feat: simplify pricing and room selection display
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user