fix: close modal after deleting card

Signed-off-by: Luutzen Dijkstra <luutzen.dijkstra@gmail.com>
This commit is contained in:
Luutzen Radiosphere
2024-12-19 01:14:54 +01:00
committed by backportbot[bot]
parent 68f18bffa1
commit 3d2485e3d5

View File

@@ -157,6 +157,9 @@ export default {
this.$store.dispatch('deleteCard', this.card) this.$store.dispatch('deleteCard', this.card)
const undoCard = { ...this.card, deletedAt: 0 } const undoCard = { ...this.card, deletedAt: 0 }
showUndo(t('deck', 'Card deleted'), () => this.$store.dispatch('cardUndoDelete', undoCard)) showUndo(t('deck', 'Card deleted'), () => this.$store.dispatch('cardUndoDelete', undoCard))
if (this.$router.currentRoute.name === 'card') {
this.$router.push({ name: 'board' })
}
}, },
changeCardDoneStatus() { changeCardDoneStatus() {
this.$store.dispatch('changeCardDoneStatus', { ...this.card, done: !this.card.done }) this.$store.dispatch('changeCardDoneStatus', { ...this.card, done: !this.card.done })