be more precise with cox_needed

This commit is contained in:
philipp 2023-04-17 19:21:19 +02:00
parent 86745a5586
commit d9bb190301

View File

@ -108,7 +108,12 @@
{# --- START List Coxes --- #}
{% if planned_event.planned_amount_cox > 0 %}
{% set amount_cur_cox = planned_event.cox | length %}
{{ macros::box(participants=planned_event.cox, empty_seats=planned_event.planned_amount_cox - amount_cur_cox, header='Steuerleute werden benötigt', text='Keine Steuerleute angemeldet') }}
{% set amount_cox_missing = planned_event.planned_amount_cox - amount_cur_cox %}
{% if amount_cox_missing > 0 %}
{{ macros::box(participants=planned_event.cox, empty_seats=planned_event.planned_amount_cox - amount_cur_cox, header='Steuerleute werden noch benötigt', text='Keine Steuerleute angemeldet') }}
{% else %}
{{ macros::box(participants=planned_event.cox, empty_seats="", header='Genügend Steuerleute haben sich angemeldet :-)', text='Keine Steuerleute angemeldet') }}
{% endif %}
{% endif %}
{# --- END List Coxes --- #}