From 17a044b1185b9519d916fe5b31c97de66c2c24b6 Mon Sep 17 00:00:00 2001 From: romankko2 Date: Fri, 13 Jan 2023 15:41:57 +0100 Subject: [PATCH] [review, add time modal] --- app/public/mock/v1/tasks/(id).GET.json | 2 +- .../app/_layout/app/_components/a-header.vue | 26 +++---- .../_components/a-forgot-password-form.vue | 3 +- .../login/_components/a-login-form.vue | 3 +- .../_components/a-reset-password-form.vue | 3 +- .../tm@dashboard/_components/z-timeline.vue | 11 ++- .../_components/a-project-calendar.vue | 58 ++++++++------- .../projects/_components/a-project-filter.vue | 10 ++- .../tm@dashboard/projects/projects.vue | 39 +++++------ .../master-task/z-master-task-modal.vue | 3 +- .../sub-task/z-add-time-task-modal.vue | 70 +++++++++++++++++++ .../tm@modal/sub-task/z-sub-task-modal.vue | 7 +- .../plugins/tm@modal/team/z-team-modal.vue | 14 ++++ .../_components/z-tasks-search.vue | 3 +- .../tasks-ongoing/tasks-ongoing.vue | 42 +++++------ .../tasks-unscheduled/tasks-unscheduled.vue | 38 +++++----- app/src/plugins/tm@overview/teams/teams.vue | 5 +- .../plugins/tm@profile/profile/my-profile.vue | 12 +--- app/src/plugins/w/auth/auth.store.ts | 37 ++++------ 19 files changed, 228 insertions(+), 158 deletions(-) create mode 100644 app/src/plugins/tm@modal/sub-task/z-add-time-task-modal.vue diff --git a/app/public/mock/v1/tasks/(id).GET.json b/app/public/mock/v1/tasks/(id).GET.json index d0486a2..9147fae 100644 --- a/app/public/mock/v1/tasks/(id).GET.json +++ b/app/public/mock/v1/tasks/(id).GET.json @@ -31,7 +31,7 @@ }, "employee_id": 1, "duration": 1000000, - "remaining_time": 150, + "spent_time": 150, "is_finished": false, "starts_at": "2022-11-10T11:00:00+00:00", "ends_at": "2022-11-12T16:00:00+00:00", diff --git a/app/src/plugins/app/_layout/app/_components/a-header.vue b/app/src/plugins/app/_layout/app/_components/a-header.vue index b0cc9ed..ebc33df 100644 --- a/app/src/plugins/app/_layout/app/_components/a-header.vue +++ b/app/src/plugins/app/_layout/app/_components/a-header.vue @@ -29,11 +29,11 @@

- {{ user.user.name.charAt(0) + user.user.surname.charAt(0) }} + {{ user.name.charAt(0) + user.surname.charAt(0) }}

- {{ `${user.user.name} ${user.user.surname}` }} + {{ `${user.name} ${user.surname}` }}
@@ -41,7 +41,7 @@ - Working hours + Profil Odhlásiť sa @@ -58,6 +58,7 @@ diff --git a/app/src/plugins/tm@dashboard/projects/_components/a-project-filter.vue b/app/src/plugins/tm@dashboard/projects/_components/a-project-filter.vue index be4d4e3..abc85e1 100644 --- a/app/src/plugins/tm@dashboard/projects/_components/a-project-filter.vue +++ b/app/src/plugins/tm@dashboard/projects/_components/a-project-filter.vue @@ -17,6 +17,10 @@ + + \ No newline at end of file diff --git a/app/src/plugins/tm@modal/sub-task/z-sub-task-modal.vue b/app/src/plugins/tm@modal/sub-task/z-sub-task-modal.vue index 6c5c73d..8bb0ca8 100644 --- a/app/src/plugins/tm@modal/sub-task/z-sub-task-modal.vue +++ b/app/src/plugins/tm@modal/sub-task/z-sub-task-modal.vue @@ -241,7 +241,7 @@ -

{{ task.remaining_time }} h

+

{{ remaining_time }} h

@@ -345,8 +345,7 @@ export default { this.masterTasks = await this.$axios.get_auth_data('v1/master-tasks') this.employees = await this.$axios.get_auth_data('v1/employees') } catch (error) { - // Kravarik: Pridaj toast - console.log(error) + this.$toast(error) } }, diff --git a/app/src/plugins/tm@modal/team/z-team-modal.vue b/app/src/plugins/tm@modal/team/z-team-modal.vue index c4b72ff..8b6f485 100644 --- a/app/src/plugins/tm@modal/team/z-team-modal.vue +++ b/app/src/plugins/tm@modal/team/z-team-modal.vue @@ -120,6 +120,20 @@ export default { } }, + async create(team = null) { + if (team) { + this.team = team + await this._load() + } else { + this.team = { + name: '', + employees: [] + } + } + + this.visible = true + }, + close() { this.visible = false this.$emit('close', this.team) diff --git a/app/src/plugins/tm@overview/_components/z-tasks-search.vue b/app/src/plugins/tm@overview/_components/z-tasks-search.vue index 41be455..62082c2 100644 --- a/app/src/plugins/tm@overview/_components/z-tasks-search.vue +++ b/app/src/plugins/tm@overview/_components/z-tasks-search.vue @@ -33,8 +33,7 @@ export default { try { this.employees = await this.$axios.get_auth_data('v1/employees') } catch (error) { - // Kravarik: Pridaj toast - console.log(error) + this.$toast(error) } }, diff --git a/app/src/plugins/tm@overview/tasks-ongoing/tasks-ongoing.vue b/app/src/plugins/tm@overview/tasks-ongoing/tasks-ongoing.vue index 49cfeb5..256d04d 100644 --- a/app/src/plugins/tm@overview/tasks-ongoing/tasks-ongoing.vue +++ b/app/src/plugins/tm@overview/tasks-ongoing/tasks-ongoing.vue @@ -1,16 +1,10 @@