@burdenoff/microfe-atheletebridge 2026.1109.1 → 2026.1110.2
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/AthleteBridgeRoutes.js +45 -21
- package/dist/atheletebridge/AthleteBridgeRoutes.js.map +1 -1
- package/dist/atheletebridge/components/MemberCard.d.ts +7 -0
- package/dist/atheletebridge/components/MemberCard.js +45 -0
- package/dist/atheletebridge/components/MemberCard.js.map +1 -0
- package/dist/atheletebridge/components/StatusBadge.js +8 -0
- package/dist/atheletebridge/components/StatusBadge.js.map +1 -1
- package/dist/atheletebridge/hooks/useAthleteBridgeApi.d.ts +15 -1
- package/dist/atheletebridge/hooks/useAthleteBridgeApi.js +63 -41
- package/dist/atheletebridge/hooks/useAthleteBridgeApi.js.map +1 -1
- package/dist/atheletebridge/hooks/useAuditApi.d.ts +14 -0
- package/dist/atheletebridge/hooks/useAuditApi.js +38 -0
- package/dist/atheletebridge/hooks/useAuditApi.js.map +1 -0
- package/dist/atheletebridge/hooks/useRegistrationApi.d.ts +15 -0
- package/dist/atheletebridge/hooks/useRegistrationApi.js +38 -19
- package/dist/atheletebridge/hooks/useRegistrationApi.js.map +1 -1
- package/dist/atheletebridge/pages/audit/AuditLogPage.d.ts +11 -0
- package/dist/atheletebridge/pages/audit/AuditLogPage.js +277 -0
- package/dist/atheletebridge/pages/audit/AuditLogPage.js.map +1 -0
- package/dist/atheletebridge/pages/control/ClubControlPage.d.ts +11 -0
- package/dist/atheletebridge/pages/control/ClubControlPage.js +208 -0
- package/dist/atheletebridge/pages/control/ClubControlPage.js.map +1 -0
- package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js +126 -65
- package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js.map +1 -1
- package/dist/atheletebridge/pages/programs/ProgramDetailPage.js +366 -196
- package/dist/atheletebridge/pages/programs/ProgramDetailPage.js.map +1 -1
- package/dist/atheletebridge/pages/registrations/RegistrationFormBuilderPage.js +243 -217
- package/dist/atheletebridge/pages/registrations/RegistrationFormBuilderPage.js.map +1 -1
- package/dist/atheletebridge/pages/registrations/RegistrationFormDetailPage.js +136 -83
- package/dist/atheletebridge/pages/registrations/RegistrationFormDetailPage.js.map +1 -1
- package/dist/atheletebridge/pages/registrations/RegistrationSubmissionPage.js +173 -146
- package/dist/atheletebridge/pages/registrations/RegistrationSubmissionPage.js.map +1 -1
- package/dist/atheletebridge/pages/sessions/SessionsCalendarPage.d.ts +11 -0
- package/dist/atheletebridge/pages/sessions/SessionsCalendarPage.js +259 -0
- package/dist/atheletebridge/pages/sessions/SessionsCalendarPage.js.map +1 -0
- package/dist/atheletebridge/pages/sessions/SessionsListPage.js +59 -47
- package/dist/atheletebridge/pages/sessions/SessionsListPage.js.map +1 -1
- package/dist/atheletebridge/pages/teams/TeamDetailPage.js +110 -83
- package/dist/atheletebridge/pages/teams/TeamDetailPage.js.map +1 -1
- package/dist/atheletebridge/types/audit.d.ts +47 -0
- package/dist/atheletebridge/types/index.d.ts +25 -0
- package/dist/atheletebridge/types/registration.d.ts +22 -1
- package/package.json +1 -1
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
import { PageLayout as e } from "../../components/PageLayout.js";
|
|
2
2
|
import { Scoreboard as t } from "../../components/Scoreboard.js";
|
|
3
|
+
import { StatusBadge as ee } from "../../components/StatusBadge.js";
|
|
3
4
|
import { Crest as n } from "../../components/Crest.js";
|
|
4
|
-
import { ErrorState as
|
|
5
|
+
import { ErrorState as te, LoadingState as ne } from "../../components/LoadingState.js";
|
|
5
6
|
import { FormField as r, fieldInputClass as i } from "../../components/form.js";
|
|
6
|
-
import { FIXTURE_TYPE_LABELS as
|
|
7
|
-
import { AvailabilityRsvpControl as
|
|
8
|
-
import { AvailabilityRosterPanel as
|
|
9
|
-
import { useScheduledTimeGate as
|
|
10
|
-
import { useAthleteBridge as
|
|
7
|
+
import { FIXTURE_TYPE_LABELS as re } from "../../components/domain.js";
|
|
8
|
+
import { AvailabilityRsvpControl as ie } from "../../components/availability/AvailabilityRsvpControl.js";
|
|
9
|
+
import { AvailabilityRosterPanel as ae } from "../../components/availability/AvailabilityRosterPanel.js";
|
|
10
|
+
import { useScheduledTimeGate as oe } from "../../hooks/useScheduledTimeGate.js";
|
|
11
|
+
import { useAthleteBridge as se } from "../../context/AthleteBridgeContext.js";
|
|
11
12
|
import "../../hooks/index.js";
|
|
12
|
-
import { useCancelFixture as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
13
|
+
import { useCancelFixture as ce, useFixture as le, usePostponeFixture as ue, useRecordFixtureResult as de, useUpdateFixture as fe } from "../../hooks/useAthleteBridgeApi.js";
|
|
14
|
+
import { useRegistrationForms as pe } from "../../hooks/useRegistrationApi.js";
|
|
15
|
+
import { buildScheduleInput as me, getFixtureLifecycleActions as he, initialScheduleInputs as ge } from "../../utils/fixtureLifecycle.js";
|
|
16
|
+
import { buildRecordResultInput as _e, parseScoreInput as a } from "../../utils/recordResult.js";
|
|
17
|
+
import { useAbTranslate as ve } from "../../i18n.js";
|
|
16
18
|
import { useState as o } from "react";
|
|
17
|
-
import { ArrowLeft as
|
|
18
|
-
import { useParams as
|
|
19
|
-
import { Fragment as
|
|
19
|
+
import { ArrowLeft as ye, Ban as be, CalendarClock as s, CalendarPlus as xe, ClipboardList as Se, Flag as Ce, Loader2 as c, Minus as we, Plus as Te, Trophy as l } from "lucide-react";
|
|
20
|
+
import { useParams as Ee } from "react-router";
|
|
21
|
+
import { Fragment as De, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
20
22
|
import { EmphasisPanel as f, GlassCard as p, ResponsiveDialog as m, ResponsiveDialogContent as h, ResponsiveDialogFooter as g, ResponsiveDialogHeader as _, ResponsiveDialogTitle as v } from "@burdenoff/fe-libs/ui";
|
|
21
|
-
import { useGlobalUi as
|
|
23
|
+
import { useGlobalUi as Oe } from "@burdenoff/fe-libs/shared/providers/shell/GlobalUiProvider";
|
|
22
24
|
// src/atheletebridge/pages/fixtures/FixtureDetailPage.tsx
|
|
23
25
|
function y() {
|
|
24
|
-
let y =
|
|
26
|
+
let y = ve(), { id: b } = Ee(), { navigateTo: x } = se(), S = le(b), C = pe({ fixtureId: b }), w = de(), T = fe(), E = ue(), D = ce(), { showToast: O } = Oe(), [k, A] = o(""), [j, M] = o(""), [N, ke] = o(""), [P, Ae] = o(""), [je, Me] = o(""), [Ne, Pe] = o(""), [Fe, Ie] = o({
|
|
25
27
|
homeRuns: "",
|
|
26
28
|
homeWickets: "",
|
|
27
29
|
homeOvers: "",
|
|
@@ -35,55 +37,55 @@ function y() {
|
|
|
35
37
|
margin: "",
|
|
36
38
|
superOver: !1,
|
|
37
39
|
dls: !1
|
|
38
|
-
}), [F, I] = o(null), L =
|
|
40
|
+
}), [F, I] = o(null), L = oe(S.data?.scheduledAt), [R, z] = o(null), [B, V] = o(""), [H, U] = o(""), [Le, W] = o(!1);
|
|
39
41
|
if (S.isLoading) return /* @__PURE__ */ u(e, {
|
|
40
42
|
title: y("atheletebridge.pages.fixtureDetail.title", "Fixture"),
|
|
41
|
-
children: /* @__PURE__ */ u(
|
|
43
|
+
children: /* @__PURE__ */ u(ne, { label: y("atheletebridge.pages.fixtureDetail.loading", "Loading fixture…") })
|
|
42
44
|
});
|
|
43
45
|
if (S.isError || !S.data) return /* @__PURE__ */ u(e, {
|
|
44
46
|
title: y("atheletebridge.pages.fixtureDetail.title", "Fixture"),
|
|
45
|
-
children: /* @__PURE__ */ u(
|
|
47
|
+
children: /* @__PURE__ */ u(te, {
|
|
46
48
|
title: y("atheletebridge.pages.fixtureDetail.notFoundTitle", "Fixture not found"),
|
|
47
49
|
message: y("atheletebridge.pages.fixtureDetail.notFoundMessage", "This fixture does not exist or you do not have access to it."),
|
|
48
50
|
onRetry: () => x("/fixtures")
|
|
49
51
|
})
|
|
50
52
|
});
|
|
51
|
-
let G = S.data, K = G.homeTeam?.name ?? y("atheletebridge.pages.fixtureDetail.home", "Home"), q = G.awayTeam?.name ?? (G.awayTeamId ? y("atheletebridge.pages.fixtureDetail.away", "Away") : "TBD"), J = !!G.awayTeamId && (G.status === "SCHEDULED" || G.status === "LIVE"),
|
|
52
|
-
a(
|
|
53
|
-
let { canReschedule: Y, canPostpone: X, canCancel: Z } =
|
|
54
|
-
let t =
|
|
53
|
+
let G = S.data, K = G.homeTeam?.name ?? y("atheletebridge.pages.fixtureDetail.home", "Home"), q = G.awayTeam?.name ?? (G.awayTeamId ? y("atheletebridge.pages.fixtureDetail.away", "Away") : "TBD"), J = !!G.awayTeamId && (G.status === "SCHEDULED" || G.status === "LIVE"), Re = J && L, ze = J && !L;
|
|
54
|
+
a(k), a(j), a(N), a(P);
|
|
55
|
+
let { canReschedule: Y, canPostpone: X, canCancel: Z } = he(G.status), Q = R === "reschedule" ? T.isPending : E.isPending, $ = (e) => {
|
|
56
|
+
let t = ge(e, G);
|
|
55
57
|
V(t.scheduledAtInput), U(t.kickoffAtInput), z(e);
|
|
56
|
-
},
|
|
58
|
+
}, Be = async (e) => {
|
|
57
59
|
e.preventDefault();
|
|
58
|
-
let t =
|
|
59
|
-
if (!t)
|
|
60
|
+
let t = me(B, H);
|
|
61
|
+
if (!t) O(y("atheletebridge.pages.fixtureDetail.scheduleDateRequired", "Pick a date and time first."), "error");
|
|
60
62
|
else try {
|
|
61
|
-
R === "reschedule" ? (await
|
|
63
|
+
R === "reschedule" ? (await T.mutateAsync({
|
|
62
64
|
id: G.id,
|
|
63
65
|
input: t
|
|
64
|
-
}),
|
|
66
|
+
}), O(y("atheletebridge.pages.fixtureDetail.rescheduledToast", "Fixture rescheduled."), "success")) : (await E.mutateAsync({
|
|
65
67
|
id: G.id,
|
|
66
68
|
input: t
|
|
67
|
-
}),
|
|
69
|
+
}), O(y("atheletebridge.pages.fixtureDetail.postponedToast", "Fixture postponed."), "success")), z(null);
|
|
68
70
|
} catch (e) {
|
|
69
|
-
|
|
71
|
+
O(e instanceof Error ? e.message : y("common.error", "Something went wrong."), "error");
|
|
70
72
|
}
|
|
71
|
-
},
|
|
73
|
+
}, Ve = async () => {
|
|
72
74
|
try {
|
|
73
|
-
await
|
|
75
|
+
await D.mutateAsync(G.id), O(y("atheletebridge.pages.fixtureDetail.cancelledToast", "Fixture cancelled."), "success"), W(!1);
|
|
74
76
|
} catch (e) {
|
|
75
|
-
|
|
77
|
+
O(e instanceof Error ? e.message : y("common.error", "Something went wrong."), "error"), W(!1);
|
|
76
78
|
}
|
|
77
79
|
};
|
|
78
80
|
return /* @__PURE__ */ d(e, {
|
|
79
81
|
title: `${K} vs ${q}`,
|
|
80
|
-
description: `${
|
|
82
|
+
description: `${re[G.type]}${G.competition ? ` · ${G.competition}` : ""}`,
|
|
81
83
|
actions: /* @__PURE__ */ d("button", {
|
|
82
84
|
type: "button",
|
|
83
85
|
onClick: () => x("/fixtures"),
|
|
84
86
|
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",
|
|
85
87
|
children: [
|
|
86
|
-
/* @__PURE__ */ u(
|
|
88
|
+
/* @__PURE__ */ u(ye, { className: "h-4 w-4" }),
|
|
87
89
|
" ",
|
|
88
90
|
y("atheletebridge.pages.fixtureDetail.back", "Back")
|
|
89
91
|
]
|
|
@@ -96,10 +98,10 @@ function y() {
|
|
|
96
98
|
}),
|
|
97
99
|
/* @__PURE__ */ d("div", {
|
|
98
100
|
className: "mb-8 grid grid-cols-1 gap-4 lg:grid-cols-[minmax(0,1fr)_2fr]",
|
|
99
|
-
children: [/* @__PURE__ */ u(
|
|
101
|
+
children: [/* @__PURE__ */ u(ie, {
|
|
100
102
|
teamId: G.homeTeamId,
|
|
101
103
|
fixtureId: G.id
|
|
102
|
-
}), /* @__PURE__ */ u(
|
|
104
|
+
}), /* @__PURE__ */ u(ae, {
|
|
103
105
|
teamId: G.homeTeamId,
|
|
104
106
|
fixtureId: G.id
|
|
105
107
|
})]
|
|
@@ -132,7 +134,7 @@ function y() {
|
|
|
132
134
|
onClick: () => $("reschedule"),
|
|
133
135
|
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",
|
|
134
136
|
children: [
|
|
135
|
-
/* @__PURE__ */ u(
|
|
137
|
+
/* @__PURE__ */ u(xe, { className: "h-4 w-4" }),
|
|
136
138
|
" ",
|
|
137
139
|
y("atheletebridge.pages.fixtureDetail.reschedule", "Reschedule")
|
|
138
140
|
]
|
|
@@ -152,7 +154,7 @@ function y() {
|
|
|
152
154
|
onClick: () => W(!0),
|
|
153
155
|
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",
|
|
154
156
|
children: [
|
|
155
|
-
/* @__PURE__ */ u(
|
|
157
|
+
/* @__PURE__ */ u(be, { className: "h-4 w-4" }),
|
|
156
158
|
" ",
|
|
157
159
|
y("atheletebridge.pages.fixtureDetail.cancelFixture", "Cancel fixture")
|
|
158
160
|
]
|
|
@@ -160,19 +162,19 @@ function y() {
|
|
|
160
162
|
]
|
|
161
163
|
})]
|
|
162
164
|
}),
|
|
163
|
-
|
|
165
|
+
ze && /* @__PURE__ */ u(f, {
|
|
164
166
|
className: "mb-8",
|
|
165
167
|
children: /* @__PURE__ */ u("p", {
|
|
166
168
|
className: "text-sm text-text-secondary",
|
|
167
169
|
children: y("atheletebridge.pages.fixtureDetail.recordResultUnavailable", "A result can be recorded once this fixture has started — after its scheduled date and time.")
|
|
168
170
|
})
|
|
169
171
|
}),
|
|
170
|
-
|
|
172
|
+
Re && /* @__PURE__ */ d("section", {
|
|
171
173
|
className: "mb-8",
|
|
172
174
|
children: [/* @__PURE__ */ d("h2", {
|
|
173
175
|
className: "mb-4 flex items-center gap-2 text-lg font-semibold text-text-primary",
|
|
174
176
|
children: [
|
|
175
|
-
/* @__PURE__ */ u(
|
|
177
|
+
/* @__PURE__ */ u(Ce, { className: "h-5 w-5" }),
|
|
176
178
|
" ",
|
|
177
179
|
y("atheletebridge.pages.fixtureDetail.recordResult", "Record result")
|
|
178
180
|
]
|
|
@@ -187,13 +189,13 @@ function y() {
|
|
|
187
189
|
/* @__PURE__ */ d("form", {
|
|
188
190
|
onSubmit: async (e) => {
|
|
189
191
|
if (e.preventDefault(), I(null), !b) return;
|
|
190
|
-
let t =
|
|
191
|
-
homeScore:
|
|
192
|
-
awayScore:
|
|
193
|
-
extraTimeHome:
|
|
194
|
-
extraTimeAway:
|
|
195
|
-
penaltyHome:
|
|
196
|
-
penaltyAway:
|
|
192
|
+
let t = _e({
|
|
193
|
+
homeScore: k,
|
|
194
|
+
awayScore: j,
|
|
195
|
+
extraTimeHome: N,
|
|
196
|
+
extraTimeAway: P,
|
|
197
|
+
penaltyHome: je,
|
|
198
|
+
penaltyAway: Ne
|
|
197
199
|
}, {
|
|
198
200
|
scoresRequired: y("atheletebridge.pages.fixtureDetail.scoresRequired", "Both scores are required and must be numbers."),
|
|
199
201
|
scoresNegative: y("atheletebridge.pages.fixtureDetail.scoresNegative", "Scores cannot be negative."),
|
|
@@ -209,15 +211,15 @@ function y() {
|
|
|
209
211
|
});
|
|
210
212
|
if (!t.ok) I(t.error);
|
|
211
213
|
else try {
|
|
212
|
-
await
|
|
214
|
+
await w.mutateAsync({
|
|
213
215
|
id: b,
|
|
214
216
|
input: t.input
|
|
215
|
-
}),
|
|
217
|
+
}), A(""), M(""), ke(""), Ae(""), Me(""), Pe("");
|
|
216
218
|
} catch (e) {
|
|
217
219
|
I(e instanceof Error ? e.message : y("atheletebridge.pages.fixtureDetail.recordFailed", "Failed to record result."));
|
|
218
220
|
}
|
|
219
221
|
},
|
|
220
|
-
children: [/* @__PURE__ */ d(
|
|
222
|
+
children: [/* @__PURE__ */ d(De, { children: [/* @__PURE__ */ d("div", {
|
|
221
223
|
className: "flex flex-wrap items-end justify-center gap-4 sm:gap-6",
|
|
222
224
|
children: [
|
|
223
225
|
/* @__PURE__ */ d("div", {
|
|
@@ -240,13 +242,13 @@ function y() {
|
|
|
240
242
|
id: "homeScore",
|
|
241
243
|
inputMode: "numeric",
|
|
242
244
|
className: `${i} text-center text-lg font-bold tabular-nums`,
|
|
243
|
-
value:
|
|
244
|
-
onChange: (e) =>
|
|
245
|
+
value: k,
|
|
246
|
+
onChange: (e) => A(e.target.value),
|
|
245
247
|
placeholder: "0"
|
|
246
248
|
})
|
|
247
249
|
})]
|
|
248
250
|
}),
|
|
249
|
-
/* @__PURE__ */ u(
|
|
251
|
+
/* @__PURE__ */ u(we, {
|
|
250
252
|
className: "mb-3 h-5 w-5 shrink-0 text-text-muted",
|
|
251
253
|
"aria-hidden": "true"
|
|
252
254
|
}),
|
|
@@ -260,8 +262,8 @@ function y() {
|
|
|
260
262
|
id: "awayScore",
|
|
261
263
|
inputMode: "numeric",
|
|
262
264
|
className: `${i} text-center text-lg font-bold tabular-nums`,
|
|
263
|
-
value:
|
|
264
|
-
onChange: (e) =>
|
|
265
|
+
value: j,
|
|
266
|
+
onChange: (e) => M(e.target.value),
|
|
265
267
|
placeholder: "0"
|
|
266
268
|
})
|
|
267
269
|
}), /* @__PURE__ */ d("div", {
|
|
@@ -281,9 +283,9 @@ function y() {
|
|
|
281
283
|
className: "mt-6 flex justify-center",
|
|
282
284
|
children: /* @__PURE__ */ d("button", {
|
|
283
285
|
type: "submit",
|
|
284
|
-
disabled:
|
|
286
|
+
disabled: w.isPending,
|
|
285
287
|
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",
|
|
286
|
-
children: [
|
|
288
|
+
children: [w.isPending ? /* @__PURE__ */ u(c, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ u(l, { className: "h-4 w-4" }), y("atheletebridge.pages.fixtureDetail.recordResultAction", "Record result")]
|
|
287
289
|
})
|
|
288
290
|
})]
|
|
289
291
|
}),
|
|
@@ -294,6 +296,65 @@ function y() {
|
|
|
294
296
|
]
|
|
295
297
|
})]
|
|
296
298
|
}),
|
|
299
|
+
/* @__PURE__ */ d("section", {
|
|
300
|
+
className: "mb-8",
|
|
301
|
+
children: [/* @__PURE__ */ d("h2", {
|
|
302
|
+
className: "mb-4 flex items-center gap-2 text-lg font-semibold text-text-primary",
|
|
303
|
+
children: [
|
|
304
|
+
/* @__PURE__ */ u(Se, { className: "h-5 w-5" }),
|
|
305
|
+
" ",
|
|
306
|
+
y("atheletebridge.pages.fixtureDetail.signUps", "Tournament sign-ups")
|
|
307
|
+
]
|
|
308
|
+
}), C.isLoading ? /* @__PURE__ */ u("p", {
|
|
309
|
+
className: "text-sm text-text-secondary",
|
|
310
|
+
children: y("atheletebridge.pages.fixtureDetail.signUpsLoading", "Loading sign-up forms…")
|
|
311
|
+
}) : C.isError ? /* @__PURE__ */ u("p", {
|
|
312
|
+
className: "text-sm text-status-error-text",
|
|
313
|
+
children: y("atheletebridge.pages.fixtureDetail.signUpsError", "Sign-up forms could not be loaded.")
|
|
314
|
+
}) : (C.data?.items ?? []).length === 0 ? /* @__PURE__ */ d("div", {
|
|
315
|
+
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",
|
|
316
|
+
children: [/* @__PURE__ */ u("p", {
|
|
317
|
+
className: "text-sm text-text-secondary",
|
|
318
|
+
children: y("atheletebridge.pages.fixtureDetail.signUpsEmpty", "No sign-up form for this fixture yet. Publish one and families register through its share link.")
|
|
319
|
+
}), /* @__PURE__ */ d("button", {
|
|
320
|
+
type: "button",
|
|
321
|
+
onClick: () => x("/registrations/new"),
|
|
322
|
+
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",
|
|
323
|
+
children: [
|
|
324
|
+
/* @__PURE__ */ u(Te, { className: "h-4 w-4" }),
|
|
325
|
+
" ",
|
|
326
|
+
y("atheletebridge.pages.fixtureDetail.createSignUp", "Create sign-up form")
|
|
327
|
+
]
|
|
328
|
+
})]
|
|
329
|
+
}) : /* @__PURE__ */ u("ul", {
|
|
330
|
+
className: "divide-y divide-border-seam overflow-hidden rounded-lg border border-border-seam bg-bg-surface",
|
|
331
|
+
children: (C.data?.items ?? []).map((e) => /* @__PURE__ */ u("li", { children: /* @__PURE__ */ d("button", {
|
|
332
|
+
type: "button",
|
|
333
|
+
onClick: () => x(`/registrations/${e.id}`),
|
|
334
|
+
className: "flex w-full flex-wrap items-center justify-between gap-3 px-4 py-3 text-left transition-colors hover:bg-bg-sunken",
|
|
335
|
+
children: [/* @__PURE__ */ d("span", {
|
|
336
|
+
className: "min-w-0",
|
|
337
|
+
children: [/* @__PURE__ */ u("span", {
|
|
338
|
+
className: "block truncate font-medium text-text-primary",
|
|
339
|
+
children: e.title
|
|
340
|
+
}), /* @__PURE__ */ u("span", {
|
|
341
|
+
className: "block text-xs text-text-secondary",
|
|
342
|
+
children: e.isOpen ? y("atheletebridge.pages.fixtureDetail.signUpsOpen", "Accepting registrations") : y("atheletebridge.pages.fixtureDetail.signUpsNotOpen", "Not accepting registrations")
|
|
343
|
+
})]
|
|
344
|
+
}), /* @__PURE__ */ d("span", {
|
|
345
|
+
className: "flex items-center gap-3",
|
|
346
|
+
children: [/* @__PURE__ */ d("span", {
|
|
347
|
+
className: "text-sm tabular-nums text-text-secondary",
|
|
348
|
+
children: [
|
|
349
|
+
e.submissionCount,
|
|
350
|
+
" ",
|
|
351
|
+
y("atheletebridge.pages.fixtureDetail.signUpCount", "registered")
|
|
352
|
+
]
|
|
353
|
+
}), /* @__PURE__ */ u(ee, { status: e.status })]
|
|
354
|
+
})]
|
|
355
|
+
}) }, e.id))
|
|
356
|
+
})]
|
|
357
|
+
}),
|
|
297
358
|
G.competition && /* @__PURE__ */ d("button", {
|
|
298
359
|
type: "button",
|
|
299
360
|
onClick: () => x(`/standings?competition=${encodeURIComponent(G.competition ?? "")}`),
|
|
@@ -310,7 +371,7 @@ function y() {
|
|
|
310
371
|
!e && !Q && z(null);
|
|
311
372
|
},
|
|
312
373
|
children: /* @__PURE__ */ d(h, { children: [/* @__PURE__ */ u(_, { children: /* @__PURE__ */ u(v, { children: R === "reschedule" ? y("atheletebridge.pages.fixtureDetail.rescheduleTitle", "Reschedule fixture") : y("atheletebridge.pages.fixtureDetail.postponeTitle", "Postpone fixture") }) }), /* @__PURE__ */ d("form", {
|
|
313
|
-
onSubmit: (e) => void
|
|
374
|
+
onSubmit: (e) => void Be(e),
|
|
314
375
|
className: "space-y-4 px-1",
|
|
315
376
|
children: [
|
|
316
377
|
/* @__PURE__ */ u("p", {
|
|
@@ -357,9 +418,9 @@ function y() {
|
|
|
357
418
|
})] })
|
|
358
419
|
}),
|
|
359
420
|
/* @__PURE__ */ u(m, {
|
|
360
|
-
open:
|
|
421
|
+
open: Le,
|
|
361
422
|
onOpenChange: (e) => {
|
|
362
|
-
!e && !
|
|
423
|
+
!e && !D.isPending && W(!1);
|
|
363
424
|
},
|
|
364
425
|
children: /* @__PURE__ */ d(h, { children: [
|
|
365
426
|
/* @__PURE__ */ u(_, { children: /* @__PURE__ */ u(v, { children: y("atheletebridge.pages.fixtureDetail.cancelTitle", "Cancel fixture?") }) }),
|
|
@@ -370,15 +431,15 @@ function y() {
|
|
|
370
431
|
/* @__PURE__ */ d(g, { children: [/* @__PURE__ */ u("button", {
|
|
371
432
|
type: "button",
|
|
372
433
|
onClick: () => W(!1),
|
|
373
|
-
disabled:
|
|
434
|
+
disabled: D.isPending,
|
|
374
435
|
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",
|
|
375
436
|
children: y("common.keepFixture", "Keep fixture")
|
|
376
437
|
}), /* @__PURE__ */ d("button", {
|
|
377
438
|
type: "button",
|
|
378
|
-
onClick: () => void
|
|
379
|
-
disabled:
|
|
439
|
+
onClick: () => void Ve(),
|
|
440
|
+
disabled: D.isPending,
|
|
380
441
|
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",
|
|
381
|
-
children: [
|
|
442
|
+
children: [D.isPending && /* @__PURE__ */ u(c, { className: "h-4 w-4 animate-spin" }), y("atheletebridge.pages.fixtureDetail.cancelConfirm", "Cancel fixture")]
|
|
382
443
|
})] })
|
|
383
444
|
] })
|
|
384
445
|
})
|