fix: properly assign readonly state to form fields for unavailable services

This commit is contained in:
Björn Fromme
2025-12-11 12:07:19 +01:00
parent f54f66cd32
commit c1539a47f9
14 changed files with 68 additions and 140 deletions
@@ -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);
}
}