From b41a4380d8a332feeb7620b969413657df44f184 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 9 Feb 2020 14:46:01 +0100 Subject: [PATCH] Add a button to the task detail page to mark a task as done --- src/components/tasks/TaskDetailView.vue | 13 +++++++++++++ src/main.js | 2 ++ 2 files changed, 15 insertions(+) diff --git a/src/components/tasks/TaskDetailView.vue b/src/components/tasks/TaskDetailView.vue index e74a55d5..6565f420 100644 --- a/src/components/tasks/TaskDetailView.vue +++ b/src/components/tasks/TaskDetailView.vue @@ -192,6 +192,15 @@
+ + + + + Assign this task to a user @@ -425,6 +434,10 @@ this.error(e, this) }) }, + toggleTaskDone() { + this.task.done = !this.task.done + this.saveTask() + }, }, } diff --git a/src/main.js b/src/main.js index 6527d215..41c642ac 100644 --- a/src/main.js +++ b/src/main.js @@ -63,6 +63,7 @@ import { faPaperclip } from '@fortawesome/free-solid-svg-icons' import { faClock } from '@fortawesome/free-regular-svg-icons' import { faHistory } from '@fortawesome/free-solid-svg-icons' import { faSearch } from '@fortawesome/free-solid-svg-icons' +import { faCheckDouble } from '@fortawesome/free-solid-svg-icons' import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome' library.add(faSignOutAlt) @@ -100,6 +101,7 @@ library.add(faPaperclip) library.add(faClock) library.add(faHistory) library.add(faSearch) +library.add(faCheckDouble) Vue.component('icon', FontAwesomeIcon)