feat: always show all available ski passes but readonly if age doesn't match

This commit is contained in:
Björn Fromme
2026-03-16 12:00:56 +01:00
parent b57d849ecd
commit 1fd9f8d1f8
6 changed files with 191 additions and 18 deletions
+10 -5
View File
@@ -68,17 +68,22 @@
{% if choiceData %}
<td class="border border-primary-bg p-2 align-top w-24 text-right whitespace-nowrap">
{% if choiceData.price is defined %}
{{ choiceData.price | format_service_price }}
{% set isPkw = choiceData.subType is defined and choiceData.subType in ['PKW', 'CAR'] %}
{{ choiceData.price | format_service_price(not isPkw) }}
{% endif %}
</td>
{% endif %}
<td class="border border-primary-bg p-2 align-top w-12 text-center">
{% set childTooltip = child.vars.attr['data-tooltip']|default(null) %}
<div class="{{ html_classes({ 'cursor-not-allowed': isReadonly }) }}"{% if childTooltip is not null %} {{ stimulus_controller('tooltip', { 'content': childTooltip }) }}{% endif %}>
<div class="{{ isReadonly ? 'pointer-events-none' : '' }}">
{{- form_widget(child, { 'attr': child_attr }) -}}
{% if isReadonly or childTooltip is not null %}
<div{% if isReadonly %} class="cursor-not-allowed"{% endif %}{% if childTooltip is not null %} {{ stimulus_controller('tooltip', { 'content': childTooltip }) }}{% endif %}>
<div{% if isReadonly %} class="pointer-events-none"{% endif %}>
{{- form_widget(child, { 'attr': child_attr }) -}}
</div>
</div>
</div>
{% else %}
{{- form_widget(child, { 'attr': child_attr }) -}}
{% endif %}
</td>
</tr>
{% endfor -%}