fix: properly assign readonly state to form fields for unavailable services
This commit is contained in:
@@ -50,13 +50,12 @@ class ParticipantTransportationOutboundFieldHandler extends AbstractParticipantF
|
||||
|
||||
$selectedTransportation = $this->getFieldValue($submittedData, $this->getFieldName());
|
||||
|
||||
// Get available outbound transportation services
|
||||
$availableServices = $bookingDto->travel->getTransportationServicesByDirection(
|
||||
DirectionMapper::OUTBOUND_TRAVEL,
|
||||
true // filter available
|
||||
// Get all outbound transportation services (availability filtering happens at form level)
|
||||
$services = $bookingDto->travel->getTransportationServicesByDirection(
|
||||
DirectionMapper::OUTBOUND_TRAVEL
|
||||
);
|
||||
|
||||
// Validate and update participant with selection
|
||||
$participant->transportationOutbound = $this->findItemById($selectedTransportation, $availableServices);
|
||||
$participant->transportationOutbound = $this->findItemById($selectedTransportation, $services);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user