Merge remote-tracking branch 'origin/#90-user-profile' into #90-user-profile

This commit is contained in:
Adrian Hopek 2022-04-14 11:37:25 +02:00
commit 680c512d15
3 changed files with 4 additions and 4 deletions

View File

@ -54,14 +54,14 @@ class HandleInertiaRequests extends Middleware
protected function getYearsData(Request $request): Closure
{
return fn() => $request->user() ? $this->yearPeriodRetriever->links() : [];
return fn(): array => $request->user() ? $this->yearPeriodRetriever->links() : [];
}
protected function getVacationRequestsCount(Request $request): Closure
{
$user = $request->user();
return fn() => $user && $user->can("listAll", VacationRequest::class)
return fn(): ?int => $user && $user->can("listAll", VacationRequest::class)
? VacationRequest::query()
->whereBelongsTo($this->yearPeriodRetriever->selected())
->states(