fix: directly set arrays, objects and delete directly
Not needed since vue3 uses proxies
This commit is contained in:
@ -229,7 +229,7 @@ export default {
|
||||
this.taskCommentService
|
||||
.getAll({taskId: this.taskId})
|
||||
.then(r => {
|
||||
this.$set(this, 'comments', r)
|
||||
this.comments = r
|
||||
this.makeActions()
|
||||
})
|
||||
.catch((e) => {
|
||||
@ -286,7 +286,7 @@ export default {
|
||||
.then((r) => {
|
||||
for (const c in this.comments) {
|
||||
if (this.comments[c].id === this.commentEdit.id) {
|
||||
this.$set(this.comments, c, r)
|
||||
this.comments[c] = r
|
||||
}
|
||||
}
|
||||
this.saved = this.commentEdit.id
|
||||
@ -322,12 +322,12 @@ export default {
|
||||
makeActions() {
|
||||
if (this.canWrite) {
|
||||
this.comments.forEach((c) => {
|
||||
this.$set(this.actions, c.id, [
|
||||
this.actions[c.id] = [
|
||||
{
|
||||
action: () => this.toggleDelete(c.id),
|
||||
title: this.$t('misc.delete'),
|
||||
},
|
||||
])
|
||||
]
|
||||
})
|
||||
}
|
||||
},
|
||||
|
@ -111,16 +111,16 @@ export default {
|
||||
this.listUserService.getAll({listId: this.listId}, {s: query})
|
||||
.then(response => {
|
||||
// Filter the results to not include users who are already assigned
|
||||
this.$set(this, 'foundUsers', differenceWith(response, this.assignees, (first, second) => {
|
||||
this.foundUsers = differenceWith(response, this.assignees, (first, second) => {
|
||||
return first.id === second.id
|
||||
}))
|
||||
})
|
||||
})
|
||||
.catch(e => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
clearAllFoundUsers() {
|
||||
this.$set(this, 'foundUsers', [])
|
||||
this.foundUsers = []
|
||||
},
|
||||
focus() {
|
||||
this.$refs.multiselect.focus()
|
||||
|
@ -56,14 +56,14 @@ export default {
|
||||
|
||||
this.listSerivce.getAll({}, {s: query})
|
||||
.then(response => {
|
||||
this.$set(this, 'foundLists', response)
|
||||
this.foundLists = response
|
||||
})
|
||||
.catch(e => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
clearAll() {
|
||||
this.$set(this, 'foundLists', [])
|
||||
this.foundLists = []
|
||||
},
|
||||
select(list) {
|
||||
this.list = list
|
||||
|
@ -188,7 +188,7 @@ export default {
|
||||
findTasks(query) {
|
||||
this.taskService.getAll({}, {s: query})
|
||||
.then(response => {
|
||||
this.$set(this, 'foundTasks', response)
|
||||
this.foundTasks = response
|
||||
})
|
||||
.catch(e => {
|
||||
this.$message.error(e)
|
||||
@ -203,7 +203,7 @@ export default {
|
||||
this.taskRelationService.create(rel)
|
||||
.then(() => {
|
||||
if (!this.relatedTasks[this.newTaskRelationKind]) {
|
||||
this.$set(this.relatedTasks, this.newTaskRelationKind, [])
|
||||
this.relatedTasks[this.newTaskRelationKind] = []
|
||||
}
|
||||
this.relatedTasks[this.newTaskRelationKind].push(this.newTaskRelationTask)
|
||||
this.newTaskRelationTask = null
|
||||
|
Reference in New Issue
Block a user