@burdenoff/microfe-eventfullymanaged 2026.723.1 → 2026.728.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 +22 -0
- package/dist/eventfullymanaged/api/eventApi.d.ts.map +1 -1
- package/dist/eventfullymanaged/api/eventApi.js +74 -54
- package/dist/eventfullymanaged/api/eventApi.js.map +1 -1
- package/dist/eventfullymanaged/lib/offlineCheckInQueue.d.ts +54 -0
- package/dist/eventfullymanaged/lib/offlineCheckInQueue.d.ts.map +1 -0
- package/dist/eventfullymanaged/lib/offlineCheckInQueue.js +68 -0
- package/dist/eventfullymanaged/lib/offlineCheckInQueue.js.map +1 -0
- package/dist/eventfullymanaged/lib/useOfflineCheckInSync.d.ts +29 -0
- package/dist/eventfullymanaged/lib/useOfflineCheckInSync.d.ts.map +1 -0
- package/dist/eventfullymanaged/lib/useOfflineCheckInSync.js +73 -0
- package/dist/eventfullymanaged/lib/useOfflineCheckInSync.js.map +1 -0
- package/dist/eventfullymanaged/pages/modules/KioskPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/KioskPage.js +381 -311
- package/dist/eventfullymanaged/pages/modules/KioskPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/RegistrationPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/RegistrationPage.js +236 -182
- package/dist/eventfullymanaged/pages/modules/RegistrationPage.js.map +1 -1
- package/dist/eventfullymanaged/types/index.d.ts.map +1 -1
- package/package.json +3 -2
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { notify as e } from "../../lib/toast.js";
|
|
2
|
-
import { useAttendeesQuery as t, useCheckInRecordsQuery as n, useCheckInStationsQuery as r, useCreateCheckInRecordMutation as i, useCreateCheckInStationMutation as a, useDeleteCheckInRecordMutation as o, useDeleteCheckInStationMutation as s, useEventSessionsQuery as c, useEventsQuery as l,
|
|
3
|
-
import { ActionMenu as
|
|
4
|
-
import { Pagination as
|
|
5
|
-
import { describeError as
|
|
2
|
+
import { useAttendeesQuery as t, useCheckInRecordsQuery as n, useCheckInStationsQuery as r, useCreateCheckInRecordMutation as i, useCreateCheckInStationMutation as a, useDeleteCheckInRecordMutation as o, useDeleteCheckInStationMutation as s, useEventSessionsQuery as c, useEventsQuery as l, useScanCheckInMutation as u, useUpdateCheckInRecordMutation as d, useUpdateCheckInStationMutation as f } from "../../api/eventApi.js";
|
|
3
|
+
import { ActionMenu as p } from "../../components/ActionMenu.js";
|
|
4
|
+
import { Pagination as m, usePagination as h } from "../../components/Pagination.js";
|
|
5
|
+
import { describeError as g, mutationSucceeded as _ } from "../../lib/mutationResult.js";
|
|
6
6
|
import "../../components/index.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { enqueuePendingScan as v } from "../../lib/offlineCheckInQueue.js";
|
|
8
|
+
import { useOfflineCheckInSync as y } from "../../lib/useOfflineCheckInSync.js";
|
|
9
|
+
import { useCallback as b, useEffect as x, useMemo as S, useRef as C, useState as w } from "react";
|
|
10
|
+
import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
11
|
+
import { ArrowLeftFromLine as O, ArrowRightToLine as k, Camera as A, CameraOff as j, CloudOff as M, Keyboard as N, LogIn as ee, Plus as P, QrCode as te, RefreshCw as F, ScanLine as ne } from "lucide-react";
|
|
12
|
+
import { Badge as re, Button as I, EmphasisPanel as ie, GlassCard as L, GradientText as R, IllustratedEmptyState as z, Input as B, Label as V, PagePurpose as ae, ResponsiveDialog as H, ResponsiveDialogContent as U, ResponsiveDialogDescription as W, ResponsiveDialogFooter as G, ResponsiveDialogHeader as K, ResponsiveDialogTitle as q, ScrollArea as oe, Select as J, SelectContent as Y, SelectItem as X, SelectTrigger as Z, SelectValue as Q, Switch as se } from "@burdenoff/fe-libs/ui";
|
|
11
13
|
//#region src/eventfullymanaged/pages/modules/KioskPage.tsx
|
|
12
|
-
var ce = [
|
|
14
|
+
var ce = /^[^.\s]+\.[0-9a-f]{64}$/i, le = [
|
|
13
15
|
"DESK",
|
|
14
16
|
"GATE",
|
|
15
17
|
"SELF_SERVICE",
|
|
16
18
|
"MOBILE"
|
|
17
|
-
],
|
|
18
|
-
function
|
|
19
|
+
], ue = ["QR", "MANUAL"], de = ["IN", "OUT"];
|
|
20
|
+
function fe(e) {
|
|
19
21
|
if (!e || typeof e != "object") return {};
|
|
20
22
|
let t = e;
|
|
21
23
|
return {
|
|
@@ -25,30 +27,30 @@ function Y(e) {
|
|
|
25
27
|
isActive: typeof t.isActive == "boolean" ? t.isActive : void 0
|
|
26
28
|
};
|
|
27
29
|
}
|
|
28
|
-
function
|
|
30
|
+
function pe(e) {
|
|
29
31
|
return e.trim().toUpperCase().replace(/[^A-Z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 24) || "STATION";
|
|
30
32
|
}
|
|
31
|
-
function
|
|
33
|
+
function me(e) {
|
|
32
34
|
let t = e.trim().split(/\s+/).filter(Boolean);
|
|
33
35
|
return t.length === 0 ? "?" : t.length === 1 ? t[0].slice(0, 2).toUpperCase() : (t[0][0] + t[t.length - 1][0]).toUpperCase();
|
|
34
36
|
}
|
|
35
|
-
function
|
|
37
|
+
function he(e) {
|
|
36
38
|
let t = new Date(e);
|
|
37
39
|
return Number.isNaN(t.getTime()) ? "" : t.toLocaleTimeString([], {
|
|
38
40
|
hour: "numeric",
|
|
39
41
|
minute: "2-digit"
|
|
40
42
|
});
|
|
41
43
|
}
|
|
42
|
-
function
|
|
43
|
-
let t = typeof window < "u" && !!window.BarcodeDetector, n =
|
|
44
|
+
function ge({ onDetected: e }) {
|
|
45
|
+
let t = typeof window < "u" && !!window.BarcodeDetector, n = C(null), r = C(null), i = C(null), [a, o] = w(!1), [s, c] = w(null), l = b(() => {
|
|
44
46
|
if (i.current &&= (clearInterval(i.current), null), r.current) {
|
|
45
47
|
for (let e of r.current.getTracks()) e.stop();
|
|
46
48
|
r.current = null;
|
|
47
49
|
}
|
|
48
50
|
n.current && (n.current.srcObject = null), o(!1);
|
|
49
51
|
}, []);
|
|
50
|
-
|
|
51
|
-
let u =
|
|
52
|
+
x(() => l, [l]);
|
|
53
|
+
let u = b(async () => {
|
|
52
54
|
if (!(!t || !window.BarcodeDetector)) {
|
|
53
55
|
c(null);
|
|
54
56
|
try {
|
|
@@ -76,63 +78,63 @@ function Z({ onDetected: e }) {
|
|
|
76
78
|
l,
|
|
77
79
|
t
|
|
78
80
|
]);
|
|
79
|
-
return /* @__PURE__ */
|
|
81
|
+
return /* @__PURE__ */ D("div", {
|
|
80
82
|
className: "relative aspect-square w-full overflow-hidden rounded-card border-2 border-accent-primary/70 bg-bg-sunken",
|
|
81
83
|
children: [
|
|
82
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ E("video", {
|
|
83
85
|
ref: n,
|
|
84
86
|
className: `h-full w-full object-cover transition-opacity duration-300 ${a ? "opacity-100" : "opacity-0"}`,
|
|
85
87
|
muted: !0,
|
|
86
88
|
playsInline: !0,
|
|
87
89
|
"aria-label": "Attendee QR camera preview"
|
|
88
90
|
}),
|
|
89
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ E("div", {
|
|
90
92
|
className: "pointer-events-none absolute inset-0 p-5",
|
|
91
|
-
children: /* @__PURE__ */
|
|
93
|
+
children: /* @__PURE__ */ D("div", {
|
|
92
94
|
className: "relative h-full w-full",
|
|
93
95
|
children: [
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
a ? /* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ E("span", { className: "absolute left-0 top-0 h-10 w-10 rounded-tl-lg border-l-4 border-t-4 border-accent-primary" }),
|
|
97
|
+
/* @__PURE__ */ E("span", { className: "absolute right-0 top-0 h-10 w-10 rounded-tr-lg border-r-4 border-t-4 border-accent-primary" }),
|
|
98
|
+
/* @__PURE__ */ E("span", { className: "absolute bottom-0 left-0 h-10 w-10 rounded-bl-lg border-b-4 border-l-4 border-accent-primary" }),
|
|
99
|
+
/* @__PURE__ */ E("span", { className: "absolute bottom-0 right-0 h-10 w-10 rounded-br-lg border-b-4 border-r-4 border-accent-primary" }),
|
|
100
|
+
a ? /* @__PURE__ */ E("span", { className: "absolute inset-x-6 top-1/2 h-0.5 animate-pulse bg-accent-primary/80" }) : null
|
|
99
101
|
]
|
|
100
102
|
})
|
|
101
103
|
}),
|
|
102
|
-
a ? /* @__PURE__ */
|
|
104
|
+
a ? /* @__PURE__ */ D("div", {
|
|
103
105
|
className: "absolute inset-x-0 bottom-0 flex items-center justify-between gap-2 bg-bg-canvas/70 p-3 backdrop-blur",
|
|
104
|
-
children: [/* @__PURE__ */
|
|
106
|
+
children: [/* @__PURE__ */ D("span", {
|
|
105
107
|
className: "flex items-center gap-1.5 text-xs font-medium text-text-primary",
|
|
106
|
-
children: [/* @__PURE__ */
|
|
107
|
-
}), /* @__PURE__ */
|
|
108
|
+
children: [/* @__PURE__ */ E("span", { className: "h-2 w-2 animate-pulse rounded-full bg-status-success-text" }), "Scanning…"]
|
|
109
|
+
}), /* @__PURE__ */ D(I, {
|
|
108
110
|
type: "button",
|
|
109
111
|
size: "sm",
|
|
110
112
|
variant: "outline",
|
|
111
113
|
onClick: l,
|
|
112
|
-
children: [/* @__PURE__ */
|
|
114
|
+
children: [/* @__PURE__ */ E(j, { className: "h-4 w-4" }), "Stop"]
|
|
113
115
|
})]
|
|
114
|
-
}) : /* @__PURE__ */
|
|
116
|
+
}) : /* @__PURE__ */ D("div", {
|
|
115
117
|
className: "absolute inset-0 flex flex-col items-center justify-center gap-3 text-center",
|
|
116
118
|
children: [
|
|
117
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ E(te, {
|
|
118
120
|
className: "h-16 w-16 text-text-muted",
|
|
119
121
|
"aria-hidden": "true"
|
|
120
122
|
}),
|
|
121
|
-
/* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ E("p", {
|
|
122
124
|
className: "text-lg font-semibold text-text-primary",
|
|
123
125
|
children: "Scan attendee QR"
|
|
124
126
|
}),
|
|
125
|
-
t ? /* @__PURE__ */
|
|
127
|
+
t ? /* @__PURE__ */ D(I, {
|
|
126
128
|
type: "button",
|
|
127
129
|
size: "sm",
|
|
128
130
|
variant: "secondary",
|
|
129
131
|
onClick: () => void u(),
|
|
130
|
-
children: [/* @__PURE__ */
|
|
131
|
-
}) : /* @__PURE__ */
|
|
132
|
+
children: [/* @__PURE__ */ E(A, { className: "h-4 w-4" }), "Start camera"]
|
|
133
|
+
}) : /* @__PURE__ */ E("p", {
|
|
132
134
|
className: "max-w-56 text-xs text-text-secondary",
|
|
133
135
|
children: "Camera scanning isn't available in this browser — use manual lookup below."
|
|
134
136
|
}),
|
|
135
|
-
s ? /* @__PURE__ */
|
|
137
|
+
s ? /* @__PURE__ */ E("p", {
|
|
136
138
|
className: "max-w-56 text-xs text-status-danger-text",
|
|
137
139
|
children: s
|
|
138
140
|
}) : null
|
|
@@ -141,31 +143,31 @@ function Z({ onDetected: e }) {
|
|
|
141
143
|
]
|
|
142
144
|
});
|
|
143
145
|
}
|
|
144
|
-
function
|
|
145
|
-
return /* @__PURE__ */
|
|
146
|
+
function $({ label: e, value: t, options: n, onChange: r }) {
|
|
147
|
+
return /* @__PURE__ */ D("div", {
|
|
146
148
|
className: "space-y-1.5",
|
|
147
|
-
children: [/* @__PURE__ */
|
|
149
|
+
children: [/* @__PURE__ */ E("span", {
|
|
148
150
|
className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
149
151
|
children: e
|
|
150
|
-
}), /* @__PURE__ */
|
|
152
|
+
}), /* @__PURE__ */ E("div", {
|
|
151
153
|
role: "group",
|
|
152
154
|
"aria-label": e,
|
|
153
155
|
className: "inline-flex rounded-input border border-border-default bg-bg-sunken p-0.5",
|
|
154
156
|
children: n.map((e) => {
|
|
155
157
|
let n = e.icon, i = e.value === t;
|
|
156
|
-
return /* @__PURE__ */
|
|
158
|
+
return /* @__PURE__ */ D("button", {
|
|
157
159
|
type: "button",
|
|
158
160
|
"aria-pressed": i,
|
|
159
161
|
onClick: () => r(e.value),
|
|
160
162
|
className: `inline-flex items-center gap-1.5 rounded-[calc(var(--radius-input)-2px)] px-3 py-1.5 text-sm font-medium transition-colors ${i ? "bg-action-primary-bg text-action-primary-text shadow-elevation-1" : "text-text-secondary hover:text-text-primary"}`,
|
|
161
|
-
children: [n ? /* @__PURE__ */
|
|
163
|
+
children: [n ? /* @__PURE__ */ E(n, { className: "h-4 w-4" }) : null, e.label]
|
|
162
164
|
}, e.value);
|
|
163
165
|
})
|
|
164
166
|
})]
|
|
165
167
|
});
|
|
166
168
|
}
|
|
167
|
-
function
|
|
168
|
-
let s = !!o, [c, { loading: l }] = a(), [u, { loading:
|
|
169
|
+
function _e({ open: t, onOpenChange: n, eventId: r, eventName: i, station: o }) {
|
|
170
|
+
let s = !!o, [c, { loading: l }] = a(), [u, { loading: d }] = f(), p = S(() => {
|
|
169
171
|
if (!o) return {
|
|
170
172
|
name: "",
|
|
171
173
|
code: "",
|
|
@@ -173,38 +175,38 @@ function fe({ open: t, onOpenChange: n, eventId: r, eventName: i, station: o })
|
|
|
173
175
|
type: "DESK",
|
|
174
176
|
isActive: !0
|
|
175
177
|
};
|
|
176
|
-
let e =
|
|
178
|
+
let e = fe(o.metadata);
|
|
177
179
|
return {
|
|
178
180
|
name: o.name ?? "",
|
|
179
|
-
code: e.code ??
|
|
181
|
+
code: e.code ?? pe(o.name ?? ""),
|
|
180
182
|
location: e.location ?? "",
|
|
181
183
|
type: e.type ?? "DESK",
|
|
182
184
|
isActive: e.isActive ?? !0
|
|
183
185
|
};
|
|
184
|
-
}, [o]), [m,
|
|
185
|
-
t && v !==
|
|
186
|
-
let
|
|
187
|
-
|
|
186
|
+
}, [o]), [m, h] = w(p), [v, y] = w(null), b = `${t ? "open" : "closed"}:${o?.id ?? "new"}`;
|
|
187
|
+
t && v !== b && (y(b), h(p)), !t && v !== null && y(null);
|
|
188
|
+
let x = (e, t) => {
|
|
189
|
+
h((n) => ({
|
|
188
190
|
...n,
|
|
189
191
|
[e]: t
|
|
190
192
|
}));
|
|
191
|
-
},
|
|
192
|
-
return /* @__PURE__ */
|
|
193
|
+
}, C = l || d;
|
|
194
|
+
return /* @__PURE__ */ E(H, {
|
|
193
195
|
open: t,
|
|
194
196
|
onOpenChange: n,
|
|
195
|
-
children: /* @__PURE__ */
|
|
197
|
+
children: /* @__PURE__ */ D(U, {
|
|
196
198
|
className: "max-w-lg",
|
|
197
199
|
children: [
|
|
198
|
-
/* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ D(K, { children: [/* @__PURE__ */ E(q, { children: s ? "Edit check-in station" : "New check-in station" }), /* @__PURE__ */ D(W, { children: [
|
|
199
201
|
"A station is a desk, gate or device where attendees scan in at ",
|
|
200
202
|
i,
|
|
201
203
|
"."
|
|
202
204
|
] })] }),
|
|
203
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ D("form", {
|
|
204
206
|
id: "station-form",
|
|
205
207
|
onSubmit: async (t) => {
|
|
206
208
|
t.preventDefault();
|
|
207
|
-
let a = m.code.trim() ||
|
|
209
|
+
let a = m.code.trim() || pe(m.name), l = {
|
|
208
210
|
eventId: r,
|
|
209
211
|
name: m.name.trim(),
|
|
210
212
|
code: a,
|
|
@@ -224,132 +226,132 @@ function fe({ open: t, onOpenChange: n, eventId: r, eventName: i, station: o })
|
|
|
224
226
|
id: o.id,
|
|
225
227
|
input: l
|
|
226
228
|
} });
|
|
227
|
-
if (!
|
|
229
|
+
if (!_(t, t.data?.updateCheckInStation?.id, "Could not update station")) return;
|
|
228
230
|
e.success("Station updated", `“${l.name}” is now ${m.isActive ? "active" : "disabled"}.`);
|
|
229
231
|
} else {
|
|
230
232
|
let t = await c({ variables: { input: l } });
|
|
231
|
-
if (!
|
|
233
|
+
if (!_(t, t.data?.createCheckInStation?.id, "Could not create station")) return;
|
|
232
234
|
e.success("Station created", `“${l.name}” is ready at ${i}.`);
|
|
233
235
|
}
|
|
234
236
|
n(!1);
|
|
235
237
|
} catch (t) {
|
|
236
|
-
e.error("Could not save station",
|
|
238
|
+
e.error("Could not save station", g(t));
|
|
237
239
|
}
|
|
238
240
|
},
|
|
239
241
|
className: "space-y-4",
|
|
240
242
|
children: [
|
|
241
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ D("div", {
|
|
242
244
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
243
|
-
children: [/* @__PURE__ */
|
|
245
|
+
children: [/* @__PURE__ */ D("label", {
|
|
244
246
|
className: "space-y-1 text-sm",
|
|
245
|
-
children: [/* @__PURE__ */
|
|
247
|
+
children: [/* @__PURE__ */ E("span", {
|
|
246
248
|
className: "font-medium text-text-primary",
|
|
247
249
|
children: "Name"
|
|
248
|
-
}), /* @__PURE__ */
|
|
250
|
+
}), /* @__PURE__ */ E(B, {
|
|
249
251
|
value: m.name,
|
|
250
|
-
onChange: (e) =>
|
|
252
|
+
onChange: (e) => x("name", e.target.value),
|
|
251
253
|
placeholder: "Main entrance",
|
|
252
254
|
required: !0
|
|
253
255
|
})]
|
|
254
|
-
}), /* @__PURE__ */
|
|
256
|
+
}), /* @__PURE__ */ D("label", {
|
|
255
257
|
className: "space-y-1 text-sm",
|
|
256
|
-
children: [/* @__PURE__ */
|
|
258
|
+
children: [/* @__PURE__ */ E("span", {
|
|
257
259
|
className: "font-medium text-text-primary",
|
|
258
260
|
children: "Code"
|
|
259
|
-
}), /* @__PURE__ */
|
|
261
|
+
}), /* @__PURE__ */ E(B, {
|
|
260
262
|
value: m.code,
|
|
261
|
-
onChange: (e) =>
|
|
263
|
+
onChange: (e) => x("code", e.target.value),
|
|
262
264
|
placeholder: "Auto from name"
|
|
263
265
|
})]
|
|
264
266
|
})]
|
|
265
267
|
}),
|
|
266
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ D("div", {
|
|
267
269
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
268
|
-
children: [/* @__PURE__ */
|
|
270
|
+
children: [/* @__PURE__ */ D("label", {
|
|
269
271
|
className: "space-y-1 text-sm",
|
|
270
|
-
children: [/* @__PURE__ */
|
|
272
|
+
children: [/* @__PURE__ */ E("span", {
|
|
271
273
|
className: "font-medium text-text-primary",
|
|
272
274
|
children: "Location"
|
|
273
|
-
}), /* @__PURE__ */
|
|
275
|
+
}), /* @__PURE__ */ E(B, {
|
|
274
276
|
value: m.location,
|
|
275
|
-
onChange: (e) =>
|
|
277
|
+
onChange: (e) => x("location", e.target.value),
|
|
276
278
|
placeholder: "North lobby"
|
|
277
279
|
})]
|
|
278
|
-
}), /* @__PURE__ */
|
|
280
|
+
}), /* @__PURE__ */ D("label", {
|
|
279
281
|
className: "space-y-1 text-sm",
|
|
280
|
-
children: [/* @__PURE__ */
|
|
282
|
+
children: [/* @__PURE__ */ E("span", {
|
|
281
283
|
className: "font-medium text-text-primary",
|
|
282
284
|
children: "Type"
|
|
283
|
-
}), /* @__PURE__ */
|
|
285
|
+
}), /* @__PURE__ */ D(J, {
|
|
284
286
|
value: m.type,
|
|
285
|
-
onValueChange: (e) =>
|
|
286
|
-
children: [/* @__PURE__ */
|
|
287
|
+
onValueChange: (e) => x("type", e),
|
|
288
|
+
children: [/* @__PURE__ */ E(Z, {
|
|
287
289
|
"aria-label": "Station type",
|
|
288
|
-
children: /* @__PURE__ */
|
|
289
|
-
}), /* @__PURE__ */
|
|
290
|
+
children: /* @__PURE__ */ E(Q, {})
|
|
291
|
+
}), /* @__PURE__ */ E(Y, { children: le.map((e) => /* @__PURE__ */ E(X, {
|
|
290
292
|
value: e,
|
|
291
293
|
children: e.replace("_", " ")
|
|
292
294
|
}, e)) })]
|
|
293
295
|
})]
|
|
294
296
|
})]
|
|
295
297
|
}),
|
|
296
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ D("div", {
|
|
297
299
|
className: "flex items-center justify-between rounded-card border border-border-seam bg-bg-surface p-3",
|
|
298
|
-
children: [/* @__PURE__ */
|
|
300
|
+
children: [/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E(V, {
|
|
299
301
|
htmlFor: "station-active",
|
|
300
302
|
className: "text-text-primary",
|
|
301
303
|
children: "Active"
|
|
302
|
-
}), /* @__PURE__ */
|
|
304
|
+
}), /* @__PURE__ */ E("p", {
|
|
303
305
|
className: "text-xs text-text-secondary",
|
|
304
306
|
children: "Disabled stations stay configured but cannot accept scans."
|
|
305
|
-
})] }), /* @__PURE__ */
|
|
307
|
+
})] }), /* @__PURE__ */ E(se, {
|
|
306
308
|
id: "station-active",
|
|
307
309
|
checked: m.isActive,
|
|
308
|
-
onCheckedChange: (e) =>
|
|
310
|
+
onCheckedChange: (e) => x("isActive", e),
|
|
309
311
|
"aria-label": "Station active"
|
|
310
312
|
})]
|
|
311
313
|
})
|
|
312
314
|
]
|
|
313
315
|
}),
|
|
314
|
-
/* @__PURE__ */
|
|
316
|
+
/* @__PURE__ */ D(G, { children: [/* @__PURE__ */ E(I, {
|
|
315
317
|
type: "button",
|
|
316
318
|
variant: "outline",
|
|
317
319
|
onClick: () => n(!1),
|
|
318
|
-
disabled:
|
|
320
|
+
disabled: C,
|
|
319
321
|
children: "Cancel"
|
|
320
|
-
}), /* @__PURE__ */
|
|
322
|
+
}), /* @__PURE__ */ E(I, {
|
|
321
323
|
type: "submit",
|
|
322
324
|
form: "station-form",
|
|
323
|
-
disabled:
|
|
324
|
-
children:
|
|
325
|
+
disabled: C,
|
|
326
|
+
children: C ? "Saving…" : s ? "Save station" : "Create station"
|
|
325
327
|
})] })
|
|
326
328
|
]
|
|
327
329
|
})
|
|
328
330
|
});
|
|
329
331
|
}
|
|
330
|
-
function
|
|
331
|
-
let [a, { loading: o }] =
|
|
332
|
+
function ve({ open: t, onOpenChange: n, record: r, stations: i }) {
|
|
333
|
+
let [a, { loading: o }] = d(), s = S(() => ({
|
|
332
334
|
method: r?.method ?? "MANUAL",
|
|
333
335
|
direction: r?.direction ?? "IN",
|
|
334
336
|
status: r?.status ?? "checked_in",
|
|
335
337
|
stationId: r?.stationId ?? "",
|
|
336
338
|
attendeeId: r?.attendeeId ?? ""
|
|
337
|
-
}), [r]), [c, l] =
|
|
338
|
-
t &&
|
|
339
|
+
}), [r]), [c, l] = w(s), [u, f] = w(null), p = `${t ? "open" : "closed"}:${r?.id ?? "none"}`;
|
|
340
|
+
t && u !== p && (f(p), l(s)), !t && u !== null && f(null);
|
|
339
341
|
let m = (e, t) => {
|
|
340
342
|
l((n) => ({
|
|
341
343
|
...n,
|
|
342
344
|
[e]: t
|
|
343
345
|
}));
|
|
344
346
|
};
|
|
345
|
-
return /* @__PURE__ */
|
|
347
|
+
return /* @__PURE__ */ E(H, {
|
|
346
348
|
open: t,
|
|
347
349
|
onOpenChange: n,
|
|
348
|
-
children: /* @__PURE__ */
|
|
350
|
+
children: /* @__PURE__ */ D(U, {
|
|
349
351
|
className: "max-w-lg",
|
|
350
352
|
children: [
|
|
351
|
-
/* @__PURE__ */
|
|
352
|
-
/* @__PURE__ */
|
|
353
|
+
/* @__PURE__ */ D(K, { children: [/* @__PURE__ */ E(q, { children: "Edit check-in record" }), /* @__PURE__ */ E(W, { children: "Correct the direction, method or station for this scan." })] }),
|
|
354
|
+
/* @__PURE__ */ D("form", {
|
|
353
355
|
id: "record-form",
|
|
354
356
|
onSubmit: async (t) => {
|
|
355
357
|
if (t.preventDefault(), !r) return;
|
|
@@ -368,86 +370,86 @@ function pe({ open: t, onOpenChange: n, record: r, stations: i }) {
|
|
|
368
370
|
id: r.id,
|
|
369
371
|
input: i
|
|
370
372
|
} });
|
|
371
|
-
if (!
|
|
373
|
+
if (!_(t, t.data?.updateCheckInRecord?.id, "Could not update record")) return;
|
|
372
374
|
e.success("Check-in updated"), n(!1);
|
|
373
375
|
} catch (t) {
|
|
374
|
-
e.error("Could not update record",
|
|
376
|
+
e.error("Could not update record", g(t));
|
|
375
377
|
}
|
|
376
378
|
},
|
|
377
379
|
className: "space-y-4",
|
|
378
380
|
children: [
|
|
379
|
-
/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ D("label", {
|
|
380
382
|
className: "block space-y-1 text-sm",
|
|
381
|
-
children: [/* @__PURE__ */
|
|
383
|
+
children: [/* @__PURE__ */ E("span", {
|
|
382
384
|
className: "font-medium text-text-primary",
|
|
383
385
|
children: "Attendee ID"
|
|
384
|
-
}), /* @__PURE__ */
|
|
386
|
+
}), /* @__PURE__ */ E(B, {
|
|
385
387
|
value: c.attendeeId,
|
|
386
388
|
onChange: (e) => m("attendeeId", e.target.value)
|
|
387
389
|
})]
|
|
388
390
|
}),
|
|
389
|
-
/* @__PURE__ */
|
|
391
|
+
/* @__PURE__ */ D("div", {
|
|
390
392
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
391
|
-
children: [/* @__PURE__ */
|
|
393
|
+
children: [/* @__PURE__ */ D("label", {
|
|
392
394
|
className: "space-y-1 text-sm",
|
|
393
|
-
children: [/* @__PURE__ */
|
|
395
|
+
children: [/* @__PURE__ */ E("span", {
|
|
394
396
|
className: "font-medium text-text-primary",
|
|
395
397
|
children: "Method"
|
|
396
|
-
}), /* @__PURE__ */
|
|
398
|
+
}), /* @__PURE__ */ D(J, {
|
|
397
399
|
value: c.method,
|
|
398
400
|
onValueChange: (e) => m("method", e),
|
|
399
|
-
children: [/* @__PURE__ */
|
|
401
|
+
children: [/* @__PURE__ */ E(Z, {
|
|
400
402
|
"aria-label": "Method",
|
|
401
|
-
children: /* @__PURE__ */
|
|
402
|
-
}), /* @__PURE__ */
|
|
403
|
+
children: /* @__PURE__ */ E(Q, {})
|
|
404
|
+
}), /* @__PURE__ */ E(Y, { children: ue.map((e) => /* @__PURE__ */ E(X, {
|
|
403
405
|
value: e,
|
|
404
406
|
children: e
|
|
405
407
|
}, e)) })]
|
|
406
408
|
})]
|
|
407
|
-
}), /* @__PURE__ */
|
|
409
|
+
}), /* @__PURE__ */ D("label", {
|
|
408
410
|
className: "space-y-1 text-sm",
|
|
409
|
-
children: [/* @__PURE__ */
|
|
411
|
+
children: [/* @__PURE__ */ E("span", {
|
|
410
412
|
className: "font-medium text-text-primary",
|
|
411
413
|
children: "Direction"
|
|
412
|
-
}), /* @__PURE__ */
|
|
414
|
+
}), /* @__PURE__ */ D(J, {
|
|
413
415
|
value: c.direction,
|
|
414
416
|
onValueChange: (e) => m("direction", e),
|
|
415
|
-
children: [/* @__PURE__ */
|
|
417
|
+
children: [/* @__PURE__ */ E(Z, {
|
|
416
418
|
"aria-label": "Direction",
|
|
417
|
-
children: /* @__PURE__ */
|
|
418
|
-
}), /* @__PURE__ */
|
|
419
|
+
children: /* @__PURE__ */ E(Q, {})
|
|
420
|
+
}), /* @__PURE__ */ E(Y, { children: de.map((e) => /* @__PURE__ */ E(X, {
|
|
419
421
|
value: e,
|
|
420
422
|
children: e
|
|
421
423
|
}, e)) })]
|
|
422
424
|
})]
|
|
423
425
|
})]
|
|
424
426
|
}),
|
|
425
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ D("div", {
|
|
426
428
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
427
|
-
children: [/* @__PURE__ */
|
|
429
|
+
children: [/* @__PURE__ */ D("label", {
|
|
428
430
|
className: "space-y-1 text-sm",
|
|
429
|
-
children: [/* @__PURE__ */
|
|
431
|
+
children: [/* @__PURE__ */ E("span", {
|
|
430
432
|
className: "font-medium text-text-primary",
|
|
431
433
|
children: "Status"
|
|
432
|
-
}), /* @__PURE__ */
|
|
434
|
+
}), /* @__PURE__ */ E(B, {
|
|
433
435
|
value: c.status,
|
|
434
436
|
onChange: (e) => m("status", e.target.value)
|
|
435
437
|
})]
|
|
436
|
-
}), /* @__PURE__ */
|
|
438
|
+
}), /* @__PURE__ */ D("label", {
|
|
437
439
|
className: "space-y-1 text-sm",
|
|
438
|
-
children: [/* @__PURE__ */
|
|
440
|
+
children: [/* @__PURE__ */ E("span", {
|
|
439
441
|
className: "font-medium text-text-primary",
|
|
440
442
|
children: "Station"
|
|
441
|
-
}), /* @__PURE__ */
|
|
443
|
+
}), /* @__PURE__ */ D(J, {
|
|
442
444
|
value: c.stationId || "none",
|
|
443
445
|
onValueChange: (e) => m("stationId", e === "none" ? "" : e),
|
|
444
|
-
children: [/* @__PURE__ */
|
|
446
|
+
children: [/* @__PURE__ */ E(Z, {
|
|
445
447
|
"aria-label": "Station",
|
|
446
|
-
children: /* @__PURE__ */
|
|
447
|
-
}), /* @__PURE__ */
|
|
448
|
+
children: /* @__PURE__ */ E(Q, {})
|
|
449
|
+
}), /* @__PURE__ */ D(Y, { children: [/* @__PURE__ */ E(X, {
|
|
448
450
|
value: "none",
|
|
449
451
|
children: "No station"
|
|
450
|
-
}), i.map((e) => /* @__PURE__ */
|
|
452
|
+
}), i.map((e) => /* @__PURE__ */ E(X, {
|
|
451
453
|
value: e.id,
|
|
452
454
|
children: e.name ?? e.id
|
|
453
455
|
}, e.id))] })]
|
|
@@ -456,13 +458,13 @@ function pe({ open: t, onOpenChange: n, record: r, stations: i }) {
|
|
|
456
458
|
})
|
|
457
459
|
]
|
|
458
460
|
}),
|
|
459
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ D(G, { children: [/* @__PURE__ */ E(I, {
|
|
460
462
|
type: "button",
|
|
461
463
|
variant: "outline",
|
|
462
464
|
onClick: () => n(!1),
|
|
463
465
|
disabled: o,
|
|
464
466
|
children: "Cancel"
|
|
465
|
-
}), /* @__PURE__ */
|
|
467
|
+
}), /* @__PURE__ */ E(I, {
|
|
466
468
|
type: "submit",
|
|
467
469
|
form: "record-form",
|
|
468
470
|
disabled: o,
|
|
@@ -472,12 +474,12 @@ function pe({ open: t, onOpenChange: n, record: r, stations: i }) {
|
|
|
472
474
|
})
|
|
473
475
|
});
|
|
474
476
|
}
|
|
475
|
-
function
|
|
476
|
-
let [
|
|
477
|
+
function ye({ eventId: t, eventName: n, stations: r, attendees: a, activeStationId: o, onStationChange: s, onCheckedIn: l }) {
|
|
478
|
+
let [d, f] = w(""), [p, m] = w("QR"), [h, b] = w("IN"), [x, S] = w(""), T = C(null), [A, { loading: j }] = i(), [P] = u(), ie = c({
|
|
477
479
|
eventId: t,
|
|
478
480
|
limit: 100,
|
|
479
481
|
offset: 0
|
|
480
|
-
}).data?.eventSessions.items ?? [],
|
|
482
|
+
}).data?.eventSessions.items ?? [], { isOnline: R, pendingCount: z, syncNow: V } = y(P, l), ae = (e) => {
|
|
481
483
|
let t = e.trim();
|
|
482
484
|
if (!t) return {
|
|
483
485
|
attendeeId: null,
|
|
@@ -498,147 +500,215 @@ function me({ eventId: t, eventName: n, stations: r, attendees: a, activeStation
|
|
|
498
500
|
label: n?.fullName ?? `attendee ${t}`,
|
|
499
501
|
matched: !!n
|
|
500
502
|
};
|
|
503
|
+
}, H = (t) => {
|
|
504
|
+
f(t), m("QR"), e.info("QR captured", "Confirm the details and tap Check in."), T.current?.focus();
|
|
505
|
+
}, U = async (t) => {
|
|
506
|
+
let n = crypto.randomUUID(), i = (/* @__PURE__ */ new Date()).toISOString(), a = {
|
|
507
|
+
clientScanId: n,
|
|
508
|
+
token: t,
|
|
509
|
+
stationId: o || null,
|
|
510
|
+
sessionId: x || null,
|
|
511
|
+
method: "QR",
|
|
512
|
+
direction: h,
|
|
513
|
+
scannedAt: i
|
|
514
|
+
}, s = async (t) => {
|
|
515
|
+
await v(a), e.success("Saved on this device", t), f(""), T.current?.focus();
|
|
516
|
+
};
|
|
517
|
+
if (typeof navigator < "u" && !navigator.onLine) {
|
|
518
|
+
await s("No connection right now — this check-in will sync automatically once you're back online.");
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
try {
|
|
522
|
+
let a = await P({ variables: { input: {
|
|
523
|
+
token: t,
|
|
524
|
+
stationId: o || null,
|
|
525
|
+
sessionId: x || null,
|
|
526
|
+
method: "QR",
|
|
527
|
+
direction: h,
|
|
528
|
+
recordedAt: i,
|
|
529
|
+
clientScanId: n
|
|
530
|
+
} } });
|
|
531
|
+
if (a.error) {
|
|
532
|
+
e.error("Could not record check-in", a.error.message);
|
|
533
|
+
return;
|
|
534
|
+
}
|
|
535
|
+
if (!a.data?.scanCheckIn?.id) {
|
|
536
|
+
e.error("Could not record check-in", "The server did not confirm the change.");
|
|
537
|
+
return;
|
|
538
|
+
}
|
|
539
|
+
let s = r.find((e) => e.id === o);
|
|
540
|
+
e.success(`Checked ${h === "OUT" ? "out" : "in"}`, `Recorded via QR${s?.name ? ` • ${s.name}` : ""}.`), f(""), T.current?.focus(), l();
|
|
541
|
+
} catch {
|
|
542
|
+
await s("Connection dropped — this check-in will sync automatically once you're back online.");
|
|
543
|
+
}
|
|
501
544
|
};
|
|
502
|
-
return /* @__PURE__ */
|
|
545
|
+
return /* @__PURE__ */ D(L, {
|
|
503
546
|
treatment: "glass",
|
|
504
547
|
glow: !0,
|
|
505
548
|
className: "border-border-seam p-5 sm:p-6",
|
|
506
549
|
children: [
|
|
507
|
-
/* @__PURE__ */
|
|
508
|
-
className: "flex items-center gap-2",
|
|
509
|
-
children: [/* @__PURE__ */
|
|
510
|
-
className: "
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
550
|
+
/* @__PURE__ */ D("div", {
|
|
551
|
+
className: "flex items-center justify-between gap-2",
|
|
552
|
+
children: [/* @__PURE__ */ D("div", {
|
|
553
|
+
className: "flex items-center gap-2",
|
|
554
|
+
children: [/* @__PURE__ */ E(ne, {
|
|
555
|
+
className: "h-5 w-5 text-accent-primary",
|
|
556
|
+
"aria-hidden": "true"
|
|
557
|
+
}), /* @__PURE__ */ E("h2", {
|
|
558
|
+
className: "text-lg font-semibold text-text-primary",
|
|
559
|
+
children: "Kiosk mode"
|
|
560
|
+
})]
|
|
561
|
+
}), !R || z > 0 ? /* @__PURE__ */ D("div", {
|
|
562
|
+
className: "flex items-center gap-2",
|
|
563
|
+
children: [/* @__PURE__ */ D(re, {
|
|
564
|
+
variant: R ? "secondary" : "destructive",
|
|
565
|
+
className: "flex items-center gap-1",
|
|
566
|
+
children: [
|
|
567
|
+
/* @__PURE__ */ E(M, {
|
|
568
|
+
className: "h-3 w-3",
|
|
569
|
+
"aria-hidden": "true"
|
|
570
|
+
}),
|
|
571
|
+
R ? "Syncing…" : "Offline",
|
|
572
|
+
z > 0 ? ` · ${z} queued` : ""
|
|
573
|
+
]
|
|
574
|
+
}), R && z > 0 ? /* @__PURE__ */ D(I, {
|
|
575
|
+
type: "button",
|
|
576
|
+
size: "sm",
|
|
577
|
+
variant: "outline",
|
|
578
|
+
onClick: V,
|
|
579
|
+
children: [/* @__PURE__ */ E(F, { className: "h-3.5 w-3.5" }), "Sync now"]
|
|
580
|
+
}) : null]
|
|
581
|
+
}) : null]
|
|
516
582
|
}),
|
|
517
|
-
/* @__PURE__ */
|
|
583
|
+
/* @__PURE__ */ D("p", {
|
|
518
584
|
className: "mt-1 text-sm text-text-secondary",
|
|
519
585
|
children: [
|
|
520
586
|
"Scan an attendee badge or look them up, set the direction, and check them into ",
|
|
521
587
|
n,
|
|
522
|
-
"."
|
|
588
|
+
".",
|
|
589
|
+
z > 0 ? " Scans queue on this device and sync automatically once you have a connection." : ""
|
|
523
590
|
]
|
|
524
591
|
}),
|
|
525
|
-
/* @__PURE__ */
|
|
592
|
+
/* @__PURE__ */ E("div", {
|
|
526
593
|
className: "mt-5",
|
|
527
|
-
children: /* @__PURE__ */
|
|
528
|
-
d(t), p("QR"), e.info("QR captured", "Confirm the details and tap Check in."), S.current?.focus();
|
|
529
|
-
} })
|
|
594
|
+
children: /* @__PURE__ */ E(ge, { onDetected: H })
|
|
530
595
|
}),
|
|
531
|
-
/* @__PURE__ */
|
|
596
|
+
/* @__PURE__ */ D("form", {
|
|
532
597
|
onSubmit: async (n) => {
|
|
533
598
|
n.preventDefault();
|
|
534
|
-
let
|
|
535
|
-
if (
|
|
536
|
-
|
|
599
|
+
let i = d.trim();
|
|
600
|
+
if (p === "QR" && ce.test(i)) {
|
|
601
|
+
await U(i);
|
|
537
602
|
return;
|
|
538
603
|
}
|
|
539
|
-
let s =
|
|
604
|
+
let { attendeeId: a, label: s } = ae(d);
|
|
605
|
+
if (d.trim().includes("@") && !a) {
|
|
606
|
+
e.error("Attendee not found", `No attendee at this event matches “${d.trim()}”.`);
|
|
607
|
+
return;
|
|
608
|
+
}
|
|
609
|
+
let c = {
|
|
540
610
|
eventId: t,
|
|
541
|
-
attendeeId:
|
|
611
|
+
attendeeId: a,
|
|
542
612
|
stationId: o || null,
|
|
543
|
-
method:
|
|
544
|
-
direction:
|
|
545
|
-
status:
|
|
613
|
+
method: p,
|
|
614
|
+
direction: h,
|
|
615
|
+
status: h === "OUT" ? "checked_out" : "checked_in",
|
|
546
616
|
recordedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
547
|
-
metadata:
|
|
617
|
+
metadata: x ? { sessionId: x } : {}
|
|
548
618
|
};
|
|
549
619
|
try {
|
|
550
|
-
let t = await
|
|
551
|
-
if (!
|
|
620
|
+
let t = await A({ variables: { input: c } });
|
|
621
|
+
if (!_(t, t.data?.createCheckInRecord?.id, "Could not record check-in")) return;
|
|
552
622
|
let n = r.find((e) => e.id === o);
|
|
553
|
-
e.success(`${
|
|
623
|
+
e.success(`${s} checked ${h === "OUT" ? "out" : "in"}`, `Recorded via ${p}${n?.name ? ` • ${n.name}` : ""}.`), f(""), T.current?.focus(), l();
|
|
554
624
|
} catch (t) {
|
|
555
|
-
e.error("Could not record check-in",
|
|
625
|
+
e.error("Could not record check-in", g(t));
|
|
556
626
|
}
|
|
557
627
|
},
|
|
558
628
|
className: "mt-5 space-y-5",
|
|
559
629
|
children: [
|
|
560
|
-
/* @__PURE__ */
|
|
630
|
+
/* @__PURE__ */ D("label", {
|
|
561
631
|
className: "block space-y-1.5",
|
|
562
|
-
children: [/* @__PURE__ */
|
|
632
|
+
children: [/* @__PURE__ */ D("span", {
|
|
563
633
|
className: "flex items-center gap-1.5 text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
564
|
-
children: [/* @__PURE__ */
|
|
565
|
-
}), /* @__PURE__ */
|
|
566
|
-
ref:
|
|
567
|
-
value:
|
|
568
|
-
onChange: (e) =>
|
|
634
|
+
children: [/* @__PURE__ */ E(N, { className: "h-3.5 w-3.5" }), "Manual lookup"]
|
|
635
|
+
}), /* @__PURE__ */ E(B, {
|
|
636
|
+
ref: T,
|
|
637
|
+
value: d,
|
|
638
|
+
onChange: (e) => f(e.target.value),
|
|
569
639
|
placeholder: "Enter name, email or attendee ID",
|
|
570
640
|
autoComplete: "off",
|
|
571
641
|
className: "h-12 text-base"
|
|
572
642
|
})]
|
|
573
643
|
}),
|
|
574
|
-
/* @__PURE__ */
|
|
644
|
+
/* @__PURE__ */ D("div", {
|
|
575
645
|
className: "flex flex-wrap gap-5",
|
|
576
646
|
children: [
|
|
577
|
-
/* @__PURE__ */
|
|
647
|
+
/* @__PURE__ */ E($, {
|
|
578
648
|
label: "Method",
|
|
579
|
-
value:
|
|
580
|
-
onChange:
|
|
649
|
+
value: p,
|
|
650
|
+
onChange: m,
|
|
581
651
|
options: [{
|
|
582
652
|
value: "QR",
|
|
583
653
|
label: "QR",
|
|
584
|
-
icon:
|
|
654
|
+
icon: te
|
|
585
655
|
}, {
|
|
586
656
|
value: "MANUAL",
|
|
587
657
|
label: "Manual",
|
|
588
|
-
icon:
|
|
658
|
+
icon: N
|
|
589
659
|
}]
|
|
590
660
|
}),
|
|
591
|
-
/* @__PURE__ */
|
|
661
|
+
/* @__PURE__ */ E($, {
|
|
592
662
|
label: "Direction",
|
|
593
|
-
value:
|
|
594
|
-
onChange:
|
|
663
|
+
value: h,
|
|
664
|
+
onChange: b,
|
|
595
665
|
options: [{
|
|
596
666
|
value: "IN",
|
|
597
667
|
label: "In",
|
|
598
|
-
icon:
|
|
668
|
+
icon: k
|
|
599
669
|
}, {
|
|
600
670
|
value: "OUT",
|
|
601
671
|
label: "Out",
|
|
602
|
-
icon:
|
|
672
|
+
icon: O
|
|
603
673
|
}]
|
|
604
674
|
}),
|
|
605
|
-
/* @__PURE__ */
|
|
675
|
+
/* @__PURE__ */ D("label", {
|
|
606
676
|
className: "space-y-1.5",
|
|
607
|
-
children: [/* @__PURE__ */
|
|
677
|
+
children: [/* @__PURE__ */ E("span", {
|
|
608
678
|
className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
609
679
|
children: "Station"
|
|
610
|
-
}), /* @__PURE__ */
|
|
680
|
+
}), /* @__PURE__ */ D(J, {
|
|
611
681
|
value: o || "none",
|
|
612
682
|
onValueChange: (e) => s(e === "none" ? "" : e),
|
|
613
|
-
children: [/* @__PURE__ */
|
|
683
|
+
children: [/* @__PURE__ */ E(Z, {
|
|
614
684
|
"aria-label": "Station",
|
|
615
685
|
className: "min-w-40",
|
|
616
|
-
children: /* @__PURE__ */
|
|
617
|
-
}), /* @__PURE__ */
|
|
686
|
+
children: /* @__PURE__ */ E(Q, { placeholder: "No station" })
|
|
687
|
+
}), /* @__PURE__ */ D(Y, { children: [/* @__PURE__ */ E(X, {
|
|
618
688
|
value: "none",
|
|
619
689
|
children: "No station"
|
|
620
|
-
}), r.map((e) => /* @__PURE__ */
|
|
690
|
+
}), r.map((e) => /* @__PURE__ */ E(X, {
|
|
621
691
|
value: e.id,
|
|
622
692
|
children: e.name ?? e.id
|
|
623
693
|
}, e.id))] })]
|
|
624
694
|
})]
|
|
625
695
|
}),
|
|
626
|
-
/* @__PURE__ */
|
|
696
|
+
/* @__PURE__ */ D("label", {
|
|
627
697
|
className: "space-y-1.5",
|
|
628
|
-
children: [/* @__PURE__ */
|
|
698
|
+
children: [/* @__PURE__ */ E("span", {
|
|
629
699
|
className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
630
700
|
children: "Session"
|
|
631
|
-
}), /* @__PURE__ */
|
|
632
|
-
value:
|
|
633
|
-
onValueChange: (e) =>
|
|
634
|
-
children: [/* @__PURE__ */
|
|
701
|
+
}), /* @__PURE__ */ D(J, {
|
|
702
|
+
value: x || "none",
|
|
703
|
+
onValueChange: (e) => S(e === "none" ? "" : e),
|
|
704
|
+
children: [/* @__PURE__ */ E(Z, {
|
|
635
705
|
"aria-label": "Session",
|
|
636
706
|
className: "min-w-40",
|
|
637
|
-
children: /* @__PURE__ */
|
|
638
|
-
}), /* @__PURE__ */
|
|
707
|
+
children: /* @__PURE__ */ E(Q, { placeholder: "Whole event" })
|
|
708
|
+
}), /* @__PURE__ */ D(Y, { children: [/* @__PURE__ */ E(X, {
|
|
639
709
|
value: "none",
|
|
640
710
|
children: "Whole event"
|
|
641
|
-
}),
|
|
711
|
+
}), ie.map((e) => /* @__PURE__ */ E(X, {
|
|
642
712
|
value: e.id,
|
|
643
713
|
children: e.title
|
|
644
714
|
}, e.id))] })]
|
|
@@ -646,52 +716,52 @@ function me({ eventId: t, eventName: n, stations: r, attendees: a, activeStation
|
|
|
646
716
|
})
|
|
647
717
|
]
|
|
648
718
|
}),
|
|
649
|
-
/* @__PURE__ */
|
|
719
|
+
/* @__PURE__ */ D(I, {
|
|
650
720
|
type: "submit",
|
|
651
721
|
size: "lg",
|
|
652
|
-
disabled:
|
|
722
|
+
disabled: j || !d.trim(),
|
|
653
723
|
className: "h-12 w-full text-base",
|
|
654
|
-
children: [/* @__PURE__ */
|
|
724
|
+
children: [/* @__PURE__ */ E(ee, { className: "h-5 w-5" }), j ? "Recording…" : `Check ${h === "OUT" ? "out" : "in"}`]
|
|
655
725
|
})
|
|
656
726
|
]
|
|
657
727
|
})
|
|
658
728
|
]
|
|
659
729
|
});
|
|
660
730
|
}
|
|
661
|
-
var
|
|
662
|
-
function
|
|
731
|
+
var be = 10, xe = 500;
|
|
732
|
+
function Se() {
|
|
663
733
|
let i = l({
|
|
664
734
|
limit: 100,
|
|
665
735
|
offset: 0
|
|
666
|
-
}).data?.events.items ?? [], [a, c] =
|
|
667
|
-
pageSize:
|
|
736
|
+
}).data?.events.items ?? [], [a, c] = w(""), u = a || void 0, d = i.find((e) => e.id === a), [f, g] = w(""), v = h({
|
|
737
|
+
pageSize: be,
|
|
668
738
|
resetKey: a
|
|
669
|
-
}),
|
|
739
|
+
}), y = r({
|
|
670
740
|
eventId: u,
|
|
671
741
|
limit: 100,
|
|
672
742
|
offset: 0
|
|
673
|
-
}),
|
|
743
|
+
}), b = n({
|
|
674
744
|
eventId: u,
|
|
675
745
|
limit: v.limit,
|
|
676
746
|
offset: v.offset
|
|
677
|
-
}),
|
|
747
|
+
}), x = n({
|
|
678
748
|
eventId: u,
|
|
679
|
-
limit:
|
|
749
|
+
limit: xe,
|
|
680
750
|
offset: 0
|
|
681
|
-
}),
|
|
751
|
+
}), C = t({
|
|
682
752
|
eventId: u,
|
|
683
753
|
limit: 200,
|
|
684
754
|
offset: 0
|
|
685
|
-
}), O =
|
|
755
|
+
}), O = S(() => y.data?.checkInStations.items ?? [], [y.data]), k = b.data?.checkInRecords.items ?? [], A = b.data?.checkInRecords.total ?? 0, j = S(() => x.data?.checkInRecords.items ?? [], [x.data]), M = S(() => C.data?.attendees.items ?? [], [C.data]), N = C.data?.attendees.total ?? 0, ee = S(() => {
|
|
686
756
|
let e = /* @__PURE__ */ new Map();
|
|
687
|
-
for (let t of
|
|
757
|
+
for (let t of M) e.set(t.id, t.fullName);
|
|
688
758
|
return e;
|
|
689
|
-
}, [
|
|
759
|
+
}, [M]), te = S(() => {
|
|
690
760
|
let e = /* @__PURE__ */ new Map();
|
|
691
761
|
for (let t of O) e.set(t.id, t.name ?? t.id);
|
|
692
762
|
return e;
|
|
693
|
-
}, [O]), { checkedInCount:
|
|
694
|
-
let e = /* @__PURE__ */ new Set(), t = { count: 0 }, n = /* @__PURE__ */ new Map(), r = [...
|
|
763
|
+
}, [O]), { checkedInCount: F, stationCounts: ne } = S(() => {
|
|
764
|
+
let e = /* @__PURE__ */ new Set(), t = { count: 0 }, n = /* @__PURE__ */ new Map(), r = [...j].sort((e, t) => new Date(e.recordedAt).getTime() - new Date(t.recordedAt).getTime());
|
|
695
765
|
for (let i of r) {
|
|
696
766
|
let r = i.attendeeId ?? "";
|
|
697
767
|
if (i.direction === "OUT" ? r ? e.delete(r) : t.count > 0 && --t.count : r ? e.add(r) : t.count += 1, i.stationId && i.direction !== "OUT") {
|
|
@@ -705,138 +775,138 @@ function _e() {
|
|
|
705
775
|
checkedInCount: e.size + t.count,
|
|
706
776
|
stationCounts: i
|
|
707
777
|
};
|
|
708
|
-
}, [
|
|
709
|
-
|
|
710
|
-
},
|
|
711
|
-
|
|
712
|
-
},
|
|
713
|
-
|
|
714
|
-
},
|
|
778
|
+
}, [j]), B = N, V = B > 0 ? Math.min(100, Math.round(F / B * 100)) : 0, [H] = s(), [U] = o(), [W, G] = w(!1), [K, q] = w(void 0), [se, ce] = w(!1), [le, ue] = w(null), de = () => {
|
|
779
|
+
q(void 0), G(!0);
|
|
780
|
+
}, fe = (e) => {
|
|
781
|
+
q(e), G(!0);
|
|
782
|
+
}, pe = (e) => {
|
|
783
|
+
ue(e), ce(!0);
|
|
784
|
+
}, ge = async (t) => {
|
|
715
785
|
let n = await H({ variables: { id: t.id } });
|
|
716
|
-
|
|
717
|
-
},
|
|
718
|
-
let n = await
|
|
719
|
-
|
|
786
|
+
_(n, n.data?.deleteCheckInStation ? t.id : null, "Could not delete station") && (f === t.id && g(""), e.success("Station deleted", `“${t.name ?? t.id}” was removed.`));
|
|
787
|
+
}, $ = async (t) => {
|
|
788
|
+
let n = await U({ variables: { id: t.id } });
|
|
789
|
+
_(n, n.data?.deleteCheckInRecord ? t.id : null, "Could not delete record") && e.success("Check-in record deleted");
|
|
720
790
|
}, Se = () => {
|
|
721
|
-
|
|
722
|
-
}, Ce = (e) => e.attendeeId ?
|
|
723
|
-
return /* @__PURE__ */
|
|
791
|
+
b.refetch(), x.refetch();
|
|
792
|
+
}, Ce = (e) => e.attendeeId ? ee.get(e.attendeeId) ?? `Attendee ${e.attendeeId.slice(0, 8)}` : "Walk-in guest", we = !!a;
|
|
793
|
+
return /* @__PURE__ */ D("div", {
|
|
724
794
|
className: "space-y-6 p-6",
|
|
725
795
|
children: [
|
|
726
|
-
/* @__PURE__ */
|
|
727
|
-
/* @__PURE__ */
|
|
796
|
+
/* @__PURE__ */ E(ae, { children: "Kiosks are the front desk of your event. Each check-in station is a device or counter where attendees scan in, and check-in records are the live log of who arrived and when. Configure your stations before doors open, then check attendees in from this page and watch arrivals flow in on the day." }),
|
|
797
|
+
/* @__PURE__ */ E(ie, { children: /* @__PURE__ */ D("div", {
|
|
728
798
|
className: "flex flex-wrap items-start justify-between gap-4",
|
|
729
|
-
children: [/* @__PURE__ */
|
|
799
|
+
children: [/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ D("h1", {
|
|
730
800
|
className: "text-2xl font-bold text-text-primary",
|
|
731
|
-
children: [/* @__PURE__ */
|
|
732
|
-
}), /* @__PURE__ */
|
|
801
|
+
children: [/* @__PURE__ */ E(R, { children: "Kiosk" }), " & Check-In"]
|
|
802
|
+
}), /* @__PURE__ */ E("p", {
|
|
733
803
|
className: "mt-1 text-sm text-text-secondary",
|
|
734
804
|
children: "Manage check-in stations and record attendee arrivals against a live backend."
|
|
735
|
-
})] }), /* @__PURE__ */
|
|
805
|
+
})] }), /* @__PURE__ */ D("div", {
|
|
736
806
|
className: "flex flex-wrap items-end gap-3",
|
|
737
|
-
children: [/* @__PURE__ */
|
|
807
|
+
children: [/* @__PURE__ */ D("label", {
|
|
738
808
|
className: "space-y-1 text-sm",
|
|
739
|
-
children: [/* @__PURE__ */
|
|
809
|
+
children: [/* @__PURE__ */ E("span", {
|
|
740
810
|
className: "font-medium text-text-primary",
|
|
741
811
|
children: "Event"
|
|
742
|
-
}), /* @__PURE__ */
|
|
812
|
+
}), /* @__PURE__ */ D(J, {
|
|
743
813
|
value: a || "all",
|
|
744
814
|
onValueChange: (e) => c(e === "all" ? "" : e),
|
|
745
|
-
children: [/* @__PURE__ */
|
|
815
|
+
children: [/* @__PURE__ */ E(Z, {
|
|
746
816
|
"aria-label": "Event",
|
|
747
817
|
className: "min-w-52",
|
|
748
|
-
children: /* @__PURE__ */
|
|
749
|
-
}), /* @__PURE__ */
|
|
818
|
+
children: /* @__PURE__ */ E(Q, { placeholder: "All events" })
|
|
819
|
+
}), /* @__PURE__ */ D(Y, { children: [/* @__PURE__ */ E(X, {
|
|
750
820
|
value: "all",
|
|
751
821
|
children: "All events"
|
|
752
|
-
}), i.map((e) => /* @__PURE__ */
|
|
822
|
+
}), i.map((e) => /* @__PURE__ */ E(X, {
|
|
753
823
|
value: e.id,
|
|
754
824
|
children: e.name
|
|
755
825
|
}, e.id))] })]
|
|
756
826
|
})]
|
|
757
|
-
}), /* @__PURE__ */
|
|
827
|
+
}), /* @__PURE__ */ D(I, {
|
|
758
828
|
type: "button",
|
|
759
|
-
onClick:
|
|
829
|
+
onClick: de,
|
|
760
830
|
disabled: !we,
|
|
761
|
-
children: [/* @__PURE__ */
|
|
831
|
+
children: [/* @__PURE__ */ E(P, { className: "h-4 w-4" }), "New station"]
|
|
762
832
|
})]
|
|
763
833
|
})]
|
|
764
834
|
}) }),
|
|
765
|
-
we ? /* @__PURE__ */
|
|
835
|
+
we ? /* @__PURE__ */ D("div", {
|
|
766
836
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-12",
|
|
767
|
-
children: [/* @__PURE__ */
|
|
837
|
+
children: [/* @__PURE__ */ E("div", {
|
|
768
838
|
className: "lg:col-span-5",
|
|
769
|
-
children: /* @__PURE__ */
|
|
839
|
+
children: /* @__PURE__ */ E(ye, {
|
|
770
840
|
eventId: a,
|
|
771
841
|
eventName: d?.name ?? "this event",
|
|
772
842
|
stations: O,
|
|
773
|
-
attendees:
|
|
774
|
-
activeStationId:
|
|
775
|
-
onStationChange:
|
|
843
|
+
attendees: M,
|
|
844
|
+
activeStationId: f,
|
|
845
|
+
onStationChange: g,
|
|
776
846
|
onCheckedIn: Se
|
|
777
847
|
})
|
|
778
|
-
}), /* @__PURE__ */
|
|
848
|
+
}), /* @__PURE__ */ D("div", {
|
|
779
849
|
className: "space-y-6 lg:col-span-7",
|
|
780
|
-
children: [/* @__PURE__ */
|
|
781
|
-
/* @__PURE__ */
|
|
850
|
+
children: [/* @__PURE__ */ D("section", { children: [
|
|
851
|
+
/* @__PURE__ */ E("h2", {
|
|
782
852
|
className: "text-sm font-semibold uppercase tracking-wide text-text-secondary",
|
|
783
853
|
children: "Stations"
|
|
784
854
|
}),
|
|
785
|
-
/* @__PURE__ */
|
|
855
|
+
/* @__PURE__ */ D("div", {
|
|
786
856
|
className: "mt-3 flex flex-wrap gap-2",
|
|
787
857
|
children: [O.map((e) => {
|
|
788
|
-
let t =
|
|
789
|
-
return /* @__PURE__ */
|
|
858
|
+
let t = f === e.id, n = ne.get(e.id) ?? 0;
|
|
859
|
+
return /* @__PURE__ */ D("div", {
|
|
790
860
|
className: `group inline-flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-sm transition-colors ${t ? "border-accent-primary bg-accent-primary/10 text-accent-primary" : "border-border-default bg-bg-surface text-text-secondary hover:border-border-strong"}`,
|
|
791
|
-
children: [/* @__PURE__ */
|
|
861
|
+
children: [/* @__PURE__ */ D("button", {
|
|
792
862
|
type: "button",
|
|
793
863
|
"aria-pressed": t,
|
|
794
|
-
onClick: () =>
|
|
864
|
+
onClick: () => g(t ? "" : e.id),
|
|
795
865
|
className: "inline-flex items-center gap-1.5 font-medium outline-none",
|
|
796
|
-
children: [e.name ?? e.id, n > 0 ? /* @__PURE__ */
|
|
866
|
+
children: [e.name ?? e.id, n > 0 ? /* @__PURE__ */ E("span", {
|
|
797
867
|
className: "rounded-full bg-bg-sunken px-1.5 py-0.5 text-xs tabular-nums text-text-secondary",
|
|
798
868
|
children: n
|
|
799
869
|
}) : null]
|
|
800
|
-
}), /* @__PURE__ */
|
|
870
|
+
}), /* @__PURE__ */ E(p, {
|
|
801
871
|
ariaLabel: `Station ${e.name ?? e.id} actions`,
|
|
802
872
|
entityName: e.name ?? void 0,
|
|
803
|
-
onEdit: () =>
|
|
804
|
-
onDelete: () =>
|
|
873
|
+
onEdit: () => fe(e),
|
|
874
|
+
onDelete: () => ge(e)
|
|
805
875
|
})]
|
|
806
876
|
}, e.id);
|
|
807
|
-
}), /* @__PURE__ */
|
|
877
|
+
}), /* @__PURE__ */ D("button", {
|
|
808
878
|
type: "button",
|
|
809
|
-
onClick:
|
|
879
|
+
onClick: de,
|
|
810
880
|
className: "inline-flex items-center gap-1.5 rounded-full border border-dashed border-border-strong px-3 py-1.5 text-sm font-medium text-text-secondary transition-colors hover:border-accent-primary hover:text-accent-primary",
|
|
811
|
-
children: [/* @__PURE__ */
|
|
881
|
+
children: [/* @__PURE__ */ E(P, { className: "h-3.5 w-3.5" }), "New station"]
|
|
812
882
|
})]
|
|
813
883
|
}),
|
|
814
|
-
|
|
884
|
+
y.loading && O.length === 0 ? /* @__PURE__ */ E("p", {
|
|
815
885
|
className: "mt-2 text-sm text-text-secondary",
|
|
816
886
|
children: "Loading stations…"
|
|
817
887
|
}) : null
|
|
818
|
-
] }), /* @__PURE__ */
|
|
888
|
+
] }), /* @__PURE__ */ D(L, {
|
|
819
889
|
treatment: "plain",
|
|
820
890
|
className: "border-border-seam p-5",
|
|
821
891
|
children: [
|
|
822
|
-
/* @__PURE__ */
|
|
892
|
+
/* @__PURE__ */ D("div", {
|
|
823
893
|
className: "flex flex-wrap items-center justify-between gap-2",
|
|
824
|
-
children: [/* @__PURE__ */
|
|
894
|
+
children: [/* @__PURE__ */ E("h2", {
|
|
825
895
|
className: "text-lg font-semibold text-text-primary",
|
|
826
896
|
children: "Check-In Records"
|
|
827
|
-
}), /* @__PURE__ */
|
|
897
|
+
}), /* @__PURE__ */ D("p", {
|
|
828
898
|
className: "text-sm text-text-secondary",
|
|
829
899
|
children: [
|
|
830
900
|
"Checked in",
|
|
831
901
|
" ",
|
|
832
|
-
/* @__PURE__ */
|
|
902
|
+
/* @__PURE__ */ E("span", {
|
|
833
903
|
className: "text-lg font-bold tabular-nums text-text-primary",
|
|
834
|
-
children:
|
|
904
|
+
children: F.toLocaleString()
|
|
835
905
|
}),
|
|
836
|
-
B > 0 ? /* @__PURE__ */
|
|
906
|
+
B > 0 ? /* @__PURE__ */ D(T, { children: [
|
|
837
907
|
" ",
|
|
838
908
|
"/ ",
|
|
839
|
-
/* @__PURE__ */
|
|
909
|
+
/* @__PURE__ */ E("span", {
|
|
840
910
|
className: "tabular-nums",
|
|
841
911
|
children: B.toLocaleString()
|
|
842
912
|
})
|
|
@@ -844,69 +914,69 @@ function _e() {
|
|
|
844
914
|
]
|
|
845
915
|
})]
|
|
846
916
|
}),
|
|
847
|
-
B > 0 ? /* @__PURE__ */
|
|
917
|
+
B > 0 ? /* @__PURE__ */ E("div", {
|
|
848
918
|
className: "mt-3 h-2 w-full overflow-hidden rounded-full bg-bg-sunken",
|
|
849
919
|
role: "progressbar",
|
|
850
|
-
"aria-valuenow":
|
|
920
|
+
"aria-valuenow": F,
|
|
851
921
|
"aria-valuemin": 0,
|
|
852
922
|
"aria-valuemax": B,
|
|
853
923
|
"aria-label": "Attendees checked in",
|
|
854
|
-
children: /* @__PURE__ */
|
|
924
|
+
children: /* @__PURE__ */ E("div", {
|
|
855
925
|
className: "h-full rounded-full bg-action-primary-bg transition-[width] duration-500",
|
|
856
926
|
style: { width: `${V}%` }
|
|
857
927
|
})
|
|
858
928
|
}) : null,
|
|
859
|
-
/* @__PURE__ */
|
|
929
|
+
/* @__PURE__ */ E("div", {
|
|
860
930
|
className: "mt-4",
|
|
861
|
-
children: k.length === 0 ? /* @__PURE__ */
|
|
931
|
+
children: k.length === 0 ? /* @__PURE__ */ E(z, {
|
|
862
932
|
illustration: "empty-data",
|
|
863
|
-
title:
|
|
933
|
+
title: b.loading ? "Loading check-in records…" : "No check-in records yet",
|
|
864
934
|
description: "Arrivals recorded from this kiosk show up here, newest first.",
|
|
865
935
|
className: "py-8"
|
|
866
|
-
}) : /* @__PURE__ */
|
|
936
|
+
}) : /* @__PURE__ */ E(oe, {
|
|
867
937
|
className: "max-h-[28rem] pr-3",
|
|
868
|
-
children: /* @__PURE__ */
|
|
938
|
+
children: /* @__PURE__ */ E("ul", {
|
|
869
939
|
className: "space-y-2.5",
|
|
870
940
|
children: k.map((e) => {
|
|
871
|
-
let t = Ce(e), n = e.direction === "OUT", r = e.stationId ?
|
|
872
|
-
return /* @__PURE__ */
|
|
941
|
+
let t = Ce(e), n = e.direction === "OUT", r = e.stationId ? te.get(e.stationId) : null;
|
|
942
|
+
return /* @__PURE__ */ D("li", {
|
|
873
943
|
className: "flex items-center gap-3 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",
|
|
874
944
|
children: [
|
|
875
|
-
/* @__PURE__ */
|
|
945
|
+
/* @__PURE__ */ E("span", {
|
|
876
946
|
className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-accent-primary/10 text-sm font-semibold text-accent-primary",
|
|
877
947
|
"aria-hidden": "true",
|
|
878
|
-
children:
|
|
948
|
+
children: me(t)
|
|
879
949
|
}),
|
|
880
|
-
/* @__PURE__ */
|
|
950
|
+
/* @__PURE__ */ D("div", {
|
|
881
951
|
className: "min-w-0 flex-1",
|
|
882
|
-
children: [/* @__PURE__ */
|
|
952
|
+
children: [/* @__PURE__ */ E("p", {
|
|
883
953
|
className: "truncate font-medium text-text-primary",
|
|
884
954
|
children: t
|
|
885
|
-
}), /* @__PURE__ */
|
|
955
|
+
}), /* @__PURE__ */ D("p", {
|
|
886
956
|
className: "mt-0.5 truncate text-sm text-text-secondary",
|
|
887
957
|
children: [
|
|
888
|
-
|
|
958
|
+
he(e.recordedAt),
|
|
889
959
|
" • ",
|
|
890
960
|
e.method
|
|
891
961
|
]
|
|
892
962
|
})]
|
|
893
963
|
}),
|
|
894
|
-
/* @__PURE__ */
|
|
964
|
+
/* @__PURE__ */ D("div", {
|
|
895
965
|
className: "flex shrink-0 items-center gap-2",
|
|
896
966
|
children: [
|
|
897
|
-
/* @__PURE__ */
|
|
967
|
+
/* @__PURE__ */ E(re, {
|
|
898
968
|
variant: n ? "secondary" : "success",
|
|
899
969
|
className: "uppercase",
|
|
900
970
|
children: n ? "Checked out" : "Checked in"
|
|
901
971
|
}),
|
|
902
|
-
r ? /* @__PURE__ */
|
|
972
|
+
r ? /* @__PURE__ */ E("span", {
|
|
903
973
|
className: "hidden text-sm text-text-secondary sm:inline",
|
|
904
974
|
children: r
|
|
905
975
|
}) : null,
|
|
906
|
-
/* @__PURE__ */
|
|
976
|
+
/* @__PURE__ */ E(p, {
|
|
907
977
|
ariaLabel: `Check-in record ${e.id} actions`,
|
|
908
|
-
onEdit: () =>
|
|
909
|
-
onDelete: () =>
|
|
978
|
+
onEdit: () => pe(e),
|
|
979
|
+
onDelete: () => $(e)
|
|
910
980
|
})
|
|
911
981
|
]
|
|
912
982
|
})
|
|
@@ -916,7 +986,7 @@ function _e() {
|
|
|
916
986
|
})
|
|
917
987
|
})
|
|
918
988
|
}),
|
|
919
|
-
/* @__PURE__ */
|
|
989
|
+
/* @__PURE__ */ E(m, {
|
|
920
990
|
offset: v.offset,
|
|
921
991
|
limit: v.limit,
|
|
922
992
|
loadedCount: k.length,
|
|
@@ -924,38 +994,38 @@ function _e() {
|
|
|
924
994
|
onPrev: v.prevPage,
|
|
925
995
|
onNext: v.nextPage,
|
|
926
996
|
itemLabel: "records",
|
|
927
|
-
loading:
|
|
997
|
+
loading: b.loading
|
|
928
998
|
})
|
|
929
999
|
]
|
|
930
1000
|
})]
|
|
931
1001
|
})]
|
|
932
|
-
}) : /* @__PURE__ */
|
|
1002
|
+
}) : /* @__PURE__ */ E(L, {
|
|
933
1003
|
treatment: "plain",
|
|
934
1004
|
className: "border-border-seam p-5",
|
|
935
|
-
children: /* @__PURE__ */
|
|
1005
|
+
children: /* @__PURE__ */ E(z, {
|
|
936
1006
|
illustration: "empty-data",
|
|
937
1007
|
title: "Select an event to open the kiosk",
|
|
938
1008
|
description: "Check-in stations and records belong to a specific event. Pick one above to start scanning attendees in.",
|
|
939
1009
|
className: "py-8"
|
|
940
1010
|
})
|
|
941
1011
|
}),
|
|
942
|
-
a ? /* @__PURE__ */
|
|
943
|
-
open:
|
|
944
|
-
onOpenChange:
|
|
1012
|
+
a ? /* @__PURE__ */ E(_e, {
|
|
1013
|
+
open: W,
|
|
1014
|
+
onOpenChange: G,
|
|
945
1015
|
eventId: a,
|
|
946
1016
|
eventName: d?.name ?? "this event",
|
|
947
|
-
station:
|
|
1017
|
+
station: K
|
|
948
1018
|
}) : null,
|
|
949
|
-
/* @__PURE__ */
|
|
950
|
-
open:
|
|
951
|
-
onOpenChange:
|
|
952
|
-
record:
|
|
1019
|
+
/* @__PURE__ */ E(ve, {
|
|
1020
|
+
open: se,
|
|
1021
|
+
onOpenChange: ce,
|
|
1022
|
+
record: le,
|
|
953
1023
|
stations: O
|
|
954
1024
|
})
|
|
955
1025
|
]
|
|
956
1026
|
});
|
|
957
1027
|
}
|
|
958
1028
|
//#endregion
|
|
959
|
-
export {
|
|
1029
|
+
export { Se as default };
|
|
960
1030
|
|
|
961
1031
|
//# sourceMappingURL=KioskPage.js.map
|