Fix id params not being named correctly

This commit is contained in:
kolaente 2020-04-17 12:19:53 +02:00
parent 588b87fb96
commit e7c1c98c6a
Signed by untrusted user who does not match committer: konrad
GPG key ID: F40E70337AB24C9B
25 changed files with 74 additions and 74 deletions

View file

@ -113,7 +113,7 @@
name: 'ListView',
data() {
return {
listID: this.$route.params.id,
listId: this.$route.params.id,
taskService: TaskService,
list: {},
isTaskEdit: false,
@ -172,11 +172,11 @@
},
editTask(id) {
// Find the selected task and set it to the current object
let theTask = this.getTaskByID(id) // Somehow this does not work if we directly assign this to this.taskEditTask
let theTask = this.getTaskById(id) // Somehow this does not work if we directly assign this to this.taskEditTask
this.taskEditTask = theTask
this.isTaskEdit = true
},
getTaskByID(id) {
getTaskById(id) {
for (const t in this.tasks) {
if (this.tasks[t].id === parseInt(id)) {
return this.tasks[t]