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

@ -361,12 +361,12 @@ export default {
})
this.taskService.create(newTask)
.then(r => {
this.success({message: 'The task was successfully created.'}, this)
this.success({message: 'The task was successfully created.'})
this.$router.push({name: 'task.detail', params: {id: r.id}})
this.closeQuickActions()
})
.catch((e) => {
this.error(e, this)
this.error(e)
})
},
newList() {
@ -380,12 +380,12 @@ export default {
})
this.listService.create(newList)
.then(r => {
this.success({message: 'The list was successfully created.'}, this)
this.success({message: 'The list was successfully created.'})
this.$router.push({name: 'list.index', params: {listId: r.id}})
this.closeQuickActions()
})
.catch((e) => {
this.error(e, this)
this.error(e)
})
},
newNamespace() {
@ -393,11 +393,11 @@ export default {
this.namespaceService.create(newNamespace)
.then(r => {
this.$store.commit('namespaces/addNamespace', r)
this.success({message: 'The namespace was successfully created.'}, this)
this.success({message: 'The namespace was successfully created.'})
this.closeQuickActions()
})
.catch((e) => {
this.error(e, this)
this.error(e)
})
},
newTeam() {
@ -408,11 +408,11 @@ export default {
name: 'teams.edit',
params: {id: r.id},
})
this.success({message: 'The team was successfully created.'}, this)
this.success({message: 'The team was successfully created.'})
this.closeQuickActions()
})
.catch((e) => {
this.error(e, this)
this.error(e)
})
},
select(parentIndex, index) {