fix: feedback

Signed-off-by: Luka Trovic <luka@nextcloud.com>
This commit is contained in:
Luka Trovic
2022-04-19 12:21:33 +02:00
parent 00eac849fe
commit 056d54d313

View File

@@ -135,6 +135,10 @@ export default {
}, },
activeBoards() { activeBoards() {
return this.$store.getters.boards.filter((item) => item.deletedAt === 0 && item.archived === false) 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: { methods: {
@@ -169,10 +173,9 @@ export default {
}, },
async moveCard() { async moveCard() {
this.copiedCard = Object.assign({}, this.card) 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.copiedCard.stackId = this.selectedStack.id
this.$store.dispatch('moveCard', this.copiedCard) 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 }) await this.$store.commit('addNewCard', { ...this.copiedCard })
} }
this.modalShow = false this.modalShow = false