wip: selectable bus exits
This commit is contained in:
@@ -43,7 +43,8 @@ class ParticipantData
|
||||
public array $rentals = [];
|
||||
public ?Service $transportationServiceTo = null;
|
||||
public ?Service $transportationServiceFro = null;
|
||||
public ?Pickup $pickup = null;
|
||||
public ?Pickup $pickupTo = null;
|
||||
public ?Pickup $pickupFro = null;
|
||||
|
||||
#[Assert\Callback]
|
||||
public function assertBodyMeasurementsValid(ExecutionContextInterface $context): void
|
||||
@@ -77,12 +78,18 @@ class ParticipantData
|
||||
#[Assert\Callback]
|
||||
public function assertPickupSelected(ExecutionContextInterface $context): void
|
||||
{
|
||||
if (null !== $this->transportationServiceTo && null === $this->pickup) {
|
||||
if (null !== $this->transportationServiceTo && null === $this->pickupTo) {
|
||||
$context->buildViolation('Bitte auswählen')
|
||||
->atPath('pickupTo')
|
||||
->addViolation()
|
||||
;
|
||||
}
|
||||
if (null !== $this->transportationServiceFro && null === $this->pickupFro) {
|
||||
$context->buildViolation('Bitte auswählen')
|
||||
->atPath('pickupFro')
|
||||
->addViolation()
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
public static function fromPersonalData(PersonalData $personalData): static
|
||||
|
||||
Reference in New Issue
Block a user