From d43427623c4bb755060899423b40a6ee468a6d9a Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 5 Jul 2020 21:29:14 +0200 Subject: [PATCH] Mark tasks as done from the kanban board with ctrl+click --- src/views/list/views/Kanban.vue | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) 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