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'),
|
this.$t('task.undoneSuccess'),
|
||||||
}, [{
|
}, [{
|
||||||
title: 'Undo',
|
title: 'Undo',
|
||||||
callback() {
|
callback: () => this.undoDone(checked),
|
||||||
this.task.done = !this.task.done
|
|
||||||
this.markAsDone(!checked)
|
|
||||||
},
|
|
||||||
}])
|
}])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,6 +201,11 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
undoDone(checked) {
|
||||||
|
this.task.done = !this.task.done
|
||||||
|
this.markAsDone(!checked)
|
||||||
|
},
|
||||||
|
|
||||||
async toggleFavorite() {
|
async toggleFavorite() {
|
||||||
this.task.isFavorite = !this.task.isFavorite
|
this.task.isFavorite = !this.task.isFavorite
|
||||||
this.task = await this.taskService.update(this.task)
|
this.task = await this.taskService.update(this.task)
|
||||||
|
|
|
@ -299,6 +299,7 @@ export default defineComponent({
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// FIXME: Use computed
|
||||||
sortTasks(this.tasks)
|
sortTasks(this.tasks)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue