From 1dec7be7131428b21e8641282efb1c473939f5d1 Mon Sep 17 00:00:00 2001 From: Luka Trovic Date: Thu, 31 Mar 2022 22:23:27 +0200 Subject: [PATCH 1/3] fix: show card after moving into another list Signed-off-by: Luka Trovic --- src/components/cards/CardMenu.vue | 6 +++++- src/store/card.js | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/cards/CardMenu.vue b/src/components/cards/CardMenu.vue index 5b471ea86..4df722601 100644 --- a/src/components/cards/CardMenu.vue +++ b/src/components/cards/CardMenu.vue @@ -167,10 +167,14 @@ export default { }, }) }, - moveCard() { + async moveCard() { this.copiedCard = Object.assign({}, this.card) + const boardId = this.card?.boardId ? this.card.boardId : this.$route.params.id this.copiedCard.stackId = this.selectedStack.id this.$store.dispatch('moveCard', this.copiedCard) + if (parseInt(boardId) === parseInt(this.selectedStack.boardId)) { + await this.$store.commit('addNewCard', { ...this.copiedCard }) + } this.modalShow = false }, async loadStacksFromBoard(board) { diff --git a/src/store/card.js b/src/store/card.js index 30c54b52d..6dbea6112 100644 --- a/src/store/card.js +++ b/src/store/card.js @@ -264,6 +264,9 @@ export default { Vue.set(state.cards[existingIndex], 'attachmentCount', state.cards[existingIndex].attachmentCount - 1) } }, + addNewCard(state, card) { + state.cards.push(card) + }, }, actions: { async addCard({ commit }, card) { From 19b4d0ac219c8b612f7a8d16f03b4555b186ccf6 Mon Sep 17 00:00:00 2001 From: Luka Trovic Date: Tue, 19 Apr 2022 12:21:33 +0200 Subject: [PATCH 2/3] fix: feedback Signed-off-by: Luka Trovic --- src/components/cards/CardMenu.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/cards/CardMenu.vue b/src/components/cards/CardMenu.vue index 4df722601..dde94fde2 100644 --- a/src/components/cards/CardMenu.vue +++ b/src/components/cards/CardMenu.vue @@ -136,6 +136,9 @@ export default { activeBoards() { return this.$store.getters.boards.filter((item) => item.deletedAt === 0 && item.archived === false) }, + boardId() { + return this.card?.boardId ? this.card.boardId : this.$route.params.id + } }, methods: { openCard() { @@ -169,10 +172,9 @@ export default { }, async moveCard() { this.copiedCard = Object.assign({}, this.card) - const boardId = this.card?.boardId ? this.card.boardId : this.$route.params.id this.copiedCard.stackId = this.selectedStack.id this.$store.dispatch('moveCard', this.copiedCard) - if (parseInt(boardId) === parseInt(this.selectedStack.boardId)) { + if (parseInt(this.boardId) === parseInt(this.selectedStack.boardId)) { await this.$store.commit('addNewCard', { ...this.copiedCard }) } this.modalShow = false From a8db7a90f10298b15a796ff052858df32e70787f Mon Sep 17 00:00:00 2001 From: Luka Trovic Date: Mon, 9 May 2022 19:25:41 +0100 Subject: [PATCH 3/3] fix: undefined variable in AttachmentMapper.php Signed-off-by: Luka Trovic --- lib/Db/AttachmentMapper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Db/AttachmentMapper.php b/lib/Db/AttachmentMapper.php index 46e63f7c4..67867e907 100644 --- a/lib/Db/AttachmentMapper.php +++ b/lib/Db/AttachmentMapper.php @@ -73,7 +73,7 @@ class AttachmentMapper extends DeckMapper implements IPermissionMapper { $row2 = $cursor->fetch(); $cursor->closeCursor(); if ($row2 !== false) { - throw new MultipleObjectsReturnedException('Did not expect more than one result when executing' . $query); + throw new MultipleObjectsReturnedException('Did not expect more than one result when executing' . $qb); } return $this->mapRowToEntity($row);