feat: split admin dashboard, improve match ops, and player closed-match UX
Admin: add match/player overview sub-nav; refine settlement flow and league match management UI; improve action button enabled/disabled styles; enhance logo upload and outright odds sync. API: expose matchPhase/bettingOpen for closed matches; league publish guards; settlement preview with auto score save; outright team auto-sync. Player: watermark for closed/settled states; keep match and bet details visible; remove default login credentials. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
13
apps/player/src/utils/matchPhase.ts
Normal file
13
apps/player/src/utils/matchPhase.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export type MatchPhase = 'open' | 'closed_pending' | 'settled';
|
||||
|
||||
export function matchPhaseLabel(t: (key: string) => string, phase?: MatchPhase | null) {
|
||||
if (phase === 'closed_pending') return t('bet.match_phase_closed_pending');
|
||||
if (phase === 'settled') return t('bet.match_phase_settled');
|
||||
return '';
|
||||
}
|
||||
|
||||
export function matchPhaseVariant(phase?: MatchPhase | null): 'closed' | 'settled' | 'pending' {
|
||||
if (phase === 'settled') return 'settled';
|
||||
if (phase === 'closed_pending') return 'closed';
|
||||
return 'pending';
|
||||
}
|
||||
Reference in New Issue
Block a user