feat: indicate family insurance eligibility

This commit is contained in:
Björn Fromme
2026-08-05 15:11:58 +02:00
parent 0b642dcfe4
commit 2cfa87f44b
12 changed files with 327 additions and 234 deletions
@@ -4,6 +4,7 @@
{% set isSubmitted = isSubmitted|default(false) %}
{% set needsAttention = needsAttention|default(false) %}
{% set attentionLabels = attentionLabels|default([]) %}
{% set hintLabel = hintLabel|default(null) %}
{% set mode = mode|default('create') %}
{# Determine display states #}
@@ -75,6 +76,13 @@
{% endif %}
</div>
{% endif %}
{# Additive informational hint - unlike attentionLabels this does not replace the
room/price line and is not styled as something the participant got wrong #}
{% if hintLabel and not isCanceled %}
<div class="mt-2 text-sm font-medium text-primary-light" {{ qa_attribute('participant-hint', index) }}>
{{ hintLabel }}
</div>
{% endif %}
</div>
<div class="flex flex-col justify-center">
{% if not isCanceled %}
@@ -551,6 +551,15 @@
</div>
{% else %}
<div class="pb-4">
{# The applicant has to choose an insurance before the dependents' dates of birth
are known, so a family insurance cannot be offered at that point. Once the
constellation qualifies, this standing hint points them back at the option. #}
{% if participantIndex == 0 and bookingCreateContext is defined and bookingCreateContext.familyInsuranceUpgradeAvailable %}
{% include '_partials/_alert.html.twig' with {
level: 'info',
messages: ['Für eure Konstellation ist auch eine Familienversicherung verfügbar und kann über die anmeldende Person gebucht werden.']
} %}
{% endif %}
<fieldset class="border border-primary-bg">
<legend class="{{ html_classes('w-full bg-primary-bg p-2 font-semibold uppercase', { 'text-red-500': form.insurance is defined and not form.insurance.vars.valid }) }}">
Reiseversicherung*
+4 -1
View File
@@ -51,7 +51,10 @@
'index': loop.index0,
'participantNumber': loop.index,
'mode': 'create',
'isSubmitted': bookingCreateContext.isSubmitted
'isSubmitted': bookingCreateContext.isSubmitted,
'hintLabel': loop.index0 == 0 and bookingCreateContext.familyInsuranceUpgradeAvailable
? 'Familienversicherung möglich - jetzt wechseln'
: null
} %}
{% endfor %}
</div>