Merge branch 'main' into #126-vacation-request-reminders

# Conflicts:
#	app/Domain/Actions/VacationRequest/CreateAction.php
#	app/Domain/Validation/Rules/DoesNotExceedLimitRule.php
This commit is contained in:
Adrian Hopek
2022-04-27 10:05:08 +02:00
69 changed files with 1580 additions and 218 deletions

View File

@@ -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());
}
}

View File

@@ -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,
])