From b39ff78a353a81acb88bb5db808a8a229ca5ba9d Mon Sep 17 00:00:00 2001 From: Robert Axelsen Date: Wed, 3 Apr 2019 10:50:55 +0200 Subject: [PATCH] TT#47516 User can remove sound file Change-Id: If09ef31e305d7358a563a8bf3a16c2ec30082c6b --- src/api/pbx-config.js | 4 + src/components/form/CscSoundFileUpload.vue | 222 ++++++++++-------- .../PbxConfiguration/CscPbxSoundGroup.vue | 11 + .../PbxConfiguration/CscPbxSoundItem.vue | 11 +- .../pages/PbxConfiguration/CscPbxSoundSet.vue | 19 +- .../PbxConfiguration/CscPbxSoundSets.vue | 32 ++- src/components/pages/Voicebox/Voicebox.vue | 14 +- src/locales/en.json | 10 +- src/store/pbx-config/actions.js | 13 +- src/store/pbx-config/getters.js | 9 +- src/store/pbx-config/mutations.js | 9 +- src/store/pbx-config/state.js | 2 +- 12 files changed, 232 insertions(+), 124 deletions(-) diff --git a/src/api/pbx-config.js b/src/api/pbx-config.js index 50bfe623..54447232 100644 --- a/src/api/pbx-config.js +++ b/src/api/pbx-config.js @@ -798,3 +798,7 @@ export function playSoundFile(options) { }); }); } + +export function removeSoundFile(id) { + return Vue.http.delete('api/soundfiles/' + id); +} diff --git a/src/components/form/CscSoundFileUpload.vue b/src/components/form/CscSoundFileUpload.vue index 8f0b9ce6..9e96cbd0 100644 --- a/src/components/form/CscSoundFileUpload.vue +++ b/src/components/form/CscSoundFileUpload.vue @@ -1,105 +1,117 @@