fix: Trigger local open card modal on the card actions

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2024-03-05 15:56:41 +01:00
parent 28f04905a3
commit 213c8c5f2f

View File

@@ -144,8 +144,14 @@ export default {
},
methods: {
openCard() {
const boardId = this.card?.boardId ? this.card.boardId : this.$route.params.id
this.$router.push({ name: 'card', params: { id: boardId, cardId: this.card.id } }).catch(() => {})
const boardId = this.card?.boardId ? this.card.boardId : this.$route?.params.id ?? this.currentBoard.id
if (this.$router) {
this.$router?.push({ name: 'card', params: { id: boardId, cardId: this.card.id } }).catch(() => {})
return
}
this.$root.$emit('open-card', this.card.id)
},
deleteCard() {
this.$store.dispatch('deleteCard', this.card)