Add undo button to notification when marking a task as done
This commit is contained in:
parent
a4acfb5ef2
commit
5972476735
6 changed files with 92 additions and 34 deletions
|
|
@ -259,7 +259,14 @@
|
|||
this.taskService.update(task)
|
||||
.then(() => {
|
||||
this.sortTasks()
|
||||
this.success({message: 'The task was successfully ' + (task.done ? '' : 'un-') + 'marked as done.'}, this)
|
||||
this.success(
|
||||
{message: 'The task was successfully ' + (task.done ? '' : 'un-') + 'marked as done.'},
|
||||
this,
|
||||
[{
|
||||
title: 'Undo',
|
||||
callback: () => this.markAsDone({target: {id: e.target.id, checked: !e.target.checked}}),
|
||||
}]
|
||||
)
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e, this)
|
||||
|
|
|
|||
Reference in a new issue