1
0

Refactor success and error messages

This commit is contained in:
kolaente
2021-06-22 22:07:57 +02:00
parent ab4edc17de
commit cdc805c8da
55 changed files with 219 additions and 256 deletions

View File

@ -203,7 +203,7 @@ export default {
this.$store.commit(HAS_TASKS, r.length > 0)
})
.catch(e => {
this.error(e, this)
this.error(e)
})
},
updateTasks(updatedTask) {

View File

@ -559,7 +559,7 @@ export default {
this.setTitle(this.task.title)
})
.catch(e => {
this.error(e, this)
this.error(e)
})
.finally(() => {
this.$nextTick(() => this.visible = true)
@ -620,10 +620,10 @@ export default {
callback: undoCallback,
}]
}
this.success({message: 'The task was saved successfully.'}, this, actions)
this.success({message: 'The task was saved successfully.'}, actions)
})
.catch(e => {
this.error(e, this)
this.error(e)
})
})
},
@ -648,11 +648,11 @@ export default {
deleteTask() {
this.$store.dispatch('tasks/delete', this.task)
.then(() => {
this.success({message: 'The task has been deleted successfully.'}, this)
this.success({message: 'The task has been deleted successfully.'})
this.$router.push({name: 'list.index', params: {listId: this.task.listId}})
})
.catch(e => {
this.error(e, this)
this.error(e)
})
},
toggleTaskDone() {