From d20215929d8bc4d8c8033da7bb11afe0b832e78d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Thu, 16 Oct 2025 09:35:30 +0200 Subject: [PATCH] feat: display booked insurance in edit mode --- templates/booking/_participant_form.html.twig | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/templates/booking/_participant_form.html.twig b/templates/booking/_participant_form.html.twig index 73132fc..e4a7226 100644 --- a/templates/booking/_participant_form.html.twig +++ b/templates/booking/_participant_form.html.twig @@ -179,10 +179,23 @@ }) }}
- {# Insurance field OR assigned insurance display for dependent participants #} - {% set showBulkInsurance = participantIndex > 0 and bookingDto.participants[0].bulkInsuranceBooking %} + {# Insurance display for edit mode (read-only) #} + {% if bookingDto.mode == constant('App\\Form\\Model\\BookingDto::MODE_EDIT') and form.vars.data.insurance %} +
+ Reiseversicherung +
+ {{ form.vars.data.insurance.label }} + {% if form.vars.data.insurance.price and form.vars.data.insurance.price > 0 %} + (€{{ form.vars.data.insurance.price|number_format(2, ',', '.') }}) + {% endif %} +
+
- {% if showBulkInsurance %} + {# Insurance field OR assigned insurance display for dependent participants (create mode) #} + {% else %} + {% set showBulkInsurance = participantIndex > 0 and bookingDto.participants[0].bulkInsuranceBooking %} + + {% if showBulkInsurance %}
Reiseversicherung
@@ -221,6 +234,7 @@ {% endif %}
{% endif %} + {% endif %}