From d4b82a4cc9f314781928b8d8e04f9dde36bc34ad Mon Sep 17 00:00:00 2001 From: kolaente Date: Sat, 18 Apr 2020 14:39:56 +0200 Subject: [PATCH] Add moving tasks between lists --- src/components/tasks/TaskDetailView.vue | 26 ++++++++ src/components/tasks/reusable/listSearch.vue | 69 ++++++++++++++++++++ src/main.js | 2 + src/services/list.js | 1 + 4 files changed, 98 insertions(+) create mode 100644 src/components/tasks/reusable/listSearch.vue diff --git a/src/components/tasks/TaskDetailView.vue b/src/components/tasks/TaskDetailView.vue index cd8d9eba..5a960de4 100644 --- a/src/components/tasks/TaskDetailView.vue +++ b/src/components/tasks/TaskDetailView.vue @@ -200,6 +200,21 @@ /> + +
+

+ + + + Move task to different list +

+
+
+ +
+
+
+ @@ -257,6 +272,10 @@ Add task relations + + + Move task to different list + Delete task @@ -302,10 +321,12 @@ import Reminders from './reusable/reminders' import Comments from './reusable/comments' import router from '../../router' + import ListSearch from "./reusable/listSearch"; export default { name: 'TaskDetailView', components: { + ListSearch, Reminders, RepeatAfter, RelatedTasks, @@ -350,6 +371,7 @@ labels: false, attachments: false, relatedTasks: false, + moveList: false, }, } }, @@ -486,6 +508,10 @@ this.saveTask() } }, + changeList(list) { + this.task.listId = list.id + this.saveTask() + } }, } diff --git a/src/components/tasks/reusable/listSearch.vue b/src/components/tasks/reusable/listSearch.vue new file mode 100644 index 00000000..ed4826fc --- /dev/null +++ b/src/components/tasks/reusable/listSearch.vue @@ -0,0 +1,69 @@ + + + diff --git a/src/main.js b/src/main.js index b33436ba..e300f7a6 100644 --- a/src/main.js +++ b/src/main.js @@ -67,6 +67,7 @@ import { faCheckDouble } from '@fortawesome/free-solid-svg-icons' import { faTh } from '@fortawesome/free-solid-svg-icons' import { faSort } from '@fortawesome/free-solid-svg-icons' import { faSortUp } from '@fortawesome/free-solid-svg-icons' +import { faList } from '@fortawesome/free-solid-svg-icons' import { faComments } from '@fortawesome/free-regular-svg-icons' import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome' @@ -110,6 +111,7 @@ library.add(faComments) library.add(faTh) library.add(faSort) library.add(faSortUp) +library.add(faList) Vue.component('icon', FontAwesomeIcon) diff --git a/src/services/list.js b/src/services/list.js index eae08e3f..29910056 100644 --- a/src/services/list.js +++ b/src/services/list.js @@ -8,6 +8,7 @@ export default class ListService extends AbstractService { super({ create: '/namespaces/{namespaceId}/lists', get: '/lists/{id}', + getAll: '/lists', update: '/lists/{id}', delete: '/lists/{id}', })