@burdenoff/microfe-atheletebridge 2026.1116.1 → 2026.1123.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/AthleteBridgeRoot.js +71 -55
- package/dist/atheletebridge/AthleteBridgeRoot.js.map +1 -1
- package/dist/atheletebridge/AthleteBridgeRoutes.js +30 -6
- package/dist/atheletebridge/AthleteBridgeRoutes.js.map +1 -1
- package/dist/atheletebridge/components/MatchupRow.js +11 -2
- package/dist/atheletebridge/components/MatchupRow.js.map +1 -1
- package/dist/atheletebridge/components/analytics/AiInsightsPanel.d.ts +5 -0
- package/dist/atheletebridge/components/analytics/AiInsightsPanel.js +617 -0
- package/dist/atheletebridge/components/analytics/AiInsightsPanel.js.map +1 -0
- package/dist/atheletebridge/components/wearables/ConnectedDevicesPanel.d.ts +5 -0
- package/dist/atheletebridge/components/wearables/ConnectedDevicesPanel.js +453 -0
- package/dist/atheletebridge/components/wearables/ConnectedDevicesPanel.js.map +1 -0
- package/dist/atheletebridge/hooks/index.d.ts +2 -0
- package/dist/atheletebridge/hooks/index.js +1 -0
- package/dist/atheletebridge/hooks/useInsightsWearablesMarketplaceApi.d.ts +62 -0
- package/dist/atheletebridge/hooks/useInsightsWearablesMarketplaceApi.js +362 -0
- package/dist/atheletebridge/hooks/useInsightsWearablesMarketplaceApi.js.map +1 -0
- package/dist/atheletebridge/pages/DashboardPage.js +71 -1
- package/dist/atheletebridge/pages/DashboardPage.js.map +1 -1
- package/dist/atheletebridge/pages/analytics/CoachAnalyticsPage.d.ts +3 -1
- package/dist/atheletebridge/pages/analytics/CoachAnalyticsPage.js +346 -317
- package/dist/atheletebridge/pages/analytics/CoachAnalyticsPage.js.map +1 -1
- package/dist/atheletebridge/pages/athletes/AthleteProfilePage.js +171 -159
- package/dist/atheletebridge/pages/athletes/AthleteProfilePage.js.map +1 -1
- package/dist/atheletebridge/pages/devices/ConnectedDevicesPage.d.ts +1 -0
- package/dist/atheletebridge/pages/devices/ConnectedDevicesPage.js +14 -0
- package/dist/atheletebridge/pages/devices/ConnectedDevicesPage.js.map +1 -0
- package/dist/atheletebridge/pages/marketplace/MarketplacePage.d.ts +1 -0
- package/dist/atheletebridge/pages/marketplace/MarketplacePage.js +756 -0
- package/dist/atheletebridge/pages/marketplace/MarketplacePage.js.map +1 -0
- package/dist/atheletebridge/pages/performance/PerformancePage.js +296 -277
- package/dist/atheletebridge/pages/performance/PerformancePage.js.map +1 -1
- package/dist/atheletebridge/pages/sessions/SessionDetailPage.js +279 -147
- package/dist/atheletebridge/pages/sessions/SessionDetailPage.js.map +1 -1
- package/dist/atheletebridge/types/index.d.ts +1 -0
- package/dist/atheletebridge/types/insights.d.ts +270 -0
- package/package.json +1 -1
|
@@ -5,55 +5,68 @@ import { RatingStars as r } from "../../components/viz/RatingStars.js";
|
|
|
5
5
|
import { SessionStatusTimeline as i } from "../../components/SessionStatusTimeline.js";
|
|
6
6
|
import "../../components/viz/index.js";
|
|
7
7
|
import { ErrorState as a, LoadingState as o } from "../../components/LoadingState.js";
|
|
8
|
-
import { FormField as s, fieldInputClass as
|
|
9
|
-
import { SESSION_TYPE_LABELS as
|
|
10
|
-
import { formatDate as
|
|
11
|
-
import { safeExternalHref as
|
|
12
|
-
import { useScheduledTimeGate as
|
|
13
|
-
import { useAthleteBridge as
|
|
14
|
-
import { useCancelSession as
|
|
8
|
+
import { FormField as s, fieldInputClass as c } from "../../components/form.js";
|
|
9
|
+
import { SESSION_TYPE_LABELS as l } from "../../components/domain.js";
|
|
10
|
+
import { formatDate as u, formatDuration as d } from "../../utils/formatters.js";
|
|
11
|
+
import { safeExternalHref as f } from "../../utils/url.js";
|
|
12
|
+
import { useScheduledTimeGate as p } from "../../hooks/useScheduledTimeGate.js";
|
|
13
|
+
import { useAthleteBridge as ee } from "../../context/AthleteBridgeContext.js";
|
|
14
|
+
import { useCancelSession as te, useCompleteSession as ne, useConfirmSession as re, useSession as ie, useUserDirectory as ae } from "../../hooks/useAthleteBridgeApi.js";
|
|
15
15
|
import "../../hooks/index.js";
|
|
16
|
-
import { useAbTranslate as
|
|
17
|
-
import { useMemo as
|
|
18
|
-
import { ArrowLeft as
|
|
19
|
-
import { useParams as
|
|
20
|
-
import { jsx as
|
|
21
|
-
import { EmphasisPanel as
|
|
16
|
+
import { useAbTranslate as oe } from "../../i18n.js";
|
|
17
|
+
import { useMemo as se, useState as m } from "react";
|
|
18
|
+
import { ArrowLeft as ce, CalendarClock as h, CheckCircle2 as g, Clock as _, ExternalLink as v, Loader2 as y, Mail as b, MapPin as x, ShieldCheck as S, Trophy as le, Video as C, XCircle as w } from "lucide-react";
|
|
19
|
+
import { useParams as T } from "react-router";
|
|
20
|
+
import { jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
21
|
+
import { EmphasisPanel as ue, GlassCard as O, ResponsiveDialog as de, ResponsiveDialogContent as fe, ResponsiveDialogFooter as pe, ResponsiveDialogHeader as k, ResponsiveDialogTitle as A } from "@burdenoff/fe-libs/ui";
|
|
22
22
|
// src/atheletebridge/pages/sessions/SessionDetailPage.tsx
|
|
23
|
-
function
|
|
24
|
-
let
|
|
25
|
-
return /* @__PURE__ */
|
|
23
|
+
function j({ role: e, name: t, email: r, id: i, scheduledAt: a, timeZoneLabel: o }) {
|
|
24
|
+
let s = t?.trim() || `User ${i.slice(0, 6)}`;
|
|
25
|
+
return /* @__PURE__ */ D(O, {
|
|
26
26
|
treatment: "metric",
|
|
27
27
|
className: "p-4",
|
|
28
28
|
children: [
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
className: "text-
|
|
29
|
+
/* @__PURE__ */ E("p", {
|
|
30
|
+
className: "text-[0.7rem] font-semibold uppercase tracking-wide text-text-muted",
|
|
31
31
|
children: e
|
|
32
32
|
}),
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
className: "mt-
|
|
35
|
-
children: [/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ D("div", {
|
|
34
|
+
className: "mt-2.5 flex items-center gap-2.5 sm:gap-3",
|
|
35
|
+
children: [/* @__PURE__ */ E(n, {
|
|
36
36
|
name: t,
|
|
37
37
|
id: i,
|
|
38
|
-
size: "
|
|
39
|
-
}), /* @__PURE__ */
|
|
38
|
+
size: "md"
|
|
39
|
+
}), /* @__PURE__ */ D("div", {
|
|
40
40
|
className: "min-w-0",
|
|
41
|
-
children: [/* @__PURE__ */
|
|
41
|
+
children: [/* @__PURE__ */ E("p", {
|
|
42
42
|
className: "truncate text-sm font-semibold text-text-primary",
|
|
43
|
-
children:
|
|
44
|
-
}), /* @__PURE__ */
|
|
43
|
+
children: s
|
|
44
|
+
}), o ? /* @__PURE__ */ E("p", {
|
|
45
|
+
className: "mt-0.5 truncate text-[0.68rem] text-[var(--color-accent-teal)]",
|
|
46
|
+
children: o
|
|
47
|
+
}) : /* @__PURE__ */ E("p", {
|
|
45
48
|
className: "truncate text-xs text-text-secondary",
|
|
46
49
|
children: e
|
|
47
50
|
})]
|
|
48
51
|
})]
|
|
49
52
|
}),
|
|
50
|
-
|
|
53
|
+
a ? /* @__PURE__ */ D("p", {
|
|
54
|
+
className: "mt-3 flex items-center gap-1.5 text-xs font-medium tabular-nums text-text-primary",
|
|
55
|
+
children: [/* @__PURE__ */ E(h, {
|
|
56
|
+
className: "h-3.5 w-3.5 shrink-0 text-text-muted",
|
|
57
|
+
"aria-hidden": "true"
|
|
58
|
+
}), /* @__PURE__ */ E("span", {
|
|
59
|
+
className: "truncate",
|
|
60
|
+
children: u(a)
|
|
61
|
+
})]
|
|
62
|
+
}) : null,
|
|
63
|
+
r ? /* @__PURE__ */ D("a", {
|
|
51
64
|
href: `mailto:${r}`,
|
|
52
|
-
className: "mt-
|
|
53
|
-
children: [/* @__PURE__ */
|
|
65
|
+
className: "mt-2 flex items-center gap-1.5 text-xs text-text-secondary hover:text-text-primary hover:underline",
|
|
66
|
+
children: [/* @__PURE__ */ E(b, {
|
|
54
67
|
className: "h-3.5 w-3.5 shrink-0",
|
|
55
68
|
"aria-hidden": "true"
|
|
56
|
-
}), /* @__PURE__ */
|
|
69
|
+
}), /* @__PURE__ */ E("span", {
|
|
57
70
|
className: "truncate",
|
|
58
71
|
children: r
|
|
59
72
|
})]
|
|
@@ -61,97 +74,101 @@ function M({ role: e, name: t, email: r, id: i }) {
|
|
|
61
74
|
]
|
|
62
75
|
});
|
|
63
76
|
}
|
|
64
|
-
function
|
|
65
|
-
let n =
|
|
66
|
-
if (
|
|
77
|
+
function M() {
|
|
78
|
+
let n = oe(), { id: b } = T(), { navigateTo: M } = ee(), N = ie(b), P = re(), F = ne(), I = te(), [L, R] = m(!1), [z, B] = m(""), [V, H] = m(0), [U, W] = m(null), G = p(N.data?.scheduledAt), me = se(() => N.data ? [N.data.coachId, N.data.athleteId] : [], [N.data]), K = ae(me);
|
|
79
|
+
if (N.isLoading) return /* @__PURE__ */ E(e, {
|
|
67
80
|
title: n("atheletebridge.pages.sessionDetail.title", "Session"),
|
|
68
|
-
children: /* @__PURE__ */
|
|
81
|
+
children: /* @__PURE__ */ E(o, { label: n("atheletebridge.pages.sessionDetail.loading", "Loading session…") })
|
|
69
82
|
});
|
|
70
|
-
if (
|
|
83
|
+
if (N.isError || !N.data) return /* @__PURE__ */ E(e, {
|
|
71
84
|
title: n("atheletebridge.pages.sessionDetail.title", "Session"),
|
|
72
|
-
children: /* @__PURE__ */
|
|
85
|
+
children: /* @__PURE__ */ E(a, {
|
|
73
86
|
title: n("atheletebridge.pages.sessionDetail.notFoundTitle", "Session not found"),
|
|
74
87
|
message: n("atheletebridge.pages.sessionDetail.notFoundMessage", "This session does not exist or you do not have access to it."),
|
|
75
|
-
onRetry: () =>
|
|
88
|
+
onRetry: () => M("/sessions")
|
|
76
89
|
})
|
|
77
90
|
});
|
|
78
|
-
let
|
|
79
|
-
return /* @__PURE__ */
|
|
80
|
-
title:
|
|
81
|
-
description:
|
|
82
|
-
actions: /* @__PURE__ */
|
|
91
|
+
let q = N.data, J = q.status === "REQUESTED", Y = q.status === "CONFIRMED", X = Y && G, he = Y && !G, Z = q.status === "REQUESTED" || q.status === "CONFIRMED", Q = f(q.meetingUrl), $ = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
92
|
+
return /* @__PURE__ */ D(e, {
|
|
93
|
+
title: q.title,
|
|
94
|
+
description: l[q.type],
|
|
95
|
+
actions: /* @__PURE__ */ D("button", {
|
|
83
96
|
type: "button",
|
|
84
|
-
onClick: () =>
|
|
97
|
+
onClick: () => M("/sessions"),
|
|
85
98
|
className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
|
|
86
99
|
children: [
|
|
87
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ E(ce, { className: "h-4 w-4" }),
|
|
88
101
|
" ",
|
|
89
102
|
n("atheletebridge.pages.sessionDetail.back", "Back")
|
|
90
103
|
]
|
|
91
104
|
}),
|
|
92
105
|
children: [
|
|
93
|
-
/* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ D(O, {
|
|
94
107
|
treatment: "insight",
|
|
95
108
|
className: "mb-6 p-5 sm:p-6",
|
|
96
|
-
children: [/* @__PURE__ */
|
|
109
|
+
children: [/* @__PURE__ */ D("div", {
|
|
97
110
|
className: "mb-5 flex items-center justify-between gap-3",
|
|
98
|
-
children: [/* @__PURE__ */
|
|
111
|
+
children: [/* @__PURE__ */ E("span", {
|
|
99
112
|
className: "text-xs font-medium uppercase tracking-wide text-text-muted",
|
|
100
113
|
children: n("atheletebridge.pages.sessionDetail.lifecycle", "Lifecycle")
|
|
101
|
-
}), /* @__PURE__ */
|
|
102
|
-
}), /* @__PURE__ */
|
|
103
|
-
status:
|
|
104
|
-
createdAt:
|
|
105
|
-
completedAt:
|
|
114
|
+
}), /* @__PURE__ */ E(t, { status: q.status })]
|
|
115
|
+
}), /* @__PURE__ */ E(i, {
|
|
116
|
+
status: q.status,
|
|
117
|
+
createdAt: q.createdAt,
|
|
118
|
+
completedAt: q.completedAt
|
|
106
119
|
})]
|
|
107
120
|
}),
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
-
className: "mb-6 grid grid-cols-
|
|
121
|
+
/* @__PURE__ */ D("div", {
|
|
122
|
+
className: "mb-6 grid grid-cols-2 gap-3 sm:gap-4 lg:grid-cols-3",
|
|
110
123
|
children: [
|
|
111
|
-
/* @__PURE__ */
|
|
112
|
-
role: n("atheletebridge.pages.sessionDetail.
|
|
113
|
-
id:
|
|
114
|
-
name:
|
|
115
|
-
email:
|
|
124
|
+
/* @__PURE__ */ E(j, {
|
|
125
|
+
role: n("atheletebridge.pages.sessionDetail.coachTime", "Coach time"),
|
|
126
|
+
id: q.coachId,
|
|
127
|
+
name: K.nameOf(q.coachId),
|
|
128
|
+
email: K.emailOf(q.coachId),
|
|
129
|
+
scheduledAt: q.scheduledAt,
|
|
130
|
+
timeZoneLabel: $
|
|
116
131
|
}),
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
role: n("atheletebridge.pages.sessionDetail.
|
|
119
|
-
id:
|
|
120
|
-
name:
|
|
121
|
-
email:
|
|
132
|
+
/* @__PURE__ */ E(j, {
|
|
133
|
+
role: n("atheletebridge.pages.sessionDetail.athleteTime", "Athlete time"),
|
|
134
|
+
id: q.athleteId,
|
|
135
|
+
name: K.nameOf(q.athleteId),
|
|
136
|
+
email: K.emailOf(q.athleteId),
|
|
137
|
+
scheduledAt: q.scheduledAt,
|
|
138
|
+
timeZoneLabel: $
|
|
122
139
|
}),
|
|
123
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ D(O, {
|
|
124
141
|
treatment: "metric",
|
|
125
|
-
className: "p-4",
|
|
126
|
-
children: [/* @__PURE__ */
|
|
142
|
+
className: "col-span-2 p-4 lg:col-span-1",
|
|
143
|
+
children: [/* @__PURE__ */ E("p", {
|
|
127
144
|
className: "text-xs font-medium uppercase tracking-wide text-text-muted",
|
|
128
145
|
children: n("atheletebridge.pages.sessionDetail.schedule", "Schedule")
|
|
129
|
-
}), /* @__PURE__ */
|
|
146
|
+
}), /* @__PURE__ */ D("div", {
|
|
130
147
|
className: "mt-3 space-y-2.5 text-sm text-text-primary",
|
|
131
148
|
children: [
|
|
132
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ D("span", {
|
|
133
150
|
className: "flex items-center gap-2",
|
|
134
|
-
children: [/* @__PURE__ */
|
|
151
|
+
children: [/* @__PURE__ */ E(h, {
|
|
135
152
|
className: "h-4 w-4 shrink-0 text-text-secondary",
|
|
136
153
|
"aria-hidden": "true"
|
|
137
|
-
}),
|
|
154
|
+
}), u(q.scheduledAt)]
|
|
138
155
|
}),
|
|
139
|
-
/* @__PURE__ */
|
|
156
|
+
/* @__PURE__ */ D("span", {
|
|
140
157
|
className: "flex items-center gap-2 text-text-secondary",
|
|
141
|
-
children: [/* @__PURE__ */
|
|
158
|
+
children: [/* @__PURE__ */ E(_, {
|
|
142
159
|
className: "h-4 w-4 shrink-0",
|
|
143
160
|
"aria-hidden": "true"
|
|
144
|
-
}),
|
|
161
|
+
}), d(q.durationMin)]
|
|
145
162
|
}),
|
|
146
|
-
|
|
163
|
+
q.type === "IN_PERSON" && q.location ? /* @__PURE__ */ D("span", {
|
|
147
164
|
className: "flex items-center gap-2 text-text-secondary",
|
|
148
165
|
children: [
|
|
149
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ E(x, {
|
|
150
167
|
className: "h-4 w-4 shrink-0",
|
|
151
168
|
"aria-hidden": "true"
|
|
152
169
|
}),
|
|
153
170
|
" ",
|
|
154
|
-
|
|
171
|
+
q.location
|
|
155
172
|
]
|
|
156
173
|
}) : null
|
|
157
174
|
]
|
|
@@ -159,57 +176,172 @@ function N() {
|
|
|
159
176
|
})
|
|
160
177
|
]
|
|
161
178
|
}),
|
|
162
|
-
/* @__PURE__ */
|
|
179
|
+
Q ? /* @__PURE__ */ D("a", {
|
|
180
|
+
href: Q,
|
|
181
|
+
target: "_blank",
|
|
182
|
+
rel: "noopener noreferrer",
|
|
183
|
+
className: "mb-6 flex w-full items-center justify-center gap-2.5 rounded-xl bg-[linear-gradient(120deg,var(--color-action-primary-bg),color-mix(in_oklab,var(--color-action-primary-bg)_62%,var(--color-accent-purple)),var(--color-action-primary-bg))] px-5 py-3.5 text-base font-bold uppercase tracking-wide text-action-primary-text shadow-elevation-2 transition-[filter,box-shadow] hover:brightness-110 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
184
|
+
children: [
|
|
185
|
+
/* @__PURE__ */ E(C, {
|
|
186
|
+
className: "h-5 w-5",
|
|
187
|
+
"aria-hidden": "true"
|
|
188
|
+
}),
|
|
189
|
+
n("atheletebridge.pages.sessionDetail.joinMeeting", "Join Meeting"),
|
|
190
|
+
/* @__PURE__ */ E(v, {
|
|
191
|
+
className: "h-4 w-4",
|
|
192
|
+
"aria-hidden": "true"
|
|
193
|
+
})
|
|
194
|
+
]
|
|
195
|
+
}) : null,
|
|
196
|
+
X || Z ? /* @__PURE__ */ D("section", {
|
|
197
|
+
className: "mb-6",
|
|
198
|
+
children: [/* @__PURE__ */ E("h2", {
|
|
199
|
+
className: "mb-3 text-xs font-semibold uppercase tracking-wide text-text-muted",
|
|
200
|
+
children: n("atheletebridge.pages.sessionDetail.sessionOutcome", "Session outcome")
|
|
201
|
+
}), /* @__PURE__ */ D("div", {
|
|
202
|
+
className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
203
|
+
children: [X ? /* @__PURE__ */ D(O, {
|
|
204
|
+
treatment: "metric",
|
|
205
|
+
className: "flex flex-col justify-between gap-3 border-status-success-border/50 p-4",
|
|
206
|
+
children: [/* @__PURE__ */ D("div", {
|
|
207
|
+
className: "flex items-start gap-3",
|
|
208
|
+
children: [/* @__PURE__ */ E("span", {
|
|
209
|
+
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-status-success-bg-subtle text-status-success-text",
|
|
210
|
+
children: /* @__PURE__ */ E(le, {
|
|
211
|
+
className: "h-4 w-4",
|
|
212
|
+
"aria-hidden": "true"
|
|
213
|
+
})
|
|
214
|
+
}), /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|
|
215
|
+
className: "text-xs font-bold uppercase tracking-wide text-status-success-text",
|
|
216
|
+
children: n("atheletebridge.pages.sessionDetail.completeSessionCard", "Complete session")
|
|
217
|
+
}), /* @__PURE__ */ E("p", {
|
|
218
|
+
className: "mt-0.5 text-xs text-text-secondary",
|
|
219
|
+
children: n("atheletebridge.pages.sessionDetail.completeSessionCardHint", "Mark as complete and rate this session")
|
|
220
|
+
})] })]
|
|
221
|
+
}), /* @__PURE__ */ D("div", {
|
|
222
|
+
className: "flex items-center justify-between gap-2 pt-1",
|
|
223
|
+
children: [/* @__PURE__ */ E(r, {
|
|
224
|
+
value: V,
|
|
225
|
+
onChange: (e) => {
|
|
226
|
+
W(null), B(q.feedback ?? ""), H(e), R(!0);
|
|
227
|
+
},
|
|
228
|
+
size: 22,
|
|
229
|
+
ariaLabel: "Quick-rate and complete session"
|
|
230
|
+
}), /* @__PURE__ */ E("button", {
|
|
231
|
+
type: "button",
|
|
232
|
+
onClick: () => {
|
|
233
|
+
W(null), B(q.feedback ?? ""), H(q.rating ?? 0), R(!0);
|
|
234
|
+
},
|
|
235
|
+
className: "rounded-lg bg-status-success-bg-subtle px-3 py-1.5 text-xs font-semibold text-status-success-text ring-1 ring-inset ring-status-success-border",
|
|
236
|
+
children: n("atheletebridge.pages.sessionDetail.complete", "Complete")
|
|
237
|
+
})]
|
|
238
|
+
})]
|
|
239
|
+
}) : null, Z ? /* @__PURE__ */ D(O, {
|
|
240
|
+
treatment: "metric",
|
|
241
|
+
className: "flex flex-col justify-between gap-3 border-status-error-border/50 p-4",
|
|
242
|
+
children: [/* @__PURE__ */ D("div", {
|
|
243
|
+
className: "flex items-start gap-3",
|
|
244
|
+
children: [/* @__PURE__ */ E("span", {
|
|
245
|
+
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-status-error-bg-subtle text-status-error-text",
|
|
246
|
+
children: /* @__PURE__ */ E(w, {
|
|
247
|
+
className: "h-4 w-4",
|
|
248
|
+
"aria-hidden": "true"
|
|
249
|
+
})
|
|
250
|
+
}), /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|
|
251
|
+
className: "text-xs font-bold uppercase tracking-wide text-status-error-text",
|
|
252
|
+
children: n("atheletebridge.pages.sessionDetail.cancelSessionCard", "Cancel session")
|
|
253
|
+
}), /* @__PURE__ */ E("p", {
|
|
254
|
+
className: "mt-0.5 text-xs text-text-secondary",
|
|
255
|
+
children: n("atheletebridge.pages.sessionDetail.cancelSessionCardHint", "Cancel this session if schedules changed")
|
|
256
|
+
})] })]
|
|
257
|
+
}), /* @__PURE__ */ D("button", {
|
|
258
|
+
type: "button",
|
|
259
|
+
onClick: () => b && I.mutate(b),
|
|
260
|
+
disabled: I.isPending,
|
|
261
|
+
className: "inline-flex w-full items-center justify-center gap-1.5 rounded-lg border border-status-error-border px-3 py-2 text-xs font-semibold text-status-error-text transition-colors hover:bg-status-error-bg-subtle disabled:opacity-60",
|
|
262
|
+
children: [I.isPending ? /* @__PURE__ */ E(y, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ E(w, { className: "h-3.5 w-3.5" }), n("atheletebridge.pages.sessionDetail.cancelSession", "Cancel session")]
|
|
263
|
+
})]
|
|
264
|
+
}) : null]
|
|
265
|
+
})]
|
|
266
|
+
}) : null,
|
|
267
|
+
/* @__PURE__ */ D(O, {
|
|
268
|
+
treatment: "metric",
|
|
269
|
+
className: "mb-6 flex items-start gap-3 p-4",
|
|
270
|
+
children: [/* @__PURE__ */ E("span", {
|
|
271
|
+
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-[var(--color-accent-soft)] text-action-primary-bg",
|
|
272
|
+
children: /* @__PURE__ */ E(S, {
|
|
273
|
+
className: "h-4 w-4",
|
|
274
|
+
"aria-hidden": "true"
|
|
275
|
+
})
|
|
276
|
+
}), /* @__PURE__ */ D("div", {
|
|
277
|
+
className: "min-w-0 text-xs",
|
|
278
|
+
children: [
|
|
279
|
+
/* @__PURE__ */ E("p", {
|
|
280
|
+
className: "font-bold uppercase tracking-wide text-action-primary-bg",
|
|
281
|
+
children: n("atheletebridge.pages.sessionDetail.beforeSessionTitle", "Before your session")
|
|
282
|
+
}),
|
|
283
|
+
/* @__PURE__ */ E("p", {
|
|
284
|
+
className: "mt-1 text-text-primary",
|
|
285
|
+
children: n("atheletebridge.pages.sessionDetail.beforeSessionHint", "Warm up, review your assigned drills, and check your camera/audio before joining.")
|
|
286
|
+
}),
|
|
287
|
+
/* @__PURE__ */ E("p", {
|
|
288
|
+
className: "mt-1 text-text-muted",
|
|
289
|
+
children: n("atheletebridge.pages.sessionDetail.privacyNote", "Your coaching session details and feedback stay strictly isolated within your club workspace.")
|
|
290
|
+
})
|
|
291
|
+
]
|
|
292
|
+
})]
|
|
293
|
+
}),
|
|
294
|
+
/* @__PURE__ */ D("div", {
|
|
163
295
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-2",
|
|
164
|
-
children: [/* @__PURE__ */
|
|
296
|
+
children: [/* @__PURE__ */ E("div", {
|
|
165
297
|
className: "space-y-6",
|
|
166
|
-
children: /* @__PURE__ */
|
|
298
|
+
children: /* @__PURE__ */ D(O, {
|
|
167
299
|
treatment: "glass",
|
|
168
300
|
className: "p-5 sm:p-6",
|
|
169
301
|
children: [
|
|
170
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ E("h2", {
|
|
171
303
|
className: "text-sm font-semibold text-text-primary",
|
|
172
304
|
children: n("atheletebridge.pages.sessionDetail.sessionDetails", "Session details")
|
|
173
305
|
}),
|
|
174
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ D("p", {
|
|
175
307
|
className: "mt-2 text-sm text-text-secondary",
|
|
176
308
|
children: [
|
|
177
|
-
|
|
309
|
+
l[q.type],
|
|
178
310
|
" ",
|
|
179
311
|
n("atheletebridge.pages.sessionDetail.sessionTypeSuffix", "session"),
|
|
180
|
-
|
|
312
|
+
q.location ? ` · ${q.location}` : "",
|
|
181
313
|
"."
|
|
182
314
|
]
|
|
183
315
|
}),
|
|
184
|
-
|
|
185
|
-
href:
|
|
316
|
+
Q ? /* @__PURE__ */ D("a", {
|
|
317
|
+
href: Q,
|
|
186
318
|
target: "_blank",
|
|
187
319
|
rel: "noopener noreferrer",
|
|
188
320
|
className: "mt-4 flex items-center gap-3 rounded-xl border border-border-seam bg-bg-sunken p-3 transition-colors hover:bg-bg-surface focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
189
321
|
children: [
|
|
190
|
-
/* @__PURE__ */
|
|
322
|
+
/* @__PURE__ */ E("span", {
|
|
191
323
|
className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-text-primary",
|
|
192
|
-
children: /* @__PURE__ */
|
|
324
|
+
children: /* @__PURE__ */ E(C, {
|
|
193
325
|
className: "h-5 w-5",
|
|
194
326
|
"aria-hidden": "true"
|
|
195
327
|
})
|
|
196
328
|
}),
|
|
197
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ D("span", {
|
|
198
330
|
className: "min-w-0 flex-1",
|
|
199
|
-
children: [/* @__PURE__ */
|
|
331
|
+
children: [/* @__PURE__ */ E("span", {
|
|
200
332
|
className: "block text-sm font-medium text-text-primary",
|
|
201
333
|
children: n("atheletebridge.pages.sessionDetail.meetingLink", "Meeting link")
|
|
202
|
-
}), /* @__PURE__ */
|
|
334
|
+
}), /* @__PURE__ */ E("span", {
|
|
203
335
|
className: "block truncate text-xs text-text-secondary",
|
|
204
336
|
children: n("atheletebridge.pages.sessionDetail.onlineSessionHint", "Online session — tap to join")
|
|
205
337
|
})]
|
|
206
338
|
}),
|
|
207
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ D("span", {
|
|
208
340
|
className: "inline-flex items-center gap-1 text-sm font-medium text-text-link",
|
|
209
341
|
children: [
|
|
210
342
|
n("atheletebridge.pages.sessionDetail.join", "Join"),
|
|
211
343
|
" ",
|
|
212
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ E(v, {
|
|
213
345
|
className: "h-4 w-4",
|
|
214
346
|
"aria-hidden": "true"
|
|
215
347
|
})
|
|
@@ -217,34 +349,34 @@ function N() {
|
|
|
217
349
|
})
|
|
218
350
|
]
|
|
219
351
|
}) : null,
|
|
220
|
-
|
|
352
|
+
q.completedAt ? /* @__PURE__ */ D("div", {
|
|
221
353
|
className: "mt-5 border-t border-border-seam pt-5",
|
|
222
354
|
children: [
|
|
223
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ E("h3", {
|
|
224
356
|
className: "mb-2 text-sm font-semibold text-text-primary",
|
|
225
357
|
children: n("atheletebridge.pages.sessionDetail.outcome", "Outcome")
|
|
226
358
|
}),
|
|
227
|
-
/* @__PURE__ */
|
|
359
|
+
/* @__PURE__ */ D("p", {
|
|
228
360
|
className: "text-sm text-text-secondary",
|
|
229
361
|
children: [
|
|
230
362
|
n("atheletebridge.pages.sessionDetail.completed", "Completed"),
|
|
231
363
|
" ",
|
|
232
|
-
|
|
364
|
+
u(q.completedAt)
|
|
233
365
|
]
|
|
234
366
|
}),
|
|
235
|
-
|
|
367
|
+
q.rating === null ? null : /* @__PURE__ */ E("div", {
|
|
236
368
|
className: "mt-2",
|
|
237
|
-
children: /* @__PURE__ */
|
|
238
|
-
value:
|
|
369
|
+
children: /* @__PURE__ */ E(r, {
|
|
370
|
+
value: q.rating,
|
|
239
371
|
size: 18,
|
|
240
372
|
showValue: !0
|
|
241
373
|
})
|
|
242
374
|
}),
|
|
243
|
-
|
|
375
|
+
q.feedback ? /* @__PURE__ */ D("p", {
|
|
244
376
|
className: "mt-3 rounded-lg bg-bg-sunken p-3 text-sm italic text-text-secondary",
|
|
245
377
|
children: [
|
|
246
378
|
"“",
|
|
247
|
-
|
|
379
|
+
q.feedback,
|
|
248
380
|
"”"
|
|
249
381
|
]
|
|
250
382
|
}) : null
|
|
@@ -252,114 +384,114 @@ function N() {
|
|
|
252
384
|
}) : null
|
|
253
385
|
]
|
|
254
386
|
})
|
|
255
|
-
}),
|
|
387
|
+
}), J || X || Z ? /* @__PURE__ */ D(ue, {
|
|
256
388
|
className: "h-fit",
|
|
257
389
|
children: [
|
|
258
|
-
/* @__PURE__ */
|
|
390
|
+
/* @__PURE__ */ E("h2", {
|
|
259
391
|
className: "mb-4 text-sm font-semibold text-text-primary",
|
|
260
392
|
children: n("atheletebridge.pages.sessionDetail.actions", "Actions")
|
|
261
393
|
}),
|
|
262
|
-
/* @__PURE__ */
|
|
394
|
+
/* @__PURE__ */ D("div", {
|
|
263
395
|
className: "flex flex-col gap-2.5",
|
|
264
396
|
children: [
|
|
265
|
-
|
|
397
|
+
J && /* @__PURE__ */ D("button", {
|
|
266
398
|
type: "button",
|
|
267
|
-
onClick: () =>
|
|
268
|
-
disabled:
|
|
399
|
+
onClick: () => b && P.mutate(b),
|
|
400
|
+
disabled: P.isPending,
|
|
269
401
|
className: "inline-flex w-full items-center justify-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2.5 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-60",
|
|
270
|
-
children: [
|
|
402
|
+
children: [P.isPending ? /* @__PURE__ */ E(y, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ E(g, { className: "h-4 w-4" }), n("atheletebridge.pages.sessionDetail.confirm", "Confirm")]
|
|
271
403
|
}),
|
|
272
|
-
|
|
404
|
+
X && /* @__PURE__ */ D("button", {
|
|
273
405
|
type: "button",
|
|
274
406
|
onClick: () => {
|
|
275
|
-
|
|
407
|
+
W(null), B(q.feedback ?? ""), H(q.rating ?? 0), R(!0);
|
|
276
408
|
},
|
|
277
409
|
className: "inline-flex w-full items-center justify-center gap-2 rounded-lg bg-status-success-bg-subtle px-4 py-2.5 text-sm font-medium text-status-success-text ring-1 ring-inset ring-status-success-border transition-colors hover:bg-status-success-bg-subtle/70",
|
|
278
410
|
children: [
|
|
279
|
-
/* @__PURE__ */
|
|
411
|
+
/* @__PURE__ */ E(g, { className: "h-4 w-4" }),
|
|
280
412
|
" ",
|
|
281
413
|
n("atheletebridge.pages.sessionDetail.complete", "Complete")
|
|
282
414
|
]
|
|
283
415
|
}),
|
|
284
|
-
|
|
416
|
+
Z && /* @__PURE__ */ D("button", {
|
|
285
417
|
type: "button",
|
|
286
|
-
onClick: () =>
|
|
287
|
-
disabled:
|
|
418
|
+
onClick: () => b && I.mutate(b),
|
|
419
|
+
disabled: I.isPending,
|
|
288
420
|
className: "inline-flex w-full items-center justify-center gap-2 rounded-lg border border-status-error-border px-4 py-2.5 text-sm font-medium text-status-error-text transition-colors hover:bg-status-error-bg-subtle disabled:opacity-60",
|
|
289
|
-
children: [
|
|
421
|
+
children: [I.isPending ? /* @__PURE__ */ E(y, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ E(w, { className: "h-4 w-4" }), n("atheletebridge.pages.sessionDetail.cancelSession", "Cancel session")]
|
|
290
422
|
})
|
|
291
423
|
]
|
|
292
424
|
}),
|
|
293
|
-
|
|
425
|
+
X ? /* @__PURE__ */ E("p", {
|
|
294
426
|
className: "mt-3 text-xs text-text-muted",
|
|
295
427
|
children: n("atheletebridge.pages.sessionDetail.completeTooltip", "Completing lets you leave feedback and a 1–5 star rating for the athlete.")
|
|
296
|
-
}) :
|
|
428
|
+
}) : he ? /* @__PURE__ */ E("p", {
|
|
297
429
|
className: "mt-3 text-xs text-text-muted",
|
|
298
430
|
children: n("atheletebridge.pages.sessionDetail.completeUnavailable", "This session can be completed once its scheduled date and time arrives.")
|
|
299
431
|
}) : null
|
|
300
432
|
]
|
|
301
433
|
}) : null]
|
|
302
434
|
}),
|
|
303
|
-
/* @__PURE__ */
|
|
304
|
-
open:
|
|
305
|
-
onOpenChange:
|
|
306
|
-
children: /* @__PURE__ */
|
|
435
|
+
/* @__PURE__ */ E(de, {
|
|
436
|
+
open: L,
|
|
437
|
+
onOpenChange: R,
|
|
438
|
+
children: /* @__PURE__ */ D(fe, { children: [/* @__PURE__ */ E(k, { children: /* @__PURE__ */ E(A, { children: n("atheletebridge.pages.sessionDetail.completeDialogTitle", "Complete session") }) }), /* @__PURE__ */ D("form", {
|
|
307
439
|
onSubmit: async (e) => {
|
|
308
|
-
if (e.preventDefault(),
|
|
309
|
-
let t =
|
|
310
|
-
if (t !== void 0 && (t < 1 || t > 5))
|
|
440
|
+
if (e.preventDefault(), W(null), !b) return;
|
|
441
|
+
let t = V > 0 ? V : void 0;
|
|
442
|
+
if (t !== void 0 && (t < 1 || t > 5)) W("Rating must be between 1 and 5.");
|
|
311
443
|
else try {
|
|
312
|
-
await
|
|
313
|
-
id:
|
|
444
|
+
await F.mutateAsync({
|
|
445
|
+
id: b,
|
|
314
446
|
input: {
|
|
315
|
-
feedback:
|
|
447
|
+
feedback: z.trim() || void 0,
|
|
316
448
|
rating: t
|
|
317
449
|
}
|
|
318
|
-
}),
|
|
450
|
+
}), R(!1);
|
|
319
451
|
} catch (e) {
|
|
320
|
-
|
|
452
|
+
W(e instanceof Error ? e.message : "Failed to complete session.");
|
|
321
453
|
}
|
|
322
454
|
},
|
|
323
455
|
className: "space-y-4 px-1",
|
|
324
456
|
children: [
|
|
325
|
-
/* @__PURE__ */
|
|
457
|
+
/* @__PURE__ */ E(s, {
|
|
326
458
|
label: n("atheletebridge.pages.sessionDetail.feedbackLabel", "Feedback"),
|
|
327
459
|
htmlFor: "feedback",
|
|
328
460
|
hint: n("atheletebridge.pages.sessionDetail.feedbackHint", "Optional post-session notes."),
|
|
329
|
-
children: /* @__PURE__ */
|
|
461
|
+
children: /* @__PURE__ */ E("textarea", {
|
|
330
462
|
id: "feedback",
|
|
331
|
-
className:
|
|
463
|
+
className: c,
|
|
332
464
|
rows: 3,
|
|
333
|
-
value:
|
|
334
|
-
onChange: (e) =>
|
|
465
|
+
value: z,
|
|
466
|
+
onChange: (e) => B(e.target.value),
|
|
335
467
|
placeholder: n("atheletebridge.pages.sessionDetail.feedbackPlaceholder", "How did the session go?")
|
|
336
468
|
})
|
|
337
469
|
}),
|
|
338
|
-
/* @__PURE__ */
|
|
470
|
+
/* @__PURE__ */ E(s, {
|
|
339
471
|
label: n("atheletebridge.pages.sessionDetail.ratingLabel", "Rating"),
|
|
340
472
|
hint: n("atheletebridge.pages.sessionDetail.ratingHint", "Optional — tap a star."),
|
|
341
|
-
children: /* @__PURE__ */
|
|
342
|
-
value:
|
|
343
|
-
onChange:
|
|
473
|
+
children: /* @__PURE__ */ E(r, {
|
|
474
|
+
value: V,
|
|
475
|
+
onChange: H,
|
|
344
476
|
size: 30,
|
|
345
477
|
showLabels: !0,
|
|
346
478
|
ariaLabel: n("atheletebridge.pages.sessionDetail.ratingAria", "Rate this session out of 5")
|
|
347
479
|
})
|
|
348
480
|
}),
|
|
349
|
-
|
|
481
|
+
U && /* @__PURE__ */ E("p", {
|
|
350
482
|
className: "text-sm text-status-error-text",
|
|
351
|
-
children:
|
|
483
|
+
children: U
|
|
352
484
|
}),
|
|
353
|
-
/* @__PURE__ */
|
|
485
|
+
/* @__PURE__ */ D(pe, { children: [/* @__PURE__ */ E("button", {
|
|
354
486
|
type: "button",
|
|
355
|
-
onClick: () =>
|
|
487
|
+
onClick: () => R(!1),
|
|
356
488
|
className: "rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
|
|
357
489
|
children: n("common.cancel", "Cancel")
|
|
358
|
-
}), /* @__PURE__ */
|
|
490
|
+
}), /* @__PURE__ */ D("button", {
|
|
359
491
|
type: "submit",
|
|
360
|
-
disabled:
|
|
492
|
+
disabled: F.isPending,
|
|
361
493
|
className: "inline-flex items-center gap-1.5 rounded-lg bg-status-success-bg-subtle px-4 py-2 text-sm font-medium text-status-success-text ring-1 ring-inset ring-status-success-border transition-colors hover:bg-status-success-bg-subtle/70 disabled:opacity-60",
|
|
362
|
-
children: [
|
|
494
|
+
children: [F.isPending && /* @__PURE__ */ E(y, { className: "h-4 w-4 animate-spin" }), n("atheletebridge.pages.sessionDetail.completeAction", "Complete session")]
|
|
363
495
|
})] })
|
|
364
496
|
]
|
|
365
497
|
})] })
|
|
@@ -367,6 +499,6 @@ function N() {
|
|
|
367
499
|
]
|
|
368
500
|
});
|
|
369
501
|
}
|
|
370
|
-
export {
|
|
502
|
+
export { M as SessionDetailPage };
|
|
371
503
|
|
|
372
504
|
//# sourceMappingURL=SessionDetailPage.js.map
|