From 6ea91397544c3ccc8cb077e0df89f12db1fb3533 Mon Sep 17 00:00:00 2001 From: Adrian Hopek Date: Mon, 21 Mar 2022 09:41:07 +0100 Subject: [PATCH] #74 - wip --- .../VacationCalendarController.php | 5 +- resources/js/Pages/Calendar.vue | 91 ++++++------------- .../js/Shared/VacationTypeCalendarIcon.vue | 7 +- 3 files changed, 33 insertions(+), 70 deletions(-) diff --git a/app/Infrastructure/Http/Controllers/VacationCalendarController.php b/app/Infrastructure/Http/Controllers/VacationCalendarController.php index c3d72a9..a347ee4 100644 --- a/app/Infrastructure/Http/Controllers/VacationCalendarController.php +++ b/app/Infrastructure/Http/Controllers/VacationCalendarController.php @@ -28,7 +28,7 @@ class VacationCalendarController extends Controller $carbonMonth = Carbon::create($yearPeriod->year, $month->toCarbonNumber()); $users = User::query() - ->where("id", "!=", $currentUser->id) + ->where("id", "!=", $currentUser->id) ->orderBy("last_name") ->orderBy("first_name") ->get(); @@ -39,7 +39,8 @@ class VacationCalendarController extends Controller return inertia("Calendar", [ "calendar" => $calendar, - "currentMonth" => $month->value, + "current" => Month::current(), + "selected" => $month->value, "users" => UserResource::collection($users), "can" => [ "generateTimesheet" => $request->user()->can("generateTimesheet"), diff --git a/resources/js/Pages/Calendar.vue b/resources/js/Pages/Calendar.vue index 9d055c0..7e70980 100644 --- a/resources/js/Pages/Calendar.vue +++ b/resources/js/Pages/Calendar.vue @@ -6,79 +6,43 @@

Kalendarz urlopów

- +
- -
- - {{ selectedMonth.name }} {{ years.current }} - - -
- - - -
- - - {{ month.name }} - - - -
-
-
-
+ Dzisiaj + - +
- + +
+ {{ selectedMonth.name }} {{ years.current }} +
+