From f4d928c6aeeb3e6f6f9a9ff502a7274d32f6dfc2 Mon Sep 17 00:00:00 2001 From: Ewelina Lasowy <56546832+EwelinaLasowy@users.noreply.github.com> Date: Fri, 6 May 2022 12:29:06 +0200 Subject: [PATCH] - UX fixes (#142) * - changed homeoffice icon color * - improved list of request on dashboard * - hide holidays if no data * - fix to holidays * - fix * - made forms looks better * - hide chart when user has no vacation limit * - linter fix * - fix to pdf attachment for vacation request --- .../Http/Resources/HolidayResource.php | 2 +- resources/js/Composables/vacationTypeInfo.js | 4 +-- resources/js/Pages/Dashboard.vue | 2 +- resources/js/Pages/Holidays/Create.vue | 2 +- resources/js/Pages/Users/Create.vue | 2 +- resources/js/Pages/VacationRequest/Create.vue | 7 ++-- resources/js/Pages/VacationRequest/Show.vue | 4 +-- .../Widgets/PendingVacationRequests.vue | 33 +++++++++++-------- .../Shared/Widgets/UserVacationRequests.vue | 31 +++++++++-------- resources/js/Shared/Widgets/VacationStats.vue | 2 +- .../views/pdf/vacation-request.blade.php | 2 +- 11 files changed, 51 insertions(+), 40 deletions(-) diff --git a/app/Infrastructure/Http/Resources/HolidayResource.php b/app/Infrastructure/Http/Resources/HolidayResource.php index 4b79b09..e1d6216 100644 --- a/app/Infrastructure/Http/Resources/HolidayResource.php +++ b/app/Infrastructure/Http/Resources/HolidayResource.php @@ -16,7 +16,7 @@ class HolidayResource extends JsonResource "id" => $this->id, "name" => $this->name, "date" => $this->date->toDateString(), - "isPast" => $this->date->isPast(), + "isPast" => $this->date->endOfDay()->isPast(), "displayDate" => $this->date->toDisplayString(), "dayOfWeek" => $this->date->dayName, ]; diff --git a/resources/js/Composables/vacationTypeInfo.js b/resources/js/Composables/vacationTypeInfo.js index 65ec983..3bd73b9 100644 --- a/resources/js/Composables/vacationTypeInfo.js +++ b/resources/js/Composables/vacationTypeInfo.js @@ -85,8 +85,8 @@ const types = [ text: 'Praca zdalna', value: 'home_office', icon: HomeCityIcon, - color: 'text-blumilk-500', - border: 'border-blumilk-500', + color: 'text-lime-500', + border: 'border-lime-500', }, ] diff --git a/resources/js/Pages/Dashboard.vue b/resources/js/Pages/Dashboard.vue index c048343..e633816 100644 --- a/resources/js/Pages/Dashboard.vue +++ b/resources/js/Pages/Dashboard.vue @@ -23,7 +23,7 @@ :remote-days="remoteDays.data" /> diff --git a/resources/js/Pages/Holidays/Create.vue b/resources/js/Pages/Holidays/Create.vue index 3e22292..4b8f3c1 100644 --- a/resources/js/Pages/Holidays/Create.vue +++ b/resources/js/Pages/Holidays/Create.vue @@ -1,6 +1,6 @@