diff --git a/src/components/AddItemModal.vue b/src/components/AddItemModal.vue index a415bad..e3cdf06 100644 --- a/src/components/AddItemModal.vue +++ b/src/components/AddItemModal.vue @@ -24,7 +24,7 @@ export default { item: {} }), created() { - this.item = {box: this.$store.state.lastUsed.box || ''}; + this.item = {box: this.$store.state.lastUsed.box || '', cid: this.$store.state.lastUsed.cid || ''}; }, methods: { saveNewItem() { diff --git a/src/store/index.js b/src/store/index.js index 7b14eaf..f42bf3c 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -134,7 +134,7 @@ const store = new Vuex.Store({ commit('removeItem',item); }, async postItem({ commit, getters }, item) { - commit('updateLastUsed',{box: item.box}); + commit('updateLastUsed',{box: item.box, cid: item.cid}); const { data } = await axios.post(`/1/${getters.getEventSlug}/item`, item); commit('appendItem', data); }