feat: unify pickup selection
This commit is contained in:
@@ -179,17 +179,13 @@ class CreateFieldStateProvider extends AbstractFieldStateProvider
|
||||
),
|
||||
];
|
||||
|
||||
// Show outbound pickup only when transportation is BUS (hidden by default)
|
||||
$this->fieldStateConditions['pickupOutbound'] = [
|
||||
// Show pickup only when either outbound or inbound transportation is BUS (hidden by default)
|
||||
$this->fieldStateConditions['pickup'] = [
|
||||
'hidden' => CompositeCondition::not(
|
||||
ServiceSubTypeCondition::equals('transportationOutbound', DirectionMapper::SUBTYPE_BUS_API)
|
||||
),
|
||||
];
|
||||
|
||||
// Show inbound pickup only when transportation is BUS (hidden by default)
|
||||
$this->fieldStateConditions['pickupInbound'] = [
|
||||
'hidden' => CompositeCondition::not(
|
||||
ServiceSubTypeCondition::equals('transportationInbound', DirectionMapper::SUBTYPE_BUS_API)
|
||||
CompositeCondition::or(
|
||||
ServiceSubTypeCondition::equals('transportationOutbound', DirectionMapper::SUBTYPE_BUS_API),
|
||||
ServiceSubTypeCondition::equals('transportationInbound', DirectionMapper::SUBTYPE_BUS_API)
|
||||
)
|
||||
),
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user