fix: properly handle parking service selection

This commit is contained in:
Björn Fromme committed 2026-03-16 12:01:09 +01:00
1 parent 3043842254
commit ab48b1f867
2 files changed
+20 -4

No files matched your search

@@ -124,9 +124,15 @@ class BookingDataProcessor
// Pickup location
$participantData->pickup = $booking->getPickupForParticipant($index);
// Parking (stored in form data, not in booking entity - needs special handling)
// For now, leave as false - may need to extract from transportation services
$participantData->parking = false;
// Parking service (for self-organized PKW transportation)
$parkingServices = $booking->getAdditionalServicesForParticipantByGroup($index, Constants::TOKEN_PARKING);
if (false === empty($parkingServices)) {
$participantData->parking = true;
$participantData->parkingService = reset($parkingServices);
} else {
$participantData->parking = false;
$participantData->parkingService = null;
}
// License plate (not stored in booking entity)
$participantData->licensePlate = null;
@@ -213,6 +219,11 @@ class BookingDataProcessor
$participant->rentalInsurance = $travel->additionalServices[$participant->rentalInsurance->id];
}
// Enrich parking service
if (null !== $participant->parkingService && isset($travel->additionalServices[$participant->parkingService->id])) {
$participant->parkingService = $travel->additionalServices[$participant->parkingService->id];
}
// Enrich transportation services
if (null !== $participant->transportationOutbound && isset($travel->transportationServices[$participant->transportationOutbound->id])) {
$participant->transportationOutbound = $travel->transportationServices[$participant->transportationOutbound->id];