From a3beddf1e960ba5f9ae7caba97f30dd432ddeeb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Glasn=C3=A1k?= Date: Tue, 13 Dec 2022 00:07:20 +0100 Subject: [PATCH] [Complete task modal] Added complete task modal --- app/.gitignore | 2 + app/public/mock/v1/overview/tasks.GET.json | 62 +++++++++--------- .../tasks/_components/z-timeline.vue | 38 +++++++---- .../tm@modal/task/z-complete-task-modal.vue | 65 +++++++++++++++++++ .../tm@modal/task/z-delete-task-modal.vue | 1 - 5 files changed, 123 insertions(+), 45 deletions(-) create mode 100644 app/.gitignore create mode 100644 app/src/plugins/tm@modal/task/z-complete-task-modal.vue diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..db4c6d9 --- /dev/null +++ b/app/.gitignore @@ -0,0 +1,2 @@ +dist +node_modules \ No newline at end of file diff --git a/app/public/mock/v1/overview/tasks.GET.json b/app/public/mock/v1/overview/tasks.GET.json index c0f31b1..32751f4 100644 --- a/app/public/mock/v1/overview/tasks.GET.json +++ b/app/public/mock/v1/overview/tasks.GET.json @@ -41,67 +41,67 @@ "task_id": 1, "starts_at": "2022-12-12T08:01:00+00:00", "ends_at": "2022-12-12T09:00:00+00:00", - "title": "title", + "title": "Task 1", "project_code": "CO-2201", "master_task_color": "#E9FFE6" }, - { - "id": 1, - "task_id": 1, - "starts_at": "2022-12-12T08:30:00+00:00", - "ends_at": "2022-12-12T09:00:00+00:00", - "title": "Kratky task", - "project_code": "CO-2201", - "master_task_color": "#f27e57" - }, - - { - "id": 1, - "task_id": 1, - "starts_at": "2022-12-12T07:30:00+00:00", - "ends_at": "2022-12-12T07:45:00+00:00", - "title": "Kratky task", - "project_code": "CO-2201", - "master_task_color": "#57e0f2" - }, - { "id": 2, "task_id": 2, + "starts_at": "2022-12-12T08:30:00+00:00", + "ends_at": "2022-12-12T09:00:00+00:00", + "title": "Kratky 30min", + "project_code": "CO-2201", + "master_task_color": "#f27e57" + }, + + { + "id": 3, + "task_id": 3, + "starts_at": "2022-12-12T10:30:00+00:00", + "ends_at": "2022-12-12T10:45:00+00:00", + "title": "Kratky 15min", + "project_code": "CO-2201", + "master_task_color": "#57e0f2" + }, + + { + "id": 4, + "task_id": 4, "starts_at": "2022-12-12T08:00:00+00:00", "ends_at": "2022-12-12T10:00:00+00:00", - "title": "title", + "title": "Task 2", "project_code": "CO-2201", "master_task_color": "#FDE1FF" }, { - "id": 4, - "task_id": null, + "id": 5, + "task_id": 5, "starts_at": "2022-12-13T07:00:00+00:00", "ends_at": "2022-12-13T11:00:00+00:00", - "title": "title", + "title": "Task 5", "is_blocker": true, "master_task_color": null }, { - "id": 5, - "task_id": 1, + "id": 6, + "task_id": 6, "starts_at": "2022-12-13T09:00:00+00:00", "ends_at": "2022-12-13T12:00:00+00:00", - "title": "title", + "title": "Task 6", "project_code": "CO-2201", "master_task_color": "#E9FFE6" }, { - "id": 6, - "task_id": 2, + "id": 7, + "task_id": 7, "starts_at": "2022-12-14T12:00:00+00:00", "ends_at": "2022-12-14T16:00:00+00:00", - "title": "title", + "title": "Task 7", "project_code": "CO-2201", "master_task_color": "#E7DBF8" } diff --git a/app/src/plugins/tm@dashboard/tasks/_components/z-timeline.vue b/app/src/plugins/tm@dashboard/tasks/_components/z-timeline.vue index ab4b740..2913d92 100644 --- a/app/src/plugins/tm@dashboard/tasks/_components/z-timeline.vue +++ b/app/src/plugins/tm@dashboard/tasks/_components/z-timeline.vue @@ -13,11 +13,12 @@ :unscheduledTime="calData.unscheduled_times" :overlaps-per-time-step="false" :showTimeInCells="false" - :time-cell-height="100" + :time-cell-height="70" :min-cell-width="300" @ready="onReady()" @view-change="weekChanged" @event-drop="eventMoved" + @event-focus="eventFocused" > \ No newline at end of file diff --git a/app/src/plugins/tm@modal/task/z-delete-task-modal.vue b/app/src/plugins/tm@modal/task/z-delete-task-modal.vue index 7a93aaf..116b1f3 100644 --- a/app/src/plugins/tm@modal/task/z-delete-task-modal.vue +++ b/app/src/plugins/tm@modal/task/z-delete-task-modal.vue @@ -39,7 +39,6 @@ export default { try { await this.$axios.delete(`v1/tasks/${this.task.id}`) this.show = false - this.$emit('confirmDelete', this.task.id) } catch (error) { this.$toast.error(error) }