@burdenoff/microfe-atheletebridge 2026.1124.1 → 2026.1128.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atheletebridge/admin/AdminDashboardPage.js +4 -0
- package/dist/atheletebridge/admin/AdminDashboardPage.js.map +1 -1
- package/dist/atheletebridge/components/AthleteSelect.js +23 -22
- package/dist/atheletebridge/components/AthleteSelect.js.map +1 -1
- package/dist/atheletebridge/components/EmptyState.d.ts +8 -0
- package/dist/atheletebridge/components/EmptyState.js +42 -29
- package/dist/atheletebridge/components/EmptyState.js.map +1 -1
- package/dist/atheletebridge/components/FilterSelect.js +10 -9
- package/dist/atheletebridge/components/FilterSelect.js.map +1 -1
- package/dist/atheletebridge/components/ai/AgentRunFeed.js.map +1 -1
- package/dist/atheletebridge/components/ai/AiModelPicker.js +49 -49
- package/dist/atheletebridge/components/ai/AiModelPicker.js.map +1 -1
- package/dist/atheletebridge/components/ai/DecisionCard.js +16 -16
- package/dist/atheletebridge/components/ai/DecisionCard.js.map +1 -1
- package/dist/atheletebridge/components/ai/RunDecisionPanel.js +42 -42
- package/dist/atheletebridge/components/ai/RunDecisionPanel.js.map +1 -1
- package/dist/atheletebridge/components/analytics/AiInsightsPanel.js +52 -52
- package/dist/atheletebridge/components/analytics/AiInsightsPanel.js.map +1 -1
- package/dist/atheletebridge/components/registration/RegistrationEntryFields.js +24 -23
- package/dist/atheletebridge/components/registration/RegistrationEntryFields.js.map +1 -1
- package/dist/atheletebridge/components/wearables/ConnectedDevicesPanel.js.map +1 -1
- package/dist/atheletebridge/pages/DashboardPage.js.map +1 -1
- package/dist/atheletebridge/pages/StandingsPage.js.map +1 -1
- package/dist/atheletebridge/pages/analytics/CoachAnalyticsPage.js.map +1 -1
- package/dist/atheletebridge/pages/athletes/AthleteProfilePage.js +1 -0
- package/dist/atheletebridge/pages/athletes/AthleteProfilePage.js.map +1 -1
- package/dist/atheletebridge/pages/audit/AuditLogPage.js +1 -0
- package/dist/atheletebridge/pages/audit/AuditLogPage.js.map +1 -1
- package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js.map +1 -1
- package/dist/atheletebridge/pages/fixtures/FixtureFormPage.js +56 -56
- package/dist/atheletebridge/pages/fixtures/FixtureFormPage.js.map +1 -1
- package/dist/atheletebridge/pages/fixtures/FixturesListPage.js +1 -0
- package/dist/atheletebridge/pages/fixtures/FixturesListPage.js.map +1 -1
- package/dist/atheletebridge/pages/marketplace/MarketplacePage.js +97 -97
- package/dist/atheletebridge/pages/marketplace/MarketplacePage.js.map +1 -1
- package/dist/atheletebridge/pages/onboarding/OnboardingPage.js +34 -34
- package/dist/atheletebridge/pages/onboarding/OnboardingPage.js.map +1 -1
- package/dist/atheletebridge/pages/performance/PerformancePage.js +182 -182
- package/dist/atheletebridge/pages/performance/PerformancePage.js.map +1 -1
- package/dist/atheletebridge/pages/programs/ProgramDetailPage.js +13 -13
- package/dist/atheletebridge/pages/programs/ProgramDetailPage.js.map +1 -1
- package/dist/atheletebridge/pages/programs/ProgramFormPage.js +61 -60
- package/dist/atheletebridge/pages/programs/ProgramFormPage.js.map +1 -1
- package/dist/atheletebridge/pages/programs/ProgramsListPage.js +1 -0
- package/dist/atheletebridge/pages/programs/ProgramsListPage.js.map +1 -1
- package/dist/atheletebridge/pages/registrations/MyRegistrationsPage.js +26 -21
- package/dist/atheletebridge/pages/registrations/MyRegistrationsPage.js.map +1 -1
- package/dist/atheletebridge/pages/registrations/RegisterPage.js +1 -0
- package/dist/atheletebridge/pages/registrations/RegisterPage.js.map +1 -1
- package/dist/atheletebridge/pages/registrations/RegistrationFormBuilderPage.js +205 -204
- package/dist/atheletebridge/pages/registrations/RegistrationFormBuilderPage.js.map +1 -1
- package/dist/atheletebridge/pages/registrations/RegistrationFormDetailPage.js +121 -115
- package/dist/atheletebridge/pages/registrations/RegistrationFormDetailPage.js.map +1 -1
- package/dist/atheletebridge/pages/registrations/RegistrationSubmissionPage.js +59 -40
- package/dist/atheletebridge/pages/registrations/RegistrationSubmissionPage.js.map +1 -1
- package/dist/atheletebridge/pages/sessions/SessionFormPage.js +59 -59
- package/dist/atheletebridge/pages/sessions/SessionFormPage.js.map +1 -1
- package/dist/atheletebridge/pages/sessions/SessionsListPage.js +1 -0
- package/dist/atheletebridge/pages/sessions/SessionsListPage.js.map +1 -1
- package/dist/atheletebridge/pages/teams/TeamDetailPage.js +143 -143
- package/dist/atheletebridge/pages/teams/TeamDetailPage.js.map +1 -1
- package/dist/atheletebridge/pages/teams/TeamFormPage.js +72 -72
- package/dist/atheletebridge/pages/teams/TeamFormPage.js.map +1 -1
- package/dist/atheletebridge/pages/teams/TeamsListPage.js +1 -0
- package/dist/atheletebridge/pages/teams/TeamsListPage.js.map +1 -1
- package/dist/atheletebridge/pages/tournaments/TournamentBracketPage.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FixtureDetailPage.js","names":["_Fragment","FixtureDetailPage","tr","useAbTranslate","useParams","useAthleteBridge","fixture","useFixture","id","fixtureForms","useRegistrationForms","recordResult","useRecordFixtureResult","updateFixture","useUpdateFixture","postponeFixture","usePostponeFixture","cancelFixture","useCancelFixture","useGlobalUi","homeScore","setHomeScore","useState","awayScore","setAwayScore","extraTimeHome","setExtraTimeHome","extraTimeAway","setExtraTimeAway","penaltyHome","setPenaltyHome","penaltyAway","setPenaltyAway","cricketForm","setCricketForm","error","setError","fixtureStarted","useScheduledTimeGate","scheduleDialog","setScheduleDialog","scheduledAtInput","setScheduledAtInput","kickoffAtInput","setKickoffAtInput","cancelOpen","setCancelOpen","PageLayout","LoadingState","ErrorState","navigateTo","f","homeName","awayName","isResultEligible","canRecordResult","awaitingKickoff","parseScoreInput","getFixtureLifecycleActions","schedulePending","openScheduleDialog","initial","initialScheduleInputs","kind","handleScheduleSubmit","input","buildScheduleInput","showToast","err","confirmCancelFixture","FIXTURE_TYPE_LABELS","ArrowLeft","Scoreboard","AvailabilityRsvpControl","AvailabilityRosterPanel","EmphasisPanel","canReschedule","canPostpone","canCancel","CalendarClock","GlassCard","CalendarPlus","Ban","Flag","draft","buildRecordResultInput","Fragment","Crest","FormField","fieldInputClass","Minus","Loader2","Trophy","ClipboardList","Plus","form","StatusBadge","ResponsiveDialog","open","ResponsiveDialogContent","ResponsiveDialogHeader","ResponsiveDialogTitle","ResponsiveDialogFooter"],"sources":["../../../../src/atheletebridge/pages/fixtures/FixtureDetailPage.tsx"],"sourcesContent":["/**\n * Fixture Detail\n * @module atheletebridge/pages/fixtures\n *\n * Reads a single fixture (athFixture), lets the user manage its lifecycle —\n * reschedule (athUpdateFixture), postpone (athPostponeFixture) and cancel\n * (athCancelFixture) (BOFF-7642) — and record a final result\n * (athRecordFixtureResult) which marks it COMPLETED and recomputes standings.\n *\n * The header is a crest-vs-crest Scoreboard hero; the record-result panel shows\n * each team's crest beside its score input. Semantic tokens only, responsive.\n */\n\nimport { useState } from 'react';\nimport { useParams } from 'react-router';\nimport {\n ArrowLeft,\n Trophy,\n Loader2,\n Flag,\n Minus,\n CalendarClock,\n CalendarPlus,\n Ban,\n ClipboardList,\n Plus,\n} from 'lucide-react';\nimport {\n GlassCard,\n EmphasisPanel,\n ResponsiveDialog,\n ResponsiveDialogContent,\n ResponsiveDialogHeader,\n ResponsiveDialogTitle,\n ResponsiveDialogFooter,\n} from '@burdenoff/fe-libs/ui';\nimport { useGlobalUi } from '@burdenoff/fe-libs/shared/providers/shell/GlobalUiProvider';\nimport { PageLayout } from '../../components/PageLayout';\nimport { Scoreboard } from '../../components/Scoreboard';\nimport { StatusBadge } from '../../components/StatusBadge';\nimport { Crest } from '../../components/Crest';\nimport { LoadingState, ErrorState } from '../../components/LoadingState';\nimport { FormField, fieldInputClass } from '../../components/form';\nimport { FIXTURE_TYPE_LABELS } from '../../components/domain';\nimport { AvailabilityRsvpControl } from '../../components/availability/AvailabilityRsvpControl';\nimport { AvailabilityRosterPanel } from '../../components/availability/AvailabilityRosterPanel';\nimport { useAthleteBridge } from '../../context/AthleteBridgeContext';\nimport { useScheduledTimeGate } from '../../hooks';\nimport {\n useFixture,\n useRecordFixtureResult,\n useUpdateFixture,\n usePostponeFixture,\n useCancelFixture,\n} from '../../hooks/useAthleteBridgeApi';\nimport { useRegistrationForms } from '../../hooks/useRegistrationApi';\nimport {\n buildScheduleInput,\n getFixtureLifecycleActions,\n initialScheduleInputs,\n} from '../../utils/fixtureLifecycle';\nimport {\n FIXTURE_CRICKET_SCORECARD_LIVE,\n FIXTURE_KNOCKOUT_SCORES_LIVE,\n} from '../../utils/fixtureCapabilities';\nimport {\n buildCricketResultInput,\n buildRecordResultInput,\n parseScoreInput,\n} from '../../utils/recordResult';\nimport { useAbTranslate } from '../../i18n';\n\nexport function FixtureDetailPage() {\n const tr = useAbTranslate();\n const { id } = useParams<{ id: string }>();\n const { navigateTo } = useAthleteBridge();\n\n const fixture = useFixture(id);\n // Tournament sign-up forms targeting this fixture (BOFF-5863).\n const fixtureForms = useRegistrationForms({ fixtureId: id });\n const recordResult = useRecordFixtureResult();\n const updateFixture = useUpdateFixture();\n const postponeFixture = usePostponeFixture();\n const cancelFixture = useCancelFixture();\n const { showToast } = useGlobalUi();\n\n const [homeScore, setHomeScore] = useState('');\n const [awayScore, setAwayScore] = useState('');\n // Knockout outcome (BOFF-7640) — only offered when the fixture is level at\n // full time; a tie still level after extra time must record the shootout.\n const [extraTimeHome, setExtraTimeHome] = useState('');\n const [extraTimeAway, setExtraTimeAway] = useState('');\n const [penaltyHome, setPenaltyHome] = useState('');\n const [penaltyAway, setPenaltyAway] = useState('');\n // Cricket scorecard form (BOFF-7644) — replaces the generic score inputs\n // when the fixture's home team plays cricket.\n const [cricketForm, setCricketForm] = useState({\n homeRuns: '',\n homeWickets: '',\n homeOvers: '',\n homeBalls: '',\n awayRuns: '',\n awayWickets: '',\n awayOvers: '',\n awayBalls: '',\n winner: 'HOME' as 'HOME' | 'AWAY',\n decidedBy: 'RUNS' as 'RUNS' | 'WICKETS',\n margin: '',\n superOver: false,\n dls: false,\n });\n const [error, setError] = useState<string | null>(null);\n // Time gate for the completion action; re-renders when kickoff arrives.\n const fixtureStarted = useScheduledTimeGate(fixture.data?.scheduledAt);\n\n const setCricket = <K extends keyof typeof cricketForm>(\n key: K,\n value: (typeof cricketForm)[K]\n ): void => setCricketForm((prev) => ({ ...prev, [key]: value }));\n\n const resetCricketForm = (): void =>\n setCricketForm({\n homeRuns: '',\n homeWickets: '',\n homeOvers: '',\n homeBalls: '',\n awayRuns: '',\n awayWickets: '',\n awayOvers: '',\n awayBalls: '',\n winner: 'HOME',\n decidedBy: 'RUNS',\n margin: '',\n superOver: false,\n dls: false,\n });\n\n // Fixture lifecycle actions (BOFF-7642). `scheduleDialog` doubles for\n // reschedule and postpone — both are a date/time form; only the mutation\n // and the copy differ.\n const [scheduleDialog, setScheduleDialog] = useState<'reschedule' | 'postpone' | null>(null);\n const [scheduledAtInput, setScheduledAtInput] = useState('');\n const [kickoffAtInput, setKickoffAtInput] = useState('');\n const [cancelOpen, setCancelOpen] = useState(false);\n\n if (fixture.isLoading) {\n return (\n <PageLayout title={tr('atheletebridge.pages.fixtureDetail.title', 'Fixture')}>\n <LoadingState\n label={tr('atheletebridge.pages.fixtureDetail.loading', 'Loading fixture…')}\n />\n </PageLayout>\n );\n }\n\n if (fixture.isError || !fixture.data) {\n return (\n <PageLayout title={tr('atheletebridge.pages.fixtureDetail.title', 'Fixture')}>\n <ErrorState\n title={tr('atheletebridge.pages.fixtureDetail.notFoundTitle', 'Fixture not found')}\n message={tr(\n 'atheletebridge.pages.fixtureDetail.notFoundMessage',\n 'This fixture does not exist or you do not have access to it.'\n )}\n onRetry={() => navigateTo('/fixtures')}\n />\n </PageLayout>\n );\n }\n\n const f = fixture.data;\n const homeName = f.homeTeam?.name ?? tr('atheletebridge.pages.fixtureDetail.home', 'Home');\n const awayName =\n f.awayTeam?.name ??\n (f.awayTeamId ? tr('atheletebridge.pages.fixtureDetail.away', 'Away') : 'TBD');\n // Result entry is the completion transition, gated on kickoff here and\n // enforced server-side too. Both branches share isResultEligible so they\n // cannot drift apart.\n const isResultEligible =\n Boolean(f.awayTeamId) && (f.status === 'SCHEDULED' || f.status === 'LIVE');\n const canRecordResult = isResultEligible && fixtureStarted;\n const awaitingKickoff = isResultEligible && !fixtureStarted;\n\n // The cricket scorecard and knockout inputs post fields the deployed backend\n // may not accept yet; see utils/fixtureCapabilities.\n const isCricket = FIXTURE_CRICKET_SCORECARD_LIVE && f.homeTeam?.sport === 'CRICKET';\n\n // Knockout-outcome inputs (BOFF-7640) — offered once the full-time score is\n // entered and level. The shootout appears while the tie is still level\n // (straight from full time, or after a level extra time).\n const parsedHomeScore = parseScoreInput(homeScore);\n const parsedAwayScore = parseScoreInput(awayScore);\n const fullTimeScoresEntered = parsedHomeScore !== null && parsedAwayScore !== null;\n const levelAtFullTime =\n FIXTURE_KNOCKOUT_SCORES_LIVE && fullTimeScoresEntered && parsedHomeScore === parsedAwayScore;\n const extraTimeEntered = extraTimeHome !== '' || extraTimeAway !== '';\n const extraTimeParsedHome = parseScoreInput(extraTimeHome);\n const extraTimeParsedAway = parseScoreInput(extraTimeAway);\n const extraTimeComplete = extraTimeParsedHome !== null && extraTimeParsedAway !== null;\n const stillLevelAfterExtraTime = extraTimeComplete && extraTimeParsedHome === extraTimeParsedAway;\n const showPenaltyShootout = levelAtFullTime && (!extraTimeEntered || stillLevelAfterExtraTime);\n\n // Lifecycle eligibility mirrors the backend guards: only a SCHEDULED or\n // POSTPONED fixture can be rescheduled (rescheduling a postponed fixture\n // returns it to the calendar as SCHEDULED), only a SCHEDULED or LIVE one\n // can be postponed, and anything not yet final can be cancelled.\n const { canReschedule, canPostpone, canCancel } = getFixtureLifecycleActions(f.status);\n const schedulePending =\n scheduleDialog === 'reschedule' ? updateFixture.isPending : postponeFixture.isPending;\n\n const openScheduleDialog = (kind: 'reschedule' | 'postpone') => {\n const initial = initialScheduleInputs(kind, f);\n setScheduledAtInput(initial.scheduledAtInput);\n setKickoffAtInput(initial.kickoffAtInput);\n setScheduleDialog(kind);\n };\n\n const handleScheduleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n const input = buildScheduleInput(scheduledAtInput, kickoffAtInput);\n if (!input) {\n showToast(\n tr(\n 'atheletebridge.pages.fixtureDetail.scheduleDateRequired',\n 'Pick a date and time first.'\n ),\n 'error'\n );\n return;\n }\n try {\n if (scheduleDialog === 'reschedule') {\n await updateFixture.mutateAsync({ id: f.id, input });\n showToast(\n tr('atheletebridge.pages.fixtureDetail.rescheduledToast', 'Fixture rescheduled.'),\n 'success'\n );\n } else {\n await postponeFixture.mutateAsync({ id: f.id, input });\n showToast(\n tr('atheletebridge.pages.fixtureDetail.postponedToast', 'Fixture postponed.'),\n 'success'\n );\n }\n setScheduleDialog(null);\n } catch (err) {\n showToast(\n err instanceof Error ? err.message : tr('common.error', 'Something went wrong.'),\n 'error'\n );\n }\n };\n\n /**\n * Destructive cancellation: only runs after the confirmation dialog's\n * explicit Cancel fixture. A cancelled fixture is terminal — it can never\n * go LIVE or record a result — so the extra step is deliberate (BOFF-7642).\n */\n const confirmCancelFixture = async () => {\n try {\n await cancelFixture.mutateAsync(f.id);\n showToast(\n tr('atheletebridge.pages.fixtureDetail.cancelledToast', 'Fixture cancelled.'),\n 'success'\n );\n setCancelOpen(false);\n } catch (err) {\n showToast(\n err instanceof Error ? err.message : tr('common.error', 'Something went wrong.'),\n 'error'\n );\n setCancelOpen(false);\n }\n };\n\n const handleRecord = async (e: React.FormEvent) => {\n e.preventDefault();\n setError(null);\n if (!id) return;\n\n if (isCricket) {\n const draft = buildCricketResultInput(\n { ...cricketForm },\n {\n required: tr(\n 'atheletebridge.pages.fixtureDetail.cricketRequired',\n 'All innings scores, overs and the margin are required.'\n ),\n negative: tr(\n 'atheletebridge.pages.fixtureDetail.cricketNegative',\n 'Scores and overs cannot be negative.'\n ),\n wicketsRange: tr(\n 'atheletebridge.pages.fixtureDetail.cricketWicketsRange',\n 'Wickets must be between 0 and 10.'\n ),\n ballsRange: tr(\n 'atheletebridge.pages.fixtureDetail.cricketBallsRange',\n 'Balls must be between 0 and 5.'\n ),\n marginMinimum: tr(\n 'atheletebridge.pages.fixtureDetail.cricketMarginMinimum',\n 'The margin must be at least 1.'\n ),\n wicketMarginMax: tr(\n 'atheletebridge.pages.fixtureDetail.cricketWicketMarginMax',\n 'A win by wickets cannot exceed a margin of 10.'\n ),\n }\n );\n if (!draft.ok) {\n setError(draft.error);\n return;\n }\n try {\n await recordResult.mutateAsync({ id, input: draft.input });\n resetCricketForm();\n } catch (err) {\n setError(\n err instanceof Error\n ? err.message\n : tr('atheletebridge.pages.fixtureDetail.recordFailed', 'Failed to record result.')\n );\n }\n return;\n }\n\n // Non-cricket fixtures: a single pair of scores, optionally followed by a\n // knockout outcome. All the rules live in `buildRecordResultInput` so the\n // page only renders copy and submits the payload it hands back.\n const draft = buildRecordResultInput(\n { homeScore, awayScore, extraTimeHome, extraTimeAway, penaltyHome, penaltyAway },\n {\n scoresRequired: tr(\n 'atheletebridge.pages.fixtureDetail.scoresRequired',\n 'Both scores are required and must be numbers.'\n ),\n scoresNegative: tr(\n 'atheletebridge.pages.fixtureDetail.scoresNegative',\n 'Scores cannot be negative.'\n ),\n extraTimePair: tr(\n 'atheletebridge.pages.fixtureDetail.extraTimePair',\n 'Enter both extra-time scores.'\n ),\n extraTimeNumeric: tr(\n 'atheletebridge.pages.fixtureDetail.extraTimeNumeric',\n 'Extra-time scores must be numbers.'\n ),\n extraTimeNegative: tr(\n 'atheletebridge.pages.fixtureDetail.extraTimeNegative',\n 'Extra-time scores cannot be negative.'\n ),\n penaltyPair: tr(\n 'atheletebridge.pages.fixtureDetail.penaltyPair',\n 'Enter both penalty scores.'\n ),\n penaltyNumeric: tr(\n 'atheletebridge.pages.fixtureDetail.penaltyNumeric',\n 'Penalty scores must be numbers.'\n ),\n penaltyNegative: tr(\n 'atheletebridge.pages.fixtureDetail.penaltyNegative',\n 'Penalty scores cannot be negative.'\n ),\n extraTimeDecided: tr(\n 'atheletebridge.pages.fixtureDetail.extraTimeDecided',\n 'Extra time decided the tie — leave the penalty shootout empty.'\n ),\n extraTimeLevel: tr(\n 'atheletebridge.pages.fixtureDetail.extraTimeLevel',\n 'Still level after extra time — record the penalty shootout.'\n ),\n penaltyLevel: tr(\n 'atheletebridge.pages.fixtureDetail.penaltyLevel',\n 'Penalty scores must have a winner.'\n ),\n }\n );\n if (!draft.ok) {\n setError(draft.error);\n return;\n }\n try {\n await recordResult.mutateAsync({ id, input: draft.input });\n setHomeScore('');\n setAwayScore('');\n setExtraTimeHome('');\n setExtraTimeAway('');\n setPenaltyHome('');\n setPenaltyAway('');\n } catch (err) {\n setError(\n err instanceof Error\n ? err.message\n : tr('atheletebridge.pages.fixtureDetail.recordFailed', 'Failed to record result.')\n );\n }\n };\n\n return (\n <PageLayout\n title={`${homeName} vs ${awayName}`}\n description={`${FIXTURE_TYPE_LABELS[f.type]}${f.competition ? ` · ${f.competition}` : ''}`}\n actions={\n <button\n type=\"button\"\n onClick={() => navigateTo('/fixtures')}\n className=\"inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken\"\n >\n <ArrowLeft className=\"h-4 w-4\" /> {tr('atheletebridge.pages.fixtureDetail.back', 'Back')}\n </button>\n }\n >\n {/* Crest-vs-crest hero scoreboard */}\n <Scoreboard fixture={f} variant=\"hero\" className=\"mb-8\" />\n\n {/* Availability / RSVP (BOFF-4134) — athlete's own response + coach roster view */}\n <div className=\"mb-8 grid grid-cols-1 gap-4 lg:grid-cols-[minmax(0,1fr)_2fr]\">\n <AvailabilityRsvpControl teamId={f.homeTeamId} fixtureId={f.id} />\n <AvailabilityRosterPanel teamId={f.homeTeamId} fixtureId={f.id} />\n </div>\n\n {f.notes && (\n <EmphasisPanel className=\"mb-8\">\n <h2 className=\"mb-2 text-sm font-semibold text-text-primary\">\n {tr('atheletebridge.pages.fixtureDetail.notes', 'Notes')}\n </h2>\n <p className=\"text-sm text-text-secondary\">{f.notes}</p>\n </EmphasisPanel>\n )}\n\n {/* Fixture lifecycle actions (BOFF-7642) */}\n {(canReschedule || canPostpone || canCancel) && (\n <section className=\"mb-8\">\n <h2 className=\"mb-4 flex items-center gap-2 text-lg font-semibold text-text-primary\">\n <CalendarClock className=\"h-5 w-5\" />{' '}\n {tr('atheletebridge.pages.fixtureDetail.fixtureActions', 'Fixture actions')}\n </h2>\n <GlassCard treatment=\"plain\" className=\"flex flex-wrap items-center gap-3 p-5 sm:p-6\">\n {canReschedule && (\n <button\n type=\"button\"\n onClick={() => openScheduleDialog('reschedule')}\n className=\"inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken\"\n >\n <CalendarPlus className=\"h-4 w-4\" />{' '}\n {tr('atheletebridge.pages.fixtureDetail.reschedule', 'Reschedule')}\n </button>\n )}\n {canPostpone && (\n <button\n type=\"button\"\n onClick={() => openScheduleDialog('postpone')}\n className=\"inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken\"\n >\n <CalendarClock className=\"h-4 w-4\" />{' '}\n {tr('atheletebridge.pages.fixtureDetail.postpone', 'Postpone')}\n </button>\n )}\n {canCancel && (\n <button\n type=\"button\"\n onClick={() => setCancelOpen(true)}\n className=\"inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-status-error-text transition-colors hover:bg-status-error-bg-subtle\"\n >\n <Ban className=\"h-4 w-4\" />{' '}\n {tr('atheletebridge.pages.fixtureDetail.cancelFixture', 'Cancel fixture')}\n </button>\n )}\n </GlassCard>\n </section>\n )}\n\n {/* Record result */}\n {awaitingKickoff && (\n <EmphasisPanel className=\"mb-8\">\n <p className=\"text-sm text-text-secondary\">\n {tr(\n 'atheletebridge.pages.fixtureDetail.recordResultUnavailable',\n 'A result can be recorded once this fixture has started — after its scheduled date and time.'\n )}\n </p>\n </EmphasisPanel>\n )}\n {canRecordResult && (\n <section className=\"mb-8\">\n <h2 className=\"mb-4 flex items-center gap-2 text-lg font-semibold text-text-primary\">\n <Flag className=\"h-5 w-5\" />{' '}\n {tr('atheletebridge.pages.fixtureDetail.recordResult', 'Record result')}\n </h2>\n <GlassCard treatment=\"insight\" className=\"p-5 sm:p-6\">\n <p className=\"mb-5 text-sm text-text-secondary\">\n {tr(\n 'atheletebridge.pages.fixtureDetail.recordResultDescription',\n 'Recording a final score marks this fixture Completed and recomputes the competition standings for both teams.'\n )}\n </p>\n <form onSubmit={handleRecord}>\n {isCricket ? (\n <div className=\"flex flex-col items-center gap-5\">\n <p className=\"text-center text-xs font-medium text-text-secondary\">\n {tr(\n 'atheletebridge.pages.fixtureDetail.cricketScorecardDescription',\n 'Record each innings score and how the match was decided — a cricket result is a margin, not a score comparison.'\n )}\n </p>\n\n {(\n [\n { side: 'home' as const, name: homeName, sport: f.homeTeam?.sport },\n { side: 'away' as const, name: awayName, sport: f.awayTeam?.sport },\n ] as const\n ).map(({ side, name, sport }) => (\n <div key={side} className=\"flex flex-wrap items-end justify-center gap-3\">\n <div className=\"flex flex-col items-center gap-2\">\n <Crest name={name} sport={sport} size={40} />\n <span className=\"max-w-[8rem] truncate text-center text-xs font-medium text-text-secondary\">\n {name}\n </span>\n </div>\n <FormField\n label={tr('atheletebridge.pages.fixtureDetail.runs', 'Runs')}\n htmlFor={`cricket-${side}-runs`}\n className=\"w-20\"\n >\n <input\n id={`cricket-${side}-runs`}\n inputMode=\"numeric\"\n className={`${fieldInputClass} text-center tabular-nums`}\n value={cricketForm[`${side}Runs`]}\n onChange={(e) => setCricket(`${side}Runs`, e.target.value)}\n placeholder=\"185\"\n />\n </FormField>\n <span className=\"pb-3 text-lg font-bold text-text-muted\">/</span>\n <FormField\n label={tr('atheletebridge.pages.fixtureDetail.wickets', 'Wkts')}\n htmlFor={`cricket-${side}-wickets`}\n className=\"w-16\"\n >\n <input\n id={`cricket-${side}-wickets`}\n inputMode=\"numeric\"\n className={`${fieldInputClass} text-center tabular-nums`}\n value={cricketForm[`${side}Wickets`]}\n onChange={(e) => setCricket(`${side}Wickets`, e.target.value)}\n placeholder=\"6\"\n />\n </FormField>\n <FormField\n label={tr('atheletebridge.pages.fixtureDetail.overs', 'Overs')}\n htmlFor={`cricket-${side}-overs`}\n className=\"w-16\"\n >\n <input\n id={`cricket-${side}-overs`}\n inputMode=\"numeric\"\n className={`${fieldInputClass} text-center tabular-nums`}\n value={cricketForm[`${side}Overs`]}\n onChange={(e) => setCricket(`${side}Overs`, e.target.value)}\n placeholder=\"20\"\n />\n </FormField>\n <FormField\n label={tr('atheletebridge.pages.fixtureDetail.balls', 'Balls')}\n htmlFor={`cricket-${side}-balls`}\n className=\"w-14\"\n >\n <input\n id={`cricket-${side}-balls`}\n inputMode=\"numeric\"\n className={`${fieldInputClass} text-center tabular-nums`}\n value={cricketForm[`${side}Balls`]}\n onChange={(e) => setCricket(`${side}Balls`, e.target.value)}\n placeholder=\"0\"\n />\n </FormField>\n </div>\n ))}\n\n <div className=\"flex flex-wrap items-end justify-center gap-4\">\n <FormField\n label={tr('atheletebridge.pages.fixtureDetail.winner', 'Winner')}\n htmlFor=\"cricket-winner\"\n >\n <select\n id=\"cricket-winner\"\n className={fieldInputClass}\n value={cricketForm.winner}\n onChange={(e) => setCricket('winner', e.target.value as 'HOME' | 'AWAY')}\n >\n <option value=\"HOME\">{homeName}</option>\n <option value=\"AWAY\">{awayName}</option>\n </select>\n </FormField>\n <FormField\n label={tr('atheletebridge.pages.fixtureDetail.decidedBy', 'Decided by')}\n htmlFor=\"cricket-decided-by\"\n >\n <select\n id=\"cricket-decided-by\"\n className={fieldInputClass}\n value={cricketForm.decidedBy}\n onChange={(e) =>\n setCricket('decidedBy', e.target.value as 'RUNS' | 'WICKETS')\n }\n >\n <option value=\"RUNS\">\n {tr('atheletebridge.pages.fixtureDetail.runs', 'Runs')}\n </option>\n <option value=\"WICKETS\">\n {tr('atheletebridge.pages.fixtureDetail.wickets', 'Wkts')}\n </option>\n </select>\n </FormField>\n <FormField\n label={tr('atheletebridge.pages.fixtureDetail.margin', 'Margin')}\n htmlFor=\"cricket-margin\"\n className=\"w-20\"\n >\n <input\n id=\"cricket-margin\"\n inputMode=\"numeric\"\n className={`${fieldInputClass} text-center tabular-nums`}\n value={cricketForm.margin}\n onChange={(e) => setCricket('margin', e.target.value)}\n placeholder=\"13\"\n />\n </FormField>\n </div>\n\n <div className=\"flex items-center gap-6\">\n <label className=\"flex items-center gap-2.5 text-sm text-text-primary\">\n <input\n type=\"checkbox\"\n checked={cricketForm.superOver}\n onChange={(e) => setCricket('superOver', e.target.checked)}\n className=\"h-4 w-4 rounded border-border-seam text-action-primary-bg focus:ring-[var(--color-focus-ring)]\"\n />\n {tr('atheletebridge.pages.fixtureDetail.superOver', 'Super Over')}\n </label>\n <label className=\"flex items-center gap-2.5 text-sm text-text-primary\">\n <input\n type=\"checkbox\"\n checked={cricketForm.dls}\n onChange={(e) => setCricket('dls', e.target.checked)}\n className=\"h-4 w-4 rounded border-border-seam text-action-primary-bg focus:ring-[var(--color-focus-ring)]\"\n />\n {tr('atheletebridge.pages.fixtureDetail.dls', 'DLS')}\n </label>\n </div>\n </div>\n ) : (\n <>\n <div className=\"flex flex-wrap items-end justify-center gap-4 sm:gap-6\">\n <div className=\"flex items-end gap-3\">\n <div className=\"flex flex-col items-center gap-2\">\n <Crest name={homeName} sport={f.homeTeam?.sport} size={40} />\n <span className=\"max-w-[8rem] truncate text-center text-xs font-medium text-text-secondary\">\n {homeName}\n </span>\n </div>\n <FormField\n label={tr('atheletebridge.pages.fixtureDetail.home', 'Home')}\n htmlFor=\"homeScore\"\n className=\"w-24\"\n >\n <input\n id=\"homeScore\"\n inputMode=\"numeric\"\n className={`${fieldInputClass} text-center text-lg font-bold tabular-nums`}\n value={homeScore}\n onChange={(e) => setHomeScore(e.target.value)}\n placeholder=\"0\"\n />\n </FormField>\n </div>\n\n <Minus className=\"mb-3 h-5 w-5 shrink-0 text-text-muted\" aria-hidden=\"true\" />\n\n <div className=\"flex items-end gap-3\">\n <FormField\n label={tr('atheletebridge.pages.fixtureDetail.away', 'Away')}\n htmlFor=\"awayScore\"\n className=\"w-24\"\n >\n <input\n id=\"awayScore\"\n inputMode=\"numeric\"\n className={`${fieldInputClass} text-center text-lg font-bold tabular-nums`}\n value={awayScore}\n onChange={(e) => setAwayScore(e.target.value)}\n placeholder=\"0\"\n />\n </FormField>\n <div className=\"flex flex-col items-center gap-2\">\n <Crest name={awayName} sport={f.awayTeam?.sport} size={40} />\n <span className=\"max-w-[8rem] truncate text-center text-xs font-medium text-text-secondary\">\n {awayName}\n </span>\n </div>\n </div>\n </div>\n\n {levelAtFullTime && (\n <div className=\"mt-6 border-t border-border-seam pt-5\">\n <p className=\"mb-4 text-center text-xs font-medium text-text-secondary\">\n {tr(\n 'atheletebridge.pages.fixtureDetail.levelAtFullTime',\n 'Level at full time — record how the tie was decided (optional).'\n )}\n </p>\n <div className=\"flex flex-col items-center gap-4\">\n <div className=\"flex items-end justify-center gap-3\">\n <span className=\"mb-2.5 w-16 text-right text-xs font-medium text-text-secondary\">\n {homeName}\n </span>\n <FormField\n label={tr('atheletebridge.pages.fixtureDetail.extraTime', 'Extra time')}\n htmlFor=\"extraTimeHome\"\n className=\"w-20\"\n >\n <input\n id=\"extraTimeHome\"\n inputMode=\"numeric\"\n className={`${fieldInputClass} text-center tabular-nums`}\n value={extraTimeHome}\n onChange={(e) => setExtraTimeHome(e.target.value)}\n placeholder=\"–\"\n />\n </FormField>\n <Minus\n className=\"mb-3 h-4 w-4 shrink-0 text-text-muted\"\n aria-hidden=\"true\"\n />\n <FormField label=\" \" htmlFor=\"extraTimeAway\" className=\"w-20\">\n <input\n id=\"extraTimeAway\"\n inputMode=\"numeric\"\n className={`${fieldInputClass} text-center tabular-nums`}\n value={extraTimeAway}\n onChange={(e) => setExtraTimeAway(e.target.value)}\n placeholder=\"–\"\n />\n </FormField>\n <span className=\"mb-2.5 w-16 truncate text-xs font-medium text-text-secondary\">\n {awayName}\n </span>\n </div>\n\n {showPenaltyShootout && (\n <div className=\"flex items-end justify-center gap-3\">\n <span className=\"mb-2.5 w-16 text-right text-xs font-medium text-text-secondary\">\n {homeName}\n </span>\n <FormField\n label={tr(\n 'atheletebridge.pages.fixtureDetail.penaltyShootout',\n 'Penalties'\n )}\n htmlFor=\"penaltyHome\"\n className=\"w-20\"\n >\n <input\n id=\"penaltyHome\"\n inputMode=\"numeric\"\n className={`${fieldInputClass} text-center tabular-nums`}\n value={penaltyHome}\n onChange={(e) => setPenaltyHome(e.target.value)}\n placeholder=\"–\"\n />\n </FormField>\n <Minus\n className=\"mb-3 h-4 w-4 shrink-0 text-text-muted\"\n aria-hidden=\"true\"\n />\n <FormField label=\" \" htmlFor=\"penaltyAway\" className=\"w-20\">\n <input\n id=\"penaltyAway\"\n inputMode=\"numeric\"\n className={`${fieldInputClass} text-center tabular-nums`}\n value={penaltyAway}\n onChange={(e) => setPenaltyAway(e.target.value)}\n placeholder=\"–\"\n />\n </FormField>\n <span className=\"mb-2.5 w-16 truncate text-xs font-medium text-text-secondary\">\n {awayName}\n </span>\n </div>\n )}\n </div>\n </div>\n )}\n </>\n )}\n\n <div className=\"mt-6 flex justify-center\">\n <button\n type=\"submit\"\n disabled={recordResult.isPending}\n className=\"inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-6 py-2.5 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-60\"\n >\n {recordResult.isPending ? (\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n ) : (\n <Trophy className=\"h-4 w-4\" />\n )}\n {tr('atheletebridge.pages.fixtureDetail.recordResultAction', 'Record result')}\n </button>\n </div>\n </form>\n {error && <p className=\"mt-3 text-center text-sm text-status-error-text\">{error}</p>}\n </GlassCard>\n </section>\n )}\n\n {/* Tournament sign-ups (BOFF-5863): registration forms targeting this\n fixture, with live intake and check-in handled on the form pages. */}\n <section className=\"mb-8\">\n <h2 className=\"mb-4 flex items-center gap-2 text-lg font-semibold text-text-primary\">\n <ClipboardList className=\"h-5 w-5\" />{' '}\n {tr('atheletebridge.pages.fixtureDetail.signUps', 'Tournament sign-ups')}\n </h2>\n {fixtureForms.isLoading ? (\n <p className=\"text-sm text-text-secondary\">\n {tr('atheletebridge.pages.fixtureDetail.signUpsLoading', 'Loading sign-up forms…')}\n </p>\n ) : fixtureForms.isError ? (\n <p className=\"text-sm text-status-error-text\">\n {tr(\n 'atheletebridge.pages.fixtureDetail.signUpsError',\n 'Sign-up forms could not be loaded.'\n )}\n </p>\n ) : (fixtureForms.data?.items ?? []).length === 0 ? (\n <div className=\"flex flex-wrap items-center justify-between gap-3 rounded-lg border border-dashed border-border-seam bg-bg-surface px-4 py-3\">\n <p className=\"text-sm text-text-secondary\">\n {tr(\n 'atheletebridge.pages.fixtureDetail.signUpsEmpty',\n 'No sign-up form for this fixture yet. Publish one and families register through its share link.'\n )}\n </p>\n <button\n type=\"button\"\n onClick={() => navigateTo('/registrations/new')}\n className=\"inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken\"\n >\n <Plus className=\"h-4 w-4\" />{' '}\n {tr('atheletebridge.pages.fixtureDetail.createSignUp', 'Create sign-up form')}\n </button>\n </div>\n ) : (\n <ul className=\"divide-y divide-border-seam overflow-hidden rounded-lg border border-border-seam bg-bg-surface\">\n {(fixtureForms.data?.items ?? []).map((form) => (\n <li key={form.id}>\n <button\n type=\"button\"\n onClick={() => navigateTo(`/registrations/${form.id}`)}\n className=\"flex w-full flex-wrap items-center justify-between gap-3 px-4 py-3 text-left transition-colors hover:bg-bg-sunken\"\n >\n <span className=\"min-w-0\">\n <span className=\"block truncate font-medium text-text-primary\">\n {form.title}\n </span>\n <span className=\"block text-xs text-text-secondary\">\n {form.isOpen\n ? tr(\n 'atheletebridge.pages.fixtureDetail.signUpsOpen',\n 'Accepting registrations'\n )\n : tr(\n 'atheletebridge.pages.fixtureDetail.signUpsNotOpen',\n 'Not accepting registrations'\n )}\n </span>\n </span>\n <span className=\"flex items-center gap-3\">\n <span className=\"text-sm tabular-nums text-text-secondary\">\n {form.submissionCount}{' '}\n {tr('atheletebridge.pages.fixtureDetail.signUpCount', 'registered')}\n </span>\n <StatusBadge status={form.status} />\n </span>\n </button>\n </li>\n ))}\n </ul>\n )}\n </section>\n\n {f.competition && (\n <button\n type=\"button\"\n onClick={() =>\n navigateTo(`/standings?competition=${encodeURIComponent(f.competition ?? '')}`)\n }\n className=\"inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken\"\n >\n <Trophy className=\"h-4 w-4\" />{' '}\n {tr(\n 'atheletebridge.pages.fixtureDetail.viewStandings',\n `View ${f.competition} standings`\n )}\n </button>\n )}\n\n {/* Reschedule / postpone dialog — one date/time form, two mutations */}\n <ResponsiveDialog\n open={scheduleDialog !== null}\n onOpenChange={(open) => {\n if (!open && !schedulePending) setScheduleDialog(null);\n }}\n >\n <ResponsiveDialogContent>\n <ResponsiveDialogHeader>\n <ResponsiveDialogTitle>\n {scheduleDialog === 'reschedule'\n ? tr('atheletebridge.pages.fixtureDetail.rescheduleTitle', 'Reschedule fixture')\n : tr('atheletebridge.pages.fixtureDetail.postponeTitle', 'Postpone fixture')}\n </ResponsiveDialogTitle>\n </ResponsiveDialogHeader>\n <form onSubmit={(e) => void handleScheduleSubmit(e)} className=\"space-y-4 px-1\">\n <p className=\"text-sm text-text-secondary\">\n {scheduleDialog === 'reschedule'\n ? tr(\n 'atheletebridge.pages.fixtureDetail.rescheduleDescription',\n 'Pick a new date and time for this fixture. Rescheduling a postponed fixture puts it back on the calendar as scheduled.'\n )\n : tr(\n 'atheletebridge.pages.fixtureDetail.postponeDescription',\n 'Move this fixture to a later date. Its status becomes Postponed and it stays off the calendar until it is rescheduled.'\n )}\n </p>\n <FormField\n label={tr('atheletebridge.pages.fixtureDetail.newDateTime', 'New date & time')}\n htmlFor=\"fixtureScheduledAt\"\n required\n >\n <input\n id=\"fixtureScheduledAt\"\n type=\"datetime-local\"\n className={fieldInputClass}\n value={scheduledAtInput}\n onChange={(e) => setScheduledAtInput(e.target.value)}\n required\n />\n </FormField>\n <FormField\n label={tr('atheletebridge.pages.fixtureDetail.newKickoff', 'New kickoff (optional)')}\n htmlFor=\"fixtureKickoffAt\"\n >\n <input\n id=\"fixtureKickoffAt\"\n type=\"datetime-local\"\n className={fieldInputClass}\n value={kickoffAtInput}\n onChange={(e) => setKickoffAtInput(e.target.value)}\n />\n </FormField>\n <ResponsiveDialogFooter>\n <button\n type=\"button\"\n onClick={() => setScheduleDialog(null)}\n disabled={schedulePending}\n className=\"rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-60\"\n >\n {tr('common.cancel', 'Cancel')}\n </button>\n <button\n type=\"submit\"\n disabled={schedulePending}\n className=\"inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-semibold text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-60\"\n >\n {schedulePending && <Loader2 className=\"h-4 w-4 animate-spin\" />}\n {scheduleDialog === 'reschedule'\n ? tr('atheletebridge.pages.fixtureDetail.rescheduleAction', 'Reschedule')\n : tr('atheletebridge.pages.fixtureDetail.postponeAction', 'Postpone')}\n </button>\n </ResponsiveDialogFooter>\n </form>\n </ResponsiveDialogContent>\n </ResponsiveDialog>\n\n {/* Cancel confirmation (BOFF-7642) — cancellation is terminal, so the\n destructive action only runs after an explicit confirmation. */}\n <ResponsiveDialog\n open={cancelOpen}\n onOpenChange={(open) => {\n if (!open && !cancelFixture.isPending) setCancelOpen(false);\n }}\n >\n <ResponsiveDialogContent>\n <ResponsiveDialogHeader>\n <ResponsiveDialogTitle>\n {tr('atheletebridge.pages.fixtureDetail.cancelTitle', 'Cancel fixture?')}\n </ResponsiveDialogTitle>\n </ResponsiveDialogHeader>\n <p className=\"px-1 text-sm text-text-secondary\">\n {tr(\n 'atheletebridge.pages.fixtureDetail.cancelMessage',\n 'This fixture will be marked Cancelled. A cancelled fixture can never be played or rescheduled. This action cannot be undone.'\n )}\n </p>\n <ResponsiveDialogFooter>\n <button\n type=\"button\"\n onClick={() => setCancelOpen(false)}\n disabled={cancelFixture.isPending}\n className=\"rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-60\"\n >\n {tr('common.keepFixture', 'Keep fixture')}\n </button>\n <button\n type=\"button\"\n onClick={() => void confirmCancelFixture()}\n disabled={cancelFixture.isPending}\n className=\"inline-flex items-center gap-1.5 rounded-lg bg-action-danger-bg px-4 py-2 text-sm font-semibold text-action-danger-text transition-colors hover:bg-action-danger-bgHover disabled:opacity-60\"\n >\n {cancelFixture.isPending && <Loader2 className=\"h-4 w-4 animate-spin\" />}\n {tr('atheletebridge.pages.fixtureDetail.cancelConfirm', 'Cancel fixture')}\n </button>\n </ResponsiveDialogFooter>\n </ResponsiveDialogContent>\n </ResponsiveDialog>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAwEA,SAAgBC,IAAoB;CAClC,IAAMC,IAAKC,GAAe,GACpB,EAAE,UAAOC,GAA0B,GACnC,EAAE,kBAAeC,GAAiB,GAElCC,IAAUC,GAAWC,CAAE,GAEvBC,IAAeC,GAAqB,EAAE,WAAWF,EAAG,CAAC,GACrDG,IAAeC,GAAuB,GACtCC,IAAgBC,GAAiB,GACjCC,IAAkBC,GAAmB,GACrCC,IAAgBC,GAAiB,GACjC,EAAE,iBAAcC,GAAY,GAE5B,CAACC,GAAWC,KAAgBC,EAAS,EAAE,GACvC,CAACC,GAAWC,KAAgBF,EAAS,EAAE,GAGvC,CAACG,GAAeC,MAAoBJ,EAAS,EAAE,GAC/C,CAACK,GAAeC,MAAoB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eAChBrC,EAAG,uDAAuD,YAAY,IACtEA,EAAG,qDAAqD,UAAU,CAChE;MACc,CAAA,CAAA,EAAA,CAAA;KACpB;IACiB,CAAA,CAAA,EAAA,CAAA;GACT,CAAA;GAIlB,kBAAC+F,GAAD;IACE,MAAMpD;IACN,eAAe,MAAS;KACtB,AAAI,CAACqD,KAAQ,CAACjF,EAAc,aAAW6B,EAAc,EAAK;IAC5D;IAEA,UAAA,kBAACqD,GAAD,EAAA,UAAA;KACE,kBAACC,GAAD,EAAA,UACE,kBAACC,GAAD,EAAA,UACGnG,EAAG,kDAAkD,iBAAiB,EAClD,CAAA,EACD,CAAA;KACxB,kBAAC,KAAD;MAAG,WAAU;MACV,UAAAA,EACC,oDACA,8HACF;KACC,CAAA;KACH,kBAACoG,GAAD,EAAA,UAAA,CACE,kBAAC,UAAD;MACE,MAAK;MACL,eAAexD,EAAc,EAAK;MAClC,UAAU7B,EAAc;MACxB,WAAU;MAET,UAAAf,EAAG,sBAAsB,cAAc;KAClC,CAAA,GACR,kBAAC,UAAD;MACE,MAAK;MACL,eAAe,KAAKmE,GAAqB;MACzC,UAAUpD,EAAc;MACxB,WAAU;MAJZ,UAAA,CAMGA,EAAc,aAAa,kBAAC0E,GAAD,EAAS,WAAU,uBAAwB,CAAA,GACtEzF,EAAG,oDAAoD,gBAAgB,CAClE;KACc,CAAA,CAAA,EAAA,CAAA;IACD,EAAA,CAAA;GACT,CAAA;EACR;;AAEhB"}
|
|
1
|
+
{"version":3,"file":"FixtureDetailPage.js","names":["_Fragment","FixtureDetailPage","tr","useAbTranslate","useParams","useAthleteBridge","fixture","useFixture","id","fixtureForms","useRegistrationForms","recordResult","useRecordFixtureResult","updateFixture","useUpdateFixture","postponeFixture","usePostponeFixture","cancelFixture","useCancelFixture","useGlobalUi","homeScore","setHomeScore","useState","awayScore","setAwayScore","extraTimeHome","setExtraTimeHome","extraTimeAway","setExtraTimeAway","penaltyHome","setPenaltyHome","penaltyAway","setPenaltyAway","cricketForm","setCricketForm","error","setError","fixtureStarted","useScheduledTimeGate","scheduleDialog","setScheduleDialog","scheduledAtInput","setScheduledAtInput","kickoffAtInput","setKickoffAtInput","cancelOpen","setCancelOpen","PageLayout","LoadingState","ErrorState","navigateTo","f","homeName","awayName","isResultEligible","canRecordResult","awaitingKickoff","parseScoreInput","getFixtureLifecycleActions","schedulePending","openScheduleDialog","initial","initialScheduleInputs","kind","handleScheduleSubmit","input","buildScheduleInput","showToast","err","confirmCancelFixture","FIXTURE_TYPE_LABELS","ArrowLeft","Scoreboard","AvailabilityRsvpControl","AvailabilityRosterPanel","EmphasisPanel","canReschedule","canPostpone","canCancel","CalendarClock","GlassCard","CalendarPlus","Ban","Flag","draft","buildRecordResultInput","Fragment","Crest","FormField","fieldInputClass","Minus","Loader2","Trophy","ClipboardList","Plus","form","StatusBadge","ResponsiveDialog","open","ResponsiveDialogContent","ResponsiveDialogHeader","ResponsiveDialogTitle","ResponsiveDialogFooter"],"sources":["../../../../src/atheletebridge/pages/fixtures/FixtureDetailPage.tsx"],"sourcesContent":["/**\n * Fixture Detail\n * @module atheletebridge/pages/fixtures\n *\n * Reads a single fixture (athFixture), lets the user manage its lifecycle —\n * reschedule (athUpdateFixture), postpone (athPostponeFixture) and cancel\n * (athCancelFixture) (BOFF-7642) — and record a final result\n * (athRecordFixtureResult) which marks it COMPLETED and recomputes standings.\n *\n * The header is a crest-vs-crest Scoreboard hero; the record-result panel shows\n * each team's crest beside its score input. Semantic tokens only, responsive.\n */\n\nimport { useState } from 'react';\nimport { useParams } from 'react-router';\nimport {\n ArrowLeft,\n Trophy,\n Loader2,\n Flag,\n Minus,\n CalendarClock,\n CalendarPlus,\n Ban,\n ClipboardList,\n Plus,\n} from 'lucide-react';\nimport {\n GlassCard,\n EmphasisPanel,\n ResponsiveDialog,\n ResponsiveDialogContent,\n ResponsiveDialogHeader,\n ResponsiveDialogTitle,\n ResponsiveDialogFooter,\n ThemedSelect,\n} from '@burdenoff/fe-libs/ui';\nimport { useGlobalUi } from '@burdenoff/fe-libs/shared/providers/shell/GlobalUiProvider';\nimport { PageLayout } from '../../components/PageLayout';\nimport { Scoreboard } from '../../components/Scoreboard';\nimport { StatusBadge } from '../../components/StatusBadge';\nimport { Crest } from '../../components/Crest';\nimport { LoadingState, ErrorState } from '../../components/LoadingState';\nimport { FormField, fieldInputClass } from '../../components/form';\nimport { FIXTURE_TYPE_LABELS } from '../../components/domain';\nimport { AvailabilityRsvpControl } from '../../components/availability/AvailabilityRsvpControl';\nimport { AvailabilityRosterPanel } from '../../components/availability/AvailabilityRosterPanel';\nimport { useAthleteBridge } from '../../context/AthleteBridgeContext';\nimport { useScheduledTimeGate } from '../../hooks';\nimport {\n useFixture,\n useRecordFixtureResult,\n useUpdateFixture,\n usePostponeFixture,\n useCancelFixture,\n} from '../../hooks/useAthleteBridgeApi';\nimport { useRegistrationForms } from '../../hooks/useRegistrationApi';\nimport {\n buildScheduleInput,\n getFixtureLifecycleActions,\n initialScheduleInputs,\n} from '../../utils/fixtureLifecycle';\nimport {\n FIXTURE_CRICKET_SCORECARD_LIVE,\n FIXTURE_KNOCKOUT_SCORES_LIVE,\n} from '../../utils/fixtureCapabilities';\nimport {\n buildCricketResultInput,\n buildRecordResultInput,\n parseScoreInput,\n} from '../../utils/recordResult';\nimport { useAbTranslate } from '../../i18n';\n\nexport function FixtureDetailPage() {\n const tr = useAbTranslate();\n const { id } = useParams<{ id: string }>();\n const { navigateTo } = useAthleteBridge();\n\n const fixture = useFixture(id);\n // Tournament sign-up forms targeting this fixture (BOFF-5863).\n const fixtureForms = useRegistrationForms({ fixtureId: id });\n const recordResult = useRecordFixtureResult();\n const updateFixture = useUpdateFixture();\n const postponeFixture = usePostponeFixture();\n const cancelFixture = useCancelFixture();\n const { showToast } = useGlobalUi();\n\n const [homeScore, setHomeScore] = useState('');\n const [awayScore, setAwayScore] = useState('');\n // Knockout outcome (BOFF-7640) — only offered when the fixture is level at\n // full time; a tie still level after extra time must record the shootout.\n const [extraTimeHome, setExtraTimeHome] = useState('');\n const [extraTimeAway, setExtraTimeAway] = useState('');\n const [penaltyHome, setPenaltyHome] = useState('');\n const [penaltyAway, setPenaltyAway] = useState('');\n // Cricket scorecard form (BOFF-7644) — replaces the generic score inputs\n // when the fixture's home team plays cricket.\n const [cricketForm, setCricketForm] = useState({\n homeRuns: '',\n homeWickets: '',\n homeOvers: '',\n homeBalls: '',\n awayRuns: '',\n awayWickets: '',\n awayOvers: '',\n awayBalls: '',\n winner: 'HOME' as 'HOME' | 'AWAY',\n decidedBy: 'RUNS' as 'RUNS' | 'WICKETS',\n margin: '',\n superOver: false,\n dls: false,\n });\n const [error, setError] = useState<string | null>(null);\n // Time gate for the completion action; re-renders when kickoff arrives.\n const fixtureStarted = useScheduledTimeGate(fixture.data?.scheduledAt);\n\n const setCricket = <K extends keyof typeof cricketForm>(\n key: K,\n value: (typeof cricketForm)[K]\n ): void => setCricketForm((prev) => ({ ...prev, [key]: value }));\n\n const resetCricketForm = (): void =>\n setCricketForm({\n homeRuns: '',\n homeWickets: '',\n homeOvers: '',\n homeBalls: '',\n awayRuns: '',\n awayWickets: '',\n awayOvers: '',\n awayBalls: '',\n winner: 'HOME',\n decidedBy: 'RUNS',\n margin: '',\n superOver: false,\n dls: false,\n });\n\n // Fixture lifecycle actions (BOFF-7642). `scheduleDialog` doubles for\n // reschedule and postpone — both are a date/time form; only the mutation\n // and the copy differ.\n const [scheduleDialog, setScheduleDialog] = useState<'reschedule' | 'postpone' | null>(null);\n const [scheduledAtInput, setScheduledAtInput] = useState('');\n const [kickoffAtInput, setKickoffAtInput] = useState('');\n const [cancelOpen, setCancelOpen] = useState(false);\n\n if (fixture.isLoading) {\n return (\n <PageLayout title={tr('atheletebridge.pages.fixtureDetail.title', 'Fixture')}>\n <LoadingState\n label={tr('atheletebridge.pages.fixtureDetail.loading', 'Loading fixture…')}\n />\n </PageLayout>\n );\n }\n\n if (fixture.isError || !fixture.data) {\n return (\n <PageLayout title={tr('atheletebridge.pages.fixtureDetail.title', 'Fixture')}>\n <ErrorState\n title={tr('atheletebridge.pages.fixtureDetail.notFoundTitle', 'Fixture not found')}\n message={tr(\n 'atheletebridge.pages.fixtureDetail.notFoundMessage',\n 'This fixture does not exist or you do not have access to it.'\n )}\n onRetry={() => navigateTo('/fixtures')}\n />\n </PageLayout>\n );\n }\n\n const f = fixture.data;\n const homeName = f.homeTeam?.name ?? tr('atheletebridge.pages.fixtureDetail.home', 'Home');\n const awayName =\n f.awayTeam?.name ??\n (f.awayTeamId ? tr('atheletebridge.pages.fixtureDetail.away', 'Away') : 'TBD');\n // Result entry is the completion transition, gated on kickoff here and\n // enforced server-side too. Both branches share isResultEligible so they\n // cannot drift apart.\n const isResultEligible =\n Boolean(f.awayTeamId) && (f.status === 'SCHEDULED' || f.status === 'LIVE');\n const canRecordResult = isResultEligible && fixtureStarted;\n const awaitingKickoff = isResultEligible && !fixtureStarted;\n\n // The cricket scorecard and knockout inputs post fields the deployed backend\n // may not accept yet; see utils/fixtureCapabilities.\n const isCricket = FIXTURE_CRICKET_SCORECARD_LIVE && f.homeTeam?.sport === 'CRICKET';\n\n // Knockout-outcome inputs (BOFF-7640) — offered once the full-time score is\n // entered and level. The shootout appears while the tie is still level\n // (straight from full time, or after a level extra time).\n const parsedHomeScore = parseScoreInput(homeScore);\n const parsedAwayScore = parseScoreInput(awayScore);\n const fullTimeScoresEntered = parsedHomeScore !== null && parsedAwayScore !== null;\n const levelAtFullTime =\n FIXTURE_KNOCKOUT_SCORES_LIVE && fullTimeScoresEntered && parsedHomeScore === parsedAwayScore;\n const extraTimeEntered = extraTimeHome !== '' || extraTimeAway !== '';\n const extraTimeParsedHome = parseScoreInput(extraTimeHome);\n const extraTimeParsedAway = parseScoreInput(extraTimeAway);\n const extraTimeComplete = extraTimeParsedHome !== null && extraTimeParsedAway !== null;\n const stillLevelAfterExtraTime = extraTimeComplete && extraTimeParsedHome === extraTimeParsedAway;\n const showPenaltyShootout = levelAtFullTime && (!extraTimeEntered || stillLevelAfterExtraTime);\n\n // Lifecycle eligibility mirrors the backend guards: only a SCHEDULED or\n // POSTPONED fixture can be rescheduled (rescheduling a postponed fixture\n // returns it to the calendar as SCHEDULED), only a SCHEDULED or LIVE one\n // can be postponed, and anything not yet final can be cancelled.\n const { canReschedule, canPostpone, canCancel } = getFixtureLifecycleActions(f.status);\n const schedulePending =\n scheduleDialog === 'reschedule' ? updateFixture.isPending : postponeFixture.isPending;\n\n const openScheduleDialog = (kind: 'reschedule' | 'postpone') => {\n const initial = initialScheduleInputs(kind, f);\n setScheduledAtInput(initial.scheduledAtInput);\n setKickoffAtInput(initial.kickoffAtInput);\n setScheduleDialog(kind);\n };\n\n const handleScheduleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n const input = buildScheduleInput(scheduledAtInput, kickoffAtInput);\n if (!input) {\n showToast(\n tr(\n 'atheletebridge.pages.fixtureDetail.scheduleDateRequired',\n 'Pick a date and time first.'\n ),\n 'error'\n );\n return;\n }\n try {\n if (scheduleDialog === 'reschedule') {\n await updateFixture.mutateAsync({ id: f.id, input });\n showToast(\n tr('atheletebridge.pages.fixtureDetail.rescheduledToast', 'Fixture rescheduled.'),\n 'success'\n );\n } else {\n await postponeFixture.mutateAsync({ id: f.id, input });\n showToast(\n tr('atheletebridge.pages.fixtureDetail.postponedToast', 'Fixture postponed.'),\n 'success'\n );\n }\n setScheduleDialog(null);\n } catch (err) {\n showToast(\n err instanceof Error ? err.message : tr('common.error', 'Something went wrong.'),\n 'error'\n );\n }\n };\n\n /**\n * Destructive cancellation: only runs after the confirmation dialog's\n * explicit Cancel fixture. A cancelled fixture is terminal — it can never\n * go LIVE or record a result — so the extra step is deliberate (BOFF-7642).\n */\n const confirmCancelFixture = async () => {\n try {\n await cancelFixture.mutateAsync(f.id);\n showToast(\n tr('atheletebridge.pages.fixtureDetail.cancelledToast', 'Fixture cancelled.'),\n 'success'\n );\n setCancelOpen(false);\n } catch (err) {\n showToast(\n err instanceof Error ? err.message : tr('common.error', 'Something went wrong.'),\n 'error'\n );\n setCancelOpen(false);\n }\n };\n\n const handleRecord = async (e: React.FormEvent) => {\n e.preventDefault();\n setError(null);\n if (!id) return;\n\n if (isCricket) {\n const draft = buildCricketResultInput(\n { ...cricketForm },\n {\n required: tr(\n 'atheletebridge.pages.fixtureDetail.cricketRequired',\n 'All innings scores, overs and the margin are required.'\n ),\n negative: tr(\n 'atheletebridge.pages.fixtureDetail.cricketNegative',\n 'Scores and overs cannot be negative.'\n ),\n wicketsRange: tr(\n 'atheletebridge.pages.fixtureDetail.cricketWicketsRange',\n 'Wickets must be between 0 and 10.'\n ),\n ballsRange: tr(\n 'atheletebridge.pages.fixtureDetail.cricketBallsRange',\n 'Balls must be between 0 and 5.'\n ),\n marginMinimum: tr(\n 'atheletebridge.pages.fixtureDetail.cricketMarginMinimum',\n 'The margin must be at least 1.'\n ),\n wicketMarginMax: tr(\n 'atheletebridge.pages.fixtureDetail.cricketWicketMarginMax',\n 'A win by wickets cannot exceed a margin of 10.'\n ),\n }\n );\n if (!draft.ok) {\n setError(draft.error);\n return;\n }\n try {\n await recordResult.mutateAsync({ id, input: draft.input });\n resetCricketForm();\n } catch (err) {\n setError(\n err instanceof Error\n ? err.message\n : tr('atheletebridge.pages.fixtureDetail.recordFailed', 'Failed to record result.')\n );\n }\n return;\n }\n\n // Non-cricket fixtures: a single pair of scores, optionally followed by a\n // knockout outcome. All the rules live in `buildRecordResultInput` so the\n // page only renders copy and submits the payload it hands back.\n const draft = buildRecordResultInput(\n { homeScore, awayScore, extraTimeHome, extraTimeAway, penaltyHome, penaltyAway },\n {\n scoresRequired: tr(\n 'atheletebridge.pages.fixtureDetail.scoresRequired',\n 'Both scores are required and must be numbers.'\n ),\n scoresNegative: tr(\n 'atheletebridge.pages.fixtureDetail.scoresNegative',\n 'Scores cannot be negative.'\n ),\n extraTimePair: tr(\n 'atheletebridge.pages.fixtureDetail.extraTimePair',\n 'Enter both extra-time scores.'\n ),\n extraTimeNumeric: tr(\n 'atheletebridge.pages.fixtureDetail.extraTimeNumeric',\n 'Extra-time scores must be numbers.'\n ),\n extraTimeNegative: tr(\n 'atheletebridge.pages.fixtureDetail.extraTimeNegative',\n 'Extra-time scores cannot be negative.'\n ),\n penaltyPair: tr(\n 'atheletebridge.pages.fixtureDetail.penaltyPair',\n 'Enter both penalty scores.'\n ),\n penaltyNumeric: tr(\n 'atheletebridge.pages.fixtureDetail.penaltyNumeric',\n 'Penalty scores must be numbers.'\n ),\n penaltyNegative: tr(\n 'atheletebridge.pages.fixtureDetail.penaltyNegative',\n 'Penalty scores cannot be negative.'\n ),\n extraTimeDecided: tr(\n 'atheletebridge.pages.fixtureDetail.extraTimeDecided',\n 'Extra time decided the tie — leave the penalty shootout empty.'\n ),\n extraTimeLevel: tr(\n 'atheletebridge.pages.fixtureDetail.extraTimeLevel',\n 'Still level after extra time — record the penalty shootout.'\n ),\n penaltyLevel: tr(\n 'atheletebridge.pages.fixtureDetail.penaltyLevel',\n 'Penalty scores must have a winner.'\n ),\n }\n );\n if (!draft.ok) {\n setError(draft.error);\n return;\n }\n try {\n await recordResult.mutateAsync({ id, input: draft.input });\n setHomeScore('');\n setAwayScore('');\n setExtraTimeHome('');\n setExtraTimeAway('');\n setPenaltyHome('');\n setPenaltyAway('');\n } catch (err) {\n setError(\n err instanceof Error\n ? err.message\n : tr('atheletebridge.pages.fixtureDetail.recordFailed', 'Failed to record result.')\n );\n }\n };\n\n return (\n <PageLayout\n title={`${homeName} vs ${awayName}`}\n description={`${FIXTURE_TYPE_LABELS[f.type]}${f.competition ? ` · ${f.competition}` : ''}`}\n actions={\n <button\n type=\"button\"\n onClick={() => navigateTo('/fixtures')}\n className=\"inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken\"\n >\n <ArrowLeft className=\"h-4 w-4\" /> {tr('atheletebridge.pages.fixtureDetail.back', 'Back')}\n </button>\n }\n >\n {/* Crest-vs-crest hero scoreboard */}\n <Scoreboard fixture={f} variant=\"hero\" className=\"mb-8\" />\n\n {/* Availability / RSVP (BOFF-4134) — athlete's own response + coach roster view */}\n <div className=\"mb-8 grid grid-cols-1 gap-4 lg:grid-cols-[minmax(0,1fr)_2fr]\">\n <AvailabilityRsvpControl teamId={f.homeTeamId} fixtureId={f.id} />\n <AvailabilityRosterPanel teamId={f.homeTeamId} fixtureId={f.id} />\n </div>\n\n {f.notes && (\n <EmphasisPanel className=\"mb-8\">\n <h2 className=\"mb-2 text-sm font-semibold text-text-primary\">\n {tr('atheletebridge.pages.fixtureDetail.notes', 'Notes')}\n </h2>\n <p className=\"text-sm text-text-secondary\">{f.notes}</p>\n </EmphasisPanel>\n )}\n\n {/* Fixture lifecycle actions (BOFF-7642) */}\n {(canReschedule || canPostpone || canCancel) && (\n <section className=\"mb-8\">\n <h2 className=\"mb-4 flex items-center gap-2 text-lg font-semibold text-text-primary\">\n <CalendarClock className=\"h-5 w-5\" />{' '}\n {tr('atheletebridge.pages.fixtureDetail.fixtureActions', 'Fixture actions')}\n </h2>\n <GlassCard treatment=\"plain\" className=\"flex flex-wrap items-center gap-3 p-5 sm:p-6\">\n {canReschedule && (\n <button\n type=\"button\"\n onClick={() => openScheduleDialog('reschedule')}\n className=\"inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken\"\n >\n <CalendarPlus className=\"h-4 w-4\" />{' '}\n {tr('atheletebridge.pages.fixtureDetail.reschedule', 'Reschedule')}\n </button>\n )}\n {canPostpone && (\n <button\n type=\"button\"\n onClick={() => openScheduleDialog('postpone')}\n className=\"inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken\"\n >\n <CalendarClock className=\"h-4 w-4\" />{' '}\n {tr('atheletebridge.pages.fixtureDetail.postpone', 'Postpone')}\n </button>\n )}\n {canCancel && (\n <button\n type=\"button\"\n onClick={() => setCancelOpen(true)}\n className=\"inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-status-error-text transition-colors hover:bg-status-error-bg-subtle\"\n >\n <Ban className=\"h-4 w-4\" />{' '}\n {tr('atheletebridge.pages.fixtureDetail.cancelFixture', 'Cancel fixture')}\n </button>\n )}\n </GlassCard>\n </section>\n )}\n\n {/* Record result */}\n {awaitingKickoff && (\n <EmphasisPanel className=\"mb-8\">\n <p className=\"text-sm text-text-secondary\">\n {tr(\n 'atheletebridge.pages.fixtureDetail.recordResultUnavailable',\n 'A result can be recorded once this fixture has started — after its scheduled date and time.'\n )}\n </p>\n </EmphasisPanel>\n )}\n {canRecordResult && (\n <section className=\"mb-8\">\n <h2 className=\"mb-4 flex items-center gap-2 text-lg font-semibold text-text-primary\">\n <Flag className=\"h-5 w-5\" />{' '}\n {tr('atheletebridge.pages.fixtureDetail.recordResult', 'Record result')}\n </h2>\n <GlassCard treatment=\"insight\" className=\"p-5 sm:p-6\">\n <p className=\"mb-5 text-sm text-text-secondary\">\n {tr(\n 'atheletebridge.pages.fixtureDetail.recordResultDescription',\n 'Recording a final score marks this fixture Completed and recomputes the competition standings for both teams.'\n )}\n </p>\n <form onSubmit={handleRecord}>\n {isCricket ? (\n <div className=\"flex flex-col items-center gap-5\">\n <p className=\"text-center text-xs font-medium text-text-secondary\">\n {tr(\n 'atheletebridge.pages.fixtureDetail.cricketScorecardDescription',\n 'Record each innings score and how the match was decided — a cricket result is a margin, not a score comparison.'\n )}\n </p>\n\n {(\n [\n { side: 'home' as const, name: homeName, sport: f.homeTeam?.sport },\n { side: 'away' as const, name: awayName, sport: f.awayTeam?.sport },\n ] as const\n ).map(({ side, name, sport }) => (\n <div key={side} className=\"flex flex-wrap items-end justify-center gap-3\">\n <div className=\"flex flex-col items-center gap-2\">\n <Crest name={name} sport={sport} size={40} />\n <span className=\"max-w-[8rem] truncate text-center text-xs font-medium text-text-secondary\">\n {name}\n </span>\n </div>\n <FormField\n label={tr('atheletebridge.pages.fixtureDetail.runs', 'Runs')}\n htmlFor={`cricket-${side}-runs`}\n className=\"w-20\"\n >\n <input\n id={`cricket-${side}-runs`}\n inputMode=\"numeric\"\n className={`${fieldInputClass} text-center tabular-nums`}\n value={cricketForm[`${side}Runs`]}\n onChange={(e) => setCricket(`${side}Runs`, e.target.value)}\n placeholder=\"185\"\n />\n </FormField>\n <span className=\"pb-3 text-lg font-bold text-text-muted\">/</span>\n <FormField\n label={tr('atheletebridge.pages.fixtureDetail.wickets', 'Wkts')}\n htmlFor={`cricket-${side}-wickets`}\n className=\"w-16\"\n >\n <input\n id={`cricket-${side}-wickets`}\n inputMode=\"numeric\"\n className={`${fieldInputClass} text-center tabular-nums`}\n value={cricketForm[`${side}Wickets`]}\n onChange={(e) => setCricket(`${side}Wickets`, e.target.value)}\n placeholder=\"6\"\n />\n </FormField>\n <FormField\n label={tr('atheletebridge.pages.fixtureDetail.overs', 'Overs')}\n htmlFor={`cricket-${side}-overs`}\n className=\"w-16\"\n >\n <input\n id={`cricket-${side}-overs`}\n inputMode=\"numeric\"\n className={`${fieldInputClass} text-center tabular-nums`}\n value={cricketForm[`${side}Overs`]}\n onChange={(e) => setCricket(`${side}Overs`, e.target.value)}\n placeholder=\"20\"\n />\n </FormField>\n <FormField\n label={tr('atheletebridge.pages.fixtureDetail.balls', 'Balls')}\n htmlFor={`cricket-${side}-balls`}\n className=\"w-14\"\n >\n <input\n id={`cricket-${side}-balls`}\n inputMode=\"numeric\"\n className={`${fieldInputClass} text-center tabular-nums`}\n value={cricketForm[`${side}Balls`]}\n onChange={(e) => setCricket(`${side}Balls`, e.target.value)}\n placeholder=\"0\"\n />\n </FormField>\n </div>\n ))}\n\n <div className=\"flex flex-wrap items-end justify-center gap-4\">\n <FormField\n label={tr('atheletebridge.pages.fixtureDetail.winner', 'Winner')}\n htmlFor=\"cricket-winner\"\n >\n <ThemedSelect\n id=\"cricket-winner\"\n className={fieldInputClass}\n value={cricketForm.winner}\n onChange={(e) => setCricket('winner', e.target.value as 'HOME' | 'AWAY')}\n >\n <option value=\"HOME\">{homeName}</option>\n <option value=\"AWAY\">{awayName}</option>\n </ThemedSelect>\n </FormField>\n <FormField\n label={tr('atheletebridge.pages.fixtureDetail.decidedBy', 'Decided by')}\n htmlFor=\"cricket-decided-by\"\n >\n <ThemedSelect\n id=\"cricket-decided-by\"\n className={fieldInputClass}\n value={cricketForm.decidedBy}\n onChange={(e) =>\n setCricket('decidedBy', e.target.value as 'RUNS' | 'WICKETS')\n }\n >\n <option value=\"RUNS\">\n {tr('atheletebridge.pages.fixtureDetail.runs', 'Runs')}\n </option>\n <option value=\"WICKETS\">\n {tr('atheletebridge.pages.fixtureDetail.wickets', 'Wkts')}\n </option>\n </ThemedSelect>\n </FormField>\n <FormField\n label={tr('atheletebridge.pages.fixtureDetail.margin', 'Margin')}\n htmlFor=\"cricket-margin\"\n className=\"w-20\"\n >\n <input\n id=\"cricket-margin\"\n inputMode=\"numeric\"\n className={`${fieldInputClass} text-center tabular-nums`}\n value={cricketForm.margin}\n onChange={(e) => setCricket('margin', e.target.value)}\n placeholder=\"13\"\n />\n </FormField>\n </div>\n\n <div className=\"flex items-center gap-6\">\n <label className=\"flex items-center gap-2.5 text-sm text-text-primary\">\n <input\n type=\"checkbox\"\n checked={cricketForm.superOver}\n onChange={(e) => setCricket('superOver', e.target.checked)}\n className=\"h-4 w-4 rounded border-border-seam text-action-primary-bg focus:ring-[var(--color-focus-ring)]\"\n />\n {tr('atheletebridge.pages.fixtureDetail.superOver', 'Super Over')}\n </label>\n <label className=\"flex items-center gap-2.5 text-sm text-text-primary\">\n <input\n type=\"checkbox\"\n checked={cricketForm.dls}\n onChange={(e) => setCricket('dls', e.target.checked)}\n className=\"h-4 w-4 rounded border-border-seam text-action-primary-bg focus:ring-[var(--color-focus-ring)]\"\n />\n {tr('atheletebridge.pages.fixtureDetail.dls', 'DLS')}\n </label>\n </div>\n </div>\n ) : (\n <>\n <div className=\"flex flex-wrap items-end justify-center gap-4 sm:gap-6\">\n <div className=\"flex items-end gap-3\">\n <div className=\"flex flex-col items-center gap-2\">\n <Crest name={homeName} sport={f.homeTeam?.sport} size={40} />\n <span className=\"max-w-[8rem] truncate text-center text-xs font-medium text-text-secondary\">\n {homeName}\n </span>\n </div>\n <FormField\n label={tr('atheletebridge.pages.fixtureDetail.home', 'Home')}\n htmlFor=\"homeScore\"\n className=\"w-24\"\n >\n <input\n id=\"homeScore\"\n inputMode=\"numeric\"\n className={`${fieldInputClass} text-center text-lg font-bold tabular-nums`}\n value={homeScore}\n onChange={(e) => setHomeScore(e.target.value)}\n placeholder=\"0\"\n />\n </FormField>\n </div>\n\n <Minus className=\"mb-3 h-5 w-5 shrink-0 text-text-muted\" aria-hidden=\"true\" />\n\n <div className=\"flex items-end gap-3\">\n <FormField\n label={tr('atheletebridge.pages.fixtureDetail.away', 'Away')}\n htmlFor=\"awayScore\"\n className=\"w-24\"\n >\n <input\n id=\"awayScore\"\n inputMode=\"numeric\"\n className={`${fieldInputClass} text-center text-lg font-bold tabular-nums`}\n value={awayScore}\n onChange={(e) => setAwayScore(e.target.value)}\n placeholder=\"0\"\n />\n </FormField>\n <div className=\"flex flex-col items-center gap-2\">\n <Crest name={awayName} sport={f.awayTeam?.sport} size={40} />\n <span className=\"max-w-[8rem] truncate text-center text-xs font-medium text-text-secondary\">\n {awayName}\n </span>\n </div>\n </div>\n </div>\n\n {levelAtFullTime && (\n <div className=\"mt-6 border-t border-border-seam pt-5\">\n <p className=\"mb-4 text-center text-xs font-medium text-text-secondary\">\n {tr(\n 'atheletebridge.pages.fixtureDetail.levelAtFullTime',\n 'Level at full time — record how the tie was decided (optional).'\n )}\n </p>\n <div className=\"flex flex-col items-center gap-4\">\n <div className=\"flex items-end justify-center gap-3\">\n <span className=\"mb-2.5 w-16 text-right text-xs font-medium text-text-secondary\">\n {homeName}\n </span>\n <FormField\n label={tr('atheletebridge.pages.fixtureDetail.extraTime', 'Extra time')}\n htmlFor=\"extraTimeHome\"\n className=\"w-20\"\n >\n <input\n id=\"extraTimeHome\"\n inputMode=\"numeric\"\n className={`${fieldInputClass} text-center tabular-nums`}\n value={extraTimeHome}\n onChange={(e) => setExtraTimeHome(e.target.value)}\n placeholder=\"–\"\n />\n </FormField>\n <Minus\n className=\"mb-3 h-4 w-4 shrink-0 text-text-muted\"\n aria-hidden=\"true\"\n />\n <FormField label=\" \" htmlFor=\"extraTimeAway\" className=\"w-20\">\n <input\n id=\"extraTimeAway\"\n inputMode=\"numeric\"\n className={`${fieldInputClass} text-center tabular-nums`}\n value={extraTimeAway}\n onChange={(e) => setExtraTimeAway(e.target.value)}\n placeholder=\"–\"\n />\n </FormField>\n <span className=\"mb-2.5 w-16 truncate text-xs font-medium text-text-secondary\">\n {awayName}\n </span>\n </div>\n\n {showPenaltyShootout && (\n <div className=\"flex items-end justify-center gap-3\">\n <span className=\"mb-2.5 w-16 text-right text-xs font-medium text-text-secondary\">\n {homeName}\n </span>\n <FormField\n label={tr(\n 'atheletebridge.pages.fixtureDetail.penaltyShootout',\n 'Penalties'\n )}\n htmlFor=\"penaltyHome\"\n className=\"w-20\"\n >\n <input\n id=\"penaltyHome\"\n inputMode=\"numeric\"\n className={`${fieldInputClass} text-center tabular-nums`}\n value={penaltyHome}\n onChange={(e) => setPenaltyHome(e.target.value)}\n placeholder=\"–\"\n />\n </FormField>\n <Minus\n className=\"mb-3 h-4 w-4 shrink-0 text-text-muted\"\n aria-hidden=\"true\"\n />\n <FormField label=\" \" htmlFor=\"penaltyAway\" className=\"w-20\">\n <input\n id=\"penaltyAway\"\n inputMode=\"numeric\"\n className={`${fieldInputClass} text-center tabular-nums`}\n value={penaltyAway}\n onChange={(e) => setPenaltyAway(e.target.value)}\n placeholder=\"–\"\n />\n </FormField>\n <span className=\"mb-2.5 w-16 truncate text-xs font-medium text-text-secondary\">\n {awayName}\n </span>\n </div>\n )}\n </div>\n </div>\n )}\n </>\n )}\n\n <div className=\"mt-6 flex justify-center\">\n <button\n type=\"submit\"\n disabled={recordResult.isPending}\n className=\"inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-6 py-2.5 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-60\"\n >\n {recordResult.isPending ? (\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n ) : (\n <Trophy className=\"h-4 w-4\" />\n )}\n {tr('atheletebridge.pages.fixtureDetail.recordResultAction', 'Record result')}\n </button>\n </div>\n </form>\n {error && <p className=\"mt-3 text-center text-sm text-status-error-text\">{error}</p>}\n </GlassCard>\n </section>\n )}\n\n {/* Tournament sign-ups (BOFF-5863): registration forms targeting this\n fixture, with live intake and check-in handled on the form pages. */}\n <section className=\"mb-8\">\n <h2 className=\"mb-4 flex items-center gap-2 text-lg font-semibold text-text-primary\">\n <ClipboardList className=\"h-5 w-5\" />{' '}\n {tr('atheletebridge.pages.fixtureDetail.signUps', 'Tournament sign-ups')}\n </h2>\n {fixtureForms.isLoading ? (\n <p className=\"text-sm text-text-secondary\">\n {tr('atheletebridge.pages.fixtureDetail.signUpsLoading', 'Loading sign-up forms…')}\n </p>\n ) : fixtureForms.isError ? (\n <p className=\"text-sm text-status-error-text\">\n {tr(\n 'atheletebridge.pages.fixtureDetail.signUpsError',\n 'Sign-up forms could not be loaded.'\n )}\n </p>\n ) : (fixtureForms.data?.items ?? []).length === 0 ? (\n <div className=\"flex flex-wrap items-center justify-between gap-3 rounded-lg border border-dashed border-border-seam bg-bg-surface px-4 py-3\">\n <p className=\"text-sm text-text-secondary\">\n {tr(\n 'atheletebridge.pages.fixtureDetail.signUpsEmpty',\n 'No sign-up form for this fixture yet. Publish one and families register through its share link.'\n )}\n </p>\n <button\n type=\"button\"\n onClick={() => navigateTo('/registrations/new')}\n className=\"inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken\"\n >\n <Plus className=\"h-4 w-4\" />{' '}\n {tr('atheletebridge.pages.fixtureDetail.createSignUp', 'Create sign-up form')}\n </button>\n </div>\n ) : (\n <ul className=\"divide-y divide-border-seam overflow-hidden rounded-lg border border-border-seam bg-bg-surface\">\n {(fixtureForms.data?.items ?? []).map((form) => (\n <li key={form.id}>\n <button\n type=\"button\"\n onClick={() => navigateTo(`/registrations/${form.id}`)}\n className=\"flex w-full flex-wrap items-center justify-between gap-3 px-4 py-3 text-left transition-colors hover:bg-bg-sunken\"\n >\n <span className=\"min-w-0\">\n <span className=\"block truncate font-medium text-text-primary\">\n {form.title}\n </span>\n <span className=\"block text-xs text-text-secondary\">\n {form.isOpen\n ? tr(\n 'atheletebridge.pages.fixtureDetail.signUpsOpen',\n 'Accepting registrations'\n )\n : tr(\n 'atheletebridge.pages.fixtureDetail.signUpsNotOpen',\n 'Not accepting registrations'\n )}\n </span>\n </span>\n <span className=\"flex items-center gap-3\">\n <span className=\"text-sm tabular-nums text-text-secondary\">\n {form.submissionCount}{' '}\n {tr('atheletebridge.pages.fixtureDetail.signUpCount', 'registered')}\n </span>\n <StatusBadge status={form.status} />\n </span>\n </button>\n </li>\n ))}\n </ul>\n )}\n </section>\n\n {f.competition && (\n <button\n type=\"button\"\n onClick={() =>\n navigateTo(`/standings?competition=${encodeURIComponent(f.competition ?? '')}`)\n }\n className=\"inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken\"\n >\n <Trophy className=\"h-4 w-4\" />{' '}\n {tr(\n 'atheletebridge.pages.fixtureDetail.viewStandings',\n `View ${f.competition} standings`\n )}\n </button>\n )}\n\n {/* Reschedule / postpone dialog — one date/time form, two mutations */}\n <ResponsiveDialog\n open={scheduleDialog !== null}\n onOpenChange={(open) => {\n if (!open && !schedulePending) setScheduleDialog(null);\n }}\n >\n <ResponsiveDialogContent>\n <ResponsiveDialogHeader>\n <ResponsiveDialogTitle>\n {scheduleDialog === 'reschedule'\n ? tr('atheletebridge.pages.fixtureDetail.rescheduleTitle', 'Reschedule fixture')\n : tr('atheletebridge.pages.fixtureDetail.postponeTitle', 'Postpone fixture')}\n </ResponsiveDialogTitle>\n </ResponsiveDialogHeader>\n <form onSubmit={(e) => void handleScheduleSubmit(e)} className=\"space-y-4 px-1\">\n <p className=\"text-sm text-text-secondary\">\n {scheduleDialog === 'reschedule'\n ? tr(\n 'atheletebridge.pages.fixtureDetail.rescheduleDescription',\n 'Pick a new date and time for this fixture. Rescheduling a postponed fixture puts it back on the calendar as scheduled.'\n )\n : tr(\n 'atheletebridge.pages.fixtureDetail.postponeDescription',\n 'Move this fixture to a later date. Its status becomes Postponed and it stays off the calendar until it is rescheduled.'\n )}\n </p>\n <FormField\n label={tr('atheletebridge.pages.fixtureDetail.newDateTime', 'New date & time')}\n htmlFor=\"fixtureScheduledAt\"\n required\n >\n <input\n id=\"fixtureScheduledAt\"\n type=\"datetime-local\"\n className={fieldInputClass}\n value={scheduledAtInput}\n onChange={(e) => setScheduledAtInput(e.target.value)}\n required\n />\n </FormField>\n <FormField\n label={tr('atheletebridge.pages.fixtureDetail.newKickoff', 'New kickoff (optional)')}\n htmlFor=\"fixtureKickoffAt\"\n >\n <input\n id=\"fixtureKickoffAt\"\n type=\"datetime-local\"\n className={fieldInputClass}\n value={kickoffAtInput}\n onChange={(e) => setKickoffAtInput(e.target.value)}\n />\n </FormField>\n <ResponsiveDialogFooter>\n <button\n type=\"button\"\n onClick={() => setScheduleDialog(null)}\n disabled={schedulePending}\n className=\"rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-60\"\n >\n {tr('common.cancel', 'Cancel')}\n </button>\n <button\n type=\"submit\"\n disabled={schedulePending}\n className=\"inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-semibold text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-60\"\n >\n {schedulePending && <Loader2 className=\"h-4 w-4 animate-spin\" />}\n {scheduleDialog === 'reschedule'\n ? tr('atheletebridge.pages.fixtureDetail.rescheduleAction', 'Reschedule')\n : tr('atheletebridge.pages.fixtureDetail.postponeAction', 'Postpone')}\n </button>\n </ResponsiveDialogFooter>\n </form>\n </ResponsiveDialogContent>\n </ResponsiveDialog>\n\n {/* Cancel confirmation (BOFF-7642) — cancellation is terminal, so the\n destructive action only runs after an explicit confirmation. */}\n <ResponsiveDialog\n open={cancelOpen}\n onOpenChange={(open) => {\n if (!open && !cancelFixture.isPending) setCancelOpen(false);\n }}\n >\n <ResponsiveDialogContent>\n <ResponsiveDialogHeader>\n <ResponsiveDialogTitle>\n {tr('atheletebridge.pages.fixtureDetail.cancelTitle', 'Cancel fixture?')}\n </ResponsiveDialogTitle>\n </ResponsiveDialogHeader>\n <p className=\"px-1 text-sm text-text-secondary\">\n {tr(\n 'atheletebridge.pages.fixtureDetail.cancelMessage',\n 'This fixture will be marked Cancelled. A cancelled fixture can never be played or rescheduled. This action cannot be undone.'\n )}\n </p>\n <ResponsiveDialogFooter>\n <button\n type=\"button\"\n onClick={() => setCancelOpen(false)}\n disabled={cancelFixture.isPending}\n className=\"rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-60\"\n >\n {tr('common.keepFixture', 'Keep fixture')}\n </button>\n <button\n type=\"button\"\n onClick={() => void confirmCancelFixture()}\n disabled={cancelFixture.isPending}\n className=\"inline-flex items-center gap-1.5 rounded-lg bg-action-danger-bg px-4 py-2 text-sm font-semibold text-action-danger-text transition-colors hover:bg-action-danger-bgHover disabled:opacity-60\"\n >\n {cancelFixture.isPending && <Loader2 className=\"h-4 w-4 animate-spin\" />}\n {tr('atheletebridge.pages.fixtureDetail.cancelConfirm', 'Cancel fixture')}\n </button>\n </ResponsiveDialogFooter>\n </ResponsiveDialogContent>\n </ResponsiveDialog>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAyEA,SAAgBC,IAAoB;CAClC,IAAMC,IAAKC,GAAe,GACpB,EA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A,EAAA,CAAA;IACD,EAAA,CAAA;GACT,CAAA;EACR;;AAEhB"}
|
|
@@ -11,17 +11,17 @@ import { useMemo as f, useState as p } from "react";
|
|
|
11
11
|
import { ArrowLeft as m, Calendar as h, Clock as g, Handshake as _, Loader2 as v, Network as y, Save as b, Shield as x, Swords as S, Trophy as C } from "lucide-react";
|
|
12
12
|
import { useSearchParams as w } from "react-router";
|
|
13
13
|
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
14
|
-
import { GlassCard as D } from "@burdenoff/fe-libs/ui";
|
|
14
|
+
import { GlassCard as D, ThemedSelect as O } from "@burdenoff/fe-libs/ui";
|
|
15
15
|
// src/atheletebridge/pages/fixtures/FixtureFormPage.tsx
|
|
16
|
-
var
|
|
16
|
+
var k = {
|
|
17
17
|
FRIENDLY: _,
|
|
18
18
|
LEAGUE: x,
|
|
19
19
|
CUP: C,
|
|
20
20
|
TOURNAMENT: y,
|
|
21
21
|
SCRIMMAGE: S
|
|
22
|
-
},
|
|
23
|
-
function
|
|
24
|
-
let [_] = w(), { navigateTo: y } = s(), x = u({ pagination: { limit: 100 } }), S = c({ pagination: { limit: 100 } }), C = l(), [
|
|
22
|
+
}, A = Object.keys(a);
|
|
23
|
+
function j() {
|
|
24
|
+
let [_] = w(), { navigateTo: y } = s(), x = u({ pagination: { limit: 100 } }), S = c({ pagination: { limit: 100 } }), C = l(), [j, M] = p(_.get("homeTeamId") ?? ""), [N, P] = p(""), [F, I] = p("FRIENDLY"), [L, R] = p(""), [z, B] = p(""), [V, H] = p(""), [U, W] = p(""), [G, K] = p(""), [q, J] = p(""), [Y, X] = p(null), Z = x.data?.items ?? [], Q = Z.find((e) => e.id === j), $ = Z.find((e) => e.id === N), { competitions: ee, venues: te } = f(() => {
|
|
25
25
|
let e = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set();
|
|
26
26
|
for (let n of S.data?.items ?? []) n.competition && e.add(n.competition), n.venue && t.add(n.venue);
|
|
27
27
|
return {
|
|
@@ -43,24 +43,24 @@ function A() {
|
|
|
43
43
|
}),
|
|
44
44
|
children: /* @__PURE__ */ T("form", {
|
|
45
45
|
onSubmit: async (e) => {
|
|
46
|
-
if (e.preventDefault(),
|
|
47
|
-
else if (!
|
|
48
|
-
else if (
|
|
46
|
+
if (e.preventDefault(), X(null), !j) X("A home team is required.");
|
|
47
|
+
else if (!U) X("A scheduled date and time is required.");
|
|
48
|
+
else if (N && N === j) X("Home and away teams must be different.");
|
|
49
49
|
else try {
|
|
50
50
|
let e = await C.mutateAsync({
|
|
51
|
-
homeTeamId:
|
|
52
|
-
awayTeamId:
|
|
53
|
-
type:
|
|
54
|
-
competition:
|
|
55
|
-
round:
|
|
56
|
-
venue:
|
|
57
|
-
scheduledAt: new Date(
|
|
58
|
-
kickoffAt: d(
|
|
59
|
-
notes:
|
|
51
|
+
homeTeamId: j,
|
|
52
|
+
awayTeamId: N || void 0,
|
|
53
|
+
type: F,
|
|
54
|
+
competition: L.trim() || void 0,
|
|
55
|
+
round: z.trim() || void 0,
|
|
56
|
+
venue: V.trim() || void 0,
|
|
57
|
+
scheduledAt: new Date(U).toISOString(),
|
|
58
|
+
kickoffAt: d(G),
|
|
59
|
+
notes: q.trim() || void 0
|
|
60
60
|
});
|
|
61
61
|
y(`/fixtures/${e.id}`);
|
|
62
62
|
} catch (e) {
|
|
63
|
-
|
|
63
|
+
X(e instanceof Error ? e.message : "Failed to schedule fixture.");
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
className: "mx-auto max-w-3xl",
|
|
@@ -74,54 +74,54 @@ function A() {
|
|
|
74
74
|
label: "Home team",
|
|
75
75
|
htmlFor: "homeTeam",
|
|
76
76
|
required: !0,
|
|
77
|
-
children: [/* @__PURE__ */ E(
|
|
77
|
+
children: [/* @__PURE__ */ E(O, {
|
|
78
78
|
id: "homeTeam",
|
|
79
79
|
className: n,
|
|
80
|
-
value:
|
|
81
|
-
onChange: (e) =>
|
|
80
|
+
value: j,
|
|
81
|
+
onChange: (e) => M(e.target.value),
|
|
82
82
|
children: [/* @__PURE__ */ T("option", {
|
|
83
83
|
value: "",
|
|
84
84
|
children: "Select a team"
|
|
85
|
-
}),
|
|
85
|
+
}), Z.map((e) => /* @__PURE__ */ T("option", {
|
|
86
86
|
value: e.id,
|
|
87
87
|
children: e.name
|
|
88
88
|
}, e.id))]
|
|
89
|
-
}),
|
|
89
|
+
}), Q ? /* @__PURE__ */ E("div", {
|
|
90
90
|
className: "mt-2 flex items-center gap-2",
|
|
91
91
|
children: [/* @__PURE__ */ T(i, {
|
|
92
|
-
name:
|
|
93
|
-
sport:
|
|
92
|
+
name: Q.name,
|
|
93
|
+
sport: Q.sport,
|
|
94
94
|
size: 28
|
|
95
95
|
}), /* @__PURE__ */ T("span", {
|
|
96
96
|
className: "truncate text-xs font-medium text-text-secondary",
|
|
97
|
-
children:
|
|
97
|
+
children: Q.name
|
|
98
98
|
})]
|
|
99
99
|
}) : null]
|
|
100
100
|
}), /* @__PURE__ */ E(t, {
|
|
101
101
|
label: "Away team",
|
|
102
102
|
htmlFor: "awayTeam",
|
|
103
103
|
hint: "Optional for trials / open events.",
|
|
104
|
-
children: [/* @__PURE__ */ E(
|
|
104
|
+
children: [/* @__PURE__ */ E(O, {
|
|
105
105
|
id: "awayTeam",
|
|
106
106
|
className: n,
|
|
107
|
-
value:
|
|
108
|
-
onChange: (e) =>
|
|
107
|
+
value: N,
|
|
108
|
+
onChange: (e) => P(e.target.value),
|
|
109
109
|
children: [/* @__PURE__ */ T("option", {
|
|
110
110
|
value: "",
|
|
111
111
|
children: "No away team"
|
|
112
|
-
}),
|
|
112
|
+
}), Z.map((e) => /* @__PURE__ */ T("option", {
|
|
113
113
|
value: e.id,
|
|
114
114
|
children: e.name
|
|
115
115
|
}, e.id))]
|
|
116
|
-
}),
|
|
116
|
+
}), $ ? /* @__PURE__ */ E("div", {
|
|
117
117
|
className: "mt-2 flex items-center gap-2",
|
|
118
118
|
children: [/* @__PURE__ */ T(i, {
|
|
119
|
-
name:
|
|
120
|
-
sport:
|
|
119
|
+
name: $.name,
|
|
120
|
+
sport: $.sport,
|
|
121
121
|
size: 28
|
|
122
122
|
}), /* @__PURE__ */ T("span", {
|
|
123
123
|
className: "truncate text-xs font-medium text-text-secondary",
|
|
124
|
-
children:
|
|
124
|
+
children: $.name
|
|
125
125
|
})]
|
|
126
126
|
}) : null]
|
|
127
127
|
})]
|
|
@@ -135,18 +135,18 @@ function A() {
|
|
|
135
135
|
role: "radiogroup",
|
|
136
136
|
"aria-label": "Fixture type",
|
|
137
137
|
onKeyDown: (e) => {
|
|
138
|
-
let t =
|
|
139
|
-
e.key === "ArrowRight" || e.key === "ArrowDown" ? (e.preventDefault(),
|
|
138
|
+
let t = A.indexOf(F);
|
|
139
|
+
e.key === "ArrowRight" || e.key === "ArrowDown" ? (e.preventDefault(), I(A[(t + 1) % A.length])) : (e.key === "ArrowLeft" || e.key === "ArrowUp") && (e.preventDefault(), I(A[(t - 1 + A.length) % A.length]));
|
|
140
140
|
},
|
|
141
141
|
className: "grid grid-cols-2 gap-2 sm:grid-cols-5",
|
|
142
|
-
children:
|
|
143
|
-
let t =
|
|
142
|
+
children: A.map((e) => {
|
|
143
|
+
let t = k[e], n = F === e;
|
|
144
144
|
return /* @__PURE__ */ E("button", {
|
|
145
145
|
type: "button",
|
|
146
146
|
role: "radio",
|
|
147
147
|
"aria-checked": n,
|
|
148
148
|
tabIndex: n ? 0 : -1,
|
|
149
|
-
onClick: () =>
|
|
149
|
+
onClick: () => I(e),
|
|
150
150
|
className: o("flex items-center justify-center gap-1.5 rounded-lg border px-2.5 py-2.5 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", n ? "border-action-primary-bg bg-[var(--color-accent-soft)] text-text-primary ring-1 ring-inset ring-action-primary-bg" : "border-border-seam text-text-secondary hover:bg-bg-sunken"),
|
|
151
151
|
children: [/* @__PURE__ */ T(t, {
|
|
152
152
|
className: "h-4 w-4 shrink-0",
|
|
@@ -166,12 +166,12 @@ function A() {
|
|
|
166
166
|
id: "competition",
|
|
167
167
|
list: "ath-fixture-competitions",
|
|
168
168
|
className: n,
|
|
169
|
-
value:
|
|
170
|
-
onChange: (e) =>
|
|
169
|
+
value: L,
|
|
170
|
+
onChange: (e) => R(e.target.value),
|
|
171
171
|
placeholder: "e.g. Spring League 2026"
|
|
172
172
|
}), /* @__PURE__ */ T("datalist", {
|
|
173
173
|
id: "ath-fixture-competitions",
|
|
174
|
-
children:
|
|
174
|
+
children: ee.map((e) => /* @__PURE__ */ T("option", { value: e }, e))
|
|
175
175
|
})]
|
|
176
176
|
}), /* @__PURE__ */ T(t, {
|
|
177
177
|
label: "Round",
|
|
@@ -179,8 +179,8 @@ function A() {
|
|
|
179
179
|
children: /* @__PURE__ */ T("input", {
|
|
180
180
|
id: "round",
|
|
181
181
|
className: n,
|
|
182
|
-
value:
|
|
183
|
-
onChange: (e) =>
|
|
182
|
+
value: z,
|
|
183
|
+
onChange: (e) => B(e.target.value),
|
|
184
184
|
placeholder: "e.g. Round 4"
|
|
185
185
|
})
|
|
186
186
|
})]
|
|
@@ -194,12 +194,12 @@ function A() {
|
|
|
194
194
|
id: "venue",
|
|
195
195
|
list: "ath-fixture-venues",
|
|
196
196
|
className: n,
|
|
197
|
-
value:
|
|
198
|
-
onChange: (e) =>
|
|
197
|
+
value: V,
|
|
198
|
+
onChange: (e) => H(e.target.value),
|
|
199
199
|
placeholder: "e.g. Riverside Stadium"
|
|
200
200
|
}), /* @__PURE__ */ T("datalist", {
|
|
201
201
|
id: "ath-fixture-venues",
|
|
202
|
-
children:
|
|
202
|
+
children: te.map((e) => /* @__PURE__ */ T("option", { value: e }, e))
|
|
203
203
|
})]
|
|
204
204
|
})
|
|
205
205
|
}),
|
|
@@ -218,8 +218,8 @@ function A() {
|
|
|
218
218
|
id: "scheduledAt",
|
|
219
219
|
type: "datetime-local",
|
|
220
220
|
className: o(n, "pl-9"),
|
|
221
|
-
value:
|
|
222
|
-
onChange: (e) =>
|
|
221
|
+
value: U,
|
|
222
|
+
onChange: (e) => W(e.target.value)
|
|
223
223
|
})]
|
|
224
224
|
})
|
|
225
225
|
}), /* @__PURE__ */ T(t, {
|
|
@@ -235,8 +235,8 @@ function A() {
|
|
|
235
235
|
id: "kickoffAt",
|
|
236
236
|
type: "datetime-local",
|
|
237
237
|
className: o(n, "pl-9"),
|
|
238
|
-
value:
|
|
239
|
-
onChange: (e) =>
|
|
238
|
+
value: G,
|
|
239
|
+
onChange: (e) => K(e.target.value)
|
|
240
240
|
})]
|
|
241
241
|
})
|
|
242
242
|
})]
|
|
@@ -250,15 +250,15 @@ function A() {
|
|
|
250
250
|
id: "notes",
|
|
251
251
|
className: n,
|
|
252
252
|
rows: 3,
|
|
253
|
-
value:
|
|
254
|
-
onChange: (e) =>
|
|
253
|
+
value: q,
|
|
254
|
+
onChange: (e) => J(e.target.value),
|
|
255
255
|
placeholder: "Any extra context for this fixture."
|
|
256
256
|
})
|
|
257
257
|
})
|
|
258
258
|
}),
|
|
259
|
-
|
|
259
|
+
Y && /* @__PURE__ */ T("p", {
|
|
260
260
|
className: "mt-5 text-sm text-status-error-text",
|
|
261
|
-
children:
|
|
261
|
+
children: Y
|
|
262
262
|
}),
|
|
263
263
|
/* @__PURE__ */ E("div", {
|
|
264
264
|
className: "mt-6 flex items-center justify-end gap-3 border-t border-border-seam pt-5",
|
|
@@ -279,6 +279,6 @@ function A() {
|
|
|
279
279
|
})
|
|
280
280
|
});
|
|
281
281
|
}
|
|
282
|
-
export {
|
|
282
|
+
export { j as FixtureFormPage };
|
|
283
283
|
|
|
284
284
|
//# sourceMappingURL=FixtureFormPage.js.map
|