feat: remove room selection field entirely for single room type

addresses #869axcukn
This commit is contained in:
Björn Fromme
2026-03-16 11:59:11 +01:00
parent 38656e73c5
commit 37cda348b0
4 changed files with 56 additions and 13 deletions
+16 -8
View File
@@ -85,14 +85,22 @@
{# Room assignment #}
<div class="grid grid-cols-2 gap-4">
{{ form_row(form.assignedRoomId, {
'attr': {
'hx-trigger': 'change',
'hx-post': path(refreshRouteName, refreshRouteParams|default({index: participantIndex})),
'hx-target': '#main-content',
'hx-swap': 'innerHTML'
}
}) }}
{% if form.assignedRoomId is defined %}
{{ form_row(form.assignedRoomId, {
'attr': {
'hx-trigger': 'change',
'hx-post': path(refreshRouteName, refreshRouteParams|default({index: participantIndex})),
'hx-target': '#main-content',
'hx-swap': 'innerHTML'
}
}) }}
{% else %}
{# Display room label directly when only one room type selected (auto-assigned) #}
<div>
<label class="font-semibold mb-1 block">Zimmer</label>
<div class="text-sm text-gray-600">{{ bookingDto.singleRoomLabel }}</div>
</div>
{% endif %}
{% if form.remarksRoom is defined %}
{{ form_row(form.remarksRoom) }}
{% endif %}