From 176d3498ce1eb1cd5458e0ae4c679987a7d3ff3b Mon Sep 17 00:00:00 2001 From: Kamil Date: Mon, 8 Jul 2024 11:29:09 +0200 Subject: [PATCH] #457 - fix: cleaning --- .../Controllers/OvertimeRequestController.php | 2 +- .../Controllers/VacationRequestController.php | 2 +- .../VacationRequest/IndexForApprovers.vue | 28 +++++++++---------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/app/Http/Controllers/OvertimeRequestController.php b/app/Http/Controllers/OvertimeRequestController.php index 2b3adc82..ba234858 100644 --- a/app/Http/Controllers/OvertimeRequestController.php +++ b/app/Http/Controllers/OvertimeRequestController.php @@ -103,7 +103,7 @@ public function indexForApprovers( $overtimeRequests = OvertimeRequest::query() ->with(["user.permissions", "user.profile"]) ->whereBelongsTo($yearPeriod) - ->whereRelation("user", fn($query) => $query->withTrashed($withTrashedUsers)) + ->whereRelation("user", fn(Builder $query): Builder => $query->withTrashed($withTrashedUsers)) ->when($user !== null, fn(Builder $query): Builder => $query->where("user_id", $user)) ->states(OvertimeRequestStatesRetriever::filterByStatusGroup($status, $request->user())) ->latest() diff --git a/app/Http/Controllers/VacationRequestController.php b/app/Http/Controllers/VacationRequestController.php index 46354dd0..f557f61f 100644 --- a/app/Http/Controllers/VacationRequestController.php +++ b/app/Http/Controllers/VacationRequestController.php @@ -110,7 +110,7 @@ public function indexForApprovers( $vacationRequests = VacationRequest::query() ->with(["vacations.user.profile", "user.permissions", "user.profile"]) ->whereBelongsTo($yearPeriod) - ->whereRelation("user", fn($query) => $query->withTrashed($withTrashedUsers)) + ->whereRelation("user", fn(Builder $query): Builder => $query->withTrashed($withTrashedUsers)) ->when($user !== null, fn(Builder $query): Builder => $query->where("user_id", $user)) ->when($type !== null, fn(Builder $query): Builder => $query->where("type", $type)) ->states(VacationRequestStatesRetriever::filterByStatusGroup($status, $request->user())) diff --git a/resources/js/Pages/VacationRequest/IndexForApprovers.vue b/resources/js/Pages/VacationRequest/IndexForApprovers.vue index e7178dea..173aab4d 100644 --- a/resources/js/Pages/VacationRequest/IndexForApprovers.vue +++ b/resources/js/Pages/VacationRequest/IndexForApprovers.vue @@ -168,6 +168,20 @@ watch(form, debounce(() => { +
+ + +
{ -
- - -