feat: don't rethrow same error and handle errors globally
This commit is contained in:
parent
6f51921588
commit
3b940cb56c
71 changed files with 69 additions and 451 deletions
|
|
@ -185,14 +185,8 @@ export default {
|
|||
},
|
||||
},
|
||||
methods: {
|
||||
findTasks(query) {
|
||||
this.taskService.getAll({}, {s: query})
|
||||
.then(response => {
|
||||
this.foundTasks = response
|
||||
})
|
||||
.catch(e => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
async findTasks(query) {
|
||||
this.foundTasks = await this.taskService.getAll({}, {s: query})
|
||||
},
|
||||
addTaskRelation() {
|
||||
let rel = new TaskRelationModel({
|
||||
|
|
@ -213,9 +207,6 @@ export default {
|
|||
this.saved = false
|
||||
}, 2000)
|
||||
})
|
||||
.catch(e => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
removeTaskRelation() {
|
||||
const rel = new TaskRelationModel({
|
||||
|
|
@ -237,9 +228,6 @@ export default {
|
|||
this.saved = false
|
||||
}, 2000)
|
||||
})
|
||||
.catch(e => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
.finally(() => {
|
||||
this.showDeleteModal = false
|
||||
})
|
||||
|
|
@ -251,9 +239,6 @@ export default {
|
|||
this.newTaskRelationTask = r
|
||||
this.addTaskRelation()
|
||||
})
|
||||
.catch(e => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
relationKindTitle(kind, length) {
|
||||
return this.$tc(`task.relation.kinds.${kind}`, length)
|
||||
|
|
|
|||
Reference in a new issue