feat: special treatment of participants with age 0-2 (babies)

This commit is contained in:
Björn Fromme
2025-11-26 15:38:49 +01:00
parent 30704f936a
commit 32bef9a4e9
12 changed files with 615 additions and 15 deletions
@@ -16,7 +16,6 @@ use App\Form\Service\Factory\ParticipantRoomChoiceLoaderFactory;
use App\Service\BookingPriceCalculatorService;
use App\Service\InsuranceService;
use App\Service\ServiceAvailabilityCalculator;
use App\Validator\Constraints\RoomSelection;
/**
* Provides dynamic field options for participant form fields.
@@ -580,9 +579,9 @@ class ParticipantFieldOptionsProvider extends AbstractFieldOptionsProvider
return false;
}
// Baby rooms only available for participants 2 years or younger
if (RoomSelection::BABY_ROOM_CODE === $room->code) {
return $age <= 2;
// Baby rooms only available for participants at or under BABY_MAX_AGE
if (Constants::BABY_ROOM_CODE === $room->code) {
return $age <= Constants::BABY_MAX_AGE;
}
// All other rooms available for all ages