@burdenoff/microfe-atheletebridge 2026.1023.1 → 2026.1024.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/hooks/index.d.ts +1 -0
- package/dist/atheletebridge/hooks/index.d.ts.map +1 -1
- package/dist/atheletebridge/hooks/index.js +1 -0
- package/dist/atheletebridge/hooks/useScheduledTimeGate.d.ts +18 -0
- package/dist/atheletebridge/hooks/useScheduledTimeGate.d.ts.map +1 -0
- package/dist/atheletebridge/hooks/useScheduledTimeGate.js +24 -0
- package/dist/atheletebridge/hooks/useScheduledTimeGate.js.map +1 -0
- package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.d.ts.map +1 -1
- package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js +203 -194
- package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js.map +1 -1
- package/dist/atheletebridge/pages/sessions/SessionDetailPage.d.ts.map +1 -1
- package/dist/atheletebridge/pages/sessions/SessionDetailPage.js +164 -159
- package/dist/atheletebridge/pages/sessions/SessionDetailPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,21 +3,23 @@ import { useAthleteBridge as t } from "../../context/AthleteBridgeContext.js";
|
|
|
3
3
|
import { PageLayout as n } from "../../components/PageLayout.js";
|
|
4
4
|
import { FIXTURE_TYPE_LABELS as ee } from "../../components/domain.js";
|
|
5
5
|
import { Crest as r } from "../../components/Crest.js";
|
|
6
|
-
import { Scoreboard as
|
|
7
|
-
import { ErrorState as
|
|
8
|
-
import { useFixture as
|
|
6
|
+
import { Scoreboard as te } from "../../components/Scoreboard.js";
|
|
7
|
+
import { ErrorState as i, LoadingState as a } from "../../components/LoadingState.js";
|
|
8
|
+
import { useFixture as o, useRecordFixtureResult as ne } from "../../hooks/useAthleteBridgeApi.js";
|
|
9
|
+
import { useScheduledTimeGate as s } from "../../hooks/useScheduledTimeGate.js";
|
|
10
|
+
import "../../hooks/index.js";
|
|
9
11
|
import { FormField as c, fieldInputClass as l } from "../../components/form.js";
|
|
10
|
-
import { AvailabilityRsvpControl as
|
|
11
|
-
import { AvailabilityRosterPanel as
|
|
12
|
-
import { buildCricketResultInput as
|
|
13
|
-
import { useState as
|
|
14
|
-
import { ArrowLeft as
|
|
15
|
-
import { useParams as
|
|
16
|
-
import { Fragment as
|
|
17
|
-
import { EmphasisPanel as
|
|
12
|
+
import { AvailabilityRsvpControl as re } from "../../components/availability/AvailabilityRsvpControl.js";
|
|
13
|
+
import { AvailabilityRosterPanel as u } from "../../components/availability/AvailabilityRosterPanel.js";
|
|
14
|
+
import { buildCricketResultInput as ie, buildRecordResultInput as d, parseScoreInput as f } from "../../utils/recordResult.js";
|
|
15
|
+
import { useState as p } from "react";
|
|
16
|
+
import { ArrowLeft as ae, Flag as oe, Loader2 as se, Minus as m, Trophy as h } from "lucide-react";
|
|
17
|
+
import { useParams as ce } from "react-router";
|
|
18
|
+
import { Fragment as le, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
19
|
+
import { EmphasisPanel as v, GlassCard as y } from "@burdenoff/fe-libs/ui";
|
|
18
20
|
//#region src/atheletebridge/pages/fixtures/FixtureDetailPage.tsx
|
|
19
|
-
function
|
|
20
|
-
let
|
|
21
|
+
function b() {
|
|
22
|
+
let b = e(), { id: x } = ce(), { navigateTo: S } = t(), C = o(x), w = ne(), [T, E] = p(""), [D, O] = p(""), [k, A] = p(""), [j, M] = p(""), [N, P] = p(""), [F, I] = p(""), [L, R] = p({
|
|
21
23
|
homeRuns: "",
|
|
22
24
|
homeWickets: "",
|
|
23
25
|
homeOvers: "",
|
|
@@ -31,10 +33,10 @@ function x() {
|
|
|
31
33
|
margin: "",
|
|
32
34
|
superOver: !1,
|
|
33
35
|
dls: !1
|
|
34
|
-
}), [
|
|
36
|
+
}), [z, B] = p(null), V = s(C.data?.scheduledAt), H = (e, t) => R((n) => ({
|
|
35
37
|
...n,
|
|
36
38
|
[e]: t
|
|
37
|
-
})), U = () =>
|
|
39
|
+
})), U = () => R({
|
|
38
40
|
homeRuns: "",
|
|
39
41
|
homeWickets: "",
|
|
40
42
|
homeOvers: "",
|
|
@@ -49,140 +51,147 @@ function x() {
|
|
|
49
51
|
superOver: !1,
|
|
50
52
|
dls: !1
|
|
51
53
|
});
|
|
52
|
-
if (
|
|
53
|
-
title:
|
|
54
|
-
children: /* @__PURE__ */
|
|
54
|
+
if (C.isLoading) return /* @__PURE__ */ g(n, {
|
|
55
|
+
title: b("atheletebridge.pages.fixtureDetail.title", "Fixture"),
|
|
56
|
+
children: /* @__PURE__ */ g(a, { label: b("atheletebridge.pages.fixtureDetail.loading", "Loading fixture…") })
|
|
55
57
|
});
|
|
56
|
-
if (
|
|
57
|
-
title:
|
|
58
|
-
children: /* @__PURE__ */
|
|
59
|
-
title:
|
|
60
|
-
message:
|
|
61
|
-
onRetry: () =>
|
|
58
|
+
if (C.isError || !C.data) return /* @__PURE__ */ g(n, {
|
|
59
|
+
title: b("atheletebridge.pages.fixtureDetail.title", "Fixture"),
|
|
60
|
+
children: /* @__PURE__ */ g(i, {
|
|
61
|
+
title: b("atheletebridge.pages.fixtureDetail.notFoundTitle", "Fixture not found"),
|
|
62
|
+
message: b("atheletebridge.pages.fixtureDetail.notFoundMessage", "This fixture does not exist or you do not have access to it."),
|
|
63
|
+
onRetry: () => S("/fixtures")
|
|
62
64
|
})
|
|
63
65
|
});
|
|
64
|
-
let W =
|
|
65
|
-
return /* @__PURE__ */
|
|
66
|
+
let W = C.data, G = W.homeTeam?.name ?? b("atheletebridge.pages.fixtureDetail.home", "Home"), K = W.awayTeam?.name ?? (W.awayTeamId ? b("atheletebridge.pages.fixtureDetail.away", "Away") : "TBD"), q = !!W.awayTeamId && (W.status === "SCHEDULED" || W.status === "LIVE"), ue = q && V, de = q && !V, J = W.homeTeam?.sport === "CRICKET", Y = f(T), X = f(D), Z = Y !== null && X !== null && Y === X, fe = k !== "" || j !== "", Q = f(k), $ = f(j), pe = Z && (!fe || Q !== null && $ !== null && Q === $);
|
|
67
|
+
return /* @__PURE__ */ _(n, {
|
|
66
68
|
title: `${G} vs ${K}`,
|
|
67
69
|
description: `${ee[W.type]}${W.competition ? ` · ${W.competition}` : ""}`,
|
|
68
|
-
actions: /* @__PURE__ */
|
|
70
|
+
actions: /* @__PURE__ */ _("button", {
|
|
69
71
|
type: "button",
|
|
70
|
-
onClick: () =>
|
|
72
|
+
onClick: () => S("/fixtures"),
|
|
71
73
|
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",
|
|
72
74
|
children: [
|
|
73
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ g(ae, { className: "h-4 w-4" }),
|
|
74
76
|
" ",
|
|
75
|
-
|
|
77
|
+
b("atheletebridge.pages.fixtureDetail.back", "Back")
|
|
76
78
|
]
|
|
77
79
|
}),
|
|
78
80
|
children: [
|
|
79
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ g(te, {
|
|
80
82
|
fixture: W,
|
|
81
83
|
variant: "hero",
|
|
82
84
|
className: "mb-8"
|
|
83
85
|
}),
|
|
84
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ _("div", {
|
|
85
87
|
className: "mb-8 grid grid-cols-1 gap-4 lg:grid-cols-[minmax(0,1fr)_2fr]",
|
|
86
|
-
children: [/* @__PURE__ */
|
|
88
|
+
children: [/* @__PURE__ */ g(re, {
|
|
87
89
|
teamId: W.homeTeamId,
|
|
88
90
|
fixtureId: W.id
|
|
89
|
-
}), /* @__PURE__ */
|
|
91
|
+
}), /* @__PURE__ */ g(u, {
|
|
90
92
|
teamId: W.homeTeamId,
|
|
91
93
|
fixtureId: W.id
|
|
92
94
|
})]
|
|
93
95
|
}),
|
|
94
|
-
W.notes && /* @__PURE__ */
|
|
96
|
+
W.notes && /* @__PURE__ */ _(v, {
|
|
95
97
|
className: "mb-8",
|
|
96
|
-
children: [/* @__PURE__ */
|
|
98
|
+
children: [/* @__PURE__ */ g("h2", {
|
|
97
99
|
className: "mb-2 text-sm font-semibold text-text-primary",
|
|
98
|
-
children:
|
|
99
|
-
}), /* @__PURE__ */
|
|
100
|
+
children: b("atheletebridge.pages.fixtureDetail.notes", "Notes")
|
|
101
|
+
}), /* @__PURE__ */ g("p", {
|
|
100
102
|
className: "text-sm text-text-secondary",
|
|
101
103
|
children: W.notes
|
|
102
104
|
})]
|
|
103
105
|
}),
|
|
104
|
-
|
|
106
|
+
de && /* @__PURE__ */ g(v, {
|
|
105
107
|
className: "mb-8",
|
|
106
|
-
children:
|
|
108
|
+
children: /* @__PURE__ */ g("p", {
|
|
109
|
+
className: "text-sm text-text-secondary",
|
|
110
|
+
children: b("atheletebridge.pages.fixtureDetail.recordResultUnavailable", "A result can be recorded once this fixture has started — after its scheduled date and time.")
|
|
111
|
+
})
|
|
112
|
+
}),
|
|
113
|
+
ue && /* @__PURE__ */ _("section", {
|
|
114
|
+
className: "mb-8",
|
|
115
|
+
children: [/* @__PURE__ */ _("h2", {
|
|
107
116
|
className: "mb-4 flex items-center gap-2 text-lg font-semibold text-text-primary",
|
|
108
117
|
children: [
|
|
109
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ g(oe, { className: "h-5 w-5" }),
|
|
110
119
|
" ",
|
|
111
|
-
|
|
120
|
+
b("atheletebridge.pages.fixtureDetail.recordResult", "Record result")
|
|
112
121
|
]
|
|
113
|
-
}), /* @__PURE__ */ y
|
|
122
|
+
}), /* @__PURE__ */ _(y, {
|
|
114
123
|
treatment: "insight",
|
|
115
124
|
className: "p-5 sm:p-6",
|
|
116
125
|
children: [
|
|
117
|
-
/* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ g("p", {
|
|
118
127
|
className: "mb-5 text-sm text-text-secondary",
|
|
119
|
-
children:
|
|
128
|
+
children: b("atheletebridge.pages.fixtureDetail.recordResultDescription", "Recording a final score marks this fixture Completed and recomputes the competition standings for both teams.")
|
|
120
129
|
}),
|
|
121
|
-
/* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ _("form", {
|
|
122
131
|
onSubmit: async (e) => {
|
|
123
|
-
if (e.preventDefault(),
|
|
132
|
+
if (e.preventDefault(), B(null), !x) return;
|
|
124
133
|
if (J) {
|
|
125
|
-
let e =
|
|
126
|
-
required:
|
|
127
|
-
negative:
|
|
128
|
-
wicketsRange:
|
|
129
|
-
ballsRange:
|
|
130
|
-
marginMinimum:
|
|
131
|
-
wicketMarginMax:
|
|
134
|
+
let e = ie({ ...L }, {
|
|
135
|
+
required: b("atheletebridge.pages.fixtureDetail.cricketRequired", "All innings scores, overs and the margin are required."),
|
|
136
|
+
negative: b("atheletebridge.pages.fixtureDetail.cricketNegative", "Scores and overs cannot be negative."),
|
|
137
|
+
wicketsRange: b("atheletebridge.pages.fixtureDetail.cricketWicketsRange", "Wickets must be between 0 and 10."),
|
|
138
|
+
ballsRange: b("atheletebridge.pages.fixtureDetail.cricketBallsRange", "Balls must be between 0 and 5."),
|
|
139
|
+
marginMinimum: b("atheletebridge.pages.fixtureDetail.cricketMarginMinimum", "The margin must be at least 1."),
|
|
140
|
+
wicketMarginMax: b("atheletebridge.pages.fixtureDetail.cricketWicketMarginMax", "A win by wickets cannot exceed a margin of 10.")
|
|
132
141
|
});
|
|
133
142
|
if (!e.ok) {
|
|
134
|
-
|
|
143
|
+
B(e.error);
|
|
135
144
|
return;
|
|
136
145
|
}
|
|
137
146
|
try {
|
|
138
|
-
await
|
|
139
|
-
id:
|
|
147
|
+
await w.mutateAsync({
|
|
148
|
+
id: x,
|
|
140
149
|
input: e.input
|
|
141
150
|
}), U();
|
|
142
151
|
} catch (e) {
|
|
143
|
-
|
|
152
|
+
B(e instanceof Error ? e.message : b("atheletebridge.pages.fixtureDetail.recordFailed", "Failed to record result."));
|
|
144
153
|
}
|
|
145
154
|
return;
|
|
146
155
|
}
|
|
147
|
-
let t =
|
|
148
|
-
homeScore:
|
|
149
|
-
awayScore:
|
|
150
|
-
extraTimeHome:
|
|
151
|
-
extraTimeAway:
|
|
152
|
-
penaltyHome:
|
|
153
|
-
penaltyAway:
|
|
156
|
+
let t = d({
|
|
157
|
+
homeScore: T,
|
|
158
|
+
awayScore: D,
|
|
159
|
+
extraTimeHome: k,
|
|
160
|
+
extraTimeAway: j,
|
|
161
|
+
penaltyHome: N,
|
|
162
|
+
penaltyAway: F
|
|
154
163
|
}, {
|
|
155
|
-
scoresRequired:
|
|
156
|
-
scoresNegative:
|
|
157
|
-
extraTimePair:
|
|
158
|
-
extraTimeNumeric:
|
|
159
|
-
extraTimeNegative:
|
|
160
|
-
penaltyPair:
|
|
161
|
-
penaltyNumeric:
|
|
162
|
-
penaltyNegative:
|
|
163
|
-
extraTimeDecided:
|
|
164
|
-
extraTimeLevel:
|
|
165
|
-
penaltyLevel:
|
|
164
|
+
scoresRequired: b("atheletebridge.pages.fixtureDetail.scoresRequired", "Both scores are required and must be numbers."),
|
|
165
|
+
scoresNegative: b("atheletebridge.pages.fixtureDetail.scoresNegative", "Scores cannot be negative."),
|
|
166
|
+
extraTimePair: b("atheletebridge.pages.fixtureDetail.extraTimePair", "Enter both extra-time scores."),
|
|
167
|
+
extraTimeNumeric: b("atheletebridge.pages.fixtureDetail.extraTimeNumeric", "Extra-time scores must be numbers."),
|
|
168
|
+
extraTimeNegative: b("atheletebridge.pages.fixtureDetail.extraTimeNegative", "Extra-time scores cannot be negative."),
|
|
169
|
+
penaltyPair: b("atheletebridge.pages.fixtureDetail.penaltyPair", "Enter both penalty scores."),
|
|
170
|
+
penaltyNumeric: b("atheletebridge.pages.fixtureDetail.penaltyNumeric", "Penalty scores must be numbers."),
|
|
171
|
+
penaltyNegative: b("atheletebridge.pages.fixtureDetail.penaltyNegative", "Penalty scores cannot be negative."),
|
|
172
|
+
extraTimeDecided: b("atheletebridge.pages.fixtureDetail.extraTimeDecided", "Extra time decided the tie — leave the penalty shootout empty."),
|
|
173
|
+
extraTimeLevel: b("atheletebridge.pages.fixtureDetail.extraTimeLevel", "Still level after extra time — record the penalty shootout."),
|
|
174
|
+
penaltyLevel: b("atheletebridge.pages.fixtureDetail.penaltyLevel", "Penalty scores must have a winner.")
|
|
166
175
|
});
|
|
167
176
|
if (!t.ok) {
|
|
168
|
-
|
|
177
|
+
B(t.error);
|
|
169
178
|
return;
|
|
170
179
|
}
|
|
171
180
|
try {
|
|
172
|
-
await
|
|
173
|
-
id:
|
|
181
|
+
await w.mutateAsync({
|
|
182
|
+
id: x,
|
|
174
183
|
input: t.input
|
|
175
|
-
}),
|
|
184
|
+
}), E(""), O(""), A(""), M(""), P(""), I("");
|
|
176
185
|
} catch (e) {
|
|
177
|
-
|
|
186
|
+
B(e instanceof Error ? e.message : b("atheletebridge.pages.fixtureDetail.recordFailed", "Failed to record result."));
|
|
178
187
|
}
|
|
179
188
|
},
|
|
180
|
-
children: [J ? /* @__PURE__ */
|
|
189
|
+
children: [J ? /* @__PURE__ */ _("div", {
|
|
181
190
|
className: "flex flex-col items-center gap-5",
|
|
182
191
|
children: [
|
|
183
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ g("p", {
|
|
184
193
|
className: "text-center text-xs font-medium text-text-secondary",
|
|
185
|
-
children:
|
|
194
|
+
children: b("atheletebridge.pages.fixtureDetail.cricketScorecardDescription", "Record each innings score and how the match was decided — a cricket result is a margin, not a score comparison.")
|
|
186
195
|
}),
|
|
187
196
|
[{
|
|
188
197
|
side: "home",
|
|
@@ -192,335 +201,335 @@ function x() {
|
|
|
192
201
|
side: "away",
|
|
193
202
|
name: K,
|
|
194
203
|
sport: W.awayTeam?.sport
|
|
195
|
-
}].map(({ side: e, name: t, sport: n }) => /* @__PURE__ */
|
|
204
|
+
}].map(({ side: e, name: t, sport: n }) => /* @__PURE__ */ _("div", {
|
|
196
205
|
className: "flex flex-wrap items-end justify-center gap-3",
|
|
197
206
|
children: [
|
|
198
|
-
/* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ _("div", {
|
|
199
208
|
className: "flex flex-col items-center gap-2",
|
|
200
|
-
children: [/* @__PURE__ */
|
|
209
|
+
children: [/* @__PURE__ */ g(r, {
|
|
201
210
|
name: t,
|
|
202
211
|
sport: n,
|
|
203
212
|
size: 40
|
|
204
|
-
}), /* @__PURE__ */
|
|
213
|
+
}), /* @__PURE__ */ g("span", {
|
|
205
214
|
className: "max-w-[8rem] truncate text-center text-xs font-medium text-text-secondary",
|
|
206
215
|
children: t
|
|
207
216
|
})]
|
|
208
217
|
}),
|
|
209
|
-
/* @__PURE__ */
|
|
210
|
-
label:
|
|
218
|
+
/* @__PURE__ */ g(c, {
|
|
219
|
+
label: b("atheletebridge.pages.fixtureDetail.runs", "Runs"),
|
|
211
220
|
htmlFor: `cricket-${e}-runs`,
|
|
212
221
|
className: "w-20",
|
|
213
|
-
children: /* @__PURE__ */
|
|
222
|
+
children: /* @__PURE__ */ g("input", {
|
|
214
223
|
id: `cricket-${e}-runs`,
|
|
215
224
|
inputMode: "numeric",
|
|
216
225
|
className: `${l} text-center tabular-nums`,
|
|
217
|
-
value:
|
|
226
|
+
value: L[`${e}Runs`],
|
|
218
227
|
onChange: (t) => H(`${e}Runs`, t.target.value),
|
|
219
228
|
placeholder: "185"
|
|
220
229
|
})
|
|
221
230
|
}),
|
|
222
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ g("span", {
|
|
223
232
|
className: "pb-3 text-lg font-bold text-text-muted",
|
|
224
233
|
children: "/"
|
|
225
234
|
}),
|
|
226
|
-
/* @__PURE__ */
|
|
227
|
-
label:
|
|
235
|
+
/* @__PURE__ */ g(c, {
|
|
236
|
+
label: b("atheletebridge.pages.fixtureDetail.wickets", "Wkts"),
|
|
228
237
|
htmlFor: `cricket-${e}-wickets`,
|
|
229
238
|
className: "w-16",
|
|
230
|
-
children: /* @__PURE__ */
|
|
239
|
+
children: /* @__PURE__ */ g("input", {
|
|
231
240
|
id: `cricket-${e}-wickets`,
|
|
232
241
|
inputMode: "numeric",
|
|
233
242
|
className: `${l} text-center tabular-nums`,
|
|
234
|
-
value:
|
|
243
|
+
value: L[`${e}Wickets`],
|
|
235
244
|
onChange: (t) => H(`${e}Wickets`, t.target.value),
|
|
236
245
|
placeholder: "6"
|
|
237
246
|
})
|
|
238
247
|
}),
|
|
239
|
-
/* @__PURE__ */
|
|
240
|
-
label:
|
|
248
|
+
/* @__PURE__ */ g(c, {
|
|
249
|
+
label: b("atheletebridge.pages.fixtureDetail.overs", "Overs"),
|
|
241
250
|
htmlFor: `cricket-${e}-overs`,
|
|
242
251
|
className: "w-16",
|
|
243
|
-
children: /* @__PURE__ */
|
|
252
|
+
children: /* @__PURE__ */ g("input", {
|
|
244
253
|
id: `cricket-${e}-overs`,
|
|
245
254
|
inputMode: "numeric",
|
|
246
255
|
className: `${l} text-center tabular-nums`,
|
|
247
|
-
value:
|
|
256
|
+
value: L[`${e}Overs`],
|
|
248
257
|
onChange: (t) => H(`${e}Overs`, t.target.value),
|
|
249
258
|
placeholder: "20"
|
|
250
259
|
})
|
|
251
260
|
}),
|
|
252
|
-
/* @__PURE__ */
|
|
253
|
-
label:
|
|
261
|
+
/* @__PURE__ */ g(c, {
|
|
262
|
+
label: b("atheletebridge.pages.fixtureDetail.balls", "Balls"),
|
|
254
263
|
htmlFor: `cricket-${e}-balls`,
|
|
255
264
|
className: "w-14",
|
|
256
|
-
children: /* @__PURE__ */
|
|
265
|
+
children: /* @__PURE__ */ g("input", {
|
|
257
266
|
id: `cricket-${e}-balls`,
|
|
258
267
|
inputMode: "numeric",
|
|
259
268
|
className: `${l} text-center tabular-nums`,
|
|
260
|
-
value:
|
|
269
|
+
value: L[`${e}Balls`],
|
|
261
270
|
onChange: (t) => H(`${e}Balls`, t.target.value),
|
|
262
271
|
placeholder: "0"
|
|
263
272
|
})
|
|
264
273
|
})
|
|
265
274
|
]
|
|
266
275
|
}, e)),
|
|
267
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ _("div", {
|
|
268
277
|
className: "flex flex-wrap items-end justify-center gap-4",
|
|
269
278
|
children: [
|
|
270
|
-
/* @__PURE__ */
|
|
271
|
-
label:
|
|
279
|
+
/* @__PURE__ */ g(c, {
|
|
280
|
+
label: b("atheletebridge.pages.fixtureDetail.winner", "Winner"),
|
|
272
281
|
htmlFor: "cricket-winner",
|
|
273
|
-
children: /* @__PURE__ */
|
|
282
|
+
children: /* @__PURE__ */ _("select", {
|
|
274
283
|
id: "cricket-winner",
|
|
275
284
|
className: l,
|
|
276
|
-
value:
|
|
285
|
+
value: L.winner,
|
|
277
286
|
onChange: (e) => H("winner", e.target.value),
|
|
278
|
-
children: [/* @__PURE__ */
|
|
287
|
+
children: [/* @__PURE__ */ g("option", {
|
|
279
288
|
value: "HOME",
|
|
280
289
|
children: G
|
|
281
|
-
}), /* @__PURE__ */
|
|
290
|
+
}), /* @__PURE__ */ g("option", {
|
|
282
291
|
value: "AWAY",
|
|
283
292
|
children: K
|
|
284
293
|
})]
|
|
285
294
|
})
|
|
286
295
|
}),
|
|
287
|
-
/* @__PURE__ */
|
|
288
|
-
label:
|
|
296
|
+
/* @__PURE__ */ g(c, {
|
|
297
|
+
label: b("atheletebridge.pages.fixtureDetail.decidedBy", "Decided by"),
|
|
289
298
|
htmlFor: "cricket-decided-by",
|
|
290
|
-
children: /* @__PURE__ */
|
|
299
|
+
children: /* @__PURE__ */ _("select", {
|
|
291
300
|
id: "cricket-decided-by",
|
|
292
301
|
className: l,
|
|
293
|
-
value:
|
|
302
|
+
value: L.decidedBy,
|
|
294
303
|
onChange: (e) => H("decidedBy", e.target.value),
|
|
295
|
-
children: [/* @__PURE__ */
|
|
304
|
+
children: [/* @__PURE__ */ g("option", {
|
|
296
305
|
value: "RUNS",
|
|
297
|
-
children:
|
|
298
|
-
}), /* @__PURE__ */
|
|
306
|
+
children: b("atheletebridge.pages.fixtureDetail.runs", "Runs")
|
|
307
|
+
}), /* @__PURE__ */ g("option", {
|
|
299
308
|
value: "WICKETS",
|
|
300
|
-
children:
|
|
309
|
+
children: b("atheletebridge.pages.fixtureDetail.wickets", "Wkts")
|
|
301
310
|
})]
|
|
302
311
|
})
|
|
303
312
|
}),
|
|
304
|
-
/* @__PURE__ */
|
|
305
|
-
label:
|
|
313
|
+
/* @__PURE__ */ g(c, {
|
|
314
|
+
label: b("atheletebridge.pages.fixtureDetail.margin", "Margin"),
|
|
306
315
|
htmlFor: "cricket-margin",
|
|
307
316
|
className: "w-20",
|
|
308
|
-
children: /* @__PURE__ */
|
|
317
|
+
children: /* @__PURE__ */ g("input", {
|
|
309
318
|
id: "cricket-margin",
|
|
310
319
|
inputMode: "numeric",
|
|
311
320
|
className: `${l} text-center tabular-nums`,
|
|
312
|
-
value:
|
|
321
|
+
value: L.margin,
|
|
313
322
|
onChange: (e) => H("margin", e.target.value),
|
|
314
323
|
placeholder: "13"
|
|
315
324
|
})
|
|
316
325
|
})
|
|
317
326
|
]
|
|
318
327
|
}),
|
|
319
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ _("div", {
|
|
320
329
|
className: "flex items-center gap-6",
|
|
321
|
-
children: [/* @__PURE__ */
|
|
330
|
+
children: [/* @__PURE__ */ _("label", {
|
|
322
331
|
className: "flex items-center gap-2.5 text-sm text-text-primary",
|
|
323
|
-
children: [/* @__PURE__ */
|
|
332
|
+
children: [/* @__PURE__ */ g("input", {
|
|
324
333
|
type: "checkbox",
|
|
325
|
-
checked:
|
|
334
|
+
checked: L.superOver,
|
|
326
335
|
onChange: (e) => H("superOver", e.target.checked),
|
|
327
336
|
className: "h-4 w-4 rounded border-border-seam text-action-primary-bg focus:ring-[var(--color-focus-ring)]"
|
|
328
|
-
}),
|
|
329
|
-
}), /* @__PURE__ */
|
|
337
|
+
}), b("atheletebridge.pages.fixtureDetail.superOver", "Super Over")]
|
|
338
|
+
}), /* @__PURE__ */ _("label", {
|
|
330
339
|
className: "flex items-center gap-2.5 text-sm text-text-primary",
|
|
331
|
-
children: [/* @__PURE__ */
|
|
340
|
+
children: [/* @__PURE__ */ g("input", {
|
|
332
341
|
type: "checkbox",
|
|
333
|
-
checked:
|
|
342
|
+
checked: L.dls,
|
|
334
343
|
onChange: (e) => H("dls", e.target.checked),
|
|
335
344
|
className: "h-4 w-4 rounded border-border-seam text-action-primary-bg focus:ring-[var(--color-focus-ring)]"
|
|
336
|
-
}),
|
|
345
|
+
}), b("atheletebridge.pages.fixtureDetail.dls", "DLS")]
|
|
337
346
|
})]
|
|
338
347
|
})
|
|
339
348
|
]
|
|
340
|
-
}) : /* @__PURE__ */
|
|
349
|
+
}) : /* @__PURE__ */ _(le, { children: [/* @__PURE__ */ _("div", {
|
|
341
350
|
className: "flex flex-wrap items-end justify-center gap-4 sm:gap-6",
|
|
342
351
|
children: [
|
|
343
|
-
/* @__PURE__ */
|
|
352
|
+
/* @__PURE__ */ _("div", {
|
|
344
353
|
className: "flex items-end gap-3",
|
|
345
|
-
children: [/* @__PURE__ */
|
|
354
|
+
children: [/* @__PURE__ */ _("div", {
|
|
346
355
|
className: "flex flex-col items-center gap-2",
|
|
347
|
-
children: [/* @__PURE__ */
|
|
356
|
+
children: [/* @__PURE__ */ g(r, {
|
|
348
357
|
name: G,
|
|
349
358
|
sport: W.homeTeam?.sport,
|
|
350
359
|
size: 40
|
|
351
|
-
}), /* @__PURE__ */
|
|
360
|
+
}), /* @__PURE__ */ g("span", {
|
|
352
361
|
className: "max-w-[8rem] truncate text-center text-xs font-medium text-text-secondary",
|
|
353
362
|
children: G
|
|
354
363
|
})]
|
|
355
|
-
}), /* @__PURE__ */
|
|
356
|
-
label:
|
|
364
|
+
}), /* @__PURE__ */ g(c, {
|
|
365
|
+
label: b("atheletebridge.pages.fixtureDetail.home", "Home"),
|
|
357
366
|
htmlFor: "homeScore",
|
|
358
367
|
className: "w-24",
|
|
359
|
-
children: /* @__PURE__ */
|
|
368
|
+
children: /* @__PURE__ */ g("input", {
|
|
360
369
|
id: "homeScore",
|
|
361
370
|
inputMode: "numeric",
|
|
362
371
|
className: `${l} text-center text-lg font-bold tabular-nums`,
|
|
363
|
-
value:
|
|
364
|
-
onChange: (e) =>
|
|
372
|
+
value: T,
|
|
373
|
+
onChange: (e) => E(e.target.value),
|
|
365
374
|
placeholder: "0"
|
|
366
375
|
})
|
|
367
376
|
})]
|
|
368
377
|
}),
|
|
369
|
-
/* @__PURE__ */
|
|
378
|
+
/* @__PURE__ */ g(m, {
|
|
370
379
|
className: "mb-3 h-5 w-5 shrink-0 text-text-muted",
|
|
371
380
|
"aria-hidden": "true"
|
|
372
381
|
}),
|
|
373
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ _("div", {
|
|
374
383
|
className: "flex items-end gap-3",
|
|
375
|
-
children: [/* @__PURE__ */
|
|
376
|
-
label:
|
|
384
|
+
children: [/* @__PURE__ */ g(c, {
|
|
385
|
+
label: b("atheletebridge.pages.fixtureDetail.away", "Away"),
|
|
377
386
|
htmlFor: "awayScore",
|
|
378
387
|
className: "w-24",
|
|
379
|
-
children: /* @__PURE__ */
|
|
388
|
+
children: /* @__PURE__ */ g("input", {
|
|
380
389
|
id: "awayScore",
|
|
381
390
|
inputMode: "numeric",
|
|
382
391
|
className: `${l} text-center text-lg font-bold tabular-nums`,
|
|
383
|
-
value:
|
|
384
|
-
onChange: (e) =>
|
|
392
|
+
value: D,
|
|
393
|
+
onChange: (e) => O(e.target.value),
|
|
385
394
|
placeholder: "0"
|
|
386
395
|
})
|
|
387
|
-
}), /* @__PURE__ */
|
|
396
|
+
}), /* @__PURE__ */ _("div", {
|
|
388
397
|
className: "flex flex-col items-center gap-2",
|
|
389
|
-
children: [/* @__PURE__ */
|
|
398
|
+
children: [/* @__PURE__ */ g(r, {
|
|
390
399
|
name: K,
|
|
391
400
|
sport: W.awayTeam?.sport,
|
|
392
401
|
size: 40
|
|
393
|
-
}), /* @__PURE__ */
|
|
402
|
+
}), /* @__PURE__ */ g("span", {
|
|
394
403
|
className: "max-w-[8rem] truncate text-center text-xs font-medium text-text-secondary",
|
|
395
404
|
children: K
|
|
396
405
|
})]
|
|
397
406
|
})]
|
|
398
407
|
})
|
|
399
408
|
]
|
|
400
|
-
}), Z && /* @__PURE__ */
|
|
409
|
+
}), Z && /* @__PURE__ */ _("div", {
|
|
401
410
|
className: "mt-6 border-t border-border-seam pt-5",
|
|
402
|
-
children: [/* @__PURE__ */
|
|
411
|
+
children: [/* @__PURE__ */ g("p", {
|
|
403
412
|
className: "mb-4 text-center text-xs font-medium text-text-secondary",
|
|
404
|
-
children:
|
|
405
|
-
}), /* @__PURE__ */
|
|
413
|
+
children: b("atheletebridge.pages.fixtureDetail.levelAtFullTime", "Level at full time — record how the tie was decided (optional).")
|
|
414
|
+
}), /* @__PURE__ */ _("div", {
|
|
406
415
|
className: "flex flex-col items-center gap-4",
|
|
407
|
-
children: [/* @__PURE__ */
|
|
416
|
+
children: [/* @__PURE__ */ _("div", {
|
|
408
417
|
className: "flex items-end justify-center gap-3",
|
|
409
418
|
children: [
|
|
410
|
-
/* @__PURE__ */
|
|
419
|
+
/* @__PURE__ */ g("span", {
|
|
411
420
|
className: "mb-2.5 w-16 text-right text-xs font-medium text-text-secondary",
|
|
412
421
|
children: G
|
|
413
422
|
}),
|
|
414
|
-
/* @__PURE__ */
|
|
415
|
-
label:
|
|
423
|
+
/* @__PURE__ */ g(c, {
|
|
424
|
+
label: b("atheletebridge.pages.fixtureDetail.extraTime", "Extra time"),
|
|
416
425
|
htmlFor: "extraTimeHome",
|
|
417
426
|
className: "w-20",
|
|
418
|
-
children: /* @__PURE__ */
|
|
427
|
+
children: /* @__PURE__ */ g("input", {
|
|
419
428
|
id: "extraTimeHome",
|
|
420
429
|
inputMode: "numeric",
|
|
421
430
|
className: `${l} text-center tabular-nums`,
|
|
422
|
-
value:
|
|
423
|
-
onChange: (e) =>
|
|
431
|
+
value: k,
|
|
432
|
+
onChange: (e) => A(e.target.value),
|
|
424
433
|
placeholder: "–"
|
|
425
434
|
})
|
|
426
435
|
}),
|
|
427
|
-
/* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ g(m, {
|
|
428
437
|
className: "mb-3 h-4 w-4 shrink-0 text-text-muted",
|
|
429
438
|
"aria-hidden": "true"
|
|
430
439
|
}),
|
|
431
|
-
/* @__PURE__ */
|
|
440
|
+
/* @__PURE__ */ g(c, {
|
|
432
441
|
label: "\xA0",
|
|
433
442
|
htmlFor: "extraTimeAway",
|
|
434
443
|
className: "w-20",
|
|
435
|
-
children: /* @__PURE__ */
|
|
444
|
+
children: /* @__PURE__ */ g("input", {
|
|
436
445
|
id: "extraTimeAway",
|
|
437
446
|
inputMode: "numeric",
|
|
438
447
|
className: `${l} text-center tabular-nums`,
|
|
439
|
-
value:
|
|
440
|
-
onChange: (e) =>
|
|
448
|
+
value: j,
|
|
449
|
+
onChange: (e) => M(e.target.value),
|
|
441
450
|
placeholder: "–"
|
|
442
451
|
})
|
|
443
452
|
}),
|
|
444
|
-
/* @__PURE__ */
|
|
453
|
+
/* @__PURE__ */ g("span", {
|
|
445
454
|
className: "mb-2.5 w-16 truncate text-xs font-medium text-text-secondary",
|
|
446
455
|
children: K
|
|
447
456
|
})
|
|
448
457
|
]
|
|
449
|
-
}),
|
|
458
|
+
}), pe && /* @__PURE__ */ _("div", {
|
|
450
459
|
className: "flex items-end justify-center gap-3",
|
|
451
460
|
children: [
|
|
452
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ g("span", {
|
|
453
462
|
className: "mb-2.5 w-16 text-right text-xs font-medium text-text-secondary",
|
|
454
463
|
children: G
|
|
455
464
|
}),
|
|
456
|
-
/* @__PURE__ */
|
|
457
|
-
label:
|
|
465
|
+
/* @__PURE__ */ g(c, {
|
|
466
|
+
label: b("atheletebridge.pages.fixtureDetail.penaltyShootout", "Penalties"),
|
|
458
467
|
htmlFor: "penaltyHome",
|
|
459
468
|
className: "w-20",
|
|
460
|
-
children: /* @__PURE__ */
|
|
469
|
+
children: /* @__PURE__ */ g("input", {
|
|
461
470
|
id: "penaltyHome",
|
|
462
471
|
inputMode: "numeric",
|
|
463
472
|
className: `${l} text-center tabular-nums`,
|
|
464
|
-
value:
|
|
465
|
-
onChange: (e) =>
|
|
473
|
+
value: N,
|
|
474
|
+
onChange: (e) => P(e.target.value),
|
|
466
475
|
placeholder: "–"
|
|
467
476
|
})
|
|
468
477
|
}),
|
|
469
|
-
/* @__PURE__ */
|
|
478
|
+
/* @__PURE__ */ g(m, {
|
|
470
479
|
className: "mb-3 h-4 w-4 shrink-0 text-text-muted",
|
|
471
480
|
"aria-hidden": "true"
|
|
472
481
|
}),
|
|
473
|
-
/* @__PURE__ */
|
|
482
|
+
/* @__PURE__ */ g(c, {
|
|
474
483
|
label: "\xA0",
|
|
475
484
|
htmlFor: "penaltyAway",
|
|
476
485
|
className: "w-20",
|
|
477
|
-
children: /* @__PURE__ */
|
|
486
|
+
children: /* @__PURE__ */ g("input", {
|
|
478
487
|
id: "penaltyAway",
|
|
479
488
|
inputMode: "numeric",
|
|
480
489
|
className: `${l} text-center tabular-nums`,
|
|
481
|
-
value:
|
|
482
|
-
onChange: (e) =>
|
|
490
|
+
value: F,
|
|
491
|
+
onChange: (e) => I(e.target.value),
|
|
483
492
|
placeholder: "–"
|
|
484
493
|
})
|
|
485
494
|
}),
|
|
486
|
-
/* @__PURE__ */
|
|
495
|
+
/* @__PURE__ */ g("span", {
|
|
487
496
|
className: "mb-2.5 w-16 truncate text-xs font-medium text-text-secondary",
|
|
488
497
|
children: K
|
|
489
498
|
})
|
|
490
499
|
]
|
|
491
500
|
})]
|
|
492
501
|
})]
|
|
493
|
-
})] }), /* @__PURE__ */
|
|
502
|
+
})] }), /* @__PURE__ */ g("div", {
|
|
494
503
|
className: "mt-6 flex justify-center",
|
|
495
|
-
children: /* @__PURE__ */
|
|
504
|
+
children: /* @__PURE__ */ _("button", {
|
|
496
505
|
type: "submit",
|
|
497
|
-
disabled:
|
|
506
|
+
disabled: w.isPending,
|
|
498
507
|
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",
|
|
499
|
-
children: [
|
|
508
|
+
children: [w.isPending ? /* @__PURE__ */ g(se, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ g(h, { className: "h-4 w-4" }), b("atheletebridge.pages.fixtureDetail.recordResultAction", "Record result")]
|
|
500
509
|
})
|
|
501
510
|
})]
|
|
502
511
|
}),
|
|
503
|
-
|
|
512
|
+
z && /* @__PURE__ */ g("p", {
|
|
504
513
|
className: "mt-3 text-center text-sm text-status-error-text",
|
|
505
|
-
children:
|
|
514
|
+
children: z
|
|
506
515
|
})
|
|
507
516
|
]
|
|
508
517
|
})]
|
|
509
518
|
}),
|
|
510
|
-
W.competition && /* @__PURE__ */
|
|
519
|
+
W.competition && /* @__PURE__ */ _("button", {
|
|
511
520
|
type: "button",
|
|
512
|
-
onClick: () =>
|
|
521
|
+
onClick: () => S(`/standings?competition=${encodeURIComponent(W.competition ?? "")}`),
|
|
513
522
|
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",
|
|
514
523
|
children: [
|
|
515
|
-
/* @__PURE__ */
|
|
524
|
+
/* @__PURE__ */ g(h, { className: "h-4 w-4" }),
|
|
516
525
|
" ",
|
|
517
|
-
|
|
526
|
+
b("atheletebridge.pages.fixtureDetail.viewStandings", `View ${W.competition} standings`)
|
|
518
527
|
]
|
|
519
528
|
})
|
|
520
529
|
]
|
|
521
530
|
});
|
|
522
531
|
}
|
|
523
532
|
//#endregion
|
|
524
|
-
export {
|
|
533
|
+
export { b as FixtureDetailPage };
|
|
525
534
|
|
|
526
535
|
//# sourceMappingURL=FixtureDetailPage.js.map
|