brackt/app/routes/leagues
Chris Parsons 4a875e7628
fix: league settings sports swap and audit log detail improvements (#294)
- Fix sports seasons not updating when saving league settings. The form
  submits intent="update" but sports were only handled under the dead
  intent="update-sports" branch, which nothing called.

- Fix spurious audit log entries (scoring rules, draft settings) firing
  on every settings save. Change detection now compares submitted values
  against current DB values before adding to seasonUpdates.

- Add previousValues to scoring_rules_changed and draft_settings_changed
  audit log entries so the detail formatter can show old → new diffs
  (e.g. "Scoring updated: 1st: 100 → 105").

- Add sports_changed audit action (migration 0076) with sport names
  resolved at log time. Batch-fetch added sports in one query instead
  of N individual queries.

- Improve audit log display for all action types: field-level old→new
  diffs, readable labels, truncated sport lists (+N more).

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 21:41:05 -07:00
..
__tests__ Fix oxlint warnings: no-shadow, consistent-function-scoping, no-non-null-assertion, and others (#196) 2026-03-21 10:59:51 -07:00
$leagueId.audit-log.tsx fix: league settings sports swap and audit log detail improvements (#294) 2026-04-14 21:41:05 -07:00
$leagueId.draft-board.$seasonId.tsx Add oxlint linting setup with zero errors (#194) 2026-03-21 09:44:05 -07:00
$leagueId.draft.$seasonId.tsx fix: address VORP code review issues (#283) 2026-04-08 23:20:02 -04:00
$leagueId.server.ts Add audit logging for commissioner actions (#293) 2026-04-13 15:45:39 -07:00
$leagueId.settings.tsx fix: league settings sports swap and audit log detail improvements (#294) 2026-04-14 21:41:05 -07:00
$leagueId.sports-seasons.$sportsSeasonId.server.ts Add FIFA World Cup 2026 support with group stage display and Monte Carlo simulator (#242) 2026-03-29 10:27:47 -07:00
$leagueId.sports-seasons.$sportsSeasonId.tsx Add FIFA World Cup 2026 support with group stage display and Monte Carlo simulator (#242) 2026-03-29 10:27:47 -07:00
$leagueId.standings.$seasonId.teams.$teamId.tsx Simplify team breakdown page layout and fix code quality issues (#155) 2026-03-17 09:20:41 -07:00
$leagueId.standings.$seasonId.tsx Redesign standings page with sortable table, 7-day change, and chart repositioned (#205) 2026-03-22 11:05:13 -07:00
$leagueId.tsx Add audit logging for commissioner actions (#293) 2026-04-13 15:45:39 -07:00
$leagueId.upcoming-events.tsx Add upcoming events pages and fix timezone filtering, fixes #213 (#235) 2026-03-27 00:49:16 -07:00
new.tsx Replace console.* with structured logger, fix no-inferrable-types (closes #98) (#199) 2026-03-21 13:41:39 -07:00