make 'Steuern' gray if already enough cox enrolled

This commit is contained in:
philipp 2023-04-17 19:37:21 +02:00
parent ac534cf690
commit 30c7637693

View File

@ -47,6 +47,8 @@
{% if day.planned_events | length > 0 %}
<div class="grid grid-cols-1 gap-3 divide-y mb-3">
{% for planned_event in day.planned_events %}
{% set amount_cur_cox = planned_event.cox | length %}
{% set amount_cox_missing = planned_event.planned_amount_cox - amount_cur_cox %}
<div class="pt-2">
<div class="flex justify-between items-center">
<div>
@ -92,7 +94,7 @@
Abmelden
</a>
{% else %}
<a href="/cox/join/{{ planned_event.id }}" class="block btn btn-gray btn-fw">
<a href="/cox/join/{{ planned_event.id }}" class="block btn {% if amount_cox_missing > 0 %} btn-dark {% else %} btn-gray {% endif %} btn-fw">
{% include "includes/cox-icon" %}
Steuern
</a>
@ -107,8 +109,6 @@
<div id="event{{ planned_event.trip_details_id }}">
{# --- START List Coxes --- #}
{% if planned_event.planned_amount_cox > 0 %}
{% set amount_cur_cox = planned_event.cox | length %}
{% 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 %}