feat: simplify pricing and room selection display

This commit is contained in:
Björn Fromme
2026-04-11 18:28:32 +02:00
parent 1b0e479e49
commit ca052682bb
4 changed files with 5 additions and 79 deletions
@@ -183,30 +183,6 @@ class BookingPriceCalculatorService
return $surchargePricing;
}
/**
* Formats a price value for display with proper German formatting.
*
* @param float $price The price to format
*
* @return string Formatted price string (e.g., "123,45")
*/
public function formatPrice(float $price): string
{
return number_format($price, 2, ',', '.');
}
/**
* Formats a price with Euro symbol for display.
*
* @param float $price The price to format
*
* @return string Formatted price string with Euro symbol (e.g., "€123,45")
*/
public function formatPriceWithSymbol(float $price): string
{
return '€'.$this->formatPrice($price);
}
/**
* Aggregates all transportation-related services and pricing into separate line items.
*
-51
View File
@@ -334,18 +334,6 @@ class BookingService
return $participantsCount;
}
/**
* Calculates the number of participants assigned to each room ID.
*
* @return array<int, int> an array where the key is the room ID and the value is the count of assigned participants
*
* @deprecated Use BookingDto::getRoomAssignmentCounts() instead
*/
public function getRoomAssignmentCounts(BookingDto $bookingDto): array
{
return $bookingDto->getRoomAssignmentCounts();
}
/**
* Returns a summary of selected rooms, participant count, and pricing information for a booking.
*
@@ -424,45 +412,6 @@ class BookingService
return $groups;
}
/**
* Resets all participant room assignments in the DTO.
*
* @param BookingDto $dto The booking DTO to reset assignments for
*
* @deprecated Use BookingDto::resetParticipantAssignments() instead
*/
public function resetParticipantAssignments(BookingDto $dto): void
{
$dto->resetParticipantAssignments();
}
/**
* Creates a snapshot of the current room selection state.
*
* @return array<int, array{int, int}> Array of [roomId, quantity] pairs
*
* @deprecated Use BookingDto::createRoomSelectionSnapshot() instead
*/
public function createRoomSelectionSnapshot(BookingDto $dto): array
{
return $dto->createRoomSelectionSnapshot();
}
/**
* Checks if room selection has changed compared to a previous snapshot.
*
* @param array $oldSnapshot The baseline room selection snapshot
* @param BookingDto $newDto The current booking DTO
*
* @return bool True if room selections have changed, false otherwise
*
* @deprecated Use BookingDto::hasRoomSelectionChanged() instead
*/
public function hasRoomSelectionChanged(array $oldSnapshot, BookingDto $newDto): bool
{
return $newDto->hasRoomSelectionChanged($oldSnapshot);
}
/**
* Pre-selects default services for all participants.
*