feat: pre-flight check of agency bookings

addresses #869bqxr4q
This commit is contained in:
Björn Fromme
2026-07-10 14:33:09 +02:00
parent f9142e3080
commit b41b19d4c6
26 changed files with 1818 additions and 304 deletions
+25 -7
View File
@@ -2,10 +2,13 @@
{% set isCanceled = cardData.isCanceled is defined ? cardData.isCanceled : false %}
{% set isValid = cardData.isValid is defined ? cardData.isValid : true %}
{% set isSubmitted = isSubmitted|default(false) %}
{% set needsAttention = needsAttention|default(false) %}
{% set attentionLabels = attentionLabels|default([]) %}
{% set mode = mode|default('create') %}
{# Determine display states #}
{% set showAsError = not isValid and isSubmitted %}
{% set showAsAttention = needsAttention and not showAsError %}
{% set showAsIncomplete = not isValid and not isSubmitted %}
{# Build edit URL for linking #}
@@ -17,11 +20,13 @@
<div class="py-4" id="participant-card-{{ index }}">
<div class="flex items-start space-x-4">
<div class="{{ html_classes('w-12 h-12 inline-flex flex-shrink-0 items-center justify-center rounded-full text-white font-bold', {
'bg-primary-dark': not showAsError and booking_theme() == 'base',
'bg-sbw-primary': not showAsError and booking_theme() == 'sbw',
'bg-snz-primary-dark': not showAsError and booking_theme() == 'snz',
'bg-ser-primary': not showAsError and booking_theme() == 'ser',
<div class="{{ html_classes('w-12 h-12 inline-flex flex-shrink-0 items-center justify-center rounded-full font-bold', {
'text-white': not showAsAttention,
'bg-yellow-500': showAsAttention,
'bg-primary-dark': not showAsError and not showAsAttention and booking_theme() == 'base',
'bg-sbw-primary': not showAsError and not showAsAttention and booking_theme() == 'sbw',
'bg-snz-primary-dark': not showAsError and not showAsAttention and booking_theme() == 'snz',
'bg-ser-primary': not showAsError and not showAsAttention and booking_theme() == 'ser',
'bg-red-500': showAsError,
'text-2xl': participantNumber < 100,
'text-xl': participantNumber >= 100,
@@ -37,13 +42,26 @@
{% endif %}
</div>
{% if isCanceled %}
<div class="text-xs font-medium text-gray-700" {{ qa_attribute('participant-canceled', index) }}>
<div class="text-sm font-medium text-gray-700" {{ qa_attribute('participant-canceled', index) }}>
storniert
</div>
{% elseif showAsError %}
<div class="text-xs font-medium text-red-500" {{ qa_attribute('participant-invalid', index) }}>
<div class="text-sm font-medium text-red-500" {{ qa_attribute('participant-invalid', index) }}>
unvollständige/fehlerhafte Daten
</div>
{% elseif showAsAttention %}
<div class="text-sm font-medium text-red-500" {{ qa_attribute('participant-attention', index) }}>
bitte prüfen/ergänzen:
</div>
{% if attentionLabels|length > 0 %}
<div class="mt-2 flex flex-wrap gap-1" {{ qa_attribute('participant-attention-labels', index) }}>
{% for label in attentionLabels %}
<span class="inline-flex items-center rounded-full bg-yellow-500 px-2 py-0.5 text-xs font-semibold">
{{ label }}
</span>
{% endfor %}
</div>
{% endif %}
{% else %}
<div class="text-gray-600" {{ qa_attribute('participant-room-name', index) }}>
{{ cardData.roomName }}