fix(tournaments): the manager runs the tournaments the game actually plays
Create and edit write real el3ab_tournaments columns. Edit used to send
organization_id, rounds_count, entry_fee, prize_pool, start_date and
end_date (none exist) and complete sent completed_at, so PostgREST rejected
both and the page said saved. The form now also covers name_ar, min_players,
min/max rating, is_rated, auto_start, the registration window and a real
prize distribution ([{place, coins}]), validates them, and reads and writes
times in Cairo (stored as UTC, DST included). Editing is allowed while
registration is open; the edit page no longer crashes on phase_config.
No more Swiss linking on create: picking an organisation used to create a
Swiss-service tournament and hand the event to a second engine.
Tournaments the player app runs (no swiss_api_tournament_id) are shown from
el3ab_tournament_rounds.pairings through NativeTournamentService: every
board with names, results, reasons and who set them; standings with the
engine's own scoring (aborted boards are losses, per-time-control rating)
and the chosen tiebreak columns; the players tab resolves names from
profiles (there is no player_name column) including withdrawn players.
Arbiter tools relay to the game's api/tournament-admin.php with the service
key: set or override a result, forfeit (either side or both), next round,
close the round now (unfinished boards 0-0), pause/resume, end early with
final placings, add a player by username (late entry once running),
withdraw, bulk add by usernames. Start goes through the game so the
minimum-players check is no longer skipped. Tiebreaks save directly for
these tournaments and offer only the four keys the engine computes, under
the names the app shows players.
Co-Authored-By:
Claude Opus 5.5 <noreply@anthropic.com>
Showing
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment