Add Elo rating system with match entry and CSV upload

- Implement EloCalculator service for 2v2 Euchre matches
- Create background job processing with GoodJob
- Add single match entry form
- Add CSV upload for batch match entry
- Create player rankings view
- Add database schema for matches and elo snapshots
This commit is contained in:
2026-03-26 16:28:24 -07:00
parent 1a9b3496e1
commit 1268889a78
31 changed files with 865 additions and 2 deletions
@@ -0,0 +1,36 @@
<h1>Match Administration</h1>
<p><a href="/admin/matches/new">Enter New Match</a> | <a href="/admin/matches/upload">Upload CSV</a></p>
<% if matches.any? %>
<table>
<thead>
<tr>
<th>ID</th>
<th>Date</th>
<th>Team 1</th>
<th>Score</th>
<th>Team 2</th>
<th>Score</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<% matches.each do |match| %>
<tr>
<td><%= match.id %></td>
<td><%= match.played_at&.strftime('%Y-%m-%d %H:%M') %></td>
<td><%= match.team_1_p1_id %>/<%= match.team_1_p2_id %></td>
<td><%= match.team_1_score %></td>
<td><%= match.team_2_p1_id %>/<%= match.team_2_p2_id %></td>
<td><%= match.team_2_score %></td>
<td><%= match.status %></td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<p>No matches entered yet.</p>
<% end %>
<p><a href="/admin/players">Manage Players</a></p>