From 2875e23b96b27dbe358508a16ddecb5f40f9b28b Mon Sep 17 00:00:00 2001 From: Jakob Date: Tue, 22 Oct 2019 07:58:45 +0200 Subject: [PATCH] update assignabl Signed-off-by: Jakob --- src/store/main.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/store/main.js b/src/store/main.js index 947bd2ac5..15ad482e9 100644 --- a/src/store/main.js +++ b/src/store/main.js @@ -384,14 +384,12 @@ export default new Vuex.Store({ }, // acl actions - addAclToCurrentBoard({ commit }, newAcl) { + addAclToCurrentBoard({ dispatch, commit }, newAcl) { newAcl.boardId = this.state.currentBoard.id apiClient.addAcl(newAcl) .then((returnAcl) => { commit('addAclToCurrentBoard', returnAcl) - this.$store.dispatch('loadBoardById', newAcl.boardId).then(() => { - - }) + dispatch('loadBoardById', newAcl.boardId) }) }, updateAclFromCurrentBoard({ commit }, acl) { @@ -401,11 +399,12 @@ export default new Vuex.Store({ commit('updateAclFromCurrentBoard', acl) }) }, - deleteAclFromCurrentBoard({ commit }, acl) { + deleteAclFromCurrentBoard({ dispatch, commit }, acl) { acl.boardId = this.state.currentBoard.id apiClient.deleteAcl(acl) .then((acl) => { commit('deleteAclFromCurrentBoard', acl) + dispatch('loadBoardById', acl.boardId) }) } }