@burdenoff/microfe-atheletebridge 2026.1102.1 → 2026.1103.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/hooks/useAthleteBridgeApi.d.ts +11 -1
- package/dist/atheletebridge/hooks/useAthleteBridgeApi.d.ts.map +1 -1
- package/dist/atheletebridge/hooks/useAthleteBridgeApi.js +109 -49
- package/dist/atheletebridge/hooks/useAthleteBridgeApi.js.map +1 -1
- package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.d.ts +3 -1
- package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.d.ts.map +1 -1
- package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js +278 -123
- package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js.map +1 -1
- package/dist/atheletebridge/pages/teams/TeamDetailPage.d.ts.map +1 -1
- package/dist/atheletebridge/pages/teams/TeamDetailPage.js +308 -287
- package/dist/atheletebridge/pages/teams/TeamDetailPage.js.map +1 -1
- package/dist/atheletebridge/types/index.d.ts +13 -0
- package/dist/atheletebridge/types/index.d.ts.map +1 -1
- package/dist/atheletebridge/utils/datetime.js +8 -1
- package/dist/atheletebridge/utils/datetime.js.map +1 -1
- package/dist/atheletebridge/utils/fixtureLifecycle.d.ts +38 -0
- package/dist/atheletebridge/utils/fixtureLifecycle.d.ts.map +1 -0
- package/dist/atheletebridge/utils/fixtureLifecycle.js +30 -0
- package/dist/atheletebridge/utils/fixtureLifecycle.js.map +1 -0
- package/package.json +1 -1
|
@@ -5,40 +5,40 @@ import { StatusBadge as r } from "../../components/StatusBadge.js";
|
|
|
5
5
|
import { MEMBER_ROLE_LABELS as i, SPORT_LABELS as ee } from "../../components/domain.js";
|
|
6
6
|
import { Crest as te } from "../../components/Crest.js";
|
|
7
7
|
import { MatchupRow as ne } from "../../components/MatchupRow.js";
|
|
8
|
-
import { UserAvatar as
|
|
9
|
-
import { EmptyState as
|
|
10
|
-
import { ErrorState as
|
|
11
|
-
import { useAddMember as
|
|
12
|
-
import { FormField as
|
|
13
|
-
import { SubjectDecisions as
|
|
14
|
-
import { UserSearchSelect as
|
|
15
|
-
import { useState as
|
|
16
|
-
import { useMutation as
|
|
17
|
-
import { Archive as
|
|
18
|
-
import { useParams as
|
|
19
|
-
import { Fragment as
|
|
20
|
-
import { GlassCard as
|
|
21
|
-
import { clearGraphqlFetchResponseCache as
|
|
22
|
-
import { useGlobalUi as
|
|
8
|
+
import { UserAvatar as re } from "../../components/UserAvatar.js";
|
|
9
|
+
import { EmptyState as a } from "../../components/EmptyState.js";
|
|
10
|
+
import { ErrorState as ie, LoadingState as ae } from "../../components/LoadingState.js";
|
|
11
|
+
import { useAddMember as oe, useArchiveTeam as se, useRemoveMember as ce, useTeam as le, useUnarchiveTeam as ue } from "../../hooks/useAthleteBridgeApi.js";
|
|
12
|
+
import { FormField as o, fieldInputClass as s } from "../../components/form.js";
|
|
13
|
+
import { SubjectDecisions as de } from "../../components/ai/SubjectDecisions.js";
|
|
14
|
+
import { UserSearchSelect as fe } from "../../components/UserSearchSelect.js";
|
|
15
|
+
import { useState as c } from "react";
|
|
16
|
+
import { useMutation as l, useQueryClient as u } from "@tanstack/react-query";
|
|
17
|
+
import { Archive as pe, ArchiveRestore as me, ArrowLeft as he, CalendarDays as ge, Check as _e, Edit as ve, Loader2 as d, MapPin as ye, Pencil as be, Plus as xe, Trash2 as f, UserPlus as p, X as Se } from "lucide-react";
|
|
18
|
+
import { useParams as Ce } from "react-router";
|
|
19
|
+
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
20
|
+
import { GlassCard as _, ResponsiveDialog as v, ResponsiveDialogContent as y, ResponsiveDialogFooter as b, ResponsiveDialogHeader as x, ResponsiveDialogTitle as S } from "@burdenoff/fe-libs/ui";
|
|
21
|
+
import { clearGraphqlFetchResponseCache as C, graphqlFetch as w } from "@burdenoff/fe-libs/shared/graphql";
|
|
22
|
+
import { useGlobalUi as we } from "@burdenoff/fe-libs/shared/providers/shell/GlobalUiProvider";
|
|
23
23
|
//#region src/atheletebridge/pages/teams/TeamDetailPage.tsx
|
|
24
|
-
var
|
|
24
|
+
var T = Object.keys(i), E = [
|
|
25
25
|
"TRIAL",
|
|
26
26
|
"ACTIVE",
|
|
27
27
|
"INJURED",
|
|
28
28
|
"SUSPENDED",
|
|
29
29
|
"RELEASED"
|
|
30
|
-
],
|
|
30
|
+
], D = (e) => e.charAt(0) + e.slice(1).toLowerCase(), O = {
|
|
31
31
|
userId: "",
|
|
32
32
|
displayName: "",
|
|
33
33
|
role: "PLAYER",
|
|
34
34
|
status: "ACTIVE",
|
|
35
35
|
position: "",
|
|
36
36
|
jerseyNumber: ""
|
|
37
|
-
},
|
|
38
|
-
let n =
|
|
39
|
-
return
|
|
37
|
+
}, k = (e) => {
|
|
38
|
+
let n = u(), { apiGatewayUrl: r } = t();
|
|
39
|
+
return l({
|
|
40
40
|
mutationFn: async ({ id: e, input: t }) => {
|
|
41
|
-
let n = await
|
|
41
|
+
let n = await w({
|
|
42
42
|
gateway: "workspace",
|
|
43
43
|
baseUrl: r,
|
|
44
44
|
query: "mutation AthUpdateMember($id: ID!, $input: AthUpdateMemberInput!) {\n athUpdateMember(id: $id, input: $input) {\n id teamId displayName role status position jerseyNumber\n }\n }",
|
|
@@ -49,7 +49,7 @@ var D = Object.keys(i), O = [
|
|
|
49
49
|
workspaceToken: !0
|
|
50
50
|
});
|
|
51
51
|
if (n.errors?.length) throw Error(n.errors[0]?.message ?? "Failed to update member.");
|
|
52
|
-
if (
|
|
52
|
+
if (C(), !n.data) throw Error("Update did not return data.");
|
|
53
53
|
return n.data.athUpdateMember;
|
|
54
54
|
},
|
|
55
55
|
onSuccess: () => {
|
|
@@ -65,161 +65,182 @@ var D = Object.keys(i), O = [
|
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
67
|
};
|
|
68
|
-
function
|
|
69
|
-
let
|
|
70
|
-
if (
|
|
71
|
-
title:
|
|
72
|
-
children: /* @__PURE__ */
|
|
68
|
+
function A() {
|
|
69
|
+
let l = e(), { id: u } = Ce(), { navigateTo: C } = t(), { showToast: w } = we(), A = le(u), j = se(), M = ue(), N = oe(), P = ce(u), F = k(u), [Te, I] = c(!1), [L, R] = c(O), [z, B] = c(null), [Ee, V] = c(null), [H, U] = c(null), [W, G] = c(null), [K, q] = c(null);
|
|
70
|
+
if (A.isLoading) return /* @__PURE__ */ h(n, {
|
|
71
|
+
title: l("atheletebridge.pages.teamDetail.title", "Team"),
|
|
72
|
+
children: /* @__PURE__ */ h(ae, { label: l("atheletebridge.pages.teamDetail.loading", "Loading team…") })
|
|
73
73
|
});
|
|
74
|
-
if (
|
|
75
|
-
title:
|
|
76
|
-
children: /* @__PURE__ */
|
|
77
|
-
title:
|
|
78
|
-
message:
|
|
79
|
-
onRetry: () =>
|
|
74
|
+
if (A.isError || !A.data) return /* @__PURE__ */ h(n, {
|
|
75
|
+
title: l("atheletebridge.pages.teamDetail.title", "Team"),
|
|
76
|
+
children: /* @__PURE__ */ h(ie, {
|
|
77
|
+
title: l("atheletebridge.pages.teamDetail.notFoundTitle", "Team not found"),
|
|
78
|
+
message: l("atheletebridge.pages.teamDetail.notFoundMessage", "This team does not exist or you do not have access to it."),
|
|
79
|
+
onRetry: () => C("/teams")
|
|
80
80
|
})
|
|
81
81
|
});
|
|
82
|
-
let
|
|
83
|
-
ee[
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
].filter(Boolean),
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
82
|
+
let J = A.data, Y = J.members?.items ?? [], X = J.fixtures?.items ?? [], Z = [
|
|
83
|
+
ee[J.sport],
|
|
84
|
+
J.ageGroup ?? void 0,
|
|
85
|
+
J.season ?? void 0,
|
|
86
|
+
J.homeVenue ?? void 0
|
|
87
|
+
].filter(Boolean), De = async () => {
|
|
88
|
+
if (u) try {
|
|
89
|
+
await j.mutateAsync(u), C("/teams");
|
|
90
|
+
} catch {
|
|
91
|
+
w(l("atheletebridge.pages.teamDetail.archiveFailed", "Failed to archive team. Please try again."), "error");
|
|
92
|
+
}
|
|
93
|
+
}, Oe = async () => {
|
|
94
|
+
if (u) try {
|
|
95
|
+
await M.mutateAsync(u), w(l("atheletebridge.pages.teamDetail.unarchived", "Team restored"), "success");
|
|
96
|
+
} catch {
|
|
97
|
+
w(l("atheletebridge.pages.teamDetail.unarchiveFailed", "Failed to restore team. Please try again."), "error");
|
|
98
|
+
}
|
|
99
|
+
}, Q = (e) => {
|
|
100
|
+
G(null), V(e.id), U({
|
|
91
101
|
role: e.role,
|
|
92
102
|
status: e.status,
|
|
93
103
|
position: e.position ?? "",
|
|
94
104
|
jerseyNumber: e.jerseyNumber == null ? "" : String(e.jerseyNumber)
|
|
95
105
|
});
|
|
96
106
|
}, $ = () => {
|
|
97
|
-
|
|
98
|
-
},
|
|
99
|
-
if (!
|
|
100
|
-
|
|
101
|
-
let t =
|
|
107
|
+
V(null), U(null), G(null);
|
|
108
|
+
}, ke = async (e) => {
|
|
109
|
+
if (!H) return;
|
|
110
|
+
G(null);
|
|
111
|
+
let t = H.jerseyNumber.trim(), n;
|
|
102
112
|
if (t && (n = Number.parseInt(t, 10), Number.isNaN(n))) {
|
|
103
|
-
|
|
113
|
+
G("Jersey number must be a number.");
|
|
104
114
|
return;
|
|
105
115
|
}
|
|
106
116
|
try {
|
|
107
|
-
await
|
|
117
|
+
await F.mutateAsync({
|
|
108
118
|
id: e,
|
|
109
119
|
input: {
|
|
110
|
-
role:
|
|
111
|
-
status:
|
|
112
|
-
position:
|
|
120
|
+
role: H.role,
|
|
121
|
+
status: H.status,
|
|
122
|
+
position: H.position.trim() || void 0,
|
|
113
123
|
jerseyNumber: n
|
|
114
124
|
}
|
|
115
125
|
}), $();
|
|
116
126
|
} catch (e) {
|
|
117
|
-
|
|
127
|
+
G(e instanceof Error ? e.message : "Failed to update member.");
|
|
118
128
|
}
|
|
119
|
-
},
|
|
120
|
-
if (e.preventDefault(),
|
|
121
|
-
if (!
|
|
122
|
-
|
|
129
|
+
}, Ae = async (e) => {
|
|
130
|
+
if (e.preventDefault(), B(null), !u) return;
|
|
131
|
+
if (!L.userId.trim() || !L.displayName.trim()) {
|
|
132
|
+
B("User ID and display name are required.");
|
|
123
133
|
return;
|
|
124
134
|
}
|
|
125
|
-
let t =
|
|
135
|
+
let t = L.jerseyNumber.trim() ? Number.parseInt(L.jerseyNumber, 10) : void 0;
|
|
126
136
|
if (t !== void 0 && Number.isNaN(t)) {
|
|
127
|
-
|
|
137
|
+
B("Jersey number must be a number.");
|
|
128
138
|
return;
|
|
129
139
|
}
|
|
130
140
|
try {
|
|
131
|
-
await
|
|
132
|
-
teamId:
|
|
133
|
-
userId:
|
|
134
|
-
displayName:
|
|
135
|
-
role:
|
|
136
|
-
status:
|
|
137
|
-
position:
|
|
141
|
+
await N.mutateAsync({
|
|
142
|
+
teamId: u,
|
|
143
|
+
userId: L.userId.trim(),
|
|
144
|
+
displayName: L.displayName.trim(),
|
|
145
|
+
role: L.role,
|
|
146
|
+
status: L.status,
|
|
147
|
+
position: L.position.trim() || void 0,
|
|
138
148
|
jerseyNumber: t
|
|
139
|
-
}),
|
|
149
|
+
}), R(O), I(!1);
|
|
140
150
|
} catch (e) {
|
|
141
|
-
|
|
151
|
+
B(e instanceof Error ? e.message : "Failed to add member.");
|
|
142
152
|
}
|
|
143
|
-
},
|
|
144
|
-
if (!
|
|
145
|
-
let e =
|
|
153
|
+
}, je = (e) => C(`/teams/${J.id}/athletes/${e}`), Me = async () => {
|
|
154
|
+
if (!K) return;
|
|
155
|
+
let e = K.displayName;
|
|
146
156
|
try {
|
|
147
|
-
await
|
|
157
|
+
await P.mutateAsync(K.id), w(l("atheletebridge.pages.teamDetail.memberDeletedToast", "\"{name}\" was removed from the team.").replace("{name}", e), "success"), q(null);
|
|
148
158
|
} catch {
|
|
149
|
-
|
|
159
|
+
w(l("atheletebridge.pages.teamDetail.memberDeleteFailedToast", "Failed to remove \"{name}\". Please try again.").replace("{name}", e), "error"), q(null);
|
|
150
160
|
}
|
|
151
161
|
};
|
|
152
|
-
return /* @__PURE__ */
|
|
153
|
-
title:
|
|
162
|
+
return /* @__PURE__ */ g(n, {
|
|
163
|
+
title: J.name,
|
|
154
164
|
gradientTitle: !0,
|
|
155
|
-
description:
|
|
156
|
-
actions: /* @__PURE__ */
|
|
165
|
+
description: Z.join(" · "),
|
|
166
|
+
actions: /* @__PURE__ */ g("div", {
|
|
157
167
|
className: "flex flex-wrap items-center gap-2",
|
|
158
168
|
children: [
|
|
159
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ g("button", {
|
|
160
170
|
type: "button",
|
|
161
|
-
onClick: () =>
|
|
171
|
+
onClick: () => C("/teams"),
|
|
162
172
|
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",
|
|
163
173
|
children: [
|
|
164
|
-
/* @__PURE__ */
|
|
174
|
+
/* @__PURE__ */ h(he, { className: "h-4 w-4" }),
|
|
165
175
|
" ",
|
|
166
|
-
|
|
176
|
+
l("atheletebridge.pages.teamDetail.back", "Back")
|
|
167
177
|
]
|
|
168
178
|
}),
|
|
169
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ g("button", {
|
|
170
180
|
type: "button",
|
|
171
|
-
onClick: () =>
|
|
181
|
+
onClick: () => C(`/teams/${J.id}/edit`),
|
|
172
182
|
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",
|
|
173
183
|
children: [
|
|
174
|
-
/* @__PURE__ */
|
|
184
|
+
/* @__PURE__ */ h(ve, { className: "h-4 w-4" }),
|
|
175
185
|
" ",
|
|
176
|
-
|
|
186
|
+
l("atheletebridge.pages.teamDetail.edit", "Edit")
|
|
177
187
|
]
|
|
178
188
|
}),
|
|
179
|
-
|
|
189
|
+
J.status !== "ARCHIVED" && /* @__PURE__ */ g("button", {
|
|
180
190
|
type: "button",
|
|
181
|
-
onClick:
|
|
182
|
-
disabled:
|
|
191
|
+
onClick: De,
|
|
192
|
+
disabled: j.isPending,
|
|
183
193
|
className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-status-error-text transition-colors hover:bg-status-error-bg-subtle disabled:opacity-60",
|
|
184
194
|
children: [
|
|
185
|
-
|
|
195
|
+
j.isPending ? /* @__PURE__ */ h(d, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ h(pe, { className: "h-4 w-4" }),
|
|
196
|
+
" ",
|
|
197
|
+
l("atheletebridge.pages.teamDetail.archive", "Archive")
|
|
198
|
+
]
|
|
199
|
+
}),
|
|
200
|
+
J.status === "ARCHIVED" && /* @__PURE__ */ g("button", {
|
|
201
|
+
type: "button",
|
|
202
|
+
onClick: Oe,
|
|
203
|
+
disabled: M.isPending,
|
|
204
|
+
className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-bg-sunken disabled:opacity-60",
|
|
205
|
+
children: [
|
|
206
|
+
M.isPending ? /* @__PURE__ */ h(d, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ h(me, { className: "h-4 w-4" }),
|
|
186
207
|
" ",
|
|
187
|
-
|
|
208
|
+
l("atheletebridge.pages.teamDetail.unarchive", "Unarchive")
|
|
188
209
|
]
|
|
189
210
|
})
|
|
190
211
|
]
|
|
191
212
|
}),
|
|
192
213
|
children: [
|
|
193
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ g(_, {
|
|
194
215
|
treatment: "insight",
|
|
195
216
|
className: "mb-8 p-6",
|
|
196
217
|
children: [
|
|
197
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ g("div", {
|
|
198
219
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center",
|
|
199
|
-
children: [/* @__PURE__ */
|
|
200
|
-
name:
|
|
201
|
-
sport:
|
|
220
|
+
children: [/* @__PURE__ */ h(te, {
|
|
221
|
+
name: J.name,
|
|
222
|
+
sport: J.sport,
|
|
202
223
|
size: 64
|
|
203
|
-
}), /* @__PURE__ */
|
|
224
|
+
}), /* @__PURE__ */ g("div", {
|
|
204
225
|
className: "min-w-0 flex-1",
|
|
205
|
-
children: [/* @__PURE__ */
|
|
226
|
+
children: [/* @__PURE__ */ g("div", {
|
|
206
227
|
className: "flex flex-wrap items-center gap-3",
|
|
207
|
-
children: [/* @__PURE__ */
|
|
228
|
+
children: [/* @__PURE__ */ h("h2", {
|
|
208
229
|
className: "text-xl font-semibold text-text-primary",
|
|
209
|
-
children:
|
|
210
|
-
}), /* @__PURE__ */
|
|
211
|
-
}), /* @__PURE__ */
|
|
230
|
+
children: J.name
|
|
231
|
+
}), /* @__PURE__ */ h(r, { status: J.status })]
|
|
232
|
+
}), /* @__PURE__ */ h("div", {
|
|
212
233
|
className: "mt-1.5 flex flex-wrap items-center gap-x-2 gap-y-1 text-sm text-text-secondary",
|
|
213
|
-
children:
|
|
234
|
+
children: Z.map((e, t) => /* @__PURE__ */ g("span", {
|
|
214
235
|
className: "flex items-center gap-2",
|
|
215
|
-
children: [t > 0 && /* @__PURE__ */
|
|
236
|
+
children: [t > 0 && /* @__PURE__ */ h("span", {
|
|
216
237
|
"aria-hidden": "true",
|
|
217
238
|
className: "text-text-muted",
|
|
218
239
|
children: "·"
|
|
219
|
-
}), e ===
|
|
240
|
+
}), e === J.homeVenue ? /* @__PURE__ */ g("span", {
|
|
220
241
|
className: "flex items-center gap-1",
|
|
221
242
|
children: [
|
|
222
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ h(ye, {
|
|
223
244
|
className: "h-3.5 w-3.5",
|
|
224
245
|
"aria-hidden": "true"
|
|
225
246
|
}),
|
|
@@ -231,213 +252,213 @@ function M() {
|
|
|
231
252
|
})]
|
|
232
253
|
})]
|
|
233
254
|
}),
|
|
234
|
-
|
|
255
|
+
J.description && /* @__PURE__ */ h("p", {
|
|
235
256
|
className: "mt-4 text-sm text-text-secondary",
|
|
236
|
-
children:
|
|
257
|
+
children: J.description
|
|
237
258
|
}),
|
|
238
|
-
|
|
259
|
+
J.tags.length > 0 && /* @__PURE__ */ h("div", {
|
|
239
260
|
className: "mt-4 flex flex-wrap gap-1.5",
|
|
240
|
-
children:
|
|
261
|
+
children: J.tags.map((e) => /* @__PURE__ */ h("span", {
|
|
241
262
|
className: "inline-flex items-center rounded-full bg-bg-sunken px-2 py-0.5 text-xs text-text-secondary",
|
|
242
263
|
children: e
|
|
243
264
|
}, e))
|
|
244
265
|
})
|
|
245
266
|
]
|
|
246
267
|
}),
|
|
247
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ g("section", {
|
|
248
269
|
className: "mb-8",
|
|
249
|
-
children: [/* @__PURE__ */
|
|
270
|
+
children: [/* @__PURE__ */ g("div", {
|
|
250
271
|
className: "mb-4 flex items-center justify-between",
|
|
251
|
-
children: [/* @__PURE__ */
|
|
272
|
+
children: [/* @__PURE__ */ g("h2", {
|
|
252
273
|
className: "text-lg font-semibold text-text-primary",
|
|
253
274
|
children: [
|
|
254
|
-
|
|
275
|
+
l("atheletebridge.pages.teamDetail.rosterTitle", "Roster"),
|
|
255
276
|
" (",
|
|
256
|
-
|
|
277
|
+
Y.length,
|
|
257
278
|
")"
|
|
258
279
|
]
|
|
259
|
-
}), /* @__PURE__ */
|
|
280
|
+
}), /* @__PURE__ */ g("button", {
|
|
260
281
|
type: "button",
|
|
261
282
|
onClick: () => {
|
|
262
|
-
|
|
283
|
+
B(null), I(!0);
|
|
263
284
|
},
|
|
264
285
|
className: "inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-3 py-1.5 text-sm font-semibold text-action-primary-text transition-colors hover:bg-action-primary-bg/90",
|
|
265
286
|
children: [
|
|
266
|
-
/* @__PURE__ */
|
|
287
|
+
/* @__PURE__ */ h(p, { className: "h-4 w-4" }),
|
|
267
288
|
" ",
|
|
268
|
-
|
|
289
|
+
l("atheletebridge.pages.teamDetail.addMember", "Add member")
|
|
269
290
|
]
|
|
270
291
|
})]
|
|
271
|
-
}),
|
|
292
|
+
}), Y.length === 0 ? /* @__PURE__ */ h(a, {
|
|
272
293
|
illustration: "empty-data",
|
|
273
|
-
icon: /* @__PURE__ */
|
|
274
|
-
title:
|
|
275
|
-
description:
|
|
276
|
-
}) : /* @__PURE__ */
|
|
294
|
+
icon: /* @__PURE__ */ h(p, { className: "h-10 w-10" }),
|
|
295
|
+
title: l("atheletebridge.pages.teamDetail.noMembersTitle", "No members yet"),
|
|
296
|
+
description: l("atheletebridge.pages.teamDetail.noMembersHint", "Add players, coaches and staff to build the roster.")
|
|
297
|
+
}) : /* @__PURE__ */ g(_, {
|
|
277
298
|
treatment: "insight",
|
|
278
299
|
className: "overflow-hidden p-0",
|
|
279
|
-
children: [/* @__PURE__ */
|
|
300
|
+
children: [/* @__PURE__ */ h("div", {
|
|
280
301
|
className: "overflow-x-auto",
|
|
281
|
-
children: /* @__PURE__ */
|
|
302
|
+
children: /* @__PURE__ */ g("table", {
|
|
282
303
|
className: "w-full min-w-[720px] border-collapse text-sm",
|
|
283
|
-
children: [/* @__PURE__ */
|
|
304
|
+
children: [/* @__PURE__ */ h("thead", { children: /* @__PURE__ */ g("tr", {
|
|
284
305
|
className: "border-b border-border-seam text-left text-xs uppercase tracking-wide text-text-secondary",
|
|
285
306
|
children: [
|
|
286
|
-
/* @__PURE__ */
|
|
307
|
+
/* @__PURE__ */ h("th", {
|
|
287
308
|
className: "px-4 py-3 font-medium",
|
|
288
|
-
children:
|
|
309
|
+
children: l("atheletebridge.pages.teamDetail.playerHeader", "Player")
|
|
289
310
|
}),
|
|
290
|
-
/* @__PURE__ */
|
|
311
|
+
/* @__PURE__ */ h("th", {
|
|
291
312
|
className: "px-4 py-3 font-medium",
|
|
292
|
-
children:
|
|
313
|
+
children: l("atheletebridge.pages.teamDetail.roleHeader", "Role")
|
|
293
314
|
}),
|
|
294
|
-
/* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ h("th", {
|
|
295
316
|
className: "px-4 py-3 font-medium",
|
|
296
|
-
children:
|
|
317
|
+
children: l("atheletebridge.pages.teamDetail.positionHeader", "Position")
|
|
297
318
|
}),
|
|
298
|
-
/* @__PURE__ */
|
|
319
|
+
/* @__PURE__ */ h("th", {
|
|
299
320
|
className: "px-4 py-3 font-medium",
|
|
300
|
-
children:
|
|
321
|
+
children: l("atheletebridge.pages.teamDetail.jerseyHeader", "Jersey #")
|
|
301
322
|
}),
|
|
302
|
-
/* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ h("th", {
|
|
303
324
|
className: "px-4 py-3 font-medium",
|
|
304
|
-
children:
|
|
325
|
+
children: l("atheletebridge.pages.teamDetail.statusHeader", "Status")
|
|
305
326
|
}),
|
|
306
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ h("th", {
|
|
307
328
|
className: "px-4 py-3 text-right font-medium",
|
|
308
|
-
children:
|
|
329
|
+
children: l("atheletebridge.pages.teamDetail.actionsHeader", "Actions")
|
|
309
330
|
})
|
|
310
331
|
]
|
|
311
|
-
}) }), /* @__PURE__ */
|
|
332
|
+
}) }), /* @__PURE__ */ h("tbody", {
|
|
312
333
|
className: "divide-y divide-border-seam",
|
|
313
|
-
children:
|
|
314
|
-
let t =
|
|
315
|
-
return /* @__PURE__ */
|
|
334
|
+
children: Y.map((e) => {
|
|
335
|
+
let t = Ee === e.id, n = F.isPending && t;
|
|
336
|
+
return /* @__PURE__ */ g("tr", {
|
|
316
337
|
className: "align-middle transition-colors hover:bg-bg-sunken/60",
|
|
317
338
|
children: [
|
|
318
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ h("td", {
|
|
319
340
|
className: "px-4 py-3",
|
|
320
|
-
children: /* @__PURE__ */
|
|
341
|
+
children: /* @__PURE__ */ g("button", {
|
|
321
342
|
type: "button",
|
|
322
|
-
onClick: () =>
|
|
343
|
+
onClick: () => je(e.id),
|
|
323
344
|
className: "group flex items-center gap-3 text-left focus-visible:outline-none",
|
|
324
|
-
title: `${
|
|
325
|
-
children: [/* @__PURE__ */
|
|
345
|
+
title: `${l("atheletebridge.pages.teamDetail.viewProfile", "View profile")}: ${e.displayName}`,
|
|
346
|
+
children: [/* @__PURE__ */ h(re, {
|
|
326
347
|
name: e.displayName,
|
|
327
348
|
id: e.userId,
|
|
328
349
|
jersey: e.jerseyNumber,
|
|
329
350
|
size: "sm"
|
|
330
|
-
}), /* @__PURE__ */
|
|
351
|
+
}), /* @__PURE__ */ g("span", {
|
|
331
352
|
className: "min-w-0",
|
|
332
|
-
children: [/* @__PURE__ */
|
|
353
|
+
children: [/* @__PURE__ */ h("span", {
|
|
333
354
|
className: "block truncate font-medium text-text-primary group-hover:text-text-link",
|
|
334
355
|
children: e.displayName
|
|
335
|
-
}), /* @__PURE__ */
|
|
356
|
+
}), /* @__PURE__ */ h("span", {
|
|
336
357
|
className: "block truncate text-xs text-text-secondary group-hover:text-text-link",
|
|
337
|
-
children:
|
|
358
|
+
children: l("atheletebridge.pages.teamDetail.viewProfile", "View profile")
|
|
338
359
|
})]
|
|
339
360
|
})]
|
|
340
361
|
})
|
|
341
362
|
}),
|
|
342
|
-
/* @__PURE__ */
|
|
363
|
+
/* @__PURE__ */ h("td", {
|
|
343
364
|
className: "px-4 py-3",
|
|
344
|
-
children: t &&
|
|
345
|
-
"aria-label":
|
|
346
|
-
className:
|
|
347
|
-
value:
|
|
348
|
-
onChange: (e) =>
|
|
365
|
+
children: t && H ? /* @__PURE__ */ h("select", {
|
|
366
|
+
"aria-label": l("atheletebridge.pages.teamDetail.roleHeader", "Role"),
|
|
367
|
+
className: s,
|
|
368
|
+
value: H.role,
|
|
369
|
+
onChange: (e) => U((t) => t && {
|
|
349
370
|
...t,
|
|
350
371
|
role: e.target.value
|
|
351
372
|
}),
|
|
352
|
-
children:
|
|
373
|
+
children: T.map((e) => /* @__PURE__ */ h("option", {
|
|
353
374
|
value: e,
|
|
354
375
|
children: i[e]
|
|
355
376
|
}, e))
|
|
356
|
-
}) : /* @__PURE__ */
|
|
377
|
+
}) : /* @__PURE__ */ h("span", {
|
|
357
378
|
className: "text-text-secondary",
|
|
358
379
|
children: i[e.role]
|
|
359
380
|
})
|
|
360
381
|
}),
|
|
361
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ h("td", {
|
|
362
383
|
className: "px-4 py-3",
|
|
363
|
-
children: t &&
|
|
364
|
-
"aria-label":
|
|
365
|
-
className:
|
|
366
|
-
value:
|
|
367
|
-
onChange: (e) =>
|
|
384
|
+
children: t && H ? /* @__PURE__ */ h("input", {
|
|
385
|
+
"aria-label": l("atheletebridge.pages.teamDetail.positionHeader", "Position"),
|
|
386
|
+
className: s,
|
|
387
|
+
value: H.position,
|
|
388
|
+
onChange: (e) => U((t) => t && {
|
|
368
389
|
...t,
|
|
369
390
|
position: e.target.value
|
|
370
391
|
}),
|
|
371
392
|
placeholder: "e.g. Striker"
|
|
372
|
-
}) : /* @__PURE__ */
|
|
393
|
+
}) : /* @__PURE__ */ h("span", {
|
|
373
394
|
className: "text-text-secondary",
|
|
374
395
|
children: e.position || "—"
|
|
375
396
|
})
|
|
376
397
|
}),
|
|
377
|
-
/* @__PURE__ */
|
|
398
|
+
/* @__PURE__ */ h("td", {
|
|
378
399
|
className: "px-4 py-3",
|
|
379
|
-
children: t &&
|
|
380
|
-
"aria-label":
|
|
400
|
+
children: t && H ? /* @__PURE__ */ h("input", {
|
|
401
|
+
"aria-label": l("atheletebridge.pages.teamDetail.jerseyHeader", "Jersey number"),
|
|
381
402
|
inputMode: "numeric",
|
|
382
|
-
className: `${
|
|
383
|
-
value:
|
|
384
|
-
onChange: (e) =>
|
|
403
|
+
className: `${s} w-20`,
|
|
404
|
+
value: H.jerseyNumber,
|
|
405
|
+
onChange: (e) => U((t) => t && {
|
|
385
406
|
...t,
|
|
386
407
|
jerseyNumber: e.target.value
|
|
387
408
|
}),
|
|
388
409
|
placeholder: "9"
|
|
389
|
-
}) : /* @__PURE__ */
|
|
410
|
+
}) : /* @__PURE__ */ h("span", {
|
|
390
411
|
className: "tabular-nums text-text-primary",
|
|
391
412
|
children: e.jerseyNumber ?? "—"
|
|
392
413
|
})
|
|
393
414
|
}),
|
|
394
|
-
/* @__PURE__ */
|
|
415
|
+
/* @__PURE__ */ h("td", {
|
|
395
416
|
className: "px-4 py-3",
|
|
396
|
-
children: t &&
|
|
397
|
-
"aria-label":
|
|
398
|
-
className:
|
|
399
|
-
value:
|
|
400
|
-
onChange: (e) =>
|
|
417
|
+
children: t && H ? /* @__PURE__ */ h("select", {
|
|
418
|
+
"aria-label": l("atheletebridge.pages.teamDetail.statusHeader", "Status"),
|
|
419
|
+
className: s,
|
|
420
|
+
value: H.status,
|
|
421
|
+
onChange: (e) => U((t) => t && {
|
|
401
422
|
...t,
|
|
402
423
|
status: e.target.value
|
|
403
424
|
}),
|
|
404
|
-
children:
|
|
425
|
+
children: E.map((e) => /* @__PURE__ */ h("option", {
|
|
405
426
|
value: e,
|
|
406
|
-
children:
|
|
427
|
+
children: D(e)
|
|
407
428
|
}, e))
|
|
408
|
-
}) : /* @__PURE__ */
|
|
429
|
+
}) : /* @__PURE__ */ h(r, { status: e.status })
|
|
409
430
|
}),
|
|
410
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ h("td", {
|
|
411
432
|
className: "px-4 py-3",
|
|
412
|
-
children: /* @__PURE__ */
|
|
433
|
+
children: /* @__PURE__ */ h("div", {
|
|
413
434
|
className: "flex items-center justify-end gap-1",
|
|
414
|
-
children: t ? /* @__PURE__ */
|
|
435
|
+
children: t ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("button", {
|
|
415
436
|
type: "button",
|
|
416
|
-
onClick: () => void
|
|
437
|
+
onClick: () => void ke(e.id),
|
|
417
438
|
disabled: n,
|
|
418
|
-
"aria-label":
|
|
439
|
+
"aria-label": l("common.save", "Save"),
|
|
419
440
|
className: "rounded-lg p-2 text-status-success-text transition-colors hover:bg-status-success-bg-subtle disabled:opacity-60",
|
|
420
|
-
children: n ? /* @__PURE__ */
|
|
421
|
-
}), /* @__PURE__ */
|
|
441
|
+
children: n ? /* @__PURE__ */ h(d, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ h(_e, { className: "h-4 w-4" })
|
|
442
|
+
}), /* @__PURE__ */ h("button", {
|
|
422
443
|
type: "button",
|
|
423
444
|
onClick: $,
|
|
424
445
|
disabled: n,
|
|
425
|
-
"aria-label":
|
|
446
|
+
"aria-label": l("common.cancel", "Cancel"),
|
|
426
447
|
className: "rounded-lg p-2 text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary disabled:opacity-60",
|
|
427
|
-
children: /* @__PURE__ */
|
|
428
|
-
})] }) : /* @__PURE__ */
|
|
448
|
+
children: /* @__PURE__ */ h(Se, { className: "h-4 w-4" })
|
|
449
|
+
})] }) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("button", {
|
|
429
450
|
type: "button",
|
|
430
|
-
onClick: () =>
|
|
431
|
-
"aria-label": `${
|
|
451
|
+
onClick: () => Q(e),
|
|
452
|
+
"aria-label": `${l("common.edit", "Edit")} ${e.displayName}`,
|
|
432
453
|
className: "rounded-lg p-2 text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary",
|
|
433
|
-
children: /* @__PURE__ */
|
|
434
|
-
}), /* @__PURE__ */
|
|
454
|
+
children: /* @__PURE__ */ h(be, { className: "h-4 w-4" })
|
|
455
|
+
}), /* @__PURE__ */ h("button", {
|
|
435
456
|
type: "button",
|
|
436
|
-
onClick: () =>
|
|
437
|
-
disabled:
|
|
438
|
-
"aria-label": `${
|
|
457
|
+
onClick: () => q(e),
|
|
458
|
+
disabled: P.isPending,
|
|
459
|
+
"aria-label": `${l("common.delete", "Delete")} ${e.displayName}`,
|
|
439
460
|
className: "rounded-lg p-2 text-text-secondary transition-colors hover:bg-status-error-bg-subtle hover:text-status-error-text disabled:opacity-60",
|
|
440
|
-
children: /* @__PURE__ */
|
|
461
|
+
children: /* @__PURE__ */ h(f, { className: "h-4 w-4" })
|
|
441
462
|
})] })
|
|
442
463
|
})
|
|
443
464
|
})
|
|
@@ -446,181 +467,181 @@ function M() {
|
|
|
446
467
|
})
|
|
447
468
|
})]
|
|
448
469
|
})
|
|
449
|
-
}),
|
|
470
|
+
}), W && /* @__PURE__ */ h("p", {
|
|
450
471
|
className: "border-t border-border-seam px-4 py-2 text-sm text-status-error-text",
|
|
451
|
-
children:
|
|
472
|
+
children: W
|
|
452
473
|
})]
|
|
453
474
|
})]
|
|
454
475
|
}),
|
|
455
|
-
/* @__PURE__ */
|
|
476
|
+
/* @__PURE__ */ g("section", { children: [/* @__PURE__ */ g("div", {
|
|
456
477
|
className: "mb-4 flex items-center justify-between",
|
|
457
|
-
children: [/* @__PURE__ */
|
|
478
|
+
children: [/* @__PURE__ */ g("h2", {
|
|
458
479
|
className: "text-lg font-semibold text-text-primary",
|
|
459
480
|
children: [
|
|
460
|
-
|
|
481
|
+
l("atheletebridge.pages.teamDetail.fixturesTitle", "Fixtures"),
|
|
461
482
|
" (",
|
|
462
|
-
|
|
483
|
+
X.length,
|
|
463
484
|
")"
|
|
464
485
|
]
|
|
465
|
-
}), /* @__PURE__ */
|
|
486
|
+
}), /* @__PURE__ */ g("div", {
|
|
466
487
|
className: "flex items-center gap-2",
|
|
467
|
-
children: [
|
|
488
|
+
children: [X.length > 0 && /* @__PURE__ */ h("button", {
|
|
468
489
|
type: "button",
|
|
469
|
-
onClick: () =>
|
|
490
|
+
onClick: () => C("/fixtures"),
|
|
470
491
|
className: "text-sm font-medium text-text-link transition-colors hover:underline",
|
|
471
|
-
children:
|
|
472
|
-
}), /* @__PURE__ */
|
|
492
|
+
children: l("atheletebridge.pages.teamDetail.viewAll", "View all")
|
|
493
|
+
}), /* @__PURE__ */ g("button", {
|
|
473
494
|
type: "button",
|
|
474
|
-
onClick: () =>
|
|
495
|
+
onClick: () => C(`/fixtures/new?homeTeamId=${J.id}`),
|
|
475
496
|
className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-1.5 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
|
|
476
497
|
children: [
|
|
477
|
-
/* @__PURE__ */
|
|
498
|
+
/* @__PURE__ */ h(xe, { className: "h-4 w-4" }),
|
|
478
499
|
" ",
|
|
479
|
-
|
|
500
|
+
l("atheletebridge.pages.teamDetail.schedule", "Schedule")
|
|
480
501
|
]
|
|
481
502
|
})]
|
|
482
503
|
})]
|
|
483
|
-
}),
|
|
504
|
+
}), X.length === 0 ? /* @__PURE__ */ h(a, {
|
|
484
505
|
illustration: "empty-calendar",
|
|
485
|
-
icon: /* @__PURE__ */
|
|
486
|
-
title:
|
|
487
|
-
description:
|
|
488
|
-
}) : /* @__PURE__ */ _
|
|
506
|
+
icon: /* @__PURE__ */ h(ge, { className: "h-10 w-10" }),
|
|
507
|
+
title: l("atheletebridge.pages.teamDetail.noFixturesTitle", "No fixtures scheduled"),
|
|
508
|
+
description: l("atheletebridge.pages.teamDetail.noFixturesHint", "Schedule a match for this team to start tracking results.")
|
|
509
|
+
}) : /* @__PURE__ */ h(_, {
|
|
489
510
|
treatment: "insight",
|
|
490
511
|
className: "px-4 py-1",
|
|
491
|
-
children: /* @__PURE__ */
|
|
512
|
+
children: /* @__PURE__ */ h("div", {
|
|
492
513
|
className: "divide-y divide-border-seam",
|
|
493
|
-
children:
|
|
514
|
+
children: X.map((e) => /* @__PURE__ */ h(ne, {
|
|
494
515
|
fixture: e,
|
|
495
|
-
onClick: () =>
|
|
516
|
+
onClick: () => C(`/fixtures/${e.id}`)
|
|
496
517
|
}, e.id))
|
|
497
518
|
})
|
|
498
519
|
})] }),
|
|
499
|
-
/* @__PURE__ */
|
|
520
|
+
/* @__PURE__ */ h(de, {
|
|
500
521
|
className: "mt-8",
|
|
501
522
|
subject: {
|
|
502
523
|
kind: "team",
|
|
503
|
-
teamId:
|
|
524
|
+
teamId: J.id
|
|
504
525
|
}
|
|
505
526
|
}),
|
|
506
|
-
/* @__PURE__ */
|
|
507
|
-
open:
|
|
527
|
+
/* @__PURE__ */ h(v, {
|
|
528
|
+
open: K !== null,
|
|
508
529
|
onOpenChange: (e) => {
|
|
509
|
-
!e && !
|
|
530
|
+
!e && !P.isPending && q(null);
|
|
510
531
|
},
|
|
511
|
-
children: /* @__PURE__ */
|
|
512
|
-
/* @__PURE__ */
|
|
513
|
-
/* @__PURE__ */
|
|
532
|
+
children: /* @__PURE__ */ g(y, { children: [
|
|
533
|
+
/* @__PURE__ */ h(x, { children: /* @__PURE__ */ h(S, { children: l("atheletebridge.pages.teamDetail.deleteMemberTitle", "Delete player?") }) }),
|
|
534
|
+
/* @__PURE__ */ h("p", {
|
|
514
535
|
className: "px-1 text-sm text-text-secondary",
|
|
515
|
-
children:
|
|
536
|
+
children: l("atheletebridge.pages.teamDetail.deleteMemberMessage", "This will remove \"{name}\" from {team}. This action cannot be undone.").replace("{name}", K?.displayName ?? "").replace("{team}", J.name)
|
|
516
537
|
}),
|
|
517
|
-
/* @__PURE__ */
|
|
538
|
+
/* @__PURE__ */ g(b, { children: [/* @__PURE__ */ h("button", {
|
|
518
539
|
type: "button",
|
|
519
|
-
onClick: () =>
|
|
520
|
-
disabled:
|
|
540
|
+
onClick: () => q(null),
|
|
541
|
+
disabled: P.isPending,
|
|
521
542
|
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",
|
|
522
|
-
children:
|
|
523
|
-
}), /* @__PURE__ */
|
|
543
|
+
children: l("common.cancel", "Cancel")
|
|
544
|
+
}), /* @__PURE__ */ g("button", {
|
|
524
545
|
type: "button",
|
|
525
|
-
onClick: () => void
|
|
526
|
-
disabled:
|
|
546
|
+
onClick: () => void Me(),
|
|
547
|
+
disabled: P.isPending,
|
|
527
548
|
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",
|
|
528
|
-
children: [
|
|
549
|
+
children: [P.isPending && /* @__PURE__ */ h(d, { className: "h-4 w-4 animate-spin" }), l("common.delete", "Delete")]
|
|
529
550
|
})] })
|
|
530
551
|
] })
|
|
531
552
|
}),
|
|
532
|
-
/* @__PURE__ */
|
|
533
|
-
open:
|
|
534
|
-
onOpenChange:
|
|
535
|
-
children: /* @__PURE__ */
|
|
536
|
-
onSubmit:
|
|
553
|
+
/* @__PURE__ */ h(v, {
|
|
554
|
+
open: Te,
|
|
555
|
+
onOpenChange: I,
|
|
556
|
+
children: /* @__PURE__ */ g(y, { children: [/* @__PURE__ */ h(x, { children: /* @__PURE__ */ h(S, { children: l("atheletebridge.pages.teamDetail.addMember", "Add member") }) }), /* @__PURE__ */ g("form", {
|
|
557
|
+
onSubmit: Ae,
|
|
537
558
|
className: "space-y-4 px-1",
|
|
538
559
|
children: [
|
|
539
|
-
/* @__PURE__ */
|
|
540
|
-
userId:
|
|
541
|
-
displayName:
|
|
542
|
-
onSelect: ({ userId: e, displayName: t }) =>
|
|
560
|
+
/* @__PURE__ */ h(fe, {
|
|
561
|
+
userId: L.userId,
|
|
562
|
+
displayName: L.displayName,
|
|
563
|
+
onSelect: ({ userId: e, displayName: t }) => R((n) => ({
|
|
543
564
|
...n,
|
|
544
565
|
userId: e,
|
|
545
566
|
displayName: t || n.displayName
|
|
546
567
|
})),
|
|
547
568
|
required: !0
|
|
548
569
|
}),
|
|
549
|
-
/* @__PURE__ */
|
|
570
|
+
/* @__PURE__ */ h(o, {
|
|
550
571
|
label: "Display name",
|
|
551
572
|
htmlFor: "displayName",
|
|
552
573
|
required: !0,
|
|
553
|
-
children: /* @__PURE__ */
|
|
574
|
+
children: /* @__PURE__ */ h("input", {
|
|
554
575
|
id: "displayName",
|
|
555
|
-
className:
|
|
556
|
-
value:
|
|
557
|
-
onChange: (e) =>
|
|
576
|
+
className: s,
|
|
577
|
+
value: L.displayName,
|
|
578
|
+
onChange: (e) => R((t) => ({
|
|
558
579
|
...t,
|
|
559
580
|
displayName: e.target.value
|
|
560
581
|
})),
|
|
561
582
|
placeholder: "e.g. Alex Morgan"
|
|
562
583
|
})
|
|
563
584
|
}),
|
|
564
|
-
/* @__PURE__ */
|
|
585
|
+
/* @__PURE__ */ g("div", {
|
|
565
586
|
className: "grid grid-cols-2 gap-4",
|
|
566
|
-
children: [/* @__PURE__ */
|
|
587
|
+
children: [/* @__PURE__ */ h(o, {
|
|
567
588
|
label: "Role",
|
|
568
589
|
htmlFor: "role",
|
|
569
|
-
children: /* @__PURE__ */
|
|
590
|
+
children: /* @__PURE__ */ h("select", {
|
|
570
591
|
id: "role",
|
|
571
|
-
className:
|
|
572
|
-
value:
|
|
573
|
-
onChange: (e) =>
|
|
592
|
+
className: s,
|
|
593
|
+
value: L.role,
|
|
594
|
+
onChange: (e) => R((t) => ({
|
|
574
595
|
...t,
|
|
575
596
|
role: e.target.value
|
|
576
597
|
})),
|
|
577
|
-
children:
|
|
598
|
+
children: T.map((e) => /* @__PURE__ */ h("option", {
|
|
578
599
|
value: e,
|
|
579
600
|
children: i[e]
|
|
580
601
|
}, e))
|
|
581
602
|
})
|
|
582
|
-
}), /* @__PURE__ */
|
|
603
|
+
}), /* @__PURE__ */ h(o, {
|
|
583
604
|
label: "Status",
|
|
584
605
|
htmlFor: "memberStatus",
|
|
585
|
-
children: /* @__PURE__ */
|
|
606
|
+
children: /* @__PURE__ */ h("select", {
|
|
586
607
|
id: "memberStatus",
|
|
587
|
-
className:
|
|
588
|
-
value:
|
|
589
|
-
onChange: (e) =>
|
|
608
|
+
className: s,
|
|
609
|
+
value: L.status,
|
|
610
|
+
onChange: (e) => R((t) => ({
|
|
590
611
|
...t,
|
|
591
612
|
status: e.target.value
|
|
592
613
|
})),
|
|
593
|
-
children:
|
|
614
|
+
children: E.map((e) => /* @__PURE__ */ h("option", {
|
|
594
615
|
value: e,
|
|
595
|
-
children:
|
|
616
|
+
children: D(e)
|
|
596
617
|
}, e))
|
|
597
618
|
})
|
|
598
619
|
})]
|
|
599
620
|
}),
|
|
600
|
-
/* @__PURE__ */
|
|
621
|
+
/* @__PURE__ */ g("div", {
|
|
601
622
|
className: "grid grid-cols-2 gap-4",
|
|
602
|
-
children: [/* @__PURE__ */
|
|
623
|
+
children: [/* @__PURE__ */ h(o, {
|
|
603
624
|
label: "Position",
|
|
604
625
|
htmlFor: "position",
|
|
605
|
-
children: /* @__PURE__ */
|
|
626
|
+
children: /* @__PURE__ */ h("input", {
|
|
606
627
|
id: "position",
|
|
607
|
-
className:
|
|
608
|
-
value:
|
|
609
|
-
onChange: (e) =>
|
|
628
|
+
className: s,
|
|
629
|
+
value: L.position,
|
|
630
|
+
onChange: (e) => R((t) => ({
|
|
610
631
|
...t,
|
|
611
632
|
position: e.target.value
|
|
612
633
|
})),
|
|
613
634
|
placeholder: "e.g. Striker"
|
|
614
635
|
})
|
|
615
|
-
}), /* @__PURE__ */
|
|
636
|
+
}), /* @__PURE__ */ h(o, {
|
|
616
637
|
label: "Jersey #",
|
|
617
638
|
htmlFor: "jersey",
|
|
618
|
-
children: /* @__PURE__ */
|
|
639
|
+
children: /* @__PURE__ */ h("input", {
|
|
619
640
|
id: "jersey",
|
|
620
|
-
className:
|
|
641
|
+
className: s,
|
|
621
642
|
inputMode: "numeric",
|
|
622
|
-
value:
|
|
623
|
-
onChange: (e) =>
|
|
643
|
+
value: L.jerseyNumber,
|
|
644
|
+
onChange: (e) => R((t) => ({
|
|
624
645
|
...t,
|
|
625
646
|
jerseyNumber: e.target.value
|
|
626
647
|
})),
|
|
@@ -628,20 +649,20 @@ function M() {
|
|
|
628
649
|
})
|
|
629
650
|
})]
|
|
630
651
|
}),
|
|
631
|
-
|
|
652
|
+
z && /* @__PURE__ */ h("p", {
|
|
632
653
|
className: "text-sm text-status-error-text",
|
|
633
|
-
children:
|
|
654
|
+
children: z
|
|
634
655
|
}),
|
|
635
|
-
/* @__PURE__ */
|
|
656
|
+
/* @__PURE__ */ g(b, { children: [/* @__PURE__ */ h("button", {
|
|
636
657
|
type: "button",
|
|
637
|
-
onClick: () =>
|
|
658
|
+
onClick: () => I(!1),
|
|
638
659
|
className: "rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
|
|
639
|
-
children:
|
|
640
|
-
}), /* @__PURE__ */
|
|
660
|
+
children: l("common.cancel", "Cancel")
|
|
661
|
+
}), /* @__PURE__ */ g("button", {
|
|
641
662
|
type: "submit",
|
|
642
|
-
disabled:
|
|
663
|
+
disabled: N.isPending,
|
|
643
664
|
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",
|
|
644
|
-
children: [
|
|
665
|
+
children: [N.isPending && /* @__PURE__ */ h(d, { className: "h-4 w-4 animate-spin" }), l("atheletebridge.pages.teamDetail.addMember", "Add member")]
|
|
645
666
|
})] })
|
|
646
667
|
]
|
|
647
668
|
})] })
|
|
@@ -650,6 +671,6 @@ function M() {
|
|
|
650
671
|
});
|
|
651
672
|
}
|
|
652
673
|
//#endregion
|
|
653
|
-
export {
|
|
674
|
+
export { A as TeamDetailPage };
|
|
654
675
|
|
|
655
676
|
//# sourceMappingURL=TeamDetailPage.js.map
|