feat: align rendering of pickups field with other services
This commit is contained in:
@@ -407,12 +407,11 @@ class ParticipantFieldOptionsProvider extends AbstractFieldOptionsProvider
|
||||
$this->fieldOptionProviders['pickup'] = fn (BookingDto $bookingDto, int $participantIndex, array $options = []) => [
|
||||
'label' => 'Zu- und Ausstieg',
|
||||
'choices' => $bookingDto->travel->pickupsOutbound,
|
||||
'choice_label' => fn (?Pickup $pickup) => $this->formatPickupLabelWithPrice($pickup),
|
||||
'choice_label' => fn (?Pickup $pickup) => $pickup?->getLabel(),
|
||||
'choice_value' => 'id',
|
||||
'expanded' => false, // Dropdown for pickups
|
||||
'expanded' => true, // Radio buttons in table layout like other services
|
||||
'multiple' => false,
|
||||
'required' => true,
|
||||
'placeholder' => 'Zu- und Ausstieg auswählen',
|
||||
];
|
||||
|
||||
// Parking (conditional - only shown when outbound transportation is PKW)
|
||||
@@ -618,15 +617,6 @@ class ParticipantFieldOptionsProvider extends AbstractFieldOptionsProvider
|
||||
return sprintf('%s (€%s)', $service->label, number_format($service->price, 2, ',', '.'));
|
||||
}
|
||||
|
||||
private function formatPickupLabelWithPrice(?Pickup $pickup): string
|
||||
{
|
||||
if (null === $pickup) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $pickup->getLabelWithPrice();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the parking checkbox label with pricing information.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user