1
0

fix: directly set arrays, objects and delete directly

Not needed since vue3 uses proxies
This commit is contained in:
Dominik Pschenitschni
2021-08-19 21:35:38 +02:00
parent 2b20f328cb
commit db49b9b532
33 changed files with 104 additions and 113 deletions

View File

@ -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)

View File

@ -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()