feat: selectable drop-offs for inbound bus travel

This commit is contained in:
Björn Fromme
2026-03-16 12:03:00 +01:00
parent f8a56b7de2
commit f795a3ea21
31 changed files with 701 additions and 200 deletions
@@ -197,6 +197,25 @@ class EditFieldStateProvider extends AbstractFieldStateProvider
'readonly' => $pickupsMutabilityCondition,
];
// Show differentDropOff checkbox only when BOTH outbound and inbound are BUS, readonly if pickups not mutable
$this->fieldStateConditions['differentDropOff'] = [
'hidden' => CompositeCondition::not(
CompositeCondition::and(
ServiceSubTypeCondition::equals('transportationOutbound', DirectionMapper::SUBTYPE_BUS_API),
ServiceSubTypeCondition::equals('transportationInbound', DirectionMapper::SUBTYPE_BUS_API)
)
),
'readonly' => $pickupsMutabilityCondition,
];
// Show drop-off when inbound is BUS (options provider further gates on checkbox state in BUS+BUS)
$this->fieldStateConditions['dropOff'] = [
'hidden' => CompositeCondition::not(
ServiceSubTypeCondition::equals('transportationInbound', DirectionMapper::SUBTYPE_BUS_API)
),
'readonly' => $pickupsMutabilityCondition,
];
// Parking - shown only when outbound transportation is PKW AND participant is 18+, readonly if transportation not mutable
// Participants under 18 cannot drive in Germany, so parking is not relevant for them
$minimumDrivingAgeCondition = new AgeRangeCondition(18);