chore: streamline property naming
This commit is contained in:
@@ -328,7 +328,7 @@ class ParticipantFieldOptionsProvider extends AbstractFieldOptionsProvider
|
||||
// Outbound Pickup (conditional - only shown when outbound transportation is bus)
|
||||
$this->fieldOptionProviders['pickupOutbound'] = fn (BookingDtoInterface $bookingDto, int $participantIndex, array $options = []) => [
|
||||
'label' => 'Zustieg Hinfahrt',
|
||||
'choices' => $bookingDto->travel->pickupsTo,
|
||||
'choices' => $bookingDto->travel->pickupsOutbound,
|
||||
'choice_label' => fn (?Pickup $pickup) => $this->formatPickupLabelWithPrice($pickup),
|
||||
'choice_value' => 'id',
|
||||
'expanded' => false, // Dropdown for pickups
|
||||
@@ -340,7 +340,7 @@ class ParticipantFieldOptionsProvider extends AbstractFieldOptionsProvider
|
||||
// Inbound Pickup (conditional - only shown when inbound transportation is bus)
|
||||
$this->fieldOptionProviders['pickupInbound'] = fn (BookingDtoInterface $bookingDto, int $participantIndex, array $options = []) => [
|
||||
'label' => 'Ausstieg Rückfahrt',
|
||||
'choices' => $bookingDto->travel->pickupsFro,
|
||||
'choices' => $bookingDto->travel->pickupsInbound,
|
||||
'choice_label' => fn (?Pickup $pickup) => $this->formatPickupLabelWithPrice($pickup),
|
||||
'choice_value' => 'id',
|
||||
'expanded' => false,
|
||||
|
||||
@@ -64,7 +64,7 @@ class ParticipantPickupInboundFieldHandler extends AbstractParticipantFieldHandl
|
||||
// Validate pickup selection against available inbound pickups
|
||||
$validSelection = null;
|
||||
if (null !== $selectedPickup) {
|
||||
$validSelection = $this->findValidPickup($selectedPickup, $bookingDto->travel->pickupsFro);
|
||||
$validSelection = $this->findValidPickup($selectedPickup, $bookingDto->travel->pickupsInbound);
|
||||
}
|
||||
|
||||
$participant->pickupInbound = $validSelection;
|
||||
|
||||
@@ -65,7 +65,7 @@ class ParticipantPickupOutboundFieldHandler extends AbstractParticipantFieldHand
|
||||
// Validate pickup selection against available outbound pickups
|
||||
$validSelection = null;
|
||||
if (null !== $selectedPickup) {
|
||||
$validSelection = $this->findValidPickup($selectedPickup, $bookingDto->travel->pickupsTo);
|
||||
$validSelection = $this->findValidPickup($selectedPickup, $bookingDto->travel->pickupsOutbound);
|
||||
}
|
||||
|
||||
$participant->pickupOutbound = $validSelection;
|
||||
|
||||
@@ -14,7 +14,7 @@ use App\Form\Service\Abstract\AbstractParticipantFieldHandler;
|
||||
*
|
||||
* This handler manages rental equipment selections for participants in the booking
|
||||
* creation process. It processes the rentals field from form submissions,
|
||||
* filters out age-inappropriate options and duration-inappropriate options, and
|
||||
* filters out age-inappropriate options and duration-inappropriate options, and
|
||||
* updates the participant DTO with only valid selections.
|
||||
*
|
||||
* Dependencies: dateOfBirth (for age evaluation) and skiPass (for duration filtering)
|
||||
@@ -68,7 +68,7 @@ class ParticipantRentalsFieldHandler extends AbstractParticipantFieldHandler
|
||||
if (null === $participant->skiPass) {
|
||||
// No skipass selected = clear all rental selections
|
||||
$participant->rentals = [];
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user