wip: show pricing

This commit is contained in:
Björn Fromme
2025-09-02 16:59:55 +02:00
parent 60b655a195
commit 0e0ce254a9
19 changed files with 602 additions and 183 deletions
+5 -2
View File
@@ -16,6 +16,7 @@ class BookingService
public function __construct(
private readonly TravelDataService $travelDataService,
private readonly BookingPriceCalculatorService $priceCalculator,
) {
}
@@ -156,18 +157,20 @@ class BookingService
}
/**
* Returns a summary of selected rooms and the resulting participant count for a booking.
* Returns a summary of selected rooms, participant count, and pricing information for a booking.
*
* @return array{selectedRooms: array, participantCount: int}
* @return array{selectedRooms: array, participantCount: int, pricing: array}
*/
public function getRoomSummaryAndParticipantCount(BookingCreateDto $bookingCreateDto): array
{
$selectedRooms = $bookingCreateDto->getSelectedRooms();
$participantCount = $this->getParticipantsCount($selectedRooms, $bookingCreateDto->travel);
$pricing = $this->priceCalculator->getPricingBreakdown($bookingCreateDto);
return [
'selectedRooms' => $selectedRooms,
'participantCount' => $participantCount,
'pricing' => $pricing,
];
}