feat: special treatment of participants with age 0-2 (babies)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user