delete box button works, with

\confirmation
This commit is contained in:
j3d1 2023-12-29 18:22:48 +01:00
parent affd6f6c86
commit 07213bd421
3 changed files with 14 additions and 6 deletions

View file

@ -315,6 +315,10 @@ const store = new Vuex.Store({
commit('closeAddBoxModal');
});
},
async deleteBox({commit, dispatch}, box_id) {
await axios.delete(`/2/boxes/${box_id}/`);
dispatch('loadBoxes');
},
async updateItem({commit, getters}, item) {
const {data} = await axios.put(`/2/${getters.getEventSlug}/item/${item.uid}/`, item);
commit('updateItem', data);