From b0da42dbe2aec77813dca473ae1ce08f759771a0 Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Fri, 19 Mar 2021 13:25:11 +0100 Subject: [PATCH] add delete program function --- pages/player.vue | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/pages/player.vue b/pages/player.vue index 40ce248f..e343d078 100644 --- a/pages/player.vue +++ b/pages/player.vue @@ -265,6 +265,9 @@ + + + + + Delete program from {{ listDate }} + @@ -513,8 +526,18 @@ export default { } ) }, + async deletePlaylist (playlistDate) { + this.$store.commit('playlist/UPDATE_PLAYLIST', []) + const date = playlistDate.split('-') + const playlistPath = `${this.configPlayout.playlist.path}/${date[0]}/${date[1]}/${playlistDate}.json` + + await this.$axios.post('api/player/playlist/', { data: { delete: playlistPath } }) + }, showCopyModal () { this.$root.$emit('bv::show::modal', 'copy-modal') + }, + showDeleteModal () { + this.$root.$emit('bv::show::modal', 'delete-modal') } } }