From 3517c81a12008393e48bbe82d345eb020cce3701 Mon Sep 17 00:00:00 2001 From: grnd-alt Date: Tue, 6 Jan 2026 15:04:50 +0100 Subject: [PATCH] fix: add tags to card and board Signed-off-by: grnd-alt --- src/components/card/TagSelector.vue | 5 ++++- src/store/main.js | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/card/TagSelector.vue b/src/components/card/TagSelector.vue index c8953089c..2f3034d84 100644 --- a/src/components/card/TagSelector.vue +++ b/src/components/card/TagSelector.vue @@ -75,7 +75,10 @@ export default { }, methods: { onSelect(options) { - const addedLabel = options.filter(option => !this.card.labels.includes(option)) + const addedLabel = options.filter(option => !this.card.labels.includes(option) && option.id && option.color) + if (addedLabel.length == 0) { + return + } this.$emit('select', addedLabel[0]) }, onRemove(removedLabel) { diff --git a/src/store/main.js b/src/store/main.js index 1225cd062..b9620d87f 100644 --- a/src/store/main.js +++ b/src/store/main.js @@ -492,6 +492,7 @@ export default function storeFactory() { async addLabelToCurrentBoardAndCard({ dispatch, commit }, { newLabel, card }) { newLabel.boardId = this.state.currentBoard.id const label = await apiClient.createLabel(newLabel) + card.labels.push(label) commit('addLabelToCurrentBoard', label) dispatch('addLabel', { card,