feat: simplify handling of ski pass service

This commit is contained in:
Björn Fromme
2025-09-19 16:19:01 +02:00
parent 29a51ed66d
commit bdc7100f74
4 changed files with 102 additions and 5 deletions
+2 -4
View File
@@ -36,10 +36,8 @@ class BookingEditDto implements BookingDtoInterface
$participantData->courses = $booking
->getAdditionalServicesForParticipantByGroup($index, Constants::TOKEN_COURSES);
// Skipass is single selection - take first item from array or null
$skipasses = $booking
->getAdditionalServicesForParticipantByGroup($index, Constants::TOKEN_SKI_PASS);
$participantData->skiPass = !empty($skipasses) ? $skipasses[0] : null;
// Skipass is single selection - use dedicated method
$participantData->skiPass = $booking->getSkiPassForParticipant($index);
$participantData->additionalServices = $booking
->getAdditionalServicesForParticipantByGroup($index, Constants::TOKEN_ADDITIONAL);