@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.
Files changed (43) hide show
  1. package/dist/atheletebridge/AthleteBridgeRoutes.js +45 -21
  2. package/dist/atheletebridge/AthleteBridgeRoutes.js.map +1 -1
  3. package/dist/atheletebridge/components/MemberCard.d.ts +7 -0
  4. package/dist/atheletebridge/components/MemberCard.js +45 -0
  5. package/dist/atheletebridge/components/MemberCard.js.map +1 -0
  6. package/dist/atheletebridge/components/StatusBadge.js +8 -0
  7. package/dist/atheletebridge/components/StatusBadge.js.map +1 -1
  8. package/dist/atheletebridge/hooks/useAthleteBridgeApi.d.ts +15 -1
  9. package/dist/atheletebridge/hooks/useAthleteBridgeApi.js +63 -41
  10. package/dist/atheletebridge/hooks/useAthleteBridgeApi.js.map +1 -1
  11. package/dist/atheletebridge/hooks/useAuditApi.d.ts +14 -0
  12. package/dist/atheletebridge/hooks/useAuditApi.js +38 -0
  13. package/dist/atheletebridge/hooks/useAuditApi.js.map +1 -0
  14. package/dist/atheletebridge/hooks/useRegistrationApi.d.ts +15 -0
  15. package/dist/atheletebridge/hooks/useRegistrationApi.js +38 -19
  16. package/dist/atheletebridge/hooks/useRegistrationApi.js.map +1 -1
  17. package/dist/atheletebridge/pages/audit/AuditLogPage.d.ts +11 -0
  18. package/dist/atheletebridge/pages/audit/AuditLogPage.js +277 -0
  19. package/dist/atheletebridge/pages/audit/AuditLogPage.js.map +1 -0
  20. package/dist/atheletebridge/pages/control/ClubControlPage.d.ts +11 -0
  21. package/dist/atheletebridge/pages/control/ClubControlPage.js +208 -0
  22. package/dist/atheletebridge/pages/control/ClubControlPage.js.map +1 -0
  23. package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js +126 -65
  24. package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js.map +1 -1
  25. package/dist/atheletebridge/pages/programs/ProgramDetailPage.js +366 -196
  26. package/dist/atheletebridge/pages/programs/ProgramDetailPage.js.map +1 -1
  27. package/dist/atheletebridge/pages/registrations/RegistrationFormBuilderPage.js +243 -217
  28. package/dist/atheletebridge/pages/registrations/RegistrationFormBuilderPage.js.map +1 -1
  29. package/dist/atheletebridge/pages/registrations/RegistrationFormDetailPage.js +136 -83
  30. package/dist/atheletebridge/pages/registrations/RegistrationFormDetailPage.js.map +1 -1
  31. package/dist/atheletebridge/pages/registrations/RegistrationSubmissionPage.js +173 -146
  32. package/dist/atheletebridge/pages/registrations/RegistrationSubmissionPage.js.map +1 -1
  33. package/dist/atheletebridge/pages/sessions/SessionsCalendarPage.d.ts +11 -0
  34. package/dist/atheletebridge/pages/sessions/SessionsCalendarPage.js +259 -0
  35. package/dist/atheletebridge/pages/sessions/SessionsCalendarPage.js.map +1 -0
  36. package/dist/atheletebridge/pages/sessions/SessionsListPage.js +59 -47
  37. package/dist/atheletebridge/pages/sessions/SessionsListPage.js.map +1 -1
  38. package/dist/atheletebridge/pages/teams/TeamDetailPage.js +110 -83
  39. package/dist/atheletebridge/pages/teams/TeamDetailPage.js.map +1 -1
  40. package/dist/atheletebridge/types/audit.d.ts +47 -0
  41. package/dist/atheletebridge/types/index.d.ts +25 -0
  42. package/dist/atheletebridge/types/registration.d.ts +22 -1
  43. package/package.json +1 -1
@@ -3,20 +3,46 @@ import { ErrorState as t, LoadingState as n } from "../../components/LoadingStat
3
3
  import { FormField as r, fieldInputClass as i } from "../../components/form.js";
4
4
  import { StatusBadge as a } from "../../components/StatusBadge.js";
5
5
  import { useAthleteBridge as o } from "../../context/AthleteBridgeContext.js";
6
- import { useRecordRegistrationPayment as s, useRefundRegistrationPayment as c, useRegistrationForm as l, useRegistrationPayments as u, useRegistrationSubmission as d, useReviewRegistration as f, useVoidRegistrationPayment as p } from "../../hooks/useRegistrationApi.js";
7
- import { formatDate as m } from "../../utils/formatters.js";
8
- import { formatMoney as h, minorToInput as g, parseMoney as _ } from "../../utils/money.js";
9
- import { canVoidPayment as v, paymentSourceLabel as y, providerLabel as b } from "../../utils/onlineCheckout.js";
10
- import { PAYMENT_METHODS as x, paymentMethodLabel as S, rosterNotice as C } from "../../utils/registration.js";
11
- import { useState as w } from "react";
12
- import { AlertTriangle as T, ArrowLeft as E, Ban as D, Check as O, Loader2 as k, Plus as A, RotateCcw as j, Users as M, X as N } from "lucide-react";
13
- import { useParams as P } from "react-router";
14
- import { jsx as F, jsxs as I } from "react/jsx-runtime";
6
+ import { useRecordRegistrationPayment as s, useRefundRegistrationPayment as c, useRegistrationCheckIn as l, useRegistrationForm as u, useRegistrationPayments as d, useRegistrationSubmission as f, useReviewRegistration as p, useVoidRegistrationPayment as m } from "../../hooks/useRegistrationApi.js";
7
+ import { formatDate as h } from "../../utils/formatters.js";
8
+ import { formatMoney as g, minorToInput as _, parseMoney as v } from "../../utils/money.js";
9
+ import { canVoidPayment as y, paymentSourceLabel as b, providerLabel as x } from "../../utils/onlineCheckout.js";
10
+ import { PAYMENT_METHODS as S, paymentMethodLabel as C, rosterNotice as w } from "../../utils/registration.js";
11
+ import { useState as T } from "react";
12
+ import { AlertTriangle as E, ArrowLeft as D, Ban as O, Check as k, Loader2 as A, Plus as j, RotateCcw as M, Users as N, X as P } from "lucide-react";
13
+ import { useParams as F } from "react-router";
14
+ import { jsx as I, jsxs as L } from "react/jsx-runtime";
15
15
  // src/atheletebridge/pages/registrations/RegistrationSubmissionPage.tsx
16
- var L = "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 disabled:opacity-50", R = "inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-50", z = (e, t) => e instanceof Error ? e.message : t;
17
- function B({ submission: e }) {
18
- let t = f(), [n, a] = w(e.reviewNotes ?? ""), [o, s] = w(null);
19
- if (e.status === "WITHDRAWN") return /* @__PURE__ */ F("p", {
16
+ var R = "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 disabled:opacity-50", z = "inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-50", B = (e, t) => e instanceof Error ? e.message : t;
17
+ function V({ submission: e }) {
18
+ let t = l(), n = e.checkInStatus === "CHECKED_IN";
19
+ return /* @__PURE__ */ L("div", {
20
+ className: "mt-4 border-t border-border-seam pt-3",
21
+ children: [
22
+ /* @__PURE__ */ I("h3", {
23
+ className: "mb-1 text-sm font-semibold text-text-primary",
24
+ children: "Tournament check-in"
25
+ }),
26
+ /* @__PURE__ */ I("p", {
27
+ className: "mb-3 text-xs text-text-secondary",
28
+ children: n ? `Checked in${e.checkedInAt ? ` ${h(e.checkedInAt)}` : ""}.` : e.status === "ACCEPTED" ? "Not checked in yet." : "Check-in unlocks once the registration is accepted."
29
+ }),
30
+ e.status === "ACCEPTED" && /* @__PURE__ */ I("button", {
31
+ type: "button",
32
+ disabled: t.isPending,
33
+ onClick: () => t.mutate({
34
+ id: e.id,
35
+ checkedIn: !n
36
+ }),
37
+ className: R,
38
+ children: n ? "Undo check-in" : "Check in"
39
+ })
40
+ ]
41
+ });
42
+ }
43
+ function H({ submission: e }) {
44
+ let t = p(), [n, a] = T(e.reviewNotes ?? ""), [o, s] = T(null);
45
+ if (e.status === "WITHDRAWN") return /* @__PURE__ */ I("p", {
20
46
  className: "text-sm text-text-secondary",
21
47
  children: "The family withdrew this registration."
22
48
  });
@@ -29,17 +55,17 @@ function B({ submission: e }) {
29
55
  notes: n.trim() || void 0
30
56
  });
31
57
  } catch (e) {
32
- s(z(e, "Could not save the decision."));
58
+ s(B(e, "Could not save the decision."));
33
59
  }
34
60
  };
35
- return /* @__PURE__ */ I("div", {
61
+ return /* @__PURE__ */ L("div", {
36
62
  className: "space-y-3",
37
63
  children: [
38
- /* @__PURE__ */ F(r, {
64
+ /* @__PURE__ */ I(r, {
39
65
  label: "Review notes",
40
66
  htmlFor: "reviewNotes",
41
67
  hint: "Visible to club staff only.",
42
- children: /* @__PURE__ */ F("textarea", {
68
+ children: /* @__PURE__ */ I("textarea", {
43
69
  id: "reviewNotes",
44
70
  rows: 2,
45
71
  className: i,
@@ -47,27 +73,27 @@ function B({ submission: e }) {
47
73
  onChange: (e) => a(e.target.value)
48
74
  })
49
75
  }),
50
- /* @__PURE__ */ I("div", {
76
+ /* @__PURE__ */ L("div", {
51
77
  className: "flex flex-wrap gap-2",
52
- children: [/* @__PURE__ */ I("button", {
78
+ children: [/* @__PURE__ */ L("button", {
53
79
  type: "button",
54
- className: R,
80
+ className: z,
55
81
  disabled: t.isPending || e.status === "ACCEPTED",
56
82
  onClick: () => void c("ACCEPT"),
57
- children: [/* @__PURE__ */ F(O, { className: "h-4 w-4" }), " Accept"]
58
- }), /* @__PURE__ */ I("button", {
83
+ children: [/* @__PURE__ */ I(k, { className: "h-4 w-4" }), " Accept"]
84
+ }), /* @__PURE__ */ L("button", {
59
85
  type: "button",
60
- className: L,
86
+ className: R,
61
87
  disabled: t.isPending || e.status === "DECLINED",
62
88
  onClick: () => void c("DECLINE"),
63
- children: [/* @__PURE__ */ F(N, { className: "h-4 w-4" }), " Decline"]
89
+ children: [/* @__PURE__ */ I(P, { className: "h-4 w-4" }), " Decline"]
64
90
  })]
65
91
  }),
66
- e.reviewedAt && /* @__PURE__ */ I("p", {
92
+ e.reviewedAt && /* @__PURE__ */ L("p", {
67
93
  className: "text-xs text-text-secondary",
68
- children: ["Last reviewed ", m(e.reviewedAt)]
94
+ children: ["Last reviewed ", h(e.reviewedAt)]
69
95
  }),
70
- o && /* @__PURE__ */ F("p", {
96
+ o && /* @__PURE__ */ I("p", {
71
97
  role: "alert",
72
98
  className: "text-sm text-status-error-text",
73
99
  children: o
@@ -75,39 +101,39 @@ function B({ submission: e }) {
75
101
  ]
76
102
  });
77
103
  }
78
- function V({ submission: e, formTeamId: t }) {
79
- let { navigateTo: n } = o(), r = C(e);
80
- if (!r) return e.status !== "ACCEPTED" || e.rosterOutcome || !t ? null : /* @__PURE__ */ F("button", {
104
+ function U({ submission: e, formTeamId: t }) {
105
+ let { navigateTo: n } = o(), r = w(e);
106
+ if (!r) return e.status !== "ACCEPTED" || e.rosterOutcome || !t ? null : /* @__PURE__ */ I("button", {
81
107
  type: "button",
82
- className: `${L} mt-4 w-full justify-center`,
108
+ className: `${R} mt-4 w-full justify-center`,
83
109
  onClick: () => n(`/teams/${t}`),
84
110
  children: "Open the team roster to add this athlete"
85
111
  });
86
112
  let i = r.tone === "success";
87
- return /* @__PURE__ */ I("div", {
113
+ return /* @__PURE__ */ L("div", {
88
114
  role: "status",
89
115
  "data-testid": "registration-roster-notice",
90
116
  className: `mt-4 space-y-2 rounded-lg border p-3 text-sm ${i ? "border-status-success-border bg-status-success-bg-subtle text-status-success-text" : "border-status-warning-border bg-status-warning-bg-subtle text-status-warning-text"}`,
91
- children: [/* @__PURE__ */ I("p", {
117
+ children: [/* @__PURE__ */ L("p", {
92
118
  className: "flex items-start gap-2",
93
- children: [F(i ? O : T, {
119
+ children: [I(i ? k : E, {
94
120
  className: "mt-0.5 h-4 w-4 shrink-0",
95
121
  "aria-hidden": "true"
96
- }), /* @__PURE__ */ F("span", { children: r.message })]
97
- }), r.teamId && /* @__PURE__ */ I("button", {
122
+ }), /* @__PURE__ */ I("span", { children: r.message })]
123
+ }), r.teamId && /* @__PURE__ */ L("button", {
98
124
  type: "button",
99
- className: `${L} w-full justify-center`,
125
+ className: `${R} w-full justify-center`,
100
126
  onClick: () => n(`/teams/${r.teamId}`),
101
- children: [/* @__PURE__ */ F(M, { className: "h-4 w-4" }), " Open the team roster"]
127
+ children: [/* @__PURE__ */ I(N, { className: "h-4 w-4" }), " Open the team roster"]
102
128
  })]
103
129
  });
104
130
  }
105
- function H({ submission: e }) {
106
- let t = s(), [n, a] = w(g(e.amountOutstanding, e.currency)), [o, c] = w("CASH"), [l, u] = w(""), [d, f] = w(null);
107
- return /* @__PURE__ */ I("form", {
131
+ function W({ submission: e }) {
132
+ let t = s(), [n, a] = T(_(e.amountOutstanding, e.currency)), [o, c] = T("CASH"), [l, u] = T(""), [d, f] = T(null);
133
+ return /* @__PURE__ */ L("form", {
108
134
  onSubmit: async (r) => {
109
135
  r.preventDefault(), f(null);
110
- let i = _(n, e.currency);
136
+ let i = v(n, e.currency);
111
137
  if (i === null || i <= 0) f("Enter the amount received.");
112
138
  else try {
113
139
  await t.mutateAsync({
@@ -117,16 +143,16 @@ function H({ submission: e }) {
117
143
  reference: l.trim() || void 0
118
144
  }), u("");
119
145
  } catch (e) {
120
- f(z(e, "Could not record the payment."));
146
+ f(B(e, "Could not record the payment."));
121
147
  }
122
148
  },
123
149
  className: "grid grid-cols-1 gap-3 sm:grid-cols-[9rem_12rem_1fr_auto]",
124
150
  "aria-label": "Record a payment",
125
151
  children: [
126
- /* @__PURE__ */ F(r, {
152
+ /* @__PURE__ */ I(r, {
127
153
  label: `Amount (${e.currency})`,
128
154
  htmlFor: "paymentAmount",
129
- children: /* @__PURE__ */ F("input", {
155
+ children: /* @__PURE__ */ I("input", {
130
156
  id: "paymentAmount",
131
157
  inputMode: "decimal",
132
158
  className: i,
@@ -134,24 +160,24 @@ function H({ submission: e }) {
134
160
  onChange: (e) => a(e.target.value)
135
161
  })
136
162
  }),
137
- /* @__PURE__ */ F(r, {
163
+ /* @__PURE__ */ I(r, {
138
164
  label: "Method",
139
165
  htmlFor: "paymentMethod",
140
- children: /* @__PURE__ */ F("select", {
166
+ children: /* @__PURE__ */ I("select", {
141
167
  id: "paymentMethod",
142
168
  className: i,
143
169
  value: o,
144
170
  onChange: (e) => c(e.target.value),
145
- children: x.map((e) => /* @__PURE__ */ F("option", {
171
+ children: S.map((e) => /* @__PURE__ */ I("option", {
146
172
  value: e,
147
- children: S(e)
173
+ children: C(e)
148
174
  }, e))
149
175
  })
150
176
  }),
151
- /* @__PURE__ */ F(r, {
177
+ /* @__PURE__ */ I(r, {
152
178
  label: "Reference",
153
179
  htmlFor: "paymentReference",
154
- children: /* @__PURE__ */ F("input", {
180
+ children: /* @__PURE__ */ I("input", {
155
181
  id: "paymentReference",
156
182
  className: i,
157
183
  value: l,
@@ -159,20 +185,20 @@ function H({ submission: e }) {
159
185
  placeholder: "Receipt / bank / cheque no."
160
186
  })
161
187
  }),
162
- /* @__PURE__ */ F("div", {
188
+ /* @__PURE__ */ I("div", {
163
189
  className: "flex items-end",
164
- children: /* @__PURE__ */ I("button", {
190
+ children: /* @__PURE__ */ L("button", {
165
191
  type: "submit",
166
- className: R,
192
+ className: z,
167
193
  disabled: t.isPending,
168
194
  children: [
169
- t.isPending ? /* @__PURE__ */ F(k, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ F(A, { className: "h-4 w-4" }),
195
+ t.isPending ? /* @__PURE__ */ I(A, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ I(j, { className: "h-4 w-4" }),
170
196
  " ",
171
197
  "Record"
172
198
  ]
173
199
  })
174
200
  }),
175
- d && /* @__PURE__ */ F("p", {
201
+ d && /* @__PURE__ */ I("p", {
176
202
  role: "alert",
177
203
  className: "text-sm text-status-error-text sm:col-span-4",
178
204
  children: d
@@ -180,8 +206,8 @@ function H({ submission: e }) {
180
206
  ]
181
207
  });
182
208
  }
183
- function U({ payment: e }) {
184
- let t = p(), n = c(), [r, i] = w(null), o = e.amount - e.refundedAmount, s = async () => {
209
+ function G({ payment: e }) {
210
+ let t = m(), n = c(), [r, i] = T(null), o = e.amount - e.refundedAmount, s = async () => {
185
211
  let n = window.prompt("Why is this payment being voided?");
186
212
  if (n?.trim()) {
187
213
  i(null);
@@ -191,22 +217,22 @@ function U({ payment: e }) {
191
217
  reason: n.trim()
192
218
  });
193
219
  } catch (e) {
194
- i(z(e, "Could not void the payment."));
220
+ i(B(e, "Could not void the payment."));
195
221
  }
196
222
  }
197
223
  }, l = async () => {
198
- let t = window.prompt(`Refund how much? (up to ${h(o, e.currency)})`, g(o, e.currency));
224
+ let t = window.prompt(`Refund how much? (up to ${g(o, e.currency)})`, _(o, e.currency));
199
225
  if (t === null) return;
200
- let r = _(t, e.currency);
226
+ let r = v(t, e.currency);
201
227
  if (r === null || r <= 0) {
202
228
  i("Enter a valid refund amount.");
203
229
  return;
204
230
  }
205
231
  if (r > o) {
206
- i(`You can refund at most ${h(o, e.currency)} of this payment.`);
232
+ i(`You can refund at most ${g(o, e.currency)} of this payment.`);
207
233
  return;
208
234
  }
209
- if (e.processor && !window.confirm(`This refunds ${h(r, e.currency)} to the payer's card through ${b(e.processor)}. Continue?`)) return;
235
+ if (e.processor && !window.confirm(`This refunds ${g(r, e.currency)} to the payer's card through ${x(e.processor)}. Continue?`)) return;
210
236
  let a = window.prompt("Reason for the refund?");
211
237
  if (a?.trim()) {
212
238
  i(null);
@@ -217,222 +243,223 @@ function U({ payment: e }) {
217
243
  reason: a.trim()
218
244
  });
219
245
  } catch (e) {
220
- i(z(e, "Could not record the refund."));
246
+ i(B(e, "Could not record the refund."));
221
247
  }
222
248
  }
223
249
  }, u = t.isPending || n.isPending;
224
- return /* @__PURE__ */ I("li", {
250
+ return /* @__PURE__ */ L("li", {
225
251
  className: "space-y-1 px-4 py-3",
226
252
  "data-testid": "registration-payment",
227
- children: [/* @__PURE__ */ I("div", {
253
+ children: [/* @__PURE__ */ L("div", {
228
254
  className: "flex flex-wrap items-center justify-between gap-3",
229
- children: [/* @__PURE__ */ I("span", {
255
+ children: [/* @__PURE__ */ L("span", {
230
256
  className: "min-w-0",
231
257
  children: [
232
- /* @__PURE__ */ I("span", {
258
+ /* @__PURE__ */ L("span", {
233
259
  className: "block text-sm font-medium tabular-nums text-text-primary",
234
- children: [h(e.amount, e.currency), e.refundedAmount > 0 && /* @__PURE__ */ I("span", {
260
+ children: [g(e.amount, e.currency), e.refundedAmount > 0 && /* @__PURE__ */ L("span", {
235
261
  className: "ml-2 text-xs text-text-secondary",
236
- children: ["refunded ", h(e.refundedAmount, e.currency)]
262
+ children: ["refunded ", g(e.refundedAmount, e.currency)]
237
263
  })]
238
264
  }),
239
- /* @__PURE__ */ I("span", {
265
+ /* @__PURE__ */ L("span", {
240
266
  className: "block text-xs text-text-secondary",
241
267
  children: [
242
- /* @__PURE__ */ F("span", {
268
+ /* @__PURE__ */ I("span", {
243
269
  "data-testid": "payment-source",
244
- children: y(e)
270
+ children: b(e)
245
271
  }),
246
272
  " ·",
247
273
  " ",
248
- m(e.receivedAt),
274
+ h(e.receivedAt),
249
275
  e.reference ? ` · ${e.reference}` : ""
250
276
  ]
251
277
  }),
252
- e.voidReason && /* @__PURE__ */ I("span", {
278
+ e.voidReason && /* @__PURE__ */ L("span", {
253
279
  className: "block text-xs text-text-secondary",
254
280
  children: ["Voided: ", e.voidReason]
255
281
  }),
256
- e.refundReason && /* @__PURE__ */ I("span", {
282
+ e.refundReason && /* @__PURE__ */ L("span", {
257
283
  className: "block text-xs text-text-secondary",
258
284
  children: ["Refund: ", e.refundReason]
259
285
  })
260
286
  ]
261
- }), /* @__PURE__ */ I("span", {
287
+ }), /* @__PURE__ */ L("span", {
262
288
  className: "flex items-center gap-2",
263
289
  children: [
264
- /* @__PURE__ */ F(a, { status: e.status }),
265
- e.status !== "VOIDED" && o > 0 && /* @__PURE__ */ I("button", {
290
+ /* @__PURE__ */ I(a, { status: e.status }),
291
+ e.status !== "VOIDED" && o > 0 && /* @__PURE__ */ L("button", {
266
292
  type: "button",
267
- className: L,
293
+ className: R,
268
294
  disabled: u,
269
295
  onClick: () => void l(),
270
- children: [/* @__PURE__ */ F(j, { className: "h-4 w-4" }), " Refund"]
296
+ children: [/* @__PURE__ */ I(M, { className: "h-4 w-4" }), " Refund"]
271
297
  }),
272
- v(e) && /* @__PURE__ */ I("button", {
298
+ y(e) && /* @__PURE__ */ L("button", {
273
299
  type: "button",
274
- className: L,
300
+ className: R,
275
301
  disabled: u,
276
302
  onClick: () => void s(),
277
- children: [/* @__PURE__ */ F(D, { className: "h-4 w-4" }), " Void"]
303
+ children: [/* @__PURE__ */ I(O, { className: "h-4 w-4" }), " Void"]
278
304
  })
279
305
  ]
280
306
  })]
281
- }), r && /* @__PURE__ */ F("p", {
307
+ }), r && /* @__PURE__ */ I("p", {
282
308
  role: "alert",
283
309
  className: "text-sm text-status-error-text",
284
310
  children: r
285
311
  })]
286
312
  });
287
313
  }
288
- function W({ submission: e }) {
289
- let t = u(e.id);
290
- return t.isError ? null : /* @__PURE__ */ I("section", {
314
+ function K({ submission: e }) {
315
+ let t = d(e.id);
316
+ return t.isError ? null : /* @__PURE__ */ L("section", {
291
317
  className: "space-y-4 rounded-lg border border-border-seam bg-bg-surface p-4",
292
318
  "aria-label": "Payments",
293
319
  children: [
294
- /* @__PURE__ */ I("div", {
320
+ /* @__PURE__ */ L("div", {
295
321
  className: "flex flex-wrap items-center justify-between gap-3",
296
- children: [/* @__PURE__ */ F("h2", {
322
+ children: [/* @__PURE__ */ I("h2", {
297
323
  className: "text-base font-semibold text-text-primary",
298
324
  children: "Payments"
299
- }), /* @__PURE__ */ I("span", {
325
+ }), /* @__PURE__ */ L("span", {
300
326
  className: "text-sm text-text-secondary",
301
327
  children: [
302
328
  "Paid",
303
329
  " ",
304
- /* @__PURE__ */ F("strong", {
330
+ /* @__PURE__ */ I("strong", {
305
331
  className: "tabular-nums text-text-primary",
306
- children: h(e.amountPaid, e.currency)
332
+ children: g(e.amountPaid, e.currency)
307
333
  }),
308
334
  " ",
309
335
  "of ",
310
- h(e.amountDue, e.currency),
336
+ g(e.amountDue, e.currency),
311
337
  " ·",
312
338
  " ",
313
- /* @__PURE__ */ I("span", {
339
+ /* @__PURE__ */ L("span", {
314
340
  "data-testid": "submission-outstanding",
315
- children: [h(e.amountOutstanding, e.currency), " outstanding"]
341
+ children: [g(e.amountOutstanding, e.currency), " outstanding"]
316
342
  })
317
343
  ]
318
344
  })]
319
345
  }),
320
- e.amountOutstanding > 0 && e.status !== "WITHDRAWN" && /* @__PURE__ */ F(H, { submission: e }, `${e.id}-${e.amountOutstanding}`),
321
- t.isLoading ? /* @__PURE__ */ F(n, { label: "Loading payments…" }) : (t.data ?? []).length === 0 ? /* @__PURE__ */ F("p", {
346
+ e.amountOutstanding > 0 && e.status !== "WITHDRAWN" && /* @__PURE__ */ I(W, { submission: e }, `${e.id}-${e.amountOutstanding}`),
347
+ t.isLoading ? /* @__PURE__ */ I(n, { label: "Loading payments…" }) : (t.data ?? []).length === 0 ? /* @__PURE__ */ I("p", {
322
348
  className: "text-sm text-text-secondary",
323
349
  children: "No payments recorded yet."
324
- }) : /* @__PURE__ */ F("ul", {
350
+ }) : /* @__PURE__ */ I("ul", {
325
351
  className: "divide-y divide-border-seam rounded-lg border border-border-seam",
326
- children: (t.data ?? []).map((e) => /* @__PURE__ */ F(U, { payment: e }, e.id))
352
+ children: (t.data ?? []).map((e) => /* @__PURE__ */ I(G, { payment: e }, e.id))
327
353
  })
328
354
  ]
329
355
  });
330
356
  }
331
- function G() {
332
- let { id: r, submissionId: i } = P(), { navigateTo: s } = o(), c = d(i), u = l(r);
333
- if (c.isLoading) return /* @__PURE__ */ F(e, {
357
+ function q() {
358
+ let { id: r, submissionId: i } = F(), { navigateTo: s } = o(), c = f(i), l = u(r);
359
+ if (c.isLoading) return /* @__PURE__ */ I(e, {
334
360
  title: "Registration",
335
- children: /* @__PURE__ */ F(n, { label: "Loading registration…" })
361
+ children: /* @__PURE__ */ I(n, { label: "Loading registration…" })
336
362
  });
337
- if (c.isError || !c.data) return /* @__PURE__ */ F(e, {
363
+ if (c.isError || !c.data) return /* @__PURE__ */ I(e, {
338
364
  title: "Registration",
339
- children: /* @__PURE__ */ F(t, {
365
+ children: /* @__PURE__ */ I(t, {
340
366
  title: "Registration not found",
341
367
  message: "This registration does not exist or you do not have access to it.",
342
368
  onRetry: () => s(r ? `/registrations/${r}` : "/registrations")
343
369
  })
344
370
  });
345
- let f = c.data, p = u.data?.fields ?? [], g = u.data?.fees ?? [], _ = (e) => p.find((t) => t.key === e)?.label ?? e, v = [...p.map((e) => e.key).filter((e) => e in f.answers), ...Object.keys(f.answers).filter((e) => !p.some((t) => t.key === e))];
346
- return /* @__PURE__ */ F(e, {
347
- title: /* @__PURE__ */ I("span", {
371
+ let d = c.data, p = l.data?.fields ?? [], m = l.data?.fees ?? [], _ = (e) => p.find((t) => t.key === e)?.label ?? e, v = [...p.map((e) => e.key).filter((e) => e in d.answers), ...Object.keys(d.answers).filter((e) => !p.some((t) => t.key === e))];
372
+ return /* @__PURE__ */ I(e, {
373
+ title: /* @__PURE__ */ L("span", {
348
374
  className: "flex flex-wrap items-center gap-3",
349
375
  children: [
350
- f.participantName,
376
+ d.participantName,
351
377
  " ",
352
- /* @__PURE__ */ F(a, { status: f.status }),
378
+ /* @__PURE__ */ I(a, { status: d.status }),
353
379
  " ",
354
- /* @__PURE__ */ F(a, { status: f.paymentStatus })
380
+ /* @__PURE__ */ I(a, { status: d.paymentStatus })
355
381
  ]
356
382
  }),
357
- description: `${f.formTitle} · submitted ${m(f.submittedAt)} · ${f.source === "STAFF_ENTRY" ? "entered by staff" : "via share link"}`,
358
- actions: /* @__PURE__ */ I("button", {
383
+ description: `${d.formTitle} · submitted ${h(d.submittedAt)} · ${d.source === "STAFF_ENTRY" ? "entered by staff" : "via share link"}`,
384
+ actions: /* @__PURE__ */ L("button", {
359
385
  type: "button",
360
- className: L,
361
- onClick: () => s(`/registrations/${f.formId}`),
362
- children: [/* @__PURE__ */ F(E, { className: "h-4 w-4" }), " Back to form"]
386
+ className: R,
387
+ onClick: () => s(`/registrations/${d.formId}`),
388
+ children: [/* @__PURE__ */ I(D, { className: "h-4 w-4" }), " Back to form"]
363
389
  }),
364
- children: /* @__PURE__ */ I("div", {
390
+ children: /* @__PURE__ */ L("div", {
365
391
  className: "grid grid-cols-1 gap-6 lg:grid-cols-[1fr_22rem]",
366
- children: [/* @__PURE__ */ I("div", {
392
+ children: [/* @__PURE__ */ L("div", {
367
393
  className: "space-y-6",
368
- children: [/* @__PURE__ */ I("section", {
394
+ children: [/* @__PURE__ */ L("section", {
369
395
  className: "rounded-lg border border-border-seam bg-bg-surface p-4",
370
396
  "aria-label": "Answers",
371
397
  children: [
372
- /* @__PURE__ */ F("h2", {
398
+ /* @__PURE__ */ I("h2", {
373
399
  className: "mb-3 text-base font-semibold text-text-primary",
374
400
  children: "Details"
375
401
  }),
376
- /* @__PURE__ */ I("dl", {
402
+ /* @__PURE__ */ L("dl", {
377
403
  className: "grid grid-cols-1 gap-x-6 gap-y-3 text-sm sm:grid-cols-2",
378
404
  children: [[
379
- ["Contact", f.contactName],
380
- ["Email", f.contactEmail],
381
- ["Phone", f.contactPhone],
382
- ["Waiver accepted", f.waiverAcceptedAt ? m(f.waiverAcceptedAt) : null]
383
- ].filter(([, e]) => e).map(([e, t]) => /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("dt", {
405
+ ["Contact", d.contactName],
406
+ ["Email", d.contactEmail],
407
+ ["Phone", d.contactPhone],
408
+ ["Waiver accepted", d.waiverAcceptedAt ? h(d.waiverAcceptedAt) : null]
409
+ ].filter(([, e]) => e).map(([e, t]) => /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("dt", {
384
410
  className: "text-xs text-text-secondary",
385
411
  children: e
386
- }), /* @__PURE__ */ F("dd", {
412
+ }), /* @__PURE__ */ I("dd", {
387
413
  className: "text-text-primary",
388
414
  children: t
389
415
  })] }, e)), v.map((e) => {
390
- let t = f.answers[e];
391
- return /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("dt", {
416
+ let t = d.answers[e];
417
+ return /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("dt", {
392
418
  className: "text-xs text-text-secondary",
393
419
  children: _(e)
394
- }), /* @__PURE__ */ F("dd", {
420
+ }), /* @__PURE__ */ I("dd", {
395
421
  className: "text-text-primary",
396
422
  children: typeof t == "boolean" ? t ? "Yes" : "No" : String(t)
397
423
  })] }, e);
398
424
  })]
399
425
  }),
400
- g.length > 0 && /* @__PURE__ */ I("div", {
426
+ m.length > 0 && /* @__PURE__ */ L("div", {
401
427
  className: "mt-4 border-t border-border-seam pt-3",
402
- children: [/* @__PURE__ */ F("p", {
428
+ children: [/* @__PURE__ */ I("p", {
403
429
  className: "mb-2 text-xs text-text-secondary",
404
430
  children: "Fees"
405
- }), /* @__PURE__ */ F("ul", {
431
+ }), /* @__PURE__ */ I("ul", {
406
432
  className: "space-y-1 text-sm",
407
- children: g.filter((e) => f.selectedFeeIds.includes(e.id)).map((e) => /* @__PURE__ */ I("li", {
433
+ children: m.filter((e) => d.selectedFeeIds.includes(e.id)).map((e) => /* @__PURE__ */ L("li", {
408
434
  className: "flex justify-between text-text-primary",
409
- children: [/* @__PURE__ */ F("span", { children: e.name }), /* @__PURE__ */ F("span", {
435
+ children: [/* @__PURE__ */ I("span", { children: e.name }), /* @__PURE__ */ I("span", {
410
436
  className: "tabular-nums",
411
- children: h(e.amount, f.currency)
437
+ children: g(e.amount, d.currency)
412
438
  })]
413
439
  }, e.id))
414
440
  })]
415
441
  })
416
442
  ]
417
- }), /* @__PURE__ */ F(W, { submission: f })]
418
- }), /* @__PURE__ */ I("section", {
443
+ }), /* @__PURE__ */ I(K, { submission: d })]
444
+ }), /* @__PURE__ */ L("section", {
419
445
  className: "h-fit rounded-lg border border-border-seam bg-bg-surface p-4",
420
446
  "aria-label": "Review",
421
447
  children: [
422
- /* @__PURE__ */ F("h2", {
448
+ /* @__PURE__ */ I("h2", {
423
449
  className: "mb-3 text-base font-semibold text-text-primary",
424
450
  children: "Review"
425
451
  }),
426
- /* @__PURE__ */ F(B, { submission: f }, f.id),
427
- /* @__PURE__ */ F(V, {
428
- submission: f,
429
- formTeamId: u.data?.teamId ?? null
430
- })
452
+ /* @__PURE__ */ I(H, { submission: d }, d.id),
453
+ /* @__PURE__ */ I(U, {
454
+ submission: d,
455
+ formTeamId: l.data?.teamId ?? null
456
+ }),
457
+ l.data?.fixtureId && /* @__PURE__ */ I(V, { submission: d }, `checkin-${d.id}`)
431
458
  ]
432
459
  })]
433
460
  })
434
461
  });
435
462
  }
436
- export { G as RegistrationSubmissionPage };
463
+ export { q as RegistrationSubmissionPage };
437
464
 
438
465
  //# sourceMappingURL=RegistrationSubmissionPage.js.map