wip: booking process, refactor participant room assignment logic

This commit is contained in:
Björn Fromme
2025-07-22 08:52:13 +02:00
parent b3c633dccb
commit 2f5b855bae
16 changed files with 216 additions and 94 deletions
+7 -3
View File
@@ -14,7 +14,7 @@
{% set messages = messages|merge([field.vars.label ~ ': ' ~ error.message]) %}
{% endfor %}
{% endfor %}
{% include '_partials/_alert.html.twig' with { 'level': 'error', 'title': 'Teilnehmer:in ' ~ participant.index ~ ':' ~ participant.firstName ~ participant.lastName, 'messages': messages } %}
{% include '_partials/_alert.html.twig' with { 'level': 'error', 'title': 'Teilnehmer:in ' ~ (participant.index + 1) ~ ':' ~ participant.firstName ~ participant.lastName, 'messages': messages } %}
{% endif %}
{% endfor %}
{% endif %}
@@ -125,7 +125,7 @@
<div class="{{ html_classes('p-8 border rounded-md mb-4', { 'border-gray-300': child.vars.valid, 'border-red-700': not child.vars.valid }) }}" {{ stimulus_controller('toggle', {'open': child.vars.valid == false}, { 'closed': 'hidden' }) }}>
<div role="button" tabindex="0" class="flex items-center justify-between focus:outline-2 focus:outline-offset-2 focus:outline-primary-light" {{ stimulus_action('toggle', 'toggle', 'click') | stimulus_action('toggle', 'toggle', 'keydown.space') }}>
<div class="flex items-center space-x-4">
<span class="text-2xl leading-none font-semibold">Teilnehmer:in {{ participant.index }}: {{ participant.firstName }} {{ participant.lastName }}</span>
<span class="text-2xl leading-none font-semibold">Teilnehmer:in {{ participant.index + 1 }}: {{ participant.firstName }} {{ participant.lastName }}</span>
{% if participant.status == 'S' %} <span class="inline-block px-2 py-1 text-xs bg-red-700 text-white">storniert</span>{% endif %}
</div>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6" {{ stimulus_target('toggle', 'icon') }}>
@@ -188,7 +188,11 @@
Unterkunft
</h3>
{% set room = bookingData.roomForParticipant(participant.index) %}
{{ room.label }} ({{ room.individualPrice[participant.index]|format_currency('EUR') }})
{% if room %}
{{ room.label }} ({{ room.individualPrice[participant.index]|format_currency('EUR') }})
{% else %}
Keine Unterkunft zugeordnet
{% endif %}
</div>
<div class="relative">
<h3 class="text-xl font-semibold">