diff --git a/src/store/index.js b/src/store/index.js index 648bf7d..4cc3a71 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -120,6 +120,10 @@ const store = new Vuex.Store({ const { data } = await axios.put(`/1/${getters.getEventSlug}/item/${item.uid}`, item); commit('updateItem', data); }, + async markItemReturned({ commit, getters }, item) { + await axios.put(`/1/${getters.getEventSlug}/item/${item.uid}`, {returned: true}); + commit('removeItem', item); + }, async deleteItem({ commit, getters }, item) { await axios.delete(`/1/${getters.getEventSlug}/item/${item.uid}`, item); commit('removeItem',item); diff --git a/src/views/Items.vue b/src/views/Items.vue index 180d548..055cc35 100644 --- a/src/views/Items.vue +++ b/src/views/Items.vue @@ -23,6 +23,9 @@ @itemActivated="openLightboxModalWith($event)" >