ac858f1e6d
Implement comprehensive partnership tracking system and tournament management features including round-robin, single/double elimination, and Swiss system pairings. Changes: - Add partnership_games and partnership_stats tables - Implement PartnershipTracker service for recording partnership data - Add tournament generator with multiple formats - Create tournament management actions and views - Add acceptance tests for partnership tracking - Fix PartnershipTracker to use single snapshot per player per match - Fix round-robin test to query by round_number instead of hardcoded ID Note: All 8 acceptance tests now passing
35 lines
885 B
Ruby
35 lines
885 B
Ruby
# frozen_string_literal: true
|
|
|
|
module EuchreCamp
|
|
module Actions
|
|
module Admin
|
|
module Tournaments
|
|
module Teams
|
|
class Edit < EuchreCamp::Action
|
|
include Deps[
|
|
teams_repo: 'repositories.teams',
|
|
players_repo: 'repositories.players',
|
|
events_repo: 'repositories.events'
|
|
]
|
|
|
|
def handle(request, response)
|
|
tournament_id = request.params[:id]
|
|
team_id = request.params[:team_id]
|
|
|
|
tournament = events_repo.by_id(tournament_id)
|
|
team = teams_repo.teams.by_pk(team_id).one
|
|
players = players_repo.all
|
|
|
|
response.render(view,
|
|
tournament: tournament,
|
|
team: team,
|
|
players: players
|
|
)
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|