feat: simplify handling of ski pass service

This commit is contained in:
Björn Fromme
2026-03-16 11:59:10 +01:00
parent 3d6c94e7c5
commit 7ff10e6792
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);