@burdenoff/microfe-eventfullymanaged 2026.728.1 → 2026.730.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/eventfullymanaged/api/eventApi.d.ts +37 -1
- package/dist/eventfullymanaged/api/eventApi.d.ts.map +1 -1
- package/dist/eventfullymanaged/api/eventApi.js +300 -239
- package/dist/eventfullymanaged/api/eventApi.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/NetworkingPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/NetworkingPage.js +211 -177
- package/dist/eventfullymanaged/pages/modules/NetworkingPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/RegistrationPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/RegistrationPage.js +204 -174
- package/dist/eventfullymanaged/pages/modules/RegistrationPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,42 +1,43 @@
|
|
|
1
1
|
import { useEventfullyManaged as e } from "../../context/EventfullyManagedContext.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { Badge as
|
|
2
|
+
import { useApolloClient as t } from "../../../node_modules/@apollo/client/react/hooks/useApolloClient.js";
|
|
3
|
+
import { notify as n } from "../../lib/toast.js";
|
|
4
|
+
import { BADGE_PDF_QUERY as r, downloadBase64Pdf as i, useAttendeesQuery as a, useCheckInTokenQuery as o, useDeleteAttendeeMutation as s, useDeletePromoCodeMutation as c, useDeleteRegistrationMutation as l, usePromoCodesQuery as u, useRegistrationsQuery as d, useTicketTypesQuery as f, useUpdateRegistrationMutation as p } from "../../api/eventApi.js";
|
|
5
|
+
import { ActionMenu as m } from "../../components/ActionMenu.js";
|
|
6
|
+
import { Pagination as h, usePagination as g } from "../../components/Pagination.js";
|
|
7
|
+
import { describeError as _, mutationSucceeded as v } from "../../lib/mutationResult.js";
|
|
8
|
+
import { formatMoney as y } from "../../lib/format.js";
|
|
9
|
+
import { useMemo as b, useState as x } from "react";
|
|
10
|
+
import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
11
|
+
import { Badge as T, Megaphone as E, QrCode as D, Tag as O, TicketPlus as k, UserPlus as A, Users as j } from "lucide-react";
|
|
12
|
+
import { Badge as M, Button as N, EmphasisPanel as P, GlassCard as F, GradientText as I, IllustratedEmptyState as L, NextSteps as R, PagePurpose as z, ResponsiveDialog as B, ResponsiveDialogContent as V, ResponsiveDialogDescription as H, ResponsiveDialogFooter as U, ResponsiveDialogHeader as W, ResponsiveDialogTitle as G, ResponsiveTable as K } from "@burdenoff/fe-libs/ui";
|
|
12
13
|
//#region src/eventfullymanaged/pages/modules/RegistrationPage.tsx
|
|
13
|
-
function
|
|
14
|
-
let { data:
|
|
15
|
-
return /* @__PURE__ */
|
|
14
|
+
function q({ registrationId: e, label: t, onOpenChange: n }) {
|
|
15
|
+
let { data: r, loading: i, error: a } = o(e), s = r?.checkInToken;
|
|
16
|
+
return /* @__PURE__ */ C(B, {
|
|
16
17
|
open: !0,
|
|
17
18
|
onOpenChange: n,
|
|
18
|
-
children: /* @__PURE__ */
|
|
19
|
+
children: /* @__PURE__ */ w(V, {
|
|
19
20
|
className: "max-w-sm",
|
|
20
21
|
children: [
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
/* @__PURE__ */
|
|
22
|
+
/* @__PURE__ */ w(W, { children: [/* @__PURE__ */ C(G, { children: "Check-in QR" }), /* @__PURE__ */ w(H, { children: [t, " scans this code at any check-in station to check in — it works even if the station has no connection at the moment."] })] }),
|
|
23
|
+
/* @__PURE__ */ C("div", {
|
|
23
24
|
className: "flex flex-col items-center gap-3 py-2",
|
|
24
|
-
children:
|
|
25
|
+
children: i ? /* @__PURE__ */ C("p", {
|
|
25
26
|
className: "text-sm text-text-secondary",
|
|
26
27
|
children: "Generating…"
|
|
27
|
-
}) :
|
|
28
|
+
}) : a || !s ? /* @__PURE__ */ C("p", {
|
|
28
29
|
className: "text-sm text-status-danger-text",
|
|
29
30
|
children: "Could not generate a check-in QR for this registration."
|
|
30
|
-
}) : /* @__PURE__ */
|
|
31
|
+
}) : /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C("img", {
|
|
31
32
|
src: s.qrDataUrl,
|
|
32
33
|
alt: `Check-in QR code for ${t}`,
|
|
33
34
|
className: "h-56 w-56 rounded-card border border-border-seam bg-white p-2"
|
|
34
|
-
}), /* @__PURE__ */
|
|
35
|
+
}), /* @__PURE__ */ C("code", {
|
|
35
36
|
className: "max-w-full break-all rounded bg-bg-sunken px-2 py-1 text-xs text-text-secondary",
|
|
36
37
|
children: s.token
|
|
37
38
|
})] })
|
|
38
39
|
}),
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
+
/* @__PURE__ */ C(U, { children: /* @__PURE__ */ C(N, {
|
|
40
41
|
type: "button",
|
|
41
42
|
variant: "outline",
|
|
42
43
|
onClick: () => n(!1),
|
|
@@ -46,14 +47,14 @@ function H({ registrationId: e, label: t, onOpenChange: n }) {
|
|
|
46
47
|
})
|
|
47
48
|
});
|
|
48
49
|
}
|
|
49
|
-
var
|
|
50
|
+
var J = [
|
|
50
51
|
"PENDING",
|
|
51
52
|
"CONFIRMED",
|
|
52
53
|
"WAITLISTED",
|
|
53
54
|
"CANCELLED",
|
|
54
55
|
"CHECKED_IN"
|
|
55
56
|
];
|
|
56
|
-
function
|
|
57
|
+
function Y(e) {
|
|
57
58
|
switch ((e ?? "").toUpperCase()) {
|
|
58
59
|
case "CONFIRMED":
|
|
59
60
|
case "CHECKED_IN": return "default";
|
|
@@ -62,47 +63,47 @@ function W(e) {
|
|
|
62
63
|
default: return "secondary";
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
|
-
function
|
|
66
|
-
if (t == null || t <= 0) return /* @__PURE__ */
|
|
66
|
+
function X({ used: e, max: t }) {
|
|
67
|
+
if (t == null || t <= 0) return /* @__PURE__ */ w("span", {
|
|
67
68
|
className: "text-xs text-text-secondary",
|
|
68
69
|
children: [e, " used"]
|
|
69
70
|
});
|
|
70
71
|
let n = Math.min(100, Math.round(e / t * 100));
|
|
71
|
-
return /* @__PURE__ */
|
|
72
|
+
return /* @__PURE__ */ w("div", {
|
|
72
73
|
className: "min-w-[7rem] space-y-1",
|
|
73
|
-
children: [/* @__PURE__ */
|
|
74
|
+
children: [/* @__PURE__ */ w("div", {
|
|
74
75
|
className: "flex items-center justify-between text-xs tabular-nums text-text-secondary",
|
|
75
|
-
children: [/* @__PURE__ */
|
|
76
|
+
children: [/* @__PURE__ */ w("span", { children: [
|
|
76
77
|
e,
|
|
77
78
|
" / ",
|
|
78
79
|
t
|
|
79
|
-
] }), /* @__PURE__ */
|
|
80
|
+
] }), /* @__PURE__ */ w("span", {
|
|
80
81
|
className: "text-text-muted",
|
|
81
82
|
children: [n, "%"]
|
|
82
83
|
})]
|
|
83
|
-
}), /* @__PURE__ */
|
|
84
|
+
}), /* @__PURE__ */ C("div", {
|
|
84
85
|
className: "h-1.5 w-full overflow-hidden rounded-full bg-bg-sunken",
|
|
85
|
-
children: /* @__PURE__ */
|
|
86
|
+
children: /* @__PURE__ */ C("div", {
|
|
86
87
|
className: `h-full rounded-full ${n >= 90 ? "bg-status-warning" : "bg-action-primary-bg"}`,
|
|
87
88
|
style: { width: `${n}%` }
|
|
88
89
|
})
|
|
89
90
|
})]
|
|
90
91
|
});
|
|
91
92
|
}
|
|
92
|
-
function
|
|
93
|
-
return /* @__PURE__ */
|
|
93
|
+
function Z({ icon: e, title: t, count: n, loading: r, action: i, children: a }) {
|
|
94
|
+
return /* @__PURE__ */ w(F, {
|
|
94
95
|
treatment: "plain",
|
|
95
96
|
className: "border-border-seam p-5",
|
|
96
|
-
children: [/* @__PURE__ */
|
|
97
|
+
children: [/* @__PURE__ */ w("div", {
|
|
97
98
|
className: "flex items-center justify-between gap-3",
|
|
98
|
-
children: [/* @__PURE__ */
|
|
99
|
+
children: [/* @__PURE__ */ w("div", {
|
|
99
100
|
className: "flex items-center gap-3",
|
|
100
|
-
children: [/* @__PURE__ */
|
|
101
|
+
children: [/* @__PURE__ */ C("span", {
|
|
101
102
|
className: "flex h-9 w-9 items-center justify-center rounded-input bg-accent-wash text-action-primary",
|
|
102
103
|
children: e
|
|
103
|
-
}), /* @__PURE__ */
|
|
104
|
+
}), /* @__PURE__ */ w("h2", {
|
|
104
105
|
className: "text-lg font-semibold text-text-primary",
|
|
105
|
-
children: [r ? `Loading ${t.toLowerCase()}…` : t, !r && n != null ? /* @__PURE__ */
|
|
106
|
+
children: [r ? `Loading ${t.toLowerCase()}…` : t, !r && n != null ? /* @__PURE__ */ w("span", {
|
|
106
107
|
className: "ml-2 text-sm font-normal text-text-secondary",
|
|
107
108
|
children: [
|
|
108
109
|
"(",
|
|
@@ -112,32 +113,51 @@ function K({ icon: e, title: t, count: n, loading: r, action: i, children: a })
|
|
|
112
113
|
}) : null]
|
|
113
114
|
})]
|
|
114
115
|
}), i]
|
|
115
|
-
}), /* @__PURE__ */
|
|
116
|
+
}), /* @__PURE__ */ C("div", {
|
|
116
117
|
className: "mt-4",
|
|
117
118
|
children: a
|
|
118
119
|
})]
|
|
119
120
|
});
|
|
120
121
|
}
|
|
121
|
-
function
|
|
122
|
-
let e =
|
|
122
|
+
function Q() {
|
|
123
|
+
let e = g({ pageSize: 10 }), { data: o, loading: s } = d({
|
|
123
124
|
limit: e.limit,
|
|
124
125
|
offset: e.offset
|
|
125
|
-
}), [
|
|
126
|
+
}), [c] = p(), [u] = l(), [S, E] = x(null), O = t(), [A, j] = x(null), N = async (e, t) => {
|
|
127
|
+
j(e);
|
|
128
|
+
try {
|
|
129
|
+
let { data: a, error: o } = await O.query({
|
|
130
|
+
query: r,
|
|
131
|
+
variables: { registrationId: e },
|
|
132
|
+
fetchPolicy: "network-only",
|
|
133
|
+
errorPolicy: "all"
|
|
134
|
+
});
|
|
135
|
+
if (o || !a?.badgePdf) {
|
|
136
|
+
n.error("Could not generate badge", o?.message ?? "Please try again.");
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
i(a.badgePdf, `${t.replace(/[^a-z0-9]+/gi, "-")}-badge.pdf`), n.success("Badge ready", `${t}'s badge downloaded.`);
|
|
140
|
+
} catch (e) {
|
|
141
|
+
n.error("Could not generate badge", _(e));
|
|
142
|
+
} finally {
|
|
143
|
+
j(null);
|
|
144
|
+
}
|
|
145
|
+
}, { data: P } = a({
|
|
126
146
|
limit: 200,
|
|
127
147
|
offset: 0
|
|
128
|
-
}), { data:
|
|
148
|
+
}), { data: F } = f({
|
|
129
149
|
limit: 200,
|
|
130
150
|
offset: 0
|
|
131
|
-
}),
|
|
151
|
+
}), I = b(() => {
|
|
132
152
|
let e = /* @__PURE__ */ new Map();
|
|
133
|
-
for (let t of
|
|
153
|
+
for (let t of P?.attendees.items ?? []) t.id && t.fullName && e.set(t.id, t.fullName);
|
|
134
154
|
return e;
|
|
135
|
-
}, [
|
|
155
|
+
}, [P]), R = b(() => {
|
|
136
156
|
let e = /* @__PURE__ */ new Map();
|
|
137
|
-
for (let t of
|
|
157
|
+
for (let t of F?.ticketTypes.items ?? []) t.id && t.name && e.set(t.id, t.name);
|
|
138
158
|
return e;
|
|
139
|
-
}, [
|
|
140
|
-
let r = await
|
|
159
|
+
}, [F]), z = (e) => e ? I.get(e) ?? `Attendee ${e.slice(0, 8)}…` : null, B = b(() => o?.registrations.items ?? [], [o]), V = o?.registrations.total ?? 0, H = async (e, t) => {
|
|
160
|
+
let r = await c({ variables: {
|
|
141
161
|
id: e.id,
|
|
142
162
|
input: {
|
|
143
163
|
eventId: e.eventId,
|
|
@@ -146,40 +166,40 @@ function q() {
|
|
|
146
166
|
quantity: e.quantity,
|
|
147
167
|
currency: e.currency,
|
|
148
168
|
totalAmount: e.totalAmount ?? null,
|
|
149
|
-
status:
|
|
169
|
+
status: t
|
|
150
170
|
}
|
|
151
171
|
} });
|
|
152
|
-
|
|
153
|
-
},
|
|
154
|
-
let r = await
|
|
155
|
-
if (r.error) throw
|
|
156
|
-
if (!r.data?.deleteRegistration) throw
|
|
157
|
-
|
|
158
|
-
},
|
|
159
|
-
return /* @__PURE__ */
|
|
160
|
-
icon: /* @__PURE__ */
|
|
172
|
+
v(r, r.data?.updateRegistration?.id, "Could not update registration") && n.success("Registration updated", `Status set to ${t}`);
|
|
173
|
+
}, U = async (e, t) => {
|
|
174
|
+
let r = await u({ variables: { id: e.id } });
|
|
175
|
+
if (r.error) throw n.error("Could not delete registration", r.error.message), r.error;
|
|
176
|
+
if (!r.data?.deleteRegistration) throw n.error("Could not delete registration", "The server did not confirm the change."), Error("delete-unconfirmed");
|
|
177
|
+
n.success("Registration deleted", t);
|
|
178
|
+
}, W = (e) => z(e.attendeeId) ?? `Registration ${e.id}`;
|
|
179
|
+
return /* @__PURE__ */ w(Z, {
|
|
180
|
+
icon: /* @__PURE__ */ C(k, { className: "h-4 w-4" }),
|
|
161
181
|
title: "Registrations",
|
|
162
|
-
count:
|
|
163
|
-
loading:
|
|
182
|
+
count: V,
|
|
183
|
+
loading: s,
|
|
164
184
|
children: [
|
|
165
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ C(K, {
|
|
166
186
|
columns: [
|
|
167
187
|
{
|
|
168
188
|
key: "name",
|
|
169
189
|
header: "Name",
|
|
170
190
|
priority: "primary",
|
|
171
|
-
cell: (e) => /* @__PURE__ */
|
|
191
|
+
cell: (e) => /* @__PURE__ */ C("span", {
|
|
172
192
|
className: "font-medium text-text-primary",
|
|
173
|
-
children:
|
|
193
|
+
children: W(e)
|
|
174
194
|
})
|
|
175
195
|
},
|
|
176
196
|
{
|
|
177
197
|
key: "ticket",
|
|
178
198
|
header: "Ticket Type",
|
|
179
199
|
mobileLabel: "Ticket",
|
|
180
|
-
cell: (e) => /* @__PURE__ */
|
|
200
|
+
cell: (e) => /* @__PURE__ */ C("span", {
|
|
181
201
|
className: "text-text-secondary",
|
|
182
|
-
children: e.ticketTypeId ?
|
|
202
|
+
children: e.ticketTypeId ? R.get(e.ticketTypeId) ?? "—" : "—"
|
|
183
203
|
})
|
|
184
204
|
},
|
|
185
205
|
{
|
|
@@ -187,7 +207,7 @@ function q() {
|
|
|
187
207
|
header: "Qty",
|
|
188
208
|
mobileLabel: "Quantity",
|
|
189
209
|
priority: "secondary",
|
|
190
|
-
cell: (e) => /* @__PURE__ */
|
|
210
|
+
cell: (e) => /* @__PURE__ */ C("span", {
|
|
191
211
|
className: "tabular-nums text-text-secondary",
|
|
192
212
|
children: e.quantity
|
|
193
213
|
})
|
|
@@ -195,101 +215,111 @@ function q() {
|
|
|
195
215
|
{
|
|
196
216
|
key: "amount",
|
|
197
217
|
header: "Amount",
|
|
198
|
-
cell: (e) => /* @__PURE__ */
|
|
218
|
+
cell: (e) => /* @__PURE__ */ C("span", {
|
|
199
219
|
className: "tabular-nums text-text-primary",
|
|
200
|
-
children: e.totalAmount ?
|
|
220
|
+
children: e.totalAmount ? y(Number(e.totalAmount), e.currency) : "—"
|
|
201
221
|
})
|
|
202
222
|
},
|
|
203
223
|
{
|
|
204
224
|
key: "status",
|
|
205
225
|
header: "Status",
|
|
206
226
|
priority: "primary",
|
|
207
|
-
cell: (e) => /* @__PURE__ */
|
|
208
|
-
variant:
|
|
227
|
+
cell: (e) => /* @__PURE__ */ C(M, {
|
|
228
|
+
variant: Y(e.status),
|
|
209
229
|
children: e.status ?? "UNKNOWN"
|
|
210
230
|
})
|
|
211
231
|
}
|
|
212
232
|
],
|
|
213
|
-
data:
|
|
233
|
+
data: B,
|
|
214
234
|
rowKey: (e) => e.id,
|
|
215
|
-
emptyState:
|
|
235
|
+
emptyState: s ? null : /* @__PURE__ */ C(L, {
|
|
216
236
|
illustration: "empty-data",
|
|
217
237
|
title: "No registrations yet.",
|
|
218
238
|
description: "Register your first attendee to start tracking sign-ups."
|
|
219
239
|
}),
|
|
220
240
|
rowActions: (e) => {
|
|
221
|
-
let t =
|
|
241
|
+
let t = W(e), n = J.filter((t) => t !== (e.status ?? "").toUpperCase()).map((t, n) => ({
|
|
222
242
|
key: t,
|
|
223
243
|
label: `Set ${t.replace("_", " ").toLowerCase()}`,
|
|
224
|
-
onSelect: () => void
|
|
244
|
+
onSelect: () => void H(e, t),
|
|
225
245
|
separatorBefore: n === 0
|
|
226
246
|
}));
|
|
227
|
-
return /* @__PURE__ */
|
|
247
|
+
return /* @__PURE__ */ C(m, {
|
|
228
248
|
ariaLabel: "Registration actions",
|
|
229
249
|
entityName: t,
|
|
230
250
|
deleteLabel: "Delete registration",
|
|
231
|
-
extraItems: [
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
251
|
+
extraItems: [
|
|
252
|
+
{
|
|
253
|
+
key: "view-qr",
|
|
254
|
+
label: "View check-in QR",
|
|
255
|
+
icon: D,
|
|
256
|
+
onSelect: () => E(e.id)
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
key: "download-badge",
|
|
260
|
+
label: A === e.id ? "Generating badge…" : "Download badge",
|
|
261
|
+
icon: T,
|
|
262
|
+
disabled: A === e.id,
|
|
263
|
+
onSelect: () => void N(e.id, t)
|
|
264
|
+
},
|
|
265
|
+
...n
|
|
266
|
+
],
|
|
267
|
+
onDelete: () => U(e, t)
|
|
238
268
|
});
|
|
239
269
|
}
|
|
240
270
|
}),
|
|
241
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ C(h, {
|
|
242
272
|
offset: e.offset,
|
|
243
273
|
limit: e.limit,
|
|
244
|
-
loadedCount:
|
|
245
|
-
total:
|
|
274
|
+
loadedCount: B.length,
|
|
275
|
+
total: V,
|
|
246
276
|
onPrev: e.prevPage,
|
|
247
277
|
onNext: e.nextPage,
|
|
248
278
|
itemLabel: "registrations",
|
|
249
|
-
loading:
|
|
279
|
+
loading: s
|
|
250
280
|
}),
|
|
251
|
-
|
|
252
|
-
let e =
|
|
253
|
-
return /* @__PURE__ */
|
|
254
|
-
registrationId:
|
|
255
|
-
label: e ?
|
|
281
|
+
S ? (() => {
|
|
282
|
+
let e = B.find((e) => e.id === S);
|
|
283
|
+
return /* @__PURE__ */ C(q, {
|
|
284
|
+
registrationId: S,
|
|
285
|
+
label: e ? W(e) : `Registration ${S}`,
|
|
256
286
|
onOpenChange: (e) => {
|
|
257
|
-
e ||
|
|
287
|
+
e || E(null);
|
|
258
288
|
}
|
|
259
289
|
});
|
|
260
290
|
})() : null
|
|
261
291
|
]
|
|
262
292
|
});
|
|
263
293
|
}
|
|
264
|
-
function
|
|
265
|
-
let { navigate:
|
|
266
|
-
limit:
|
|
267
|
-
offset:
|
|
268
|
-
}), [c] =
|
|
269
|
-
let
|
|
270
|
-
if (
|
|
271
|
-
if (!
|
|
272
|
-
|
|
294
|
+
function $() {
|
|
295
|
+
let { navigate: t } = e(), r = g({ pageSize: 10 }), { data: i, loading: o } = a({
|
|
296
|
+
limit: r.limit,
|
|
297
|
+
offset: r.offset
|
|
298
|
+
}), [c] = s(), l = b(() => i?.attendees.items ?? [], [i]), u = i?.attendees.total ?? 0, d = async (e) => {
|
|
299
|
+
let t = await c({ variables: { id: e.id } });
|
|
300
|
+
if (t.error) throw n.error("Could not delete attendee", t.error.message), t.error;
|
|
301
|
+
if (!t.data?.deleteAttendee) throw n.error("Could not delete attendee", "The server did not confirm the change."), Error("delete-unconfirmed");
|
|
302
|
+
n.success("Attendee deleted", e.fullName);
|
|
273
303
|
};
|
|
274
|
-
return /* @__PURE__ */
|
|
275
|
-
icon: /* @__PURE__ */
|
|
304
|
+
return /* @__PURE__ */ w(Z, {
|
|
305
|
+
icon: /* @__PURE__ */ C(j, { className: "h-4 w-4" }),
|
|
276
306
|
title: "Attendees",
|
|
277
307
|
count: u,
|
|
278
|
-
loading:
|
|
279
|
-
action: /* @__PURE__ */
|
|
308
|
+
loading: o,
|
|
309
|
+
action: /* @__PURE__ */ w(N, {
|
|
280
310
|
type: "button",
|
|
281
311
|
size: "sm",
|
|
282
312
|
variant: "outline",
|
|
283
|
-
onClick: () =>
|
|
284
|
-
children: [/* @__PURE__ */
|
|
313
|
+
onClick: () => t("/registration/attendees/create"),
|
|
314
|
+
children: [/* @__PURE__ */ C(A, { className: "h-4 w-4" }), "Add attendee"]
|
|
285
315
|
}),
|
|
286
|
-
children: [/* @__PURE__ */
|
|
316
|
+
children: [/* @__PURE__ */ C(K, {
|
|
287
317
|
columns: [
|
|
288
318
|
{
|
|
289
319
|
key: "name",
|
|
290
320
|
header: "Name",
|
|
291
321
|
priority: "primary",
|
|
292
|
-
cell: (e) => /* @__PURE__ */
|
|
322
|
+
cell: (e) => /* @__PURE__ */ C("span", {
|
|
293
323
|
className: "font-medium text-text-primary",
|
|
294
324
|
children: e.fullName
|
|
295
325
|
})
|
|
@@ -298,7 +328,7 @@ function J() {
|
|
|
298
328
|
key: "email",
|
|
299
329
|
header: "Email",
|
|
300
330
|
priority: "primary",
|
|
301
|
-
cell: (e) => /* @__PURE__ */
|
|
331
|
+
cell: (e) => /* @__PURE__ */ C("span", {
|
|
302
332
|
className: "text-text-secondary",
|
|
303
333
|
children: e.email
|
|
304
334
|
})
|
|
@@ -306,7 +336,7 @@ function J() {
|
|
|
306
336
|
{
|
|
307
337
|
key: "company",
|
|
308
338
|
header: "Company",
|
|
309
|
-
cell: (e) => /* @__PURE__ */
|
|
339
|
+
cell: (e) => /* @__PURE__ */ C("span", {
|
|
310
340
|
className: "text-text-secondary",
|
|
311
341
|
children: [e.company, e.role].filter(Boolean).join(" · ") || "—"
|
|
312
342
|
})
|
|
@@ -314,59 +344,59 @@ function J() {
|
|
|
314
344
|
],
|
|
315
345
|
data: l,
|
|
316
346
|
rowKey: (e) => e.id,
|
|
317
|
-
emptyState:
|
|
347
|
+
emptyState: o ? null : /* @__PURE__ */ C(L, {
|
|
318
348
|
illustration: "empty-people",
|
|
319
349
|
title: "No attendees yet.",
|
|
320
350
|
description: "Add attendees or register one to build your guest list."
|
|
321
351
|
}),
|
|
322
|
-
rowActions: (e) => /* @__PURE__ */
|
|
352
|
+
rowActions: (e) => /* @__PURE__ */ C(m, {
|
|
323
353
|
ariaLabel: `Actions for ${e.fullName}`,
|
|
324
354
|
entityName: e.fullName,
|
|
325
355
|
deleteLabel: "Delete attendee",
|
|
326
|
-
onView: () =>
|
|
327
|
-
onEdit: () =>
|
|
328
|
-
onDelete: () =>
|
|
356
|
+
onView: () => t(`/attendees/${e.id}/profile`),
|
|
357
|
+
onEdit: () => t(`/registration/attendees/${e.id}/edit`),
|
|
358
|
+
onDelete: () => d(e)
|
|
329
359
|
})
|
|
330
|
-
}), /* @__PURE__ */
|
|
331
|
-
offset:
|
|
332
|
-
limit:
|
|
360
|
+
}), /* @__PURE__ */ C(h, {
|
|
361
|
+
offset: r.offset,
|
|
362
|
+
limit: r.limit,
|
|
333
363
|
loadedCount: l.length,
|
|
334
364
|
total: u,
|
|
335
|
-
onPrev:
|
|
336
|
-
onNext:
|
|
365
|
+
onPrev: r.prevPage,
|
|
366
|
+
onNext: r.nextPage,
|
|
337
367
|
itemLabel: "attendees",
|
|
338
|
-
loading:
|
|
368
|
+
loading: o
|
|
339
369
|
})]
|
|
340
370
|
});
|
|
341
371
|
}
|
|
342
|
-
function
|
|
343
|
-
let { navigate:
|
|
372
|
+
function ee() {
|
|
373
|
+
let { navigate: t } = e(), r = g({ pageSize: 10 }), { data: i, loading: a } = u({
|
|
344
374
|
limit: r.limit,
|
|
345
375
|
offset: r.offset
|
|
346
|
-
}), [
|
|
347
|
-
let
|
|
348
|
-
if (
|
|
349
|
-
|
|
376
|
+
}), [o] = c(), s = b(() => i?.promoCodes.items ?? [], [i]), l = i?.promoCodes.total ?? 0, d = async (e) => {
|
|
377
|
+
let t = await o({ variables: { id: e.id } });
|
|
378
|
+
if (t.error) throw n.error("Could not delete promo code", t.error.message), t.error;
|
|
379
|
+
n.success("Promo code deleted", e.code);
|
|
350
380
|
};
|
|
351
|
-
return /* @__PURE__ */
|
|
352
|
-
icon: /* @__PURE__ */
|
|
381
|
+
return /* @__PURE__ */ w(Z, {
|
|
382
|
+
icon: /* @__PURE__ */ C(O, { className: "h-4 w-4" }),
|
|
353
383
|
title: "Promo Codes",
|
|
354
|
-
count:
|
|
355
|
-
loading:
|
|
356
|
-
action: /* @__PURE__ */
|
|
384
|
+
count: l,
|
|
385
|
+
loading: a,
|
|
386
|
+
action: /* @__PURE__ */ w(N, {
|
|
357
387
|
type: "button",
|
|
358
388
|
size: "sm",
|
|
359
389
|
variant: "outline",
|
|
360
|
-
onClick: () =>
|
|
361
|
-
children: [/* @__PURE__ */
|
|
390
|
+
onClick: () => t("/registration/promo-codes/create"),
|
|
391
|
+
children: [/* @__PURE__ */ C(k, { className: "h-4 w-4" }), "New promo code"]
|
|
362
392
|
}),
|
|
363
|
-
children: [/* @__PURE__ */
|
|
393
|
+
children: [/* @__PURE__ */ C(K, {
|
|
364
394
|
columns: [
|
|
365
395
|
{
|
|
366
396
|
key: "code",
|
|
367
397
|
header: "Code",
|
|
368
398
|
priority: "primary",
|
|
369
|
-
cell: (e) => /* @__PURE__ */
|
|
399
|
+
cell: (e) => /* @__PURE__ */ C("span", {
|
|
370
400
|
className: "font-mono text-sm font-semibold text-text-primary",
|
|
371
401
|
children: e.code
|
|
372
402
|
})
|
|
@@ -375,12 +405,12 @@ function Y() {
|
|
|
375
405
|
key: "discount",
|
|
376
406
|
header: "Discount",
|
|
377
407
|
priority: "primary",
|
|
378
|
-
cell: (e) => /* @__PURE__ */
|
|
408
|
+
cell: (e) => /* @__PURE__ */ w("span", {
|
|
379
409
|
className: "flex items-center gap-2",
|
|
380
|
-
children: [/* @__PURE__ */
|
|
410
|
+
children: [/* @__PURE__ */ C(M, {
|
|
381
411
|
variant: "secondary",
|
|
382
412
|
children: e.discountType === "PERCENT" ? "PERCENT" : "FIXED"
|
|
383
|
-
}), /* @__PURE__ */
|
|
413
|
+
}), /* @__PURE__ */ C("span", {
|
|
384
414
|
className: "text-sm text-text-secondary",
|
|
385
415
|
children: e.discountType === "PERCENT" ? `${e.discountValue}%` : e.discountValue
|
|
386
416
|
})]
|
|
@@ -389,7 +419,7 @@ function Y() {
|
|
|
389
419
|
{
|
|
390
420
|
key: "usage",
|
|
391
421
|
header: "Usage",
|
|
392
|
-
cell: (e) => /* @__PURE__ */
|
|
422
|
+
cell: (e) => /* @__PURE__ */ C(X, {
|
|
393
423
|
used: e.usedCount,
|
|
394
424
|
max: e.maxUses
|
|
395
425
|
})
|
|
@@ -398,78 +428,78 @@ function Y() {
|
|
|
398
428
|
key: "status",
|
|
399
429
|
header: "Status",
|
|
400
430
|
priority: "secondary",
|
|
401
|
-
cell: (e) => /* @__PURE__ */
|
|
431
|
+
cell: (e) => /* @__PURE__ */ C(M, {
|
|
402
432
|
variant: e.isActive ? "default" : "secondary",
|
|
403
433
|
children: e.isActive ? "Active" : "Inactive"
|
|
404
434
|
})
|
|
405
435
|
}
|
|
406
436
|
],
|
|
407
|
-
data:
|
|
437
|
+
data: s,
|
|
408
438
|
rowKey: (e) => e.id,
|
|
409
|
-
emptyState:
|
|
439
|
+
emptyState: a ? null : /* @__PURE__ */ C(L, {
|
|
410
440
|
illustration: "empty-data",
|
|
411
441
|
title: "No promo codes yet.",
|
|
412
442
|
description: "Create a code to offer discounts and drive registrations."
|
|
413
443
|
}),
|
|
414
|
-
rowActions: (e) => /* @__PURE__ */
|
|
444
|
+
rowActions: (e) => /* @__PURE__ */ C(m, {
|
|
415
445
|
ariaLabel: `Actions for ${e.code}`,
|
|
416
446
|
entityName: e.code,
|
|
417
|
-
onEdit: () =>
|
|
418
|
-
onDelete: () =>
|
|
447
|
+
onEdit: () => t(`/registration/promo-codes/${e.id}/edit`),
|
|
448
|
+
onDelete: () => d(e)
|
|
419
449
|
})
|
|
420
|
-
}), /* @__PURE__ */
|
|
450
|
+
}), /* @__PURE__ */ C(h, {
|
|
421
451
|
offset: r.offset,
|
|
422
452
|
limit: r.limit,
|
|
423
|
-
loadedCount:
|
|
424
|
-
total:
|
|
453
|
+
loadedCount: s.length,
|
|
454
|
+
total: l,
|
|
425
455
|
onPrev: r.prevPage,
|
|
426
456
|
onNext: r.nextPage,
|
|
427
457
|
itemLabel: "promo codes",
|
|
428
|
-
loading:
|
|
458
|
+
loading: a
|
|
429
459
|
})]
|
|
430
460
|
});
|
|
431
461
|
}
|
|
432
|
-
function
|
|
462
|
+
function te() {
|
|
433
463
|
let { navigate: t } = e();
|
|
434
|
-
return /* @__PURE__ */
|
|
464
|
+
return /* @__PURE__ */ w("div", {
|
|
435
465
|
className: "space-y-6 p-6",
|
|
436
466
|
children: [
|
|
437
|
-
/* @__PURE__ */
|
|
438
|
-
/* @__PURE__ */
|
|
467
|
+
/* @__PURE__ */ C(z, { children: "This is where you see who is coming. Registrations are the paid or confirmed sign-ups, attendees are the people behind them, and promo codes let you offer discounts. Register attendees, edit their details, change a registration's status, and manage discount codes — all backed by live GraphQL APIs." }),
|
|
468
|
+
/* @__PURE__ */ C(P, { children: /* @__PURE__ */ w("div", {
|
|
439
469
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
440
|
-
children: [/* @__PURE__ */
|
|
470
|
+
children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("h1", {
|
|
441
471
|
className: "text-2xl font-bold text-text-primary",
|
|
442
|
-
children: /* @__PURE__ */
|
|
443
|
-
}), /* @__PURE__ */
|
|
472
|
+
children: /* @__PURE__ */ C(I, { children: "Registration" })
|
|
473
|
+
}), /* @__PURE__ */ C("p", {
|
|
444
474
|
className: "mt-1 text-sm text-text-secondary",
|
|
445
475
|
children: "Track registrations, attendees, and promo codes with backend persistence."
|
|
446
|
-
})] }), /* @__PURE__ */
|
|
476
|
+
})] }), /* @__PURE__ */ w("div", {
|
|
447
477
|
className: "flex flex-wrap gap-2",
|
|
448
478
|
children: [
|
|
449
|
-
/* @__PURE__ */
|
|
479
|
+
/* @__PURE__ */ w(N, {
|
|
450
480
|
type: "button",
|
|
451
481
|
onClick: () => t("/registration/register"),
|
|
452
|
-
children: [/* @__PURE__ */
|
|
482
|
+
children: [/* @__PURE__ */ C(k, { className: "h-4 w-4" }), "Register attendee"]
|
|
453
483
|
}),
|
|
454
|
-
/* @__PURE__ */
|
|
484
|
+
/* @__PURE__ */ w(N, {
|
|
455
485
|
type: "button",
|
|
456
486
|
variant: "outline",
|
|
457
487
|
onClick: () => t("/registration/attendees/create"),
|
|
458
|
-
children: [/* @__PURE__ */
|
|
488
|
+
children: [/* @__PURE__ */ C(A, { className: "h-4 w-4" }), "Add attendee"]
|
|
459
489
|
}),
|
|
460
|
-
/* @__PURE__ */
|
|
490
|
+
/* @__PURE__ */ w(N, {
|
|
461
491
|
type: "button",
|
|
462
492
|
variant: "outline",
|
|
463
493
|
onClick: () => t("/registration/promo-codes/create"),
|
|
464
|
-
children: [/* @__PURE__ */
|
|
494
|
+
children: [/* @__PURE__ */ C(O, { className: "h-4 w-4" }), "New promo code"]
|
|
465
495
|
})
|
|
466
496
|
]
|
|
467
497
|
})]
|
|
468
498
|
}) }),
|
|
469
|
-
/* @__PURE__ */
|
|
470
|
-
/* @__PURE__ */
|
|
471
|
-
/* @__PURE__ */
|
|
472
|
-
/* @__PURE__ */
|
|
499
|
+
/* @__PURE__ */ C(Q, {}),
|
|
500
|
+
/* @__PURE__ */ C($, {}),
|
|
501
|
+
/* @__PURE__ */ C(ee, {}),
|
|
502
|
+
/* @__PURE__ */ C(R, {
|
|
473
503
|
storageKey: "eventfullymanaged-registration",
|
|
474
504
|
title: "Grow your registrations",
|
|
475
505
|
steps: [
|
|
@@ -477,21 +507,21 @@ function X() {
|
|
|
477
507
|
id: "view-networking",
|
|
478
508
|
label: "Set up attendee networking",
|
|
479
509
|
description: "Turn registered attendees into connections with matchmaking.",
|
|
480
|
-
icon: /* @__PURE__ */
|
|
510
|
+
icon: /* @__PURE__ */ C(j, { className: "h-4 w-4" }),
|
|
481
511
|
onClick: () => t("/networking")
|
|
482
512
|
},
|
|
483
513
|
{
|
|
484
514
|
id: "promote",
|
|
485
515
|
label: "Promote with a campaign",
|
|
486
516
|
description: "Send reminders and offers to drive more sign-ups.",
|
|
487
|
-
icon: /* @__PURE__ */
|
|
517
|
+
icon: /* @__PURE__ */ C(E, { className: "h-4 w-4" }),
|
|
488
518
|
onClick: () => t("/communication")
|
|
489
519
|
},
|
|
490
520
|
{
|
|
491
521
|
id: "analyze",
|
|
492
522
|
label: "Snapshot your numbers",
|
|
493
523
|
description: "Capture an analytics snapshot to track registration trends.",
|
|
494
|
-
icon: /* @__PURE__ */
|
|
524
|
+
icon: /* @__PURE__ */ C(O, { className: "h-4 w-4" }),
|
|
495
525
|
onClick: () => t("/analytics")
|
|
496
526
|
}
|
|
497
527
|
]
|
|
@@ -500,6 +530,6 @@ function X() {
|
|
|
500
530
|
});
|
|
501
531
|
}
|
|
502
532
|
//#endregion
|
|
503
|
-
export {
|
|
533
|
+
export { te as default };
|
|
504
534
|
|
|
505
535
|
//# sourceMappingURL=RegistrationPage.js.map
|