fix: Properly undo card deletion in the frontend
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -175,7 +175,8 @@ export default {
|
|||||||
},
|
},
|
||||||
deleteCard() {
|
deleteCard() {
|
||||||
this.$store.dispatch('deleteCard', this.card)
|
this.$store.dispatch('deleteCard', this.card)
|
||||||
showUndo(t('deck', 'Card deleted'), () => this.$store.dispatch('cardUndoDelete', this.card))
|
const undoCard = { ...this.card, deletedAt: 0 }
|
||||||
|
showUndo(t('deck', 'Card deleted'), () => this.$store.dispatch('cardUndoDelete', undoCard))
|
||||||
},
|
},
|
||||||
changeCardDoneStatus() {
|
changeCardDoneStatus() {
|
||||||
this.$store.dispatch('changeCardDoneStatus', { ...this.card, done: !this.card.done })
|
this.$store.dispatch('changeCardDoneStatus', { ...this.card, done: !this.card.done })
|
||||||
|
|||||||
Reference in New Issue
Block a user