{% extends "layouts/base.html" %} {% block title %}{{ _('Dashboard') }} - UdeS team manager{% endblock %} {% block page_title %}{{ _('Dashboard') }}{% endblock %} {% block breadcrumb %}Home / Dashboard{% endblock %} {% block content %}
{% if user.role == 'admin' %}

{{ stats.total_users }}

{{ _('Total Users') }}

{{ stats.total_players }}

{{ _('Players') }}

{{ stats.total_tryouts }}

{{ _('Total Tryouts') }}

{{ stats.total_evaluations }}

{{ _('Evaluations') }}

{{ stats.active_tryouts }}

{{ _('Active Tryouts') }}

{{ stats.upcoming_tryouts }}

{{ _('Upcoming') }}

{{ _('Recent Users') }}

{% for u in stats.recent_users %} {% endfor %}
{{ _('Name') }}{{ _('Role') }}{{ _('Joined') }}
{{ u.username }} {{ u.role }} {{ u.created_at.strftime('%m/%d/%Y') }}

{{ _('Recent Tryouts') }}

{% for t in stats.recent_tryouts %} {% endfor %}
{{ _('Title') }}{{ _('Date') }}{{ _('Status') }}
{{ t.title }} {{ t.date.strftime('%m/%d/%Y') }} {{ t.status }}
{% if stats.upcoming_matches %}

{{ _('Upcoming Matches') }}

{% for match in stats.upcoming_matches %} {% endfor %}
{{ _('Match') }}{{ _('Tryout') }}{{ _('Date & Time') }}{{ _('Status') }}
{{ match.title }} {{ match.tryout.title }} {{ match.date.strftime('%m/%d/%Y') }} {% if match.start_time %} at {{ match.start_time.strftime('%I:%M %p') }}{% endif %} {{ match.status }}
{% endif %} {% elif user.role == 'manager' %}

{{ stats.total_tryouts }}

{{ _('My Tryouts') }}

{{ stats.active_tryouts }}

{{ _('Active') }}

{{ stats.total_evaluations }}

{{ _('My Evaluations') }}

{{ _('My Tryouts') }}

+ New Tryout
{% for t in stats.my_tryouts %} {% endfor %} {% if not stats.my_tryouts %} {% endif %}
{{ _('Title') }}{{ _('Date') }}{{ _('Status') }}{{ _('Players') }}{{ _('Actions') }}
{{ t.title }} {{ t.date.strftime('%m/%d/%Y') }} {{ t.status }} {{ t.registrations.count() }} View
No tryouts yet. Create one
{% if stats.upcoming_matches %}

{{ _('Upcoming Matches') }}

{% for match in stats.upcoming_matches %} {% endfor %}
{{ _('Match') }}{{ _('Tryout') }}{{ _('Date & Time') }}{{ _('Status') }}
{{ match.title }} {{ match.tryout.title }} {{ match.date.strftime('%m/%d/%Y') }} {% if match.start_time %} at {{ match.start_time.strftime('%I:%M %p') }}{% endif %} {{ match.status }}
{% endif %} {% elif user.role == 'coach' %}

{{ stats.my_evaluations }}

{{ _('Evaluations Done') }}

{{ stats.pending_evaluations }}

{{ _('Pending') }}

{{ _('Recent Evaluations') }}

{% for e in stats.my_recent_evaluations %} {% endfor %}
{{ _('Player') }}{{ _('Tryout') }}{{ _('Score') }}{{ _('Date') }}
{{ e.player.username }} {{ e.tryout.title }} {{ e.overall_score }} {{ e.created_at.strftime('%m/%d/%Y') }}
{% elif user.role == 'player' %}

{{ stats.my_tryouts }}

{{ _('My Tryouts') }}

{{ _('My Next Matches') }}

{% if stats.next_matches %} {% for item in stats.next_matches %} {% endfor %}
{{ _('Tryout') }}{{ _('Match') }}{{ _('Date & Time') }}{{ _('Opponent') }}
{{ item.tryout.title }} {{ item.match.title }} {{ item.match.date.strftime('%m/%d/%Y') }} {% if item.match.start_time %} at {{ item.match.start_time.strftime('%I:%M %p') }}{% endif %} {% if item.match.match_type == 'team_vs_team' and item.team %} {% if item.match.team1_id == item.team.id %} vs {{ item.match.team2.name if item.match.team2 else 'TBD' }} {% else %} vs {{ item.match.team1.name if item.match.team1 else 'TBD' }} {% endif %} {% else %} - {% endif %}
{% else %}

{{ _('No upcoming matches yet.') }}

{% endif %}

{{ _('My Registrations') }}

{% for r in stats.my_registrations %} {% endfor %}
{{ _('Tryout') }}{{ _('Date') }}{{ _('Status') }}
{{ r.tryout.title }} {{ r.tryout.date.strftime('%m/%d/%Y') }} {{ r.status }}
{% elif user.role == 'scout' %}

{{ stats.total_players }}

{{ _('Total Players') }}

{{ stats.total_evaluations }}

{{ _('Total Evaluations') }}

{{ _('Top Rated Players') }}

{% for player, score in stats.top_players %} {% endfor %} {% if not stats.top_players %} {% endif %}
#{{ _('Player') }}{{ _('Avg Score') }}
{{ loop.index }} {{ player.username }} {{ score }}
{{ _('No evaluations yet.') }}
{% endif %}
{% endblock %}