feat: automatically assign rooms only for unique room type selection

This commit is contained in:
Björn Fromme
2026-03-16 11:59:11 +01:00
parent 513c889926
commit 6cc5886073
6 changed files with 302 additions and 14 deletions
@@ -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, ',', '.').' €';
}
}