wip: show pricing
This commit is contained in:
@@ -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,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user