feat: automatically assign rooms only for unique room type selection
This commit is contained in:
@@ -103,6 +103,9 @@ class ParticipantCardDataService
|
||||
|
||||
/**
|
||||
* Calculate and format individual participant price.
|
||||
*
|
||||
* Returns a dash (-) when the price is zero and no room is assigned,
|
||||
* indicating incomplete configuration rather than a zero-cost booking.
|
||||
*/
|
||||
private function getFormattedPrice(BookingDto $bookingDto, int $index): string
|
||||
{
|
||||
@@ -110,6 +113,12 @@ class ParticipantCardDataService
|
||||
|
||||
$price = $prices[$index] ?? 0.0;
|
||||
|
||||
// Display dash when price is zero and no room assigned (incomplete configuration)
|
||||
$participant = $bookingDto->participants[$index] ?? null;
|
||||
if (0.0 === $price && (null === $participant || null === $participant->assignedRoomId)) {
|
||||
return '-';
|
||||
}
|
||||
|
||||
return number_format($price, 2, ',', '.').' €';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user