<%= tournament.name %>

<% if tournament.description %>

<%= tournament.description %>

<% end %>
Format: <%= tournament.format %> | Status: <%= tournament.status %> | <% if tournament.event_date %> Date: <%= tournament.event_date.strftime('%Y-%m-%d %H:%M') %> <% end %>

Participants

<% if players.any? %>

Total: <%= players.count %> players registered

<% players.each do |player| %> <% participant = participants.find { |p| p.player_id == player.id } %> <% end %>
Player Status Seed Actions
<%= player.name %> <%= participant&.status || 'registered' %> <%= participant&.seed || '-' %>
<% else %>

No participants registered yet.

<% end %>

Add Participants

<% if available_players.any? %>
<% else %>

All available players are already registered.

<% end %>

Teams

<% if teams.any? %>

Total: <%= teams.count %> teams

<% teams.each do |team| %> <% p1 = players.find { |p| p.id == team.player_1_id } %> <% p2 = players.find { |p| p.id == team.player_2_id } %> <% end %>
Team Name Player 1 Player 2 Actions
<%= team.team_name %> <%= p1&.name || team.player_1_id %> <%= p2&.name || team.player_2_id %> Edit |
<% else %>

No teams created yet.

<% end %>

Create Teams

<% if players.any? %>
<% else %>

Add participants first before creating teams.

<% end %>

Rounds & Schedule

<% if rounds.any? %> <% rounds.each do |round| %> <% end %>
Round Status Actions
Round <%= round.round_number %> <%= round.status %> View
<% else %>

No rounds scheduled yet.

<% end %> <% if teams.any? %>
<% else %>

Add teams first to generate the schedule.

<% end %>

Standings

<% if teams.any? %> <% teams.each_with_index do |team, i| %> <% end %>
# Team W L PCT PF PA PD
<%= i + 1 %> <%= team.team_name %> 0 0 .000 0 0 0
<% else %>

No teams to display standings.

<% end %>

Enter Match Results | Complete Tournament | Back to Tournaments