This commit is contained in:
Adrian Hopek
2022-03-29 15:13:10 +02:00
parent 93f0151b14
commit 3c43f6814d
28 changed files with 176 additions and 144 deletions

View File

@@ -103,10 +103,7 @@ class VacationRequestController extends Controller
->paginate();
$users = User::query()
->whereRelation(
"vacationlimits",
fn(Builder $query) => $query->where("year_period_id", $yearPeriod->id)->whereNotNull("days"),
)
->withVacationLimitIn($yearPeriod)
->orderBy("last_name")
->orderBy("first_name")
->get();
@@ -164,10 +161,7 @@ class VacationRequestController extends Controller
$yearPeriod = $yearPeriodRetriever->selected();
$users = User::query()
->whereRelation(
"vacationlimits",
fn(Builder $query) => $query->where("year_period_id", $yearPeriod->id)->whereNotNull("days"),
)
->withVacationLimitIn($yearPeriod)
->orderBy("last_name")
->orderBy("first_name")
->get();