Skip to content

Commit

Permalink
#457 - fix: cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilpiech97 committed Jul 8, 2024
1 parent 0c6bfcd commit 176d349
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/OvertimeRequestController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/VacationRequestController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
Expand Down
28 changes: 14 additions & 14 deletions resources/js/Pages/VacationRequest/IndexForApprovers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,20 @@ watch(form, debounce(() => {
</ListboxOptions>
</transition>
</div>
<div class="flex items-center space-x-2 mt-3">
<input
id="withTrashedUsers"
v-model="form.withTrashedUsers"
class="left-6 top-1/2 h-4 w-4 rounded border-gray-300 text-blumilk-600 focus:ring-blumilk-500"
type="checkbox"
>
<label
class="block text-sm font-medium text-gray-700"
for="withTrashedUsers"
>
Zablokowani użytkownicy
</label>
</div>
</Listbox>
<Listbox
v-model="form.status"
Expand Down Expand Up @@ -296,20 +310,6 @@ watch(form, debounce(() => {
</transition>
</div>
</Listbox>
<div class="flex items-center space-x-2 mt-3 md:mt-0">
<input
id="withTrashedUsers"
v-model="form.withTrashedUsers"
class="left-6 top-1/2 h-4 w-4 rounded border-gray-300 text-blumilk-600 focus:ring-blumilk-500"
type="checkbox"
>
<label
class="block text-sm font-medium text-gray-700"
for="withTrashedUsers"
>
Zablokowani użytkownicy
</label>
</div>
</div>
</div>
<div class="overflow-auto xl:overflow-visible">
Expand Down

0 comments on commit 176d349

Please sign in to comment.