- Add isBracketMajor() helper (event-utils.ts) as single source of truth for distinguishing CS2/Tennis bracket events from golf manual-entry events - Replace all playoff_game-only guards in the admin event detail page with isBracketEvent, fixing: manual result forms, current results card, bracket explanation card, Bracket Finalized badge, and styling - Extend delete handler in scoring-event.ts to clean up seasonParticipantResults and recalculate standings when a major_tournament event is deleted - Add simulatorType to UpcomingParticipantEvent; thread it from home/upcoming-events loaders; fix isAllCompete in SportSeasonCard, UpcomingEventsCard, UpcomingCalendarPanel so CS2/Tennis bracket events show individual participant badges instead of counts https://claude.ai/code/session_01SFmJQxQZsKxvJ5rhbYk3za
12 lines
477 B
TypeScript
12 lines
477 B
TypeScript
const BRACKET_MAJOR_SIMULATOR_TYPES = [
|
|
"cs2_major_qualifying_points",
|
|
"tennis_qualifying_points",
|
|
] as const;
|
|
|
|
/**
|
|
* Returns true for major_tournament events that use a bracket (CS2, Tennis).
|
|
* Golf (golf_qualifying_points) uses manual result entry and returns false.
|
|
*/
|
|
export function isBracketMajor(simulatorType: string | null | undefined): boolean {
|
|
return BRACKET_MAJOR_SIMULATOR_TYPES.includes(simulatorType as typeof BRACKET_MAJOR_SIMULATOR_TYPES[number]);
|
|
}
|