fix: show pickup select field for outbound bus travel only

This commit is contained in:
Björn Fromme
2026-02-19 08:22:52 +01:00
parent 0884a39f3d
commit 08aaff1e2d
3 changed files with 10 additions and 22 deletions
+2 -5
View File
@@ -186,13 +186,10 @@ class EditFieldStateProvider extends AbstractFieldStateProvider
'readonly' => $transportationServicesMutabilityCondition,
];
// Pickup field (unified) - shown only when either transportation direction is BUS, readonly if pickups not mutable
// Pickup field - shown only when outbound transportation is BUS (pickup is for outbound journey), readonly if pickups not mutable
$this->fieldStateConditions['pickup'] = [
'hidden' => CompositeCondition::not(
CompositeCondition::or(
ServiceSubTypeCondition::equals('transportationOutbound', DirectionMapper::SUBTYPE_BUS_API),
ServiceSubTypeCondition::equals('transportationInbound', DirectionMapper::SUBTYPE_BUS_API)
)
ServiceSubTypeCondition::equals('transportationOutbound', DirectionMapper::SUBTYPE_BUS_API)
),
'readonly' => $pickupsMutabilityCondition,
];