feat: pre-flight check of agency bookings

addresses #869bqxr4q
This commit is contained in:
Björn Fromme committed 2026-07-10 14:33:09 +02:00
1 parent f9142e3080
commit b41b19d4c6
26 files changed
+1818 -304

No files matched your search

@@ -15,6 +15,7 @@ use App\Form\Model\ParticipantDto;
use App\Form\Model\RoomSelectionDto;
use App\Service\BookingPriceCalculator;
use App\Service\InsuranceManager;
use function Symfony\Component\String\u;
/**
* Processes booking form data and converts it into BusProNet API payload format.
@@ -78,7 +79,7 @@ class BookingDataProcessor
// Copy address if first participant has no street (indicating empty/incomplete address)
$isEmpty = null === $participantData->address
|| null === $participantData->address->street
|| '' === trim($participantData->address->street);
|| u($participantData->address->street)->trim()->isEmpty();
if ($isEmpty) {
$participantData->address = clone $booking->applicant->address;
@@ -155,6 +156,9 @@ class BookingDataProcessor
// Enrich services with data from travel (especially prices)
$this->enrichParticipantServicesFromTravel($participantData, $travel);
// Normalize loaded participant data so the edit flow sees canonical values.
$participantData->normalizeLoadedData();
$dto->participants[$index] = $participantData;
}