@burdenoff/microfe-eventfullymanaged 2026.1110.12 → 2026.1110.13
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/eventfullymanaged/api/eventApi.d.ts +116 -0
- package/dist/eventfullymanaged/api/eventApi.js +421 -309
- package/dist/eventfullymanaged/api/eventApi.js.map +1 -1
- package/dist/eventfullymanaged/pages/events/EventDetailPage.js +334 -283
- package/dist/eventfullymanaged/pages/events/EventDetailPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/AttendeeProfilePage.js +109 -64
- package/dist/eventfullymanaged/pages/modules/AttendeeProfilePage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/EventTemplatesSection.d.ts +7 -0
- package/dist/eventfullymanaged/pages/modules/EventTemplatesSection.js +173 -0
- package/dist/eventfullymanaged/pages/modules/EventTemplatesSection.js.map +1 -0
- package/dist/eventfullymanaged/pages/modules/EventsPage.js +186 -184
- package/dist/eventfullymanaged/pages/modules/EventsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/WorkflowsPage.js +250 -140
- package/dist/eventfullymanaged/pages/modules/WorkflowsPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import { gql as e } from "../../../node_modules/graphql-tag/lib/index.js";
|
|
2
2
|
import { useQuery as t } from "../../../node_modules/@apollo/client/react/hooks/useQuery.js";
|
|
3
|
-
import { useDeleteEventSessionMutation as n, useDeleteSpeakerMutation as r, useDeleteTicketTypeMutation as i, useEventQuery as a, useRegistrationsQuery as o,
|
|
3
|
+
import { useDeleteEventSessionMutation as n, useDeleteSpeakerMutation as r, useDeleteTicketTypeMutation as i, useEventQuery as a, useRegistrationsQuery as o, useSaveEventTemplateMutation as s, useSpeakersQuery as c, useTicketTypesQuery as l, useVenueQuery as u, useVenuesQuery as d } from "../../api/eventApi.js";
|
|
4
4
|
import "../../hooks/index.js";
|
|
5
|
-
import { ActionMenu as
|
|
6
|
-
import { CHART_COLORS as
|
|
7
|
-
import { Pagination as
|
|
8
|
-
import { useEventDelete as
|
|
9
|
-
import { useEventfullyManaged as
|
|
10
|
-
import { describeValidity as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
5
|
+
import { ActionMenu as f } from "../../components/ActionMenu.js";
|
|
6
|
+
import { CHART_COLORS as p } from "../../components/EventCharts.js";
|
|
7
|
+
import { Pagination as m, usePagination as h } from "../../components/Pagination.js";
|
|
8
|
+
import { useEventDelete as g } from "../../hooks/useEventDelete.js";
|
|
9
|
+
import { useEventfullyManaged as _ } from "../../context/EventfullyManagedContext.js";
|
|
10
|
+
import { describeValidity as v } from "../../lib/format.js";
|
|
11
|
+
import { describeError as y, mutationSucceeded as b } from "../../lib/mutationResult.js";
|
|
12
|
+
import { notify as x } from "../../lib/toast.js";
|
|
13
|
+
import { formatDateTime as S } from "./eventFormUtils.js";
|
|
14
|
+
import { registerBreadcrumbName as C, unregisterBreadcrumbName as w } from "../../utils/breadcrumbRegistry.js";
|
|
15
|
+
import { useEffect as T, useMemo as E, useState as D } from "react";
|
|
16
|
+
import { useParams as O } from "react-router";
|
|
17
|
+
import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
|
|
18
|
+
import { ArrowLeft as M, CalendarClock as N, Clock as P, Edit as F, Eye as I, LayoutTemplate as L, MapPin as R, Mic2 as z, Plus as B, Ticket as ee, Users as V, Video as H } from "lucide-react";
|
|
19
|
+
import { Badge as U, Button as W, GlassCard as G, IllustratedEmptyState as K, Input as te, Skeleton as q, Tabs as ne, TabsContent as J, TabsList as re, TabsTrigger as Y } from "@burdenoff/fe-libs/ui";
|
|
19
20
|
// src/eventfullymanaged/pages/events/EventDetailPage.tsx
|
|
20
|
-
function
|
|
21
|
+
function ie(e) {
|
|
21
22
|
let t = e.toLowerCase();
|
|
22
23
|
return [
|
|
23
24
|
"active",
|
|
@@ -39,17 +40,17 @@ function K(e) {
|
|
|
39
40
|
"scheduled"
|
|
40
41
|
].includes(t) ? "info" : "secondary";
|
|
41
42
|
}
|
|
42
|
-
function
|
|
43
|
+
function ae(e, t) {
|
|
43
44
|
let n = new Date(e).getTime(), r = new Date(t).getTime();
|
|
44
45
|
if (Number.isNaN(n) || Number.isNaN(r) || r <= n) return "";
|
|
45
46
|
let i = Math.round((r - n) / 6e4), a = Math.floor(i / 60), o = i % 60;
|
|
46
47
|
return a && o ? `${a}h ${o}m` : a ? `${a}h` : `${o}m`;
|
|
47
48
|
}
|
|
48
|
-
function
|
|
49
|
+
function oe(e) {
|
|
49
50
|
let t = e < 12 ? "AM" : "PM";
|
|
50
51
|
return `${e % 12 == 0 ? 12 : e % 12}:00 ${t}`;
|
|
51
52
|
}
|
|
52
|
-
function
|
|
53
|
+
function se(e) {
|
|
53
54
|
let t = new Date(e);
|
|
54
55
|
return Number.isNaN(t.getTime()) ? "" : t.toLocaleTimeString(void 0, {
|
|
55
56
|
hour: "numeric",
|
|
@@ -75,27 +76,27 @@ var X = e`
|
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
78
|
`, Z = "General";
|
|
78
|
-
function
|
|
79
|
+
function ce(e) {
|
|
79
80
|
let t = new Date(e);
|
|
80
81
|
return Number.isNaN(t.getTime()) ? "unknown" : t.toISOString().slice(0, 10);
|
|
81
82
|
}
|
|
82
83
|
function Q({ session: e, color: t, speakerName: n, roomName: r, onEdit: i, onDelete: a }) {
|
|
83
|
-
let o =
|
|
84
|
-
return /* @__PURE__ */
|
|
84
|
+
let o = ae(e.startsAt, e.endsAt);
|
|
85
|
+
return /* @__PURE__ */ j("div", {
|
|
85
86
|
className: "relative rounded-card border border-border-subtle p-3 shadow-elevation-1",
|
|
86
87
|
style: {
|
|
87
88
|
borderLeftWidth: "3px",
|
|
88
89
|
borderLeftColor: t,
|
|
89
90
|
background: `color-mix(in srgb, ${t} 8%, var(--color-bg-surface))`
|
|
90
91
|
},
|
|
91
|
-
children: [/* @__PURE__ */
|
|
92
|
+
children: [/* @__PURE__ */ j("div", {
|
|
92
93
|
className: "flex items-start justify-between gap-2",
|
|
93
|
-
children: [/* @__PURE__ */
|
|
94
|
+
children: [/* @__PURE__ */ A("p", {
|
|
94
95
|
className: "min-w-0 pr-1 text-sm font-semibold leading-snug text-text-primary",
|
|
95
96
|
children: e.title
|
|
96
|
-
}), /* @__PURE__ */
|
|
97
|
+
}), /* @__PURE__ */ A("div", {
|
|
97
98
|
className: "-mr-1 -mt-1 shrink-0",
|
|
98
|
-
children: /* @__PURE__ */
|
|
99
|
+
children: /* @__PURE__ */ A(f, {
|
|
99
100
|
ariaLabel: `Session actions for ${e.title}`,
|
|
100
101
|
entityName: e.title,
|
|
101
102
|
deleteLabel: "Delete session",
|
|
@@ -103,61 +104,61 @@ function Q({ session: e, color: t, speakerName: n, roomName: r, onEdit: i, onDel
|
|
|
103
104
|
onDelete: a
|
|
104
105
|
})
|
|
105
106
|
})]
|
|
106
|
-
}), /* @__PURE__ */
|
|
107
|
+
}), /* @__PURE__ */ j("dl", {
|
|
107
108
|
className: "mt-2 space-y-1 text-xs text-text-secondary",
|
|
108
109
|
children: [
|
|
109
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ j("div", {
|
|
110
111
|
className: "flex items-center gap-1.5",
|
|
111
|
-
children: [/* @__PURE__ */
|
|
112
|
+
children: [/* @__PURE__ */ A(z, { className: "h-3.5 w-3.5 shrink-0 text-text-muted" }), /* @__PURE__ */ A("span", {
|
|
112
113
|
className: "truncate",
|
|
113
114
|
children: n ?? "Speaker TBD"
|
|
114
115
|
})]
|
|
115
116
|
}),
|
|
116
|
-
r ? /* @__PURE__ */
|
|
117
|
+
r ? /* @__PURE__ */ j("div", {
|
|
117
118
|
className: "flex items-center gap-1.5",
|
|
118
|
-
children: [/* @__PURE__ */
|
|
119
|
+
children: [/* @__PURE__ */ A(R, { className: "h-3.5 w-3.5 shrink-0 text-text-muted" }), /* @__PURE__ */ A("span", {
|
|
119
120
|
className: "truncate",
|
|
120
121
|
children: r
|
|
121
122
|
})]
|
|
122
123
|
}) : null,
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ j("div", {
|
|
124
125
|
className: "flex items-center gap-1.5",
|
|
125
|
-
children: [/* @__PURE__ */
|
|
126
|
+
children: [/* @__PURE__ */ A(P, { className: "h-3.5 w-3.5 shrink-0 text-text-muted" }), /* @__PURE__ */ j("span", { children: [se(e.startsAt), o ? ` · ${o}` : ""] })]
|
|
126
127
|
})
|
|
127
128
|
]
|
|
128
129
|
})]
|
|
129
130
|
});
|
|
130
131
|
}
|
|
131
|
-
function
|
|
132
|
-
let { navigate: r } =
|
|
132
|
+
function le({ eventId: e }) {
|
|
133
|
+
let { navigate: r } = _(), i = h(), { data: a, loading: o, refetch: s } = t(X, { variables: {
|
|
133
134
|
eventId: e,
|
|
134
135
|
limit: i.limit,
|
|
135
136
|
offset: i.offset
|
|
136
|
-
} }), { data: l } =
|
|
137
|
+
} }), { data: l } = d({
|
|
137
138
|
limit: 200,
|
|
138
139
|
offset: 0
|
|
139
|
-
}), { data:
|
|
140
|
+
}), { data: u } = c({
|
|
140
141
|
limit: 200,
|
|
141
142
|
offset: 0
|
|
142
|
-
}), [
|
|
143
|
+
}), [f] = n(), g = a?.eventSessions?.total ?? 0, v = E(() => a?.eventSessions?.items ?? [], [a]), y = E(() => {
|
|
143
144
|
let e = /* @__PURE__ */ new Map();
|
|
144
145
|
for (let t of l?.venues?.items ?? []) e.set(t.id, t.name);
|
|
145
146
|
return e;
|
|
146
|
-
}, [l]),
|
|
147
|
+
}, [l]), b = E(() => {
|
|
147
148
|
let e = /* @__PURE__ */ new Map();
|
|
148
|
-
for (let t of
|
|
149
|
+
for (let t of u?.speakers?.items ?? []) e.set(t.id, t.fullName);
|
|
149
150
|
return e;
|
|
150
|
-
}, [
|
|
151
|
+
}, [u]), S = E(() => {
|
|
151
152
|
let e = /* @__PURE__ */ new Map(), t = 0;
|
|
152
|
-
for (let n of
|
|
153
|
+
for (let n of v) {
|
|
153
154
|
let r = n.track?.trim() || Z;
|
|
154
|
-
e.has(r) || (e.set(r,
|
|
155
|
+
e.has(r) || (e.set(r, p[t % p.length]), t += 1);
|
|
155
156
|
}
|
|
156
157
|
return e;
|
|
157
|
-
}, [
|
|
158
|
+
}, [v]), C = E(() => {
|
|
158
159
|
let e = /* @__PURE__ */ new Map();
|
|
159
|
-
for (let t of [...
|
|
160
|
-
let n =
|
|
160
|
+
for (let t of [...v].sort((e, t) => new Date(e.startsAt).getTime() - new Date(t.startsAt).getTime())) {
|
|
161
|
+
let n = ce(t.startsAt), r = e.get(n) ?? [];
|
|
161
162
|
r.push(t), e.set(n, r);
|
|
162
163
|
}
|
|
163
164
|
return Array.from(e.entries()).map(([e, t]) => {
|
|
@@ -170,50 +171,50 @@ function ie({ eventId: e }) {
|
|
|
170
171
|
hourRange: o
|
|
171
172
|
};
|
|
172
173
|
});
|
|
173
|
-
}, [
|
|
174
|
-
let t = await
|
|
175
|
-
if (t.error) throw
|
|
176
|
-
if (!t.data?.deleteEventSession) throw
|
|
177
|
-
|
|
178
|
-
},
|
|
174
|
+
}, [v]), w = async (e) => {
|
|
175
|
+
let t = await f({ variables: { id: e.id } });
|
|
176
|
+
if (t.error) throw x.error("Could not delete session", t.error.message), t.error;
|
|
177
|
+
if (!t.data?.deleteEventSession) throw x.error("Could not delete session", "The server did not confirm the change."), Error("delete-unconfirmed");
|
|
178
|
+
x.success("Session deleted", e.title), await s();
|
|
179
|
+
}, T = (e) => {
|
|
179
180
|
let t = e.metadata ?? {}, n = typeof t.speakerId == "string" ? t.speakerId : "";
|
|
180
|
-
return n ?
|
|
181
|
-
},
|
|
182
|
-
return /* @__PURE__ */
|
|
181
|
+
return n ? b.get(n) : void 0;
|
|
182
|
+
}, D = (e) => e.venueId ? y.get(e.venueId) : void 0;
|
|
183
|
+
return /* @__PURE__ */ j("div", {
|
|
183
184
|
className: "space-y-5",
|
|
184
185
|
children: [
|
|
185
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ j("div", {
|
|
186
187
|
className: "flex items-center justify-between gap-3",
|
|
187
|
-
children: [/* @__PURE__ */
|
|
188
|
+
children: [/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("h2", {
|
|
188
189
|
className: "text-lg font-semibold text-text-primary",
|
|
189
190
|
children: "Agenda & Sessions"
|
|
190
|
-
}), /* @__PURE__ */
|
|
191
|
+
}), /* @__PURE__ */ A("p", {
|
|
191
192
|
className: "text-sm text-text-secondary",
|
|
192
193
|
children: "A multi-track schedule of everything happening on the day."
|
|
193
|
-
})] }), /* @__PURE__ */
|
|
194
|
+
})] }), /* @__PURE__ */ j(W, {
|
|
194
195
|
type: "button",
|
|
195
196
|
size: "sm",
|
|
196
197
|
onClick: () => r(`/events/${e}/sessions/create`),
|
|
197
|
-
children: [/* @__PURE__ */
|
|
198
|
+
children: [/* @__PURE__ */ A(B, { className: "h-4 w-4" }), "New Session"]
|
|
198
199
|
})]
|
|
199
200
|
}),
|
|
200
|
-
o ? /* @__PURE__ */
|
|
201
|
+
o ? /* @__PURE__ */ A(q, { className: "h-64 w-full rounded-card" }) : v.length === 0 ? /* @__PURE__ */ A(K, {
|
|
201
202
|
illustration: "empty-data",
|
|
202
203
|
title: "No sessions yet.",
|
|
203
204
|
description: "Build the agenda by adding your first session.",
|
|
204
|
-
action: /* @__PURE__ */
|
|
205
|
+
action: /* @__PURE__ */ j(W, {
|
|
205
206
|
type: "button",
|
|
206
207
|
size: "sm",
|
|
207
208
|
onClick: () => r(`/events/${e}/sessions/create`),
|
|
208
|
-
children: [/* @__PURE__ */
|
|
209
|
+
children: [/* @__PURE__ */ A(B, { className: "h-4 w-4" }), "New Session"]
|
|
209
210
|
}),
|
|
210
211
|
className: "py-10"
|
|
211
|
-
}) : /* @__PURE__ */
|
|
212
|
+
}) : /* @__PURE__ */ A("div", {
|
|
212
213
|
className: "space-y-8",
|
|
213
|
-
children:
|
|
214
|
+
children: C.map((t) => /* @__PURE__ */ j("section", {
|
|
214
215
|
className: "space-y-3",
|
|
215
216
|
children: [
|
|
216
|
-
/* @__PURE__ */
|
|
217
|
+
/* @__PURE__ */ A("h3", {
|
|
217
218
|
className: "text-sm font-semibold text-text-primary",
|
|
218
219
|
children: (/* @__PURE__ */ new Date(`${t.key}T00:00:00`)).toLocaleDateString(void 0, {
|
|
219
220
|
weekday: "long",
|
|
@@ -221,40 +222,40 @@ function ie({ eventId: e }) {
|
|
|
221
222
|
day: "numeric"
|
|
222
223
|
})
|
|
223
224
|
}),
|
|
224
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ A("div", {
|
|
225
226
|
className: "hidden overflow-x-auto rounded-card border border-border-seam md:block",
|
|
226
|
-
children: /* @__PURE__ */
|
|
227
|
+
children: /* @__PURE__ */ j("div", {
|
|
227
228
|
className: "grid min-w-max",
|
|
228
229
|
style: { gridTemplateColumns: `88px repeat(${t.tracks.length}, minmax(200px, 1fr))` },
|
|
229
230
|
children: [
|
|
230
|
-
/* @__PURE__ */
|
|
231
|
-
t.tracks.map((e) => /* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ A("div", { className: "sticky left-0 z-10 border-b border-border-seam bg-bg-sunken px-3 py-2.5" }),
|
|
232
|
+
t.tracks.map((e) => /* @__PURE__ */ A("div", {
|
|
232
233
|
className: "border-b border-l border-border-seam bg-bg-sunken px-3 py-2.5 text-center text-sm font-semibold text-text-primary",
|
|
233
|
-
children: /* @__PURE__ */
|
|
234
|
+
children: /* @__PURE__ */ j("span", {
|
|
234
235
|
className: "inline-flex items-center gap-2",
|
|
235
|
-
children: [/* @__PURE__ */
|
|
236
|
+
children: [/* @__PURE__ */ A("span", {
|
|
236
237
|
className: "h-2 w-2 rounded-full",
|
|
237
238
|
style: { background: S.get(e) },
|
|
238
239
|
"aria-hidden": "true"
|
|
239
240
|
}), e]
|
|
240
241
|
})
|
|
241
242
|
}, e)),
|
|
242
|
-
t.hourRange.map((n) => /* @__PURE__ */
|
|
243
|
+
t.hourRange.map((n) => /* @__PURE__ */ j("div", {
|
|
243
244
|
className: "contents",
|
|
244
|
-
children: [/* @__PURE__ */
|
|
245
|
+
children: [/* @__PURE__ */ A("div", {
|
|
245
246
|
className: "sticky left-0 z-10 border-b border-border-subtle bg-bg-surface px-3 py-3 text-xs font-medium text-text-muted",
|
|
246
|
-
children:
|
|
247
|
+
children: oe(n)
|
|
247
248
|
}), t.tracks.map((i) => {
|
|
248
249
|
let a = t.sessions.filter((e) => (e.track?.trim() || Z) === i && new Date(e.startsAt).getHours() === n);
|
|
249
|
-
return /* @__PURE__ */
|
|
250
|
+
return /* @__PURE__ */ A("div", {
|
|
250
251
|
className: "space-y-2 border-b border-l border-border-subtle p-2 align-top",
|
|
251
|
-
children: a.map((t) => /* @__PURE__ */
|
|
252
|
+
children: a.map((t) => /* @__PURE__ */ A(Q, {
|
|
252
253
|
session: t,
|
|
253
|
-
color: S.get(i) ??
|
|
254
|
-
speakerName:
|
|
255
|
-
roomName:
|
|
254
|
+
color: S.get(i) ?? p[0],
|
|
255
|
+
speakerName: T(t),
|
|
256
|
+
roomName: D(t),
|
|
256
257
|
onEdit: () => r(`/events/${e}/sessions/${t.id}/edit`),
|
|
257
|
-
onDelete: () =>
|
|
258
|
+
onDelete: () => w(t)
|
|
258
259
|
}, t.id))
|
|
259
260
|
}, `${n}-${i}`);
|
|
260
261
|
})]
|
|
@@ -262,28 +263,28 @@ function ie({ eventId: e }) {
|
|
|
262
263
|
]
|
|
263
264
|
})
|
|
264
265
|
}),
|
|
265
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ A("ul", {
|
|
266
267
|
className: "space-y-2.5 md:hidden",
|
|
267
268
|
children: t.sessions.map((t) => {
|
|
268
269
|
let n = t.track?.trim() || Z;
|
|
269
|
-
return /* @__PURE__ */
|
|
270
|
+
return /* @__PURE__ */ A("li", { children: /* @__PURE__ */ A(Q, {
|
|
270
271
|
session: t,
|
|
271
|
-
color: S.get(n) ??
|
|
272
|
-
speakerName:
|
|
273
|
-
roomName:
|
|
272
|
+
color: S.get(n) ?? p[0],
|
|
273
|
+
speakerName: T(t),
|
|
274
|
+
roomName: D(t) ?? n,
|
|
274
275
|
onEdit: () => r(`/events/${e}/sessions/${t.id}/edit`),
|
|
275
|
-
onDelete: () =>
|
|
276
|
+
onDelete: () => w(t)
|
|
276
277
|
}) }, t.id);
|
|
277
278
|
})
|
|
278
279
|
})
|
|
279
280
|
]
|
|
280
281
|
}, t.key))
|
|
281
282
|
}),
|
|
282
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ A(m, {
|
|
283
284
|
offset: i.offset,
|
|
284
285
|
limit: i.limit,
|
|
285
|
-
loadedCount:
|
|
286
|
-
total:
|
|
286
|
+
loadedCount: v.length,
|
|
287
|
+
total: g,
|
|
287
288
|
onPrev: i.prevPage,
|
|
288
289
|
onNext: i.nextPage,
|
|
289
290
|
itemLabel: "sessions",
|
|
@@ -292,67 +293,67 @@ function ie({ eventId: e }) {
|
|
|
292
293
|
]
|
|
293
294
|
});
|
|
294
295
|
}
|
|
295
|
-
function
|
|
296
|
-
let { navigate: e } =
|
|
296
|
+
function ue() {
|
|
297
|
+
let { navigate: e } = _(), t = h(), { data: n, loading: i, refetch: a } = c({
|
|
297
298
|
limit: t.limit,
|
|
298
299
|
offset: t.offset
|
|
299
|
-
}), [o] = r(),
|
|
300
|
+
}), [o] = r(), s = n?.speakers?.total ?? 0, l = n?.speakers?.items ?? [], u = async (e) => {
|
|
300
301
|
let t = await o({ variables: { id: e.id } });
|
|
301
|
-
if (t.error) throw
|
|
302
|
-
if (!t.data?.deleteSpeaker) throw
|
|
303
|
-
|
|
302
|
+
if (t.error) throw x.error("Could not delete speaker", t.error.message), t.error;
|
|
303
|
+
if (!t.data?.deleteSpeaker) throw x.error("Could not delete speaker", "The server did not confirm the change."), Error("delete-unconfirmed");
|
|
304
|
+
x.success("Speaker deleted", e.fullName), await a();
|
|
304
305
|
};
|
|
305
|
-
return /* @__PURE__ */
|
|
306
|
+
return /* @__PURE__ */ j("div", {
|
|
306
307
|
className: "space-y-4",
|
|
307
308
|
children: [
|
|
308
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ j("div", {
|
|
309
310
|
className: "flex items-center justify-between gap-3",
|
|
310
|
-
children: [/* @__PURE__ */
|
|
311
|
+
children: [/* @__PURE__ */ A("h2", {
|
|
311
312
|
className: "text-lg font-semibold text-text-primary",
|
|
312
313
|
children: "Speakers"
|
|
313
|
-
}), /* @__PURE__ */
|
|
314
|
+
}), /* @__PURE__ */ j("div", {
|
|
314
315
|
className: "flex items-center gap-2",
|
|
315
|
-
children: [/* @__PURE__ */
|
|
316
|
+
children: [/* @__PURE__ */ A(W, {
|
|
316
317
|
type: "button",
|
|
317
318
|
variant: "outline",
|
|
318
319
|
size: "sm",
|
|
319
320
|
onClick: () => e("/speakers"),
|
|
320
321
|
children: "Manage speakers"
|
|
321
|
-
}), /* @__PURE__ */
|
|
322
|
+
}), /* @__PURE__ */ j(W, {
|
|
322
323
|
type: "button",
|
|
323
324
|
size: "sm",
|
|
324
325
|
onClick: () => e("/speakers/create"),
|
|
325
|
-
children: [/* @__PURE__ */
|
|
326
|
+
children: [/* @__PURE__ */ A(B, { className: "h-4 w-4" }), "New Speaker"]
|
|
326
327
|
})]
|
|
327
328
|
})]
|
|
328
329
|
}),
|
|
329
|
-
i ? /* @__PURE__ */
|
|
330
|
+
i ? /* @__PURE__ */ A(q, { className: "h-40 w-full rounded-card" }) : l.length === 0 ? /* @__PURE__ */ A(K, {
|
|
330
331
|
illustration: "empty-people",
|
|
331
332
|
title: "No speakers yet.",
|
|
332
333
|
description: "Add speakers so you can assign them to sessions.",
|
|
333
334
|
className: "py-8"
|
|
334
|
-
}) : /* @__PURE__ */
|
|
335
|
+
}) : /* @__PURE__ */ A("ul", {
|
|
335
336
|
className: "grid grid-cols-1 gap-2.5 sm:grid-cols-2",
|
|
336
|
-
children: l.map((t) => /* @__PURE__ */
|
|
337
|
+
children: l.map((t) => /* @__PURE__ */ A("li", {
|
|
337
338
|
className: "rounded-card border border-border-seam bg-bg-surface p-3 transition-[box-shadow,border-color] duration-200 hover:border-border-strong hover:shadow-elevation-1",
|
|
338
|
-
children: /* @__PURE__ */
|
|
339
|
+
children: /* @__PURE__ */ j("div", {
|
|
339
340
|
className: "flex items-center justify-between gap-3",
|
|
340
|
-
children: [/* @__PURE__ */
|
|
341
|
+
children: [/* @__PURE__ */ j("div", {
|
|
341
342
|
className: "flex min-w-0 items-center gap-3",
|
|
342
|
-
children: [/* @__PURE__ */
|
|
343
|
+
children: [/* @__PURE__ */ A("span", {
|
|
343
344
|
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-accent-wash text-sm font-semibold text-action-primary-bg",
|
|
344
345
|
children: t.fullName.slice(0, 1).toUpperCase()
|
|
345
|
-
}), /* @__PURE__ */
|
|
346
|
+
}), /* @__PURE__ */ j("div", {
|
|
346
347
|
className: "min-w-0",
|
|
347
|
-
children: [/* @__PURE__ */
|
|
348
|
+
children: [/* @__PURE__ */ A("p", {
|
|
348
349
|
className: "truncate font-medium text-text-primary",
|
|
349
350
|
children: t.fullName
|
|
350
|
-
}), /* @__PURE__ */
|
|
351
|
+
}), /* @__PURE__ */ A("p", {
|
|
351
352
|
className: "mt-0.5 truncate text-sm text-text-secondary",
|
|
352
353
|
children: [t.title, t.organization].filter(Boolean).join(" • ") || "Speaker"
|
|
353
354
|
})]
|
|
354
355
|
})]
|
|
355
|
-
}), /* @__PURE__ */
|
|
356
|
+
}), /* @__PURE__ */ A(f, {
|
|
356
357
|
ariaLabel: `Speaker actions for ${t.fullName}`,
|
|
357
358
|
entityName: t.fullName,
|
|
358
359
|
deleteLabel: "Delete speaker",
|
|
@@ -362,11 +363,11 @@ function ae() {
|
|
|
362
363
|
})
|
|
363
364
|
}, t.id))
|
|
364
365
|
}),
|
|
365
|
-
/* @__PURE__ */
|
|
366
|
+
/* @__PURE__ */ A(m, {
|
|
366
367
|
offset: t.offset,
|
|
367
368
|
limit: t.limit,
|
|
368
369
|
loadedCount: l.length,
|
|
369
|
-
total:
|
|
370
|
+
total: s,
|
|
370
371
|
onPrev: t.prevPage,
|
|
371
372
|
onNext: t.nextPage,
|
|
372
373
|
itemLabel: "speakers",
|
|
@@ -375,53 +376,53 @@ function ae() {
|
|
|
375
376
|
]
|
|
376
377
|
});
|
|
377
378
|
}
|
|
378
|
-
function
|
|
379
|
-
let { navigate: t } =
|
|
379
|
+
function de({ eventId: e }) {
|
|
380
|
+
let { navigate: t } = _(), n = h(), { data: r, loading: a, refetch: o } = l({
|
|
380
381
|
eventId: e,
|
|
381
382
|
limit: n.limit,
|
|
382
383
|
offset: n.offset
|
|
383
|
-
}), [s] = i(),
|
|
384
|
+
}), [s] = i(), c = r?.ticketTypes?.total ?? 0, u = r?.ticketTypes?.items ?? [], d = async (e) => {
|
|
384
385
|
let t = await s({ variables: { id: e.id } });
|
|
385
|
-
if (t.error) throw
|
|
386
|
-
if (!t.data?.deleteTicketType) throw
|
|
387
|
-
|
|
386
|
+
if (t.error) throw x.error("Could not delete ticket type", t.error.message), t.error;
|
|
387
|
+
if (!t.data?.deleteTicketType) throw x.error("Could not delete ticket type", "The server did not confirm the change."), Error("delete-unconfirmed");
|
|
388
|
+
x.success("Ticket type deleted"), await o();
|
|
388
389
|
};
|
|
389
|
-
return /* @__PURE__ */
|
|
390
|
+
return /* @__PURE__ */ j("div", {
|
|
390
391
|
className: "space-y-4",
|
|
391
392
|
children: [
|
|
392
|
-
/* @__PURE__ */
|
|
393
|
+
/* @__PURE__ */ j("div", {
|
|
393
394
|
className: "flex items-center justify-between gap-3",
|
|
394
|
-
children: [/* @__PURE__ */
|
|
395
|
+
children: [/* @__PURE__ */ A("h2", {
|
|
395
396
|
className: "text-lg font-semibold text-text-primary",
|
|
396
397
|
children: "Ticket Types"
|
|
397
|
-
}), /* @__PURE__ */
|
|
398
|
+
}), /* @__PURE__ */ j(W, {
|
|
398
399
|
type: "button",
|
|
399
400
|
size: "sm",
|
|
400
401
|
onClick: () => t(`/events/${e}/tickets/create`),
|
|
401
|
-
children: [/* @__PURE__ */
|
|
402
|
+
children: [/* @__PURE__ */ A(B, { className: "h-4 w-4" }), "New Ticket Type"]
|
|
402
403
|
})]
|
|
403
404
|
}),
|
|
404
|
-
a ? /* @__PURE__ */
|
|
405
|
+
a ? /* @__PURE__ */ A(q, { className: "h-40 w-full rounded-card" }) : u.length === 0 ? /* @__PURE__ */ A(K, {
|
|
405
406
|
illustration: "empty-data",
|
|
406
407
|
title: "No ticket types yet.",
|
|
407
408
|
description: "Add a ticket type so attendees can register.",
|
|
408
409
|
className: "py-8"
|
|
409
|
-
}) : /* @__PURE__ */
|
|
410
|
+
}) : /* @__PURE__ */ A("ul", {
|
|
410
411
|
className: "space-y-3",
|
|
411
412
|
children: u.map((n) => {
|
|
412
413
|
let r = n.capacity != null, i = n.capacity, a = r ? i === 0 ? 100 : Math.min(100, Math.round(n.soldCount / i * 100)) : 0, o = a >= 90;
|
|
413
|
-
return /* @__PURE__ */
|
|
414
|
+
return /* @__PURE__ */ j("li", {
|
|
414
415
|
className: "rounded-card border border-border-seam bg-bg-surface p-4 transition-[box-shadow,border-color] duration-200 hover:border-border-strong hover:shadow-elevation-1",
|
|
415
|
-
children: [/* @__PURE__ */
|
|
416
|
+
children: [/* @__PURE__ */ j("div", {
|
|
416
417
|
className: "flex items-start justify-between gap-3",
|
|
417
|
-
children: [/* @__PURE__ */
|
|
418
|
+
children: [/* @__PURE__ */ j("div", {
|
|
418
419
|
className: "min-w-0",
|
|
419
420
|
children: [
|
|
420
|
-
/* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ A("p", {
|
|
421
422
|
className: "truncate font-medium text-text-primary",
|
|
422
423
|
children: n.name
|
|
423
424
|
}),
|
|
424
|
-
/* @__PURE__ */
|
|
425
|
+
/* @__PURE__ */ j("p", {
|
|
425
426
|
className: "mt-0.5 text-sm text-text-secondary",
|
|
426
427
|
children: [
|
|
427
428
|
n.price,
|
|
@@ -429,59 +430,59 @@ function oe({ eventId: e }) {
|
|
|
429
430
|
n.currency
|
|
430
431
|
]
|
|
431
432
|
}),
|
|
432
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ j("p", {
|
|
433
434
|
className: "mt-1 flex items-center gap-1.5 text-xs text-text-muted",
|
|
434
|
-
children: [/* @__PURE__ */
|
|
435
|
+
children: [/* @__PURE__ */ A(N, {
|
|
435
436
|
className: "h-3.5 w-3.5 shrink-0",
|
|
436
437
|
"aria-hidden": "true"
|
|
437
|
-
}), /* @__PURE__ */
|
|
438
|
+
}), /* @__PURE__ */ j("span", {
|
|
438
439
|
className: "truncate",
|
|
439
|
-
children: ["Sales window · ",
|
|
440
|
+
children: ["Sales window · ", v(n.salesStartAt ?? "", n.salesEndAt ?? "")]
|
|
440
441
|
})]
|
|
441
442
|
})
|
|
442
443
|
]
|
|
443
|
-
}), /* @__PURE__ */
|
|
444
|
+
}), /* @__PURE__ */ j("div", {
|
|
444
445
|
className: "flex shrink-0 items-center gap-2",
|
|
445
|
-
children: [/* @__PURE__ */
|
|
446
|
+
children: [/* @__PURE__ */ A(U, {
|
|
446
447
|
variant: n.isActive ? "success" : "warning",
|
|
447
448
|
className: "uppercase",
|
|
448
449
|
children: n.isActive ? "Active" : "Inactive"
|
|
449
|
-
}), /* @__PURE__ */
|
|
450
|
+
}), /* @__PURE__ */ A(f, {
|
|
450
451
|
ariaLabel: `Ticket actions for ${n.name}`,
|
|
451
452
|
entityName: n.name,
|
|
452
453
|
deleteLabel: "Delete ticket type",
|
|
453
454
|
onEdit: () => t(`/events/${e}/tickets/${n.id}/edit`),
|
|
454
|
-
onDelete: () =>
|
|
455
|
+
onDelete: () => d(n)
|
|
455
456
|
})]
|
|
456
457
|
})]
|
|
457
|
-
}), /* @__PURE__ */
|
|
458
|
+
}), /* @__PURE__ */ j("div", {
|
|
458
459
|
className: "mt-3",
|
|
459
|
-
children: [/* @__PURE__ */
|
|
460
|
+
children: [/* @__PURE__ */ j("div", {
|
|
460
461
|
className: "flex items-center justify-between text-xs text-text-secondary",
|
|
461
|
-
children: [/* @__PURE__ */
|
|
462
|
-
/* @__PURE__ */
|
|
462
|
+
children: [/* @__PURE__ */ j("span", { children: [
|
|
463
|
+
/* @__PURE__ */ A("span", {
|
|
463
464
|
className: "font-medium tabular-nums text-text-primary",
|
|
464
465
|
children: n.soldCount.toLocaleString()
|
|
465
466
|
}),
|
|
466
467
|
" ",
|
|
467
468
|
"sold",
|
|
468
|
-
r ? /* @__PURE__ */
|
|
469
|
+
r ? /* @__PURE__ */ j(k, { children: [
|
|
469
470
|
" / ",
|
|
470
471
|
n.capacity.toLocaleString(),
|
|
471
472
|
" capacity"
|
|
472
473
|
] }) : " • unlimited capacity"
|
|
473
|
-
] }), r ? /* @__PURE__ */
|
|
474
|
+
] }), r ? /* @__PURE__ */ j("span", {
|
|
474
475
|
className: o ? "font-medium text-text-primary" : "",
|
|
475
476
|
children: [a, "%"]
|
|
476
477
|
}) : null]
|
|
477
|
-
}), r ? /* @__PURE__ */
|
|
478
|
+
}), r ? /* @__PURE__ */ A("div", {
|
|
478
479
|
className: "mt-1.5 h-2 overflow-hidden rounded-full bg-bg-sunken",
|
|
479
480
|
role: "progressbar",
|
|
480
481
|
"aria-valuenow": a,
|
|
481
482
|
"aria-valuemin": 0,
|
|
482
483
|
"aria-valuemax": 100,
|
|
483
484
|
"aria-label": `${n.name} sold`,
|
|
484
|
-
children: /* @__PURE__ */
|
|
485
|
+
children: /* @__PURE__ */ A("div", {
|
|
485
486
|
className: "h-full rounded-full transition-[width] duration-500",
|
|
486
487
|
style: {
|
|
487
488
|
width: `${a}%`,
|
|
@@ -493,11 +494,11 @@ function oe({ eventId: e }) {
|
|
|
493
494
|
}, n.id);
|
|
494
495
|
})
|
|
495
496
|
}),
|
|
496
|
-
/* @__PURE__ */
|
|
497
|
+
/* @__PURE__ */ A(m, {
|
|
497
498
|
offset: n.offset,
|
|
498
499
|
limit: n.limit,
|
|
499
500
|
loadedCount: u.length,
|
|
500
|
-
total:
|
|
501
|
+
total: c,
|
|
501
502
|
onPrev: n.prevPage,
|
|
502
503
|
onNext: n.nextPage,
|
|
503
504
|
itemLabel: "ticket types",
|
|
@@ -507,353 +508,403 @@ function oe({ eventId: e }) {
|
|
|
507
508
|
});
|
|
508
509
|
}
|
|
509
510
|
function $({ label: e, value: t, icon: n }) {
|
|
510
|
-
return /* @__PURE__ */
|
|
511
|
+
return /* @__PURE__ */ j(G, {
|
|
511
512
|
treatment: "metric",
|
|
512
513
|
className: "p-4",
|
|
513
514
|
children: [
|
|
514
|
-
/* @__PURE__ */
|
|
515
|
+
/* @__PURE__ */ A("span", {
|
|
515
516
|
className: "flex h-8 w-8 items-center justify-center rounded-button bg-accent-wash text-action-primary-bg",
|
|
516
|
-
children: /* @__PURE__ */
|
|
517
|
+
children: /* @__PURE__ */ A(n, { className: "h-4 w-4" })
|
|
517
518
|
}),
|
|
518
|
-
/* @__PURE__ */
|
|
519
|
+
/* @__PURE__ */ A("div", {
|
|
519
520
|
className: "mt-2.5 text-xl font-semibold tabular-nums text-text-primary",
|
|
520
521
|
children: t
|
|
521
522
|
}),
|
|
522
|
-
/* @__PURE__ */
|
|
523
|
+
/* @__PURE__ */ A("div", {
|
|
523
524
|
className: "mt-0.5 text-xs text-text-muted",
|
|
524
525
|
children: e
|
|
525
526
|
})
|
|
526
527
|
]
|
|
527
528
|
});
|
|
528
529
|
}
|
|
529
|
-
function
|
|
530
|
-
let
|
|
530
|
+
function fe({ eventId: e, eventName: t }) {
|
|
531
|
+
let [n, r] = D(!1), [i, a] = D(""), [o, { loading: c }] = s(), l = async () => {
|
|
532
|
+
let n = i.trim() || `${t} template`, s = "Could not save the template";
|
|
533
|
+
try {
|
|
534
|
+
let i = await o({ variables: { input: {
|
|
535
|
+
eventId: e,
|
|
536
|
+
name: n,
|
|
537
|
+
description: `Saved from “${t}”`
|
|
538
|
+
} } });
|
|
539
|
+
if (!b(i, i.data?.saveEventTemplate?.id, s)) return;
|
|
540
|
+
x.success(`Template “${n}” saved — find it on the Events page`), r(!1), a("");
|
|
541
|
+
} catch (e) {
|
|
542
|
+
x.error(s, y(e));
|
|
543
|
+
}
|
|
544
|
+
};
|
|
545
|
+
return n ? /* @__PURE__ */ j("div", {
|
|
546
|
+
className: "flex flex-wrap items-center gap-2",
|
|
547
|
+
children: [
|
|
548
|
+
/* @__PURE__ */ A(te, {
|
|
549
|
+
value: i,
|
|
550
|
+
onChange: (e) => a(e.target.value),
|
|
551
|
+
placeholder: `${t} template`,
|
|
552
|
+
"aria-label": "Template name",
|
|
553
|
+
className: "w-56"
|
|
554
|
+
}),
|
|
555
|
+
/* @__PURE__ */ A(W, {
|
|
556
|
+
type: "button",
|
|
557
|
+
onClick: () => void l(),
|
|
558
|
+
disabled: c,
|
|
559
|
+
children: c ? "Saving…" : "Save template"
|
|
560
|
+
}),
|
|
561
|
+
/* @__PURE__ */ A(W, {
|
|
562
|
+
type: "button",
|
|
563
|
+
variant: "ghost",
|
|
564
|
+
size: "sm",
|
|
565
|
+
onClick: () => r(!1),
|
|
566
|
+
children: "Cancel"
|
|
567
|
+
})
|
|
568
|
+
]
|
|
569
|
+
}) : /* @__PURE__ */ j(W, {
|
|
570
|
+
type: "button",
|
|
571
|
+
variant: "outline",
|
|
572
|
+
onClick: () => r(!0),
|
|
573
|
+
children: [/* @__PURE__ */ A(L, { className: "h-4 w-4" }), "Save as template"]
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
function pe() {
|
|
577
|
+
let { id: e = "" } = O(), { navigate: n } = _(), { data: r, loading: i } = a(e), { data: s } = t(X, {
|
|
531
578
|
variables: {
|
|
532
579
|
eventId: e,
|
|
533
580
|
limit: 200
|
|
534
581
|
},
|
|
535
582
|
skip: !e
|
|
536
|
-
}), { data:
|
|
583
|
+
}), { data: c } = l({
|
|
537
584
|
eventId: e,
|
|
538
585
|
limit: 100,
|
|
539
586
|
offset: 0
|
|
540
|
-
}), { data:
|
|
587
|
+
}), { data: d } = o({
|
|
541
588
|
eventId: e,
|
|
542
589
|
limit: 1,
|
|
543
590
|
offset: 0
|
|
544
|
-
}), { onDeleteEvent: p } =
|
|
591
|
+
}), { onDeleteEvent: p } = g(), [m, h] = D("overview"), v = async () => {
|
|
545
592
|
await p(e, { onSuccess: () => n("/events") });
|
|
546
|
-
},
|
|
547
|
-
|
|
548
|
-
let
|
|
549
|
-
let e =
|
|
593
|
+
}, y = r?.event ?? null;
|
|
594
|
+
T(() => (C(e, y?.name), () => w(e)), [e, y?.name]);
|
|
595
|
+
let b = E(() => {
|
|
596
|
+
let e = y?.metadata ?? {};
|
|
550
597
|
return typeof e.venueId == "string" ? e.venueId : "";
|
|
551
|
-
}, [
|
|
552
|
-
return i ? /* @__PURE__ */
|
|
598
|
+
}, [y]), { data: x } = u(b), k = x?.venue?.name ?? void 0, P = s?.eventSessions?.total ?? 0, L = d?.registrations?.total ?? 0, z = E(() => (c?.ticketTypes?.items ?? []).reduce((e, t) => e + (t.soldCount ?? 0), 0), [c]);
|
|
599
|
+
return i ? /* @__PURE__ */ j("div", {
|
|
553
600
|
className: "space-y-4 p-6",
|
|
554
601
|
children: [
|
|
555
|
-
/* @__PURE__ */
|
|
556
|
-
/* @__PURE__ */
|
|
557
|
-
/* @__PURE__ */
|
|
602
|
+
/* @__PURE__ */ A(q, { className: "h-8 w-40" }),
|
|
603
|
+
/* @__PURE__ */ A(q, { className: "h-24 w-full rounded-card" }),
|
|
604
|
+
/* @__PURE__ */ A(q, { className: "h-64 w-full rounded-card" })
|
|
558
605
|
]
|
|
559
|
-
}) :
|
|
606
|
+
}) : y ? /* @__PURE__ */ j("div", {
|
|
560
607
|
className: "space-y-6 p-6",
|
|
561
608
|
children: [
|
|
562
|
-
/* @__PURE__ */
|
|
609
|
+
/* @__PURE__ */ j("div", {
|
|
563
610
|
className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
|
|
564
|
-
children: [/* @__PURE__ */
|
|
611
|
+
children: [/* @__PURE__ */ j("div", {
|
|
565
612
|
className: "space-y-3",
|
|
566
|
-
children: [/* @__PURE__ */
|
|
613
|
+
children: [/* @__PURE__ */ j(W, {
|
|
567
614
|
type: "button",
|
|
568
615
|
variant: "ghost",
|
|
569
616
|
size: "sm",
|
|
570
617
|
onClick: () => n("/events"),
|
|
571
|
-
children: [/* @__PURE__ */
|
|
572
|
-
}), /* @__PURE__ */
|
|
618
|
+
children: [/* @__PURE__ */ A(M, { className: "h-4 w-4" }), "Back to Events"]
|
|
619
|
+
}), /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ j("div", {
|
|
573
620
|
className: "flex flex-wrap items-center gap-3",
|
|
574
|
-
children: [/* @__PURE__ */
|
|
621
|
+
children: [/* @__PURE__ */ A("h1", {
|
|
575
622
|
className: "text-2xl font-bold text-text-primary",
|
|
576
|
-
children:
|
|
577
|
-
}), /* @__PURE__ */
|
|
578
|
-
variant:
|
|
623
|
+
children: y.name
|
|
624
|
+
}), /* @__PURE__ */ A(U, {
|
|
625
|
+
variant: ie(y.status),
|
|
579
626
|
className: "uppercase",
|
|
580
|
-
children:
|
|
627
|
+
children: y.status
|
|
581
628
|
})]
|
|
582
|
-
}), /* @__PURE__ */
|
|
629
|
+
}), /* @__PURE__ */ j("p", {
|
|
583
630
|
className: "mt-1 flex flex-wrap items-center gap-x-4 gap-y-1 text-sm text-text-secondary",
|
|
584
|
-
children: [/* @__PURE__ */
|
|
631
|
+
children: [/* @__PURE__ */ j("span", {
|
|
585
632
|
className: "flex items-center gap-1.5",
|
|
586
633
|
children: [
|
|
587
|
-
/* @__PURE__ */
|
|
588
|
-
y
|
|
634
|
+
/* @__PURE__ */ A(N, { className: "h-4 w-4 text-text-muted" }),
|
|
635
|
+
S(y.startAt),
|
|
589
636
|
" — ",
|
|
590
|
-
y
|
|
637
|
+
S(y.endAt)
|
|
591
638
|
]
|
|
592
|
-
}),
|
|
639
|
+
}), k ? /* @__PURE__ */ j("span", {
|
|
593
640
|
className: "flex items-center gap-1.5",
|
|
594
|
-
children: [/* @__PURE__ */
|
|
641
|
+
children: [/* @__PURE__ */ A(R, { className: "h-4 w-4 text-text-muted" }), k]
|
|
595
642
|
}) : null]
|
|
596
643
|
})] })]
|
|
597
|
-
}), /* @__PURE__ */
|
|
644
|
+
}), /* @__PURE__ */ j("div", {
|
|
598
645
|
className: "flex flex-wrap gap-2",
|
|
599
646
|
children: [
|
|
600
|
-
|
|
647
|
+
y.type === "VIRTUAL" || y.type === "HYBRID" ? /* @__PURE__ */ j(W, {
|
|
601
648
|
type: "button",
|
|
602
649
|
variant: "outline",
|
|
603
650
|
onClick: () => n(`/events/${e}/virtual`),
|
|
604
|
-
children: [/* @__PURE__ */
|
|
651
|
+
children: [/* @__PURE__ */ A(H, { className: "h-4 w-4" }), "Virtual Session"]
|
|
605
652
|
}) : null,
|
|
606
|
-
/* @__PURE__ */
|
|
653
|
+
/* @__PURE__ */ A(fe, {
|
|
654
|
+
eventId: e,
|
|
655
|
+
eventName: y.name
|
|
656
|
+
}),
|
|
657
|
+
/* @__PURE__ */ j(W, {
|
|
607
658
|
type: "button",
|
|
608
659
|
onClick: () => n(`/events/${e}/edit`),
|
|
609
|
-
children: [/* @__PURE__ */
|
|
660
|
+
children: [/* @__PURE__ */ A(F, { className: "h-4 w-4" }), "Edit Event"]
|
|
610
661
|
}),
|
|
611
|
-
/* @__PURE__ */
|
|
662
|
+
/* @__PURE__ */ A(f, {
|
|
612
663
|
ariaLabel: "Event actions",
|
|
613
|
-
entityName:
|
|
664
|
+
entityName: y.name,
|
|
614
665
|
deleteLabel: "Delete event",
|
|
615
666
|
onDelete: v
|
|
616
667
|
})
|
|
617
668
|
]
|
|
618
669
|
})]
|
|
619
670
|
}),
|
|
620
|
-
/* @__PURE__ */
|
|
671
|
+
/* @__PURE__ */ j("div", {
|
|
621
672
|
className: "grid grid-cols-2 gap-3 sm:grid-cols-4",
|
|
622
673
|
children: [
|
|
623
|
-
/* @__PURE__ */
|
|
674
|
+
/* @__PURE__ */ A($, {
|
|
624
675
|
label: "Capacity",
|
|
625
|
-
value: (
|
|
626
|
-
icon:
|
|
676
|
+
value: (y.capacity ?? 0).toLocaleString(),
|
|
677
|
+
icon: V
|
|
627
678
|
}),
|
|
628
|
-
/* @__PURE__ */
|
|
679
|
+
/* @__PURE__ */ A($, {
|
|
629
680
|
label: "Sessions",
|
|
630
|
-
value:
|
|
631
|
-
icon:
|
|
681
|
+
value: P.toLocaleString(),
|
|
682
|
+
icon: N
|
|
632
683
|
}),
|
|
633
|
-
/* @__PURE__ */
|
|
684
|
+
/* @__PURE__ */ A($, {
|
|
634
685
|
label: "Ticket types",
|
|
635
|
-
value: (
|
|
686
|
+
value: (c?.ticketTypes?.total ?? 0).toLocaleString(),
|
|
636
687
|
icon: ee
|
|
637
688
|
}),
|
|
638
|
-
/* @__PURE__ */
|
|
689
|
+
/* @__PURE__ */ A($, {
|
|
639
690
|
label: "Tickets sold",
|
|
640
|
-
value:
|
|
641
|
-
icon:
|
|
691
|
+
value: z.toLocaleString(),
|
|
692
|
+
icon: I
|
|
642
693
|
})
|
|
643
694
|
]
|
|
644
695
|
}),
|
|
645
|
-
/* @__PURE__ */
|
|
696
|
+
/* @__PURE__ */ j(ne, {
|
|
646
697
|
value: m,
|
|
647
|
-
onValueChange:
|
|
698
|
+
onValueChange: h,
|
|
648
699
|
children: [
|
|
649
|
-
/* @__PURE__ */
|
|
650
|
-
/* @__PURE__ */
|
|
700
|
+
/* @__PURE__ */ j(re, { children: [
|
|
701
|
+
/* @__PURE__ */ A(Y, {
|
|
651
702
|
value: "overview",
|
|
652
703
|
children: "Overview"
|
|
653
704
|
}),
|
|
654
|
-
/* @__PURE__ */
|
|
705
|
+
/* @__PURE__ */ A(Y, {
|
|
655
706
|
value: "sessions",
|
|
656
707
|
children: "Sessions"
|
|
657
708
|
}),
|
|
658
|
-
/* @__PURE__ */
|
|
709
|
+
/* @__PURE__ */ A(Y, {
|
|
659
710
|
value: "speakers",
|
|
660
711
|
children: "Speakers"
|
|
661
712
|
}),
|
|
662
|
-
/* @__PURE__ */
|
|
713
|
+
/* @__PURE__ */ A(Y, {
|
|
663
714
|
value: "tickets",
|
|
664
715
|
children: "Tickets"
|
|
665
716
|
})
|
|
666
717
|
] }),
|
|
667
|
-
/* @__PURE__ */
|
|
718
|
+
/* @__PURE__ */ A(J, {
|
|
668
719
|
value: "overview",
|
|
669
720
|
className: "mt-4",
|
|
670
|
-
children: /* @__PURE__ */
|
|
721
|
+
children: /* @__PURE__ */ j("div", {
|
|
671
722
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-3",
|
|
672
|
-
children: [/* @__PURE__ */
|
|
723
|
+
children: [/* @__PURE__ */ j(G, {
|
|
673
724
|
treatment: "plain",
|
|
674
725
|
className: "border-border-seam p-5 lg:col-span-2",
|
|
675
726
|
children: [
|
|
676
|
-
/* @__PURE__ */
|
|
727
|
+
/* @__PURE__ */ A("h2", {
|
|
677
728
|
className: "text-lg font-semibold text-text-primary",
|
|
678
729
|
children: "Event Details"
|
|
679
730
|
}),
|
|
680
|
-
/* @__PURE__ */
|
|
731
|
+
/* @__PURE__ */ j("dl", {
|
|
681
732
|
className: "mt-4 space-y-4 text-sm",
|
|
682
733
|
children: [
|
|
683
|
-
/* @__PURE__ */
|
|
734
|
+
/* @__PURE__ */ j("div", {
|
|
684
735
|
className: "grid grid-cols-1 gap-1 sm:grid-cols-[140px_1fr]",
|
|
685
|
-
children: [/* @__PURE__ */
|
|
736
|
+
children: [/* @__PURE__ */ A("dt", {
|
|
686
737
|
className: "text-text-muted",
|
|
687
738
|
children: "Dates"
|
|
688
|
-
}), /* @__PURE__ */
|
|
739
|
+
}), /* @__PURE__ */ j("dd", {
|
|
689
740
|
className: "text-text-primary",
|
|
690
741
|
children: [
|
|
691
|
-
y
|
|
742
|
+
S(y.startAt),
|
|
692
743
|
" — ",
|
|
693
|
-
y
|
|
744
|
+
S(y.endAt)
|
|
694
745
|
]
|
|
695
746
|
})]
|
|
696
747
|
}),
|
|
697
|
-
/* @__PURE__ */
|
|
748
|
+
/* @__PURE__ */ j("div", {
|
|
698
749
|
className: "grid grid-cols-1 gap-1 sm:grid-cols-[140px_1fr]",
|
|
699
|
-
children: [/* @__PURE__ */
|
|
750
|
+
children: [/* @__PURE__ */ A("dt", {
|
|
700
751
|
className: "text-text-muted",
|
|
701
752
|
children: "Venue"
|
|
702
|
-
}), /* @__PURE__ */
|
|
753
|
+
}), /* @__PURE__ */ A("dd", {
|
|
703
754
|
className: "text-text-primary",
|
|
704
|
-
children:
|
|
755
|
+
children: k ? /* @__PURE__ */ A(W, {
|
|
705
756
|
type: "button",
|
|
706
757
|
variant: "link",
|
|
707
758
|
size: "sm",
|
|
708
759
|
className: "h-auto p-0",
|
|
709
|
-
onClick: () => n(`/venues/${
|
|
710
|
-
children:
|
|
760
|
+
onClick: () => n(`/venues/${b}`),
|
|
761
|
+
children: k
|
|
711
762
|
}) : "No venue assigned"
|
|
712
763
|
})]
|
|
713
764
|
}),
|
|
714
|
-
/* @__PURE__ */
|
|
765
|
+
/* @__PURE__ */ j("div", {
|
|
715
766
|
className: "grid grid-cols-1 gap-1 sm:grid-cols-[140px_1fr]",
|
|
716
|
-
children: [/* @__PURE__ */
|
|
767
|
+
children: [/* @__PURE__ */ A("dt", {
|
|
717
768
|
className: "text-text-muted",
|
|
718
769
|
children: "Capacity"
|
|
719
|
-
}), /* @__PURE__ */
|
|
770
|
+
}), /* @__PURE__ */ j("dd", {
|
|
720
771
|
className: "text-text-primary",
|
|
721
|
-
children: [(
|
|
772
|
+
children: [(y.capacity ?? 0).toLocaleString(), " attendees"]
|
|
722
773
|
})]
|
|
723
774
|
}),
|
|
724
|
-
/* @__PURE__ */
|
|
775
|
+
/* @__PURE__ */ j("div", {
|
|
725
776
|
className: "grid grid-cols-1 gap-1 sm:grid-cols-[140px_1fr]",
|
|
726
|
-
children: [/* @__PURE__ */
|
|
777
|
+
children: [/* @__PURE__ */ A("dt", {
|
|
727
778
|
className: "text-text-muted",
|
|
728
779
|
children: "Type"
|
|
729
|
-
}), /* @__PURE__ */
|
|
780
|
+
}), /* @__PURE__ */ A("dd", {
|
|
730
781
|
className: "capitalize text-text-primary",
|
|
731
|
-
children:
|
|
782
|
+
children: y.type.toLowerCase().replace(/_/g, " ")
|
|
732
783
|
})]
|
|
733
784
|
}),
|
|
734
|
-
/* @__PURE__ */
|
|
785
|
+
/* @__PURE__ */ j("div", {
|
|
735
786
|
className: "grid grid-cols-1 gap-1 sm:grid-cols-[140px_1fr]",
|
|
736
|
-
children: [/* @__PURE__ */
|
|
787
|
+
children: [/* @__PURE__ */ A("dt", {
|
|
737
788
|
className: "text-text-muted",
|
|
738
789
|
children: "Timezone"
|
|
739
|
-
}), /* @__PURE__ */
|
|
790
|
+
}), /* @__PURE__ */ A("dd", {
|
|
740
791
|
className: "text-text-primary",
|
|
741
|
-
children:
|
|
792
|
+
children: y.timezone
|
|
742
793
|
})]
|
|
743
794
|
}),
|
|
744
|
-
/* @__PURE__ */
|
|
795
|
+
/* @__PURE__ */ j("div", {
|
|
745
796
|
className: "grid grid-cols-1 gap-1 sm:grid-cols-[140px_1fr]",
|
|
746
|
-
children: [/* @__PURE__ */
|
|
797
|
+
children: [/* @__PURE__ */ A("dt", {
|
|
747
798
|
className: "text-text-muted",
|
|
748
799
|
children: "Visibility"
|
|
749
|
-
}), /* @__PURE__ */
|
|
800
|
+
}), /* @__PURE__ */ A("dd", {
|
|
750
801
|
className: "capitalize text-text-primary",
|
|
751
|
-
children:
|
|
802
|
+
children: y.visibility
|
|
752
803
|
})]
|
|
753
804
|
}),
|
|
754
|
-
/* @__PURE__ */
|
|
805
|
+
/* @__PURE__ */ j("div", {
|
|
755
806
|
className: "grid grid-cols-1 gap-1 sm:grid-cols-[140px_1fr]",
|
|
756
|
-
children: [/* @__PURE__ */
|
|
807
|
+
children: [/* @__PURE__ */ A("dt", {
|
|
757
808
|
className: "text-text-muted",
|
|
758
809
|
children: "Description"
|
|
759
|
-
}), /* @__PURE__ */
|
|
810
|
+
}), /* @__PURE__ */ A("dd", {
|
|
760
811
|
className: "text-text-secondary",
|
|
761
|
-
children:
|
|
812
|
+
children: y.description?.trim() ? y.description : "No description provided."
|
|
762
813
|
})]
|
|
763
814
|
})
|
|
764
815
|
]
|
|
765
816
|
}),
|
|
766
|
-
/* @__PURE__ */
|
|
817
|
+
/* @__PURE__ */ A("div", {
|
|
767
818
|
className: "mt-5",
|
|
768
|
-
children: /* @__PURE__ */
|
|
819
|
+
children: /* @__PURE__ */ j(W, {
|
|
769
820
|
type: "button",
|
|
770
821
|
variant: "outline",
|
|
771
822
|
size: "sm",
|
|
772
823
|
onClick: () => n(`/events/${e}/edit`),
|
|
773
|
-
children: [/* @__PURE__ */
|
|
824
|
+
children: [/* @__PURE__ */ A(F, { className: "h-4 w-4" }), "Edit event details"]
|
|
774
825
|
})
|
|
775
826
|
})
|
|
776
827
|
]
|
|
777
|
-
}), /* @__PURE__ */
|
|
828
|
+
}), /* @__PURE__ */ j(G, {
|
|
778
829
|
treatment: "glass",
|
|
779
830
|
glow: !0,
|
|
780
831
|
className: "p-5",
|
|
781
|
-
children: [/* @__PURE__ */
|
|
832
|
+
children: [/* @__PURE__ */ A("h2", {
|
|
782
833
|
className: "text-lg font-semibold text-text-primary",
|
|
783
834
|
children: "Key Metrics"
|
|
784
|
-
}), /* @__PURE__ */
|
|
835
|
+
}), /* @__PURE__ */ j("dl", {
|
|
785
836
|
className: "mt-4 space-y-4",
|
|
786
837
|
children: [
|
|
787
|
-
/* @__PURE__ */
|
|
838
|
+
/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("dt", {
|
|
788
839
|
className: "text-sm text-text-secondary",
|
|
789
840
|
children: "Registrations"
|
|
790
|
-
}), /* @__PURE__ */
|
|
841
|
+
}), /* @__PURE__ */ A("dd", {
|
|
791
842
|
className: "text-2xl font-semibold tabular-nums text-text-primary",
|
|
792
|
-
children:
|
|
843
|
+
children: L.toLocaleString()
|
|
793
844
|
})] }),
|
|
794
|
-
/* @__PURE__ */
|
|
845
|
+
/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("dt", {
|
|
795
846
|
className: "text-sm text-text-secondary",
|
|
796
847
|
children: "Capacity"
|
|
797
|
-
}), /* @__PURE__ */
|
|
848
|
+
}), /* @__PURE__ */ A("dd", {
|
|
798
849
|
className: "text-2xl font-semibold tabular-nums text-text-primary",
|
|
799
|
-
children: (
|
|
850
|
+
children: (y.capacity ?? 0).toLocaleString()
|
|
800
851
|
})] }),
|
|
801
|
-
/* @__PURE__ */
|
|
852
|
+
/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("dt", {
|
|
802
853
|
className: "text-sm text-text-secondary",
|
|
803
854
|
children: "Sessions"
|
|
804
|
-
}), /* @__PURE__ */
|
|
855
|
+
}), /* @__PURE__ */ A("dd", {
|
|
805
856
|
className: "text-2xl font-semibold tabular-nums text-text-primary",
|
|
806
|
-
children:
|
|
857
|
+
children: P.toLocaleString()
|
|
807
858
|
})] }),
|
|
808
|
-
/* @__PURE__ */
|
|
859
|
+
/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("dt", {
|
|
809
860
|
className: "text-sm text-text-secondary",
|
|
810
861
|
children: "Ticket types"
|
|
811
|
-
}), /* @__PURE__ */
|
|
862
|
+
}), /* @__PURE__ */ A("dd", {
|
|
812
863
|
className: "text-2xl font-semibold tabular-nums text-text-primary",
|
|
813
|
-
children: (
|
|
864
|
+
children: (c?.ticketTypes?.total ?? 0).toLocaleString()
|
|
814
865
|
})] }),
|
|
815
|
-
/* @__PURE__ */
|
|
866
|
+
/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("dt", {
|
|
816
867
|
className: "text-sm text-text-secondary",
|
|
817
868
|
children: "Tickets sold"
|
|
818
|
-
}), /* @__PURE__ */
|
|
869
|
+
}), /* @__PURE__ */ A("dd", {
|
|
819
870
|
className: "text-2xl font-semibold tabular-nums text-text-primary",
|
|
820
|
-
children:
|
|
871
|
+
children: z.toLocaleString()
|
|
821
872
|
})] })
|
|
822
873
|
]
|
|
823
874
|
})]
|
|
824
875
|
})]
|
|
825
876
|
})
|
|
826
877
|
}),
|
|
827
|
-
/* @__PURE__ */
|
|
878
|
+
/* @__PURE__ */ A(J, {
|
|
828
879
|
value: "sessions",
|
|
829
880
|
className: "mt-4",
|
|
830
|
-
children: /* @__PURE__ */
|
|
881
|
+
children: /* @__PURE__ */ A(le, { eventId: e })
|
|
831
882
|
}),
|
|
832
|
-
/* @__PURE__ */
|
|
883
|
+
/* @__PURE__ */ A(J, {
|
|
833
884
|
value: "speakers",
|
|
834
885
|
className: "mt-4",
|
|
835
|
-
children: /* @__PURE__ */
|
|
886
|
+
children: /* @__PURE__ */ A(ue, {})
|
|
836
887
|
}),
|
|
837
|
-
/* @__PURE__ */
|
|
888
|
+
/* @__PURE__ */ A(J, {
|
|
838
889
|
value: "tickets",
|
|
839
890
|
className: "mt-4",
|
|
840
|
-
children: /* @__PURE__ */
|
|
891
|
+
children: /* @__PURE__ */ A(de, { eventId: e })
|
|
841
892
|
})
|
|
842
893
|
]
|
|
843
894
|
})
|
|
844
895
|
]
|
|
845
|
-
}) : /* @__PURE__ */
|
|
896
|
+
}) : /* @__PURE__ */ j("div", {
|
|
846
897
|
className: "space-y-4 p-6",
|
|
847
|
-
children: [/* @__PURE__ */
|
|
898
|
+
children: [/* @__PURE__ */ j(W, {
|
|
848
899
|
type: "button",
|
|
849
900
|
variant: "ghost",
|
|
850
901
|
size: "sm",
|
|
851
902
|
onClick: () => n("/events"),
|
|
852
|
-
children: [/* @__PURE__ */
|
|
853
|
-
}), /* @__PURE__ */
|
|
903
|
+
children: [/* @__PURE__ */ A(M, { className: "h-4 w-4" }), "Back to Events"]
|
|
904
|
+
}), /* @__PURE__ */ A(G, {
|
|
854
905
|
treatment: "plain",
|
|
855
906
|
className: "border-border-seam",
|
|
856
|
-
children: /* @__PURE__ */
|
|
907
|
+
children: /* @__PURE__ */ A(K, {
|
|
857
908
|
illustration: "empty-search",
|
|
858
909
|
title: "Event not found.",
|
|
859
910
|
description: "This event may have been removed or is outside your current scope."
|
|
@@ -861,6 +912,6 @@ function se() {
|
|
|
861
912
|
})]
|
|
862
913
|
});
|
|
863
914
|
}
|
|
864
|
-
export {
|
|
915
|
+
export { pe as default };
|
|
865
916
|
|
|
866
917
|
//# sourceMappingURL=EventDetailPage.js.map
|