wip: insurance booking
This commit is contained in:
@@ -13,7 +13,6 @@ use App\Form\Model\BookingCreateDto;
|
||||
use App\Form\Model\BookingDtoInterface;
|
||||
use App\Form\Service\Abstract\AbstractFieldOptionsProvider;
|
||||
use App\Form\Service\Factory\ParticipantRoomChoiceLoaderFactory;
|
||||
use App\Form\Service\ServiceAgeEvaluator;
|
||||
use App\Service\InsuranceMatchingService;
|
||||
use App\Service\ServiceAvailabilityCalculator;
|
||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
@@ -591,7 +590,7 @@ class ParticipantFieldOptionsProvider extends AbstractFieldOptionsProvider
|
||||
private function getParkingCheckboxLabel(array $parkingServices): string
|
||||
{
|
||||
if (empty($parkingServices)) {
|
||||
return 'Parkplatz';
|
||||
return Constants::SERVICE_LABELS[Constants::TOKEN_PARKING];
|
||||
}
|
||||
|
||||
$parkingService = reset($parkingServices); // Get the first (and only) parking service
|
||||
@@ -681,7 +680,7 @@ class ParticipantFieldOptionsProvider extends AbstractFieldOptionsProvider
|
||||
private function getRentalInsuranceCheckboxLabel(array $rentalInsuranceServices): string
|
||||
{
|
||||
if (empty($rentalInsuranceServices)) {
|
||||
return 'Leihmaterial-Versicherung';
|
||||
return Constants::SERVICE_LABELS[Constants::TOKEN_RENTAL_INSURANCE];
|
||||
}
|
||||
$rentalInsuranceService = reset($rentalInsuranceServices); // Get the first (and only) rental insurance service
|
||||
|
||||
@@ -751,15 +750,9 @@ class ParticipantFieldOptionsProvider extends AbstractFieldOptionsProvider
|
||||
$label .= sprintf(' (€%s)', number_format($insurance->price, 2, ',', '.'));
|
||||
}
|
||||
|
||||
// Add type information if available
|
||||
if (null !== $insurance->subType) {
|
||||
$typeLabel = match ($insurance->subType) {
|
||||
'RRV' => 'Reiserücktrittsversicherung',
|
||||
'PAK' => 'Reiseschutz',
|
||||
'OHN' => 'Selbstbehalt',
|
||||
default => $insurance->subType,
|
||||
};
|
||||
$label .= sprintf(' (%s)', $typeLabel);
|
||||
// Add type information if available using centralized mapping
|
||||
if (null !== $insurance->subType && isset(Constants::INSURANCE_LABELS[$insurance->subType])) {
|
||||
$label .= sprintf(' (%s)', Constants::INSURANCE_LABELS[$insurance->subType]);
|
||||
}
|
||||
|
||||
return $label;
|
||||
|
||||
Reference in New Issue
Block a user