Move everything to models and services #17
|
@ -83,11 +83,14 @@ export default class ListModel extends AbstractModel {
|
|||
return {} // FIXME: This should probably throw something to make it clear to the user noting was found
|
||||
}
|
||||
|
||||
/**
|
||||
* Loops through all tasks and updates the one with the id it has
|
||||
* @param task
|
||||
*/
|
||||
updateTaskByID(task) {
|
||||
for (const t in this.tasks) {
|
||||
if (this.tasks[t].id === task.id) {
|
||||
this.tasks[t] = task
|
||||
//this.$set(this.list.tasks, t, this.fixStuffComingFromAPI(updatedTask))
|
||||
break
|
||||
}
|
||||
|
||||
|
@ -95,7 +98,6 @@ export default class ListModel extends AbstractModel {
|
|||
for (const s in this.tasks[t].subtasks) {
|
||||
if (this.tasks[t].subtasks[s].id === task.id) {
|
||||
this.tasks[t].subtasks[s] = task
|
||||
//this.$set(this.list.tasks[t].subtasks, s, updatedTask)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
|
Reference in New Issue
Block a user