Admin Dashboard

<%= total_players %>
Total Players
Manage Players →
<%= active_tournaments %>
Active Tournaments
Manage Tournaments →
<%= completed_tournaments %>
Completed Tournaments
View History →
<%= recent_matches.count %>
Recent Matches
Record Match →

Quick Actions

<% if defined?(current_user) && current_user %> Record Match Result <% if EuchreCamp::Services::Authorization.can?(current_user, :create_tournament) %> Create Tournament <% end %> <% if EuchreCamp::Services::Authorization.can?(current_user, :edit_any_record) %> Add Player <% end %> Upload CSV <% else %> Record Match Result <% end %>

Recent Matches

<% if recent_matches.any? %> <% recent_matches.each do |match| %> <% end %>
Match ID Team 1 Score Team 2 Date
<%= match[:id] %> <%= match[:team_1].map { |p| p[:name] }.join(' + ') %> <%= match[:score] %> <%= match[:team_2].map { |p| p[:name] }.join(' + ') %> <%= match[:played_at]&.strftime('%Y-%m-%d') || '-' %>
<% else %>

No matches recorded yet.

<% end %>