fix: undo task done from list view
This commit is contained in:
parent
7b62a0895d
commit
051dd98ff7
2 changed files with 7 additions and 4 deletions
|
@ -190,10 +190,7 @@ export default {
|
|||
this.$t('task.undoneSuccess'),
|
||||
}, [{
|
||||
title: 'Undo',
|
||||
callback() {
|
||||
this.task.done = !this.task.done
|
||||
this.markAsDone(!checked)
|
||||
},
|
||||
callback: () => this.undoDone(checked),
|
||||
}])
|
||||
}
|
||||
|
||||
|
@ -204,6 +201,11 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
undoDone(checked) {
|
||||
this.task.done = !this.task.done
|
||||
this.markAsDone(!checked)
|
||||
},
|
||||
|
||||
async toggleFavorite() {
|
||||
this.task.isFavorite = !this.task.isFavorite
|
||||
this.task = await this.taskService.update(this.task)
|
||||
|
|
|
@ -299,6 +299,7 @@ export default defineComponent({
|
|||
break
|
||||
}
|
||||
}
|
||||
// FIXME: Use computed
|
||||
sortTasks(this.tasks)
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue