{% load lucide %} {% comment %} The club table, shared by the dashboard and the clubs list so the two cannot drift apart. Health, not vanity: a member total says nothing you can act on, while "no coach", "nothing scheduled", "€ owed" and "no admins" each name something somebody has to go and fix. Every column is annotated by clubs_with_health() in a single query. Expects: clubs (from clubs_with_health), and optionally empty_message. {% endcomment %}
{% for club in clubs %} {% empty %} {% endfor %}
Club Members Admins Teams Events Plan Dues Plan end
{% if club.logo %} {{ club.name }} {% else %}
{{ club.initials }}
{% endif %}
{{ club.name }}
{{ club.slug }}.rosterchief.app · {{ club.get_sport_type_display }}
{% if club.is_archived %} {% lucide "archive" size=12 %} Archived {% else %} {% if not club.has_season %} {% lucide "calendar-x" size=12 %} No seasons {% endif %} {% if not club.upcoming_events %} {% lucide "moon-star" size=12 %} Dormant {% endif %} {% endif %}
{{ club.active_members }}
{% if not club.admin_count %} {% lucide "triangle-alert" size=14 %} {% endif %} {{ club.admin_count }}
{{ club.team_count }} {{ club.upcoming_events }} {{ club.plan_name|lower|default:"—" }}
{% if not club.dues_owed %} {% if club.plan_name %} {% comment %} Not owing and on a plan. covered_until is the settled period's end — the day grace would start if nothing renews — shown on its own row under the badge, for a paid period AND a waived one (both cover the club, they just differ in how). No covered period at all (only cancelled dues, say) shows a dash. {% endcomment %} {% if club.covered_status == "waived" %} Waived {% elif club.covered_until %} Paid {% else %} {% endif %} {% else %} {% endif %} {% else %} €{{ club.dues_owed|floatformat:2 }} {% if club.dues_grace_until < today %} Overdue {% elif club.dues_period_end < today %} Grace {% endif %} {% endif %}
{{ club.covered_until|date:"j M Y"|default:"—" }} {% lucide "pencil" size=12 %} Edit
{{ empty_message|default:"No clubs yet." }}