#116 - cr fix
This commit is contained in:
@@ -16,6 +16,6 @@ class CalculateVacationDaysController extends Controller
|
||||
{
|
||||
$days = $calculator->calculateDays($request->from(), $request->to());
|
||||
|
||||
return new JsonResponse($days->map(fn(Carbon $day) => $day->toDateString())->all());
|
||||
return new JsonResponse($days->map(fn(Carbon $day): string => $day->toDateString())->all());
|
||||
}
|
||||
}
|
||||
|
@@ -21,8 +21,8 @@ class GetAvailableVacationTypesController extends Controller
|
||||
$user = User::query()->find($request->get("user"));
|
||||
|
||||
$types = VacationType::all()
|
||||
->filter(fn(VacationType $type) => $configRetriever->isAvailableFor($type, $user->profile->employment_form))
|
||||
->map(fn(VacationType $type) => [
|
||||
->filter(fn(VacationType $type): bool => $configRetriever->isAvailableFor($type, $user->profile->employment_form))
|
||||
->map(fn(VacationType $type): array => [
|
||||
"label" => $type->label(),
|
||||
"value" => $type->value,
|
||||
])
|
||||
|
Reference in New Issue
Block a user