* Fix admin Games to Score panel missing bracket events The panel was silently dropping bracket events in two cases: 1. When a bracket event had `scoringEvents.eventDate` set to a future round date (e.g. "April 5") but an individual game's `scheduledAt` was today, the old dedup code picked `eventDate` first and the component filter `displayDate === today` never matched. 2. When an event had games on both today and tomorrow, whichever row the unordered step-1 query returned first "won" — potentially hiding a today game from the today tab entirely. Fix: replace the `Map<id, firstDate>` deduplication with `Map<id, Set<date>>` that collects every requested date an event qualifies for (via either `eventDate` or `gameDate`). The return uses `flatMap` to emit one entry per (event, date) pair, so events with games on multiple days now appear correctly in both tabs. https://claude.ai/code/session_01QkFxCF4xmKjdVCNPysWDML * Fix lint errors: replace .sort() with .toSorted() and remove non-null assertion - Replace Array#sort() with Array#toSorted() in two places (unicorn rule) - Remove non-null assertion on Map#get(); use early continue instead https://claude.ai/code/session_01QkFxCF4xmKjdVCNPysWDML --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| components | ||
| contexts | ||
| hooks | ||
| lib | ||
| models | ||
| routes | ||
| services | ||
| test | ||
| types | ||
| utils | ||
| welcome | ||
| app.css | ||
| entry.client.tsx | ||
| entry.server.tsx | ||
| root.tsx | ||
| routes.ts | ||