fix: properly handle 'veg' services in booking edit flow
This commit is contained in:
1 parent
287c299c41
commit
c0c8ad515c
9 files changed
+89
-4
No files matched your search
@@ -105,6 +105,9 @@ class BookingDataProcessor
|
||||
$participantData->board = $booking
|
||||
->getAdditionalServicesForParticipantByGroup($index, Constants::TOKEN_BOARD);
|
||||
|
||||
$vegServices = $booking->getAdditionalServicesForParticipantByGroup($index, Constants::TOKEN_VEG);
|
||||
$participantData->veg = false === empty($vegServices) ? reset($vegServices) : null;
|
||||
|
||||
$participantData->rentals = $booking
|
||||
->getAdditionalServicesForParticipantByGroup($index, Constants::TOKEN_RENTALS);
|
||||
|
||||
@@ -211,6 +214,11 @@ class BookingDataProcessor
|
||||
}
|
||||
}
|
||||
|
||||
// Enrich veg
|
||||
if (null !== $participant->veg && isset($travel->additionalServices[$participant->veg->id])) {
|
||||
$participant->veg = $travel->additionalServices[$participant->veg->id];
|
||||
}
|
||||
|
||||
// Enrich rentals
|
||||
foreach ($participant->rentals as $key => $rental) {
|
||||
if (isset($travel->additionalServices[$rental->id])) {
|
||||
|
||||
Reference in new issue
Block a user