From 6bcbd59362ea296dc766d3b2fac75b164c885329 Mon Sep 17 00:00:00 2001 From: jedi Date: Wed, 1 Jan 2020 22:13:09 +0100 Subject: [PATCH] second shitty fix --- src/components/AddItemModal.vue | 2 +- src/store/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); }