Move everything to models and services #17

Merged
konrad merged 82 commits from refactor/models into master 2019-03-02 10:25:10 +00:00
Showing only changes of commit d18167a1fe - Show all commits

View File

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