{% extends "layouts/base.html" %} {% block title %}Team Matches - UdeS team manager{% endblock %} {% block page_title %}Team Matches{% endblock %} {% block breadcrumb %}Home / Team Matches{% endblock %} {% block header_actions %} {% if teams %}
{% endif %} {% endblock %} {% block content %} {% if match_data %}
{% for item in match_data %} {% set m = item.match %} {% endfor %}
Match Team Opponent Date Time Location Presence Status Actions
{{ m.title }} {{ m.org_team.name }} {% if m.opponent %} {{ m.opponent }} {% else %} Practice {% endif %} {{ m.date.strftime('%m/%d/%Y') }} {% if m.start_time and m.end_time %} {{ m.start_time.strftime('%H:%M') }} - {{ m.end_time.strftime('%H:%M') }} {% else %} TBD {% endif %} {{ m.location or '—' }} {% if item.total_count > 0 %}
{% set pct = (item.confirmed_count / item.total_count * 100) | int %}
{% if item.confirmed_count == item.total_count and item.total_count > 0 %} ✅ {{ item.confirmed_count }}/{{ item.total_count }} {% elif item.confirmed_count > 0 %} ⏳ {{ item.confirmed_count }}/{{ item.total_count }} {% else %} ❌ 0/{{ item.total_count }} {% endif %}
{% for p in item.participants %} {{ p.player.username[:2] | upper }} {{ p.player.username }} {% if p.is_confirmed %}✅{% else %}⏳{% endif %} {% endfor %}
{% else %} {% endif %}
{{ m.status }} {% set can_manage_this = (current_user.role in ['admin', 'manager']) or (current_user.role == 'coach' and m.org_team.coaches.filter_by(id=current_user.id).first()) or (current_user.role == 'coach' and m.org_team.coach_id == current_user.id) %} {% if can_manage_this %}
{% endif %} {% if current_user.role == 'player' %} {% for p in item.participants %} {% if p.player.id == current_user.id %} {% endif %} {% endfor %} {% endif %}
{% else %}

No Team Matches

Regular season matches have not been scheduled yet.

{% if teams %}
{% endif %}
{% endif %} {% endblock %}