feat: bulk insurance booking by applicant
This commit is contained in:
@@ -183,14 +183,49 @@
|
||||
'hx-swap': 'none'
|
||||
}
|
||||
}) }}
|
||||
|
||||
{{ _self.service_field(participant, 'insurance', 'Reiseversicherung', {
|
||||
'attr': {
|
||||
'hx-trigger': 'change',
|
||||
'hx-post': path('app_booking_create_step_2_refresh'),
|
||||
'hx-swap': 'none'
|
||||
}
|
||||
}) }}
|
||||
|
||||
{# Insurance field OR assigned insurance display for dependent participants #}
|
||||
{% set participantData = participant.vars.data %}
|
||||
{% set showBulkInsurance = loop.index > 1 and form.vars.data.participants[0].bulkInsuranceBooking %}
|
||||
|
||||
{% if showBulkInsurance %}
|
||||
<fieldset class="mb-1">
|
||||
<legend class="font-semibold mb-1">Reiseversicherung</legend>
|
||||
<div class="text-sm text-gray-600">
|
||||
{% if participantData.insurance %}
|
||||
{{ participantData.insurance.label }}
|
||||
{% if participantData.insurance.price and participantData.insurance.price > 0 %}
|
||||
<span class="text-gray-500">(€{{ participantData.insurance.price|number_format(2, ',', '.') }})</span>
|
||||
{% endif %}
|
||||
<span class="italic text-gray-500 ml-2">– wie Anmelder</span>
|
||||
{% else %}
|
||||
<span class="italic">wie Anmelder</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</fieldset>
|
||||
{% else %}
|
||||
<fieldset class="mb-1">
|
||||
<legend class="font-semibold mb-1">Reiseversicherung</legend>
|
||||
|
||||
{# Bulk insurance booking checkbox (applicant only) #}
|
||||
{% if participant.bulkInsuranceBooking is defined %}
|
||||
{{ form_row(participant.bulkInsuranceBooking) }}
|
||||
{% endif %}
|
||||
|
||||
{% if participant.insurance is defined %}
|
||||
{{ form_row(participant.insurance, {
|
||||
'attr': {
|
||||
'hx-trigger': 'change',
|
||||
'hx-post': path('app_booking_create_step_2_refresh'),
|
||||
'hx-swap': 'none'
|
||||
},
|
||||
'label': false
|
||||
}) }}
|
||||
{% else %}
|
||||
<div class="text-sm text-gray-500">Nicht wählbar</div>
|
||||
{% endif %}
|
||||
</fieldset>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{# Transportation Services Section #}
|
||||
|
||||
Reference in New Issue
Block a user