fix: directly set arrays, objects and delete directly
Not needed since vue3 uses proxies
This commit is contained in:
@ -206,7 +206,7 @@ export default {
|
||||
})
|
||||
const tasks = r.filter(t => t.dueDate !== null).concat(r.filter(t => t.dueDate === null))
|
||||
|
||||
this.$set(this, 'tasks', tasks)
|
||||
this.tasks = tasks
|
||||
})
|
||||
.catch(e => {
|
||||
this.$message.error(e)
|
||||
@ -215,7 +215,7 @@ export default {
|
||||
updateTasks(updatedTask) {
|
||||
for (const t in this.tasks) {
|
||||
if (this.tasks[t].id === updatedTask.id) {
|
||||
this.$set(this.tasks, t, updatedTask)
|
||||
this.tasks[t] = updatedTask
|
||||
// Move the task to the end of the done tasks if it is now done
|
||||
if (updatedTask.done) {
|
||||
this.tasks.splice(t, 1)
|
||||
|
@ -561,7 +561,7 @@ export default {
|
||||
this.taskId = Number(this.$route.params.id)
|
||||
this.taskService.get({id: this.taskId})
|
||||
.then(r => {
|
||||
this.$set(this, 'task', r)
|
||||
this.task = r
|
||||
this.$store.commit('attachments/set', r.attachments)
|
||||
this.taskColor = this.task.hexColor
|
||||
this.setActiveFields()
|
||||
|
Reference in New Issue
Block a user