From 2150f464cd150028adb74fa1f5a7c328ce54b3de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Kalu=C5=BEa?= Date: Fri, 2 Dec 2022 17:24:59 +0100 Subject: [PATCH] [tasks overview] praca s datami --- app/public/mock/v1/overview/tasks.GET.json | 116 ++++++++---------- .../app@vendor/vue-cal/weekdays-headings.vue | 2 +- .../tasks/_components/a-tasks-filter.vue | 30 +++-- .../tasks/_components/z-timeline.vue | 49 +++----- app/src/plugins/tm@dashboard/tasks/tasks.vue | 26 +++- 5 files changed, 119 insertions(+), 104 deletions(-) diff --git a/app/public/mock/v1/overview/tasks.GET.json b/app/public/mock/v1/overview/tasks.GET.json index 7503eae..7830668 100644 --- a/app/public/mock/v1/overview/tasks.GET.json +++ b/app/public/mock/v1/overview/tasks.GET.json @@ -1,72 +1,64 @@ { "data": { - "user": { - "id": 1, - "name": "Matej", - "surname": "Glasnak", - "work_hours_from": "08:00", - "work_hours_to": "16:00" - }, - + "id": 1, + "name": "Matej", + "surname": "Glasnak", + "work_hours_from": "08:00", + "work_hours_to": "19:00", "unscheduled_time": 123123123, + "dates": [ + { + "id": 1, + "task_id": 1, + "starts_at": "2022-11-28T09:00:00+00:00", + "ends_at": "2022-11-29T12:00:00+00:00", + "title": "title", + "project_code": "CO-2201", + "master_task_color": "#121212", + "class": "red" + }, - "dates": { - "2022-11-13": [ - { - "id": 1, - "task_id": 1, - "starts_at": "2022-11-28T09:00:00+00:00", - "ends_at": "2022-11-29T12:00:00+00:00", - "title": "title", - "project_code": "CO-2201", - "master_task_color": "#121212", - "class": "red" - }, + { + "id": 2, + "task_id": 2, + "starts_at": "2022-12-01T12:00:00+00:00", + "ends_at": "2022-12-02T16:00:00+00:00", + "title": "title", + "project_code": "CO-2201", + "master_task_color": "#121212", + "style": "bakcground: red" + }, - { - "id": 2, - "task_id": 2, - "starts_at": "2022-12-01T12:00:00+00:00", - "ends_at": "2022-12-02T16:00:00+00:00", - "title": "title", - "project_code": "CO-2201", - "master_task_color": "#121212", - "style": "bakcground: red" - }, + { + "id": 4, + "task_id": null, + "starts_at": "2022-11-10T16:00:00+00:00", + "ends_at": "2022-11-12T18:00:00+00:00", + "title": "title", + "is_blocker": true, + "master_task_color": null + }, - { - "id": 4, - "task_id": null, - "starts_at": "2022-11-10T16:00:00+00:00", - "ends_at": "2022-11-12T18:00:00+00:00", - "title": "title", - "is_blocker": true, - "master_task_color": null - } - ], + { + "id": 5, + "task_id": 1, + "starts_at": "2022-11-10T09:00:00+00:00", + "ends_at": "2022-11-12T12:00:00+00:00", + "title": "title", + "project_code": "CO-2201", + "master_task_color": "#121212" + }, - "2022-12-10": [ - { - "id": 5, - "task_id": 1, - "starts_at": "2022-11-10T09:00:00+00:00", - "ends_at": "2022-11-12T12:00:00+00:00", - "title": "title", - "project_code": "CO-2201", - "master_task_color": "#121212" - }, - - { - "id": 6, - "task_id": 2, - "starts_at": "2022-11-10T12:00:00+00:00", - "ends_at": "2022-11-12T16:00:00+00:00", - "title": "title", - "project_code": "CO-2201", - "master_task_color": "#121212" - } - ] - } + { + "id": 6, + "task_id": 2, + "starts_at": "2022-11-10T12:00:00+00:00", + "ends_at": "2022-11-12T16:00:00+00:00", + "title": "title", + "project_code": "CO-2201", + "master_task_color": "#121212" + } + ] }, "status": 200 } \ No newline at end of file diff --git a/app/src/plugins/app@vendor/vue-cal/weekdays-headings.vue b/app/src/plugins/app@vendor/vue-cal/weekdays-headings.vue index 2db2834..37a01ce 100644 --- a/app/src/plugins/app@vendor/vue-cal/weekdays-headings.vue +++ b/app/src/plugins/app@vendor/vue-cal/weekdays-headings.vue @@ -4,7 +4,7 @@ template(v-for="(heading, i) in headings" :key="i") .vuecal__flex.vuecal__heading( v-if="!heading.hide" - :class="{ today: heading.today, clickable: cellHeadingsClickable }" + :class="{ today: heading.today, clickable: cellHeadingsClickable, 'yesterday-cell' : new Date(heading.date).toLocaleDateString('sk-SK') == new Date(new Date().setDate(new Date().getDate() - 1)).toLocaleDateString('sk-SK') }" :style="weekdayCellStyles" @click="view.id === 'week' && selectCell(heading.date, $event)" @dblclick="view.id === 'week' && vuecal.dblclickToNavigate && switchToNarrowerView()") diff --git a/app/src/plugins/tm@dashboard/tasks/_components/a-tasks-filter.vue b/app/src/plugins/tm@dashboard/tasks/_components/a-tasks-filter.vue index da0889d..0657aa2 100644 --- a/app/src/plugins/tm@dashboard/tasks/_components/a-tasks-filter.vue +++ b/app/src/plugins/tm@dashboard/tasks/_components/a-tasks-filter.vue @@ -8,7 +8,7 @@ variant="outlined" >
- + - +