diff --git a/src/views/list/views/Kanban.vue b/src/views/list/views/Kanban.vue index 6e7ea730..673b75e7 100644 --- a/src/views/list/views/Kanban.vue +++ b/src/views/list/views/Kanban.vue @@ -41,16 +41,17 @@ drag-handle-selector=".task.draggable" > - Done @@ -100,7 +101,7 @@ - + @@ -329,6 +330,16 @@ }) } }, + markTaskAsDone(task) { + task.done = !task.done + this.$store.dispatch('tasks/update', task) + .catch(e => { + this.error(e, this) + }) + .finally(() => { + this.$set(this.taskUpdating, task.id, false) + }) + }, getTaskPayload(bucketId) { return index => { const bucket = this.buckets[filterObject(this.buckets, b => b.id === bucketId)] @@ -380,7 +391,7 @@ this.error(e, this) }) .finally(() => { - if(!this.$refs[`tasks-container${task.bucketId}`][0]) { + if (!this.$refs[`tasks-container${task.bucketId}`][0]) { return } this.$refs[`tasks-container${task.bucketId}`][0].scrollTop = this.$refs[`tasks-container${task.bucketId}`][0].scrollHeight