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