@burdenoff/microfe-eventfullymanaged 2026.1123.6 → 2026.1124.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.
Files changed (86) hide show
  1. package/dist/eventfullymanaged/EventfullyManagedRoutes.js +58 -54
  2. package/dist/eventfullymanaged/EventfullyManagedRoutes.js.map +1 -1
  3. package/dist/eventfullymanaged/components/ActionMenu.js +19 -19
  4. package/dist/eventfullymanaged/components/EntityFormShell.js +9 -9
  5. package/dist/eventfullymanaged/components/EntityTagsField.js +13 -13
  6. package/dist/eventfullymanaged/components/EntityTagsField.js.map +1 -1
  7. package/dist/eventfullymanaged/components/ImageUploadField.js +5 -5
  8. package/dist/eventfullymanaged/components/Pagination.js +7 -7
  9. package/dist/eventfullymanaged/components/floorPlanEditor/ZonePanels.js +51 -51
  10. package/dist/eventfullymanaged/components/floorPlanEditor/ZonePanels.js.map +1 -1
  11. package/dist/eventfullymanaged/pages/certificates/CertificateAccess.d.ts +7 -0
  12. package/dist/eventfullymanaged/pages/certificates/CertificateAccess.js +29 -0
  13. package/dist/eventfullymanaged/pages/certificates/CertificateAccess.js.map +1 -0
  14. package/dist/eventfullymanaged/pages/certificates/CertificateIssuance.d.ts +7 -0
  15. package/dist/eventfullymanaged/pages/certificates/CertificateIssuance.js +253 -0
  16. package/dist/eventfullymanaged/pages/certificates/CertificateIssuance.js.map +1 -0
  17. package/dist/eventfullymanaged/pages/certificates/CertificateTemplates.d.ts +8 -0
  18. package/dist/eventfullymanaged/pages/certificates/CertificateTemplates.js +260 -0
  19. package/dist/eventfullymanaged/pages/certificates/CertificateTemplates.js.map +1 -0
  20. package/dist/eventfullymanaged/pages/certificates/CertificatesPage.d.ts +1 -0
  21. package/dist/eventfullymanaged/pages/certificates/CertificatesPage.js +121 -0
  22. package/dist/eventfullymanaged/pages/certificates/CertificatesPage.js.map +1 -0
  23. package/dist/eventfullymanaged/pages/dashboard/DashboardPage.js +26 -26
  24. package/dist/eventfullymanaged/pages/events/EventDetailPage.js +150 -148
  25. package/dist/eventfullymanaged/pages/events/EventDetailPage.js.map +1 -1
  26. package/dist/eventfullymanaged/pages/events/VirtualSessionPage.js +100 -100
  27. package/dist/eventfullymanaged/pages/events/VirtualSessionPage.js.map +1 -1
  28. package/dist/eventfullymanaged/pages/exhibitors/ExhibitorsPage.js +19 -19
  29. package/dist/eventfullymanaged/pages/exhibitors/ExhibitorsPage.js.map +1 -1
  30. package/dist/eventfullymanaged/pages/leads/LeadCaptureDialog.js +16 -16
  31. package/dist/eventfullymanaged/pages/leads/LeadCaptureDialog.js.map +1 -1
  32. package/dist/eventfullymanaged/pages/modules/AnalyticsPage.js +103 -103
  33. package/dist/eventfullymanaged/pages/modules/AnalyticsPage.js.map +1 -1
  34. package/dist/eventfullymanaged/pages/modules/AttendeeProfilePage.js +15 -15
  35. package/dist/eventfullymanaged/pages/modules/AttendeeRecommendations.js +12 -12
  36. package/dist/eventfullymanaged/pages/modules/AttendeeRecommendations.js.map +1 -1
  37. package/dist/eventfullymanaged/pages/modules/CommunicationPage.js +80 -80
  38. package/dist/eventfullymanaged/pages/modules/CommunicationPage.js.map +1 -1
  39. package/dist/eventfullymanaged/pages/modules/EventTemplatesSection.js +14 -14
  40. package/dist/eventfullymanaged/pages/modules/EventTemplatesSection.js.map +1 -1
  41. package/dist/eventfullymanaged/pages/modules/EventsPage.js +121 -121
  42. package/dist/eventfullymanaged/pages/modules/EventsPage.js.map +1 -1
  43. package/dist/eventfullymanaged/pages/modules/IntegrationsPage.js +57 -57
  44. package/dist/eventfullymanaged/pages/modules/IntegrationsPage.js.map +1 -1
  45. package/dist/eventfullymanaged/pages/modules/KioskPage.js +241 -241
  46. package/dist/eventfullymanaged/pages/modules/KioskPage.js.map +1 -1
  47. package/dist/eventfullymanaged/pages/modules/NetworkingPage.js +120 -120
  48. package/dist/eventfullymanaged/pages/modules/NetworkingPage.js.map +1 -1
  49. package/dist/eventfullymanaged/pages/modules/OperationsHubPage.js +17 -17
  50. package/dist/eventfullymanaged/pages/modules/OperationsHubPage.js.map +1 -1
  51. package/dist/eventfullymanaged/pages/modules/RegistrationPage.js +61 -61
  52. package/dist/eventfullymanaged/pages/modules/RegistrationPage.js.map +1 -1
  53. package/dist/eventfullymanaged/pages/modules/RoadmapPanel.js +23 -23
  54. package/dist/eventfullymanaged/pages/modules/RoadmapPanel.js.map +1 -1
  55. package/dist/eventfullymanaged/pages/modules/SponsorDetailsPage.js +17 -17
  56. package/dist/eventfullymanaged/pages/modules/SponsorDetailsPage.js.map +1 -1
  57. package/dist/eventfullymanaged/pages/modules/SponsorLeadsPage.js +11 -11
  58. package/dist/eventfullymanaged/pages/modules/VenueResourcesPage.js +13 -13
  59. package/dist/eventfullymanaged/pages/modules/WorkflowsPage.js +108 -108
  60. package/dist/eventfullymanaged/pages/modules/WorkflowsPage.js.map +1 -1
  61. package/dist/eventfullymanaged/pages/registration/PromoCodeFormPage.js +22 -22
  62. package/dist/eventfullymanaged/pages/registration/PromoCodeFormPage.js.map +1 -1
  63. package/dist/eventfullymanaged/pages/registration/RegisterAttendeePage.js +45 -45
  64. package/dist/eventfullymanaged/pages/speakers/SpeakersPage.js +24 -24
  65. package/dist/eventfullymanaged/pages/speakers/SpeakersPage.js.map +1 -1
  66. package/dist/eventfullymanaged/pages/sponsors/SponsorFormPage.js +37 -37
  67. package/dist/eventfullymanaged/pages/sponsors/SponsorsListPage.js +23 -23
  68. package/dist/eventfullymanaged/pages/sponsors/SponsorsListPage.js.map +1 -1
  69. package/dist/eventfullymanaged/pages/venues/FloorPlansPage.js +123 -123
  70. package/dist/eventfullymanaged/pages/venues/FloorPlansPage.js.map +1 -1
  71. package/dist/eventfullymanaged/pages/venues/VenueDetailPage.js +37 -37
  72. package/dist/eventfullymanaged/pages/venues/VenueDetailPage.js.map +1 -1
  73. package/dist/eventfullymanaged/pages/venues/VenueFormPage.js +25 -25
  74. package/dist/eventfullymanaged/pages/venues/VenueListPage.js +26 -26
  75. package/dist/eventfullymanaged/pages/venues/VenueListPage.js.map +1 -1
  76. package/dist/generated/wspace-operations.d.ts +383 -0
  77. package/dist/generated/wspace-operations.js +177 -11
  78. package/dist/generated/wspace-operations.js.map +1 -1
  79. package/dist/generated/wspace-types.d.ts +29809 -1503
  80. package/dist/node_modules/@apollo/client/react/hooks/internal/useRenderGuard.js +19 -0
  81. package/dist/node_modules/@apollo/client/react/hooks/internal/useRenderGuard.js.map +1 -0
  82. package/dist/node_modules/@apollo/client/react/hooks/useLazyQuery.js +110 -0
  83. package/dist/node_modules/@apollo/client/react/hooks/useLazyQuery.js.map +1 -0
  84. package/dist/utils/pageContext.js +5 -0
  85. package/dist/utils/pageContext.js.map +1 -1
  86. package/package.json +1 -1
@@ -0,0 +1,253 @@
1
+ import { useEventCertificateEligibilityLazyQuery as e, useEventCertificateReceiptLazyQuery as t, useEventCertificateRegistrationsQuery as n, useIssueEventCertificateMutation as r } from "../../../generated/wspace-operations.js";
2
+ import { useTr as i } from "../../../shared/hooks/useTr.js";
3
+ import { Pagination as a, usePagination as o } from "../../components/Pagination.js";
4
+ import { mutationSucceeded as s } from "../../lib/mutationResult.js";
5
+ import { notify as c } from "../../lib/toast.js";
6
+ import { formatDateTime as l } from "../events/eventFormUtils.js";
7
+ import { useId as u, useState as d } from "react";
8
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
9
+ import { Button as m, Input as h, Label as g } from "@burdenoff/fe-libs/ui";
10
+ // src/eventfullymanaged/pages/certificates/CertificateIssuance.tsx
11
+ var _ = "min-h-10 w-full rounded-input border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus", v = "space-y-4 rounded-card border border-border-seam bg-bg-surface p-4";
12
+ function y({ eventId: t, templates: l }) {
13
+ let h = i(), y = u(), x = o(), C = n({
14
+ variables: {
15
+ eventId: t,
16
+ limit: x.limit,
17
+ offset: x.offset
18
+ },
19
+ fetchPolicy: "no-cache"
20
+ }), w = C.data?.eventfullyManagedRegistrations, [T, E] = d(""), [D, O] = d(""), [k, A] = d(null), [j, M] = d(null), [N, { loading: P }] = e({ fetchPolicy: "no-cache" }), [F, { loading: I }] = r(), L = l.find((e) => e.id === D), R = w?.items.find((e) => e.id === T), z = JSON.stringify([
21
+ R?.id,
22
+ L?.id,
23
+ L?.revision,
24
+ L?.requiredSessionIds
25
+ ]), B = k?.key === z ? k.result : void 0, V = P || I, H = h("eventfullymanaged.certificates.issuanceError", "Could not confirm certificate issuance"), U = async () => {
26
+ if (L && R && !V) {
27
+ A(null);
28
+ try {
29
+ let e = await N({ variables: {
30
+ eventId: t,
31
+ registrationId: R.id,
32
+ requiredSessionIds: L.requiredSessionIds
33
+ } });
34
+ if (e.error || !e.data?.eventfullyManagedCertificateEligibility) throw Error("Eligibility not confirmed");
35
+ A({
36
+ key: z,
37
+ result: e.data.eventfullyManagedCertificateEligibility
38
+ });
39
+ } catch {
40
+ c.error(h("eventfullymanaged.certificates.eligibilityError", "Could not confirm attendance eligibility"));
41
+ }
42
+ }
43
+ };
44
+ return /* @__PURE__ */ f("form", {
45
+ className: v,
46
+ onSubmit: async (e) => {
47
+ if (e.preventDefault(), L && R && B?.eligible && !V) try {
48
+ let e = await F({ variables: {
49
+ eventId: t,
50
+ registrationId: R.id,
51
+ templateId: L.id
52
+ } }), n = e.data?.eventfullyManagedIssueCertificate;
53
+ if (!s(e, n?.id, H) || !n) return;
54
+ M(n);
55
+ } catch {
56
+ c.error(H);
57
+ }
58
+ },
59
+ children: /* @__PURE__ */ p("fieldset", {
60
+ disabled: V,
61
+ className: "space-y-4",
62
+ children: [
63
+ /* @__PURE__ */ f("legend", {
64
+ className: "mb-3 text-lg font-semibold",
65
+ children: h("eventfullymanaged.certificates.manualIssue", "Issue a certificate")
66
+ }),
67
+ /* @__PURE__ */ p("div", {
68
+ className: "space-y-1.5",
69
+ children: [/* @__PURE__ */ f(g, {
70
+ id: y + "templateLabel",
71
+ htmlFor: y + "template",
72
+ children: h("eventfullymanaged.certificates.template", "Certificate template")
73
+ }), /* @__PURE__ */ p("select", {
74
+ id: y + "template",
75
+ "aria-labelledby": y + "templateLabel",
76
+ className: _,
77
+ value: L?.id ?? "",
78
+ onChange: (e) => {
79
+ O(e.target.value), A(null);
80
+ },
81
+ children: [/* @__PURE__ */ f("option", {
82
+ value: "",
83
+ children: h("eventfullymanaged.certificates.chooseTemplate", "Choose a template")
84
+ }), l.map((e) => /* @__PURE__ */ f("option", {
85
+ value: e.id,
86
+ children: e.title
87
+ }, e.id))]
88
+ })]
89
+ }),
90
+ /* @__PURE__ */ p("div", {
91
+ className: "space-y-1.5",
92
+ children: [/* @__PURE__ */ f(g, {
93
+ id: y + "registrationLabel",
94
+ htmlFor: y + "registration",
95
+ children: h("eventfullymanaged.certificates.registration", "Attendee registration")
96
+ }), /* @__PURE__ */ p("select", {
97
+ id: y + "registration",
98
+ "aria-labelledby": y + "registrationLabel",
99
+ className: _,
100
+ value: R?.id ?? "",
101
+ onChange: (e) => {
102
+ E(e.target.value), A(null);
103
+ },
104
+ children: [/* @__PURE__ */ f("option", {
105
+ value: "",
106
+ children: h("eventfullymanaged.certificates.chooseRegistration", "Choose a registration")
107
+ }), w?.items.map((e) => /* @__PURE__ */ p("option", {
108
+ value: e.id,
109
+ children: [
110
+ e.attendeeName || e.id,
111
+ " · ",
112
+ e.status
113
+ ]
114
+ }, e.id))]
115
+ })]
116
+ }),
117
+ C.error ? /* @__PURE__ */ p("p", {
118
+ role: "alert",
119
+ className: "text-sm text-status-error-text",
120
+ children: [
121
+ h("eventfullymanaged.certificates.registrationsError", "Could not load registrations."),
122
+ " ",
123
+ /* @__PURE__ */ f(m, {
124
+ type: "button",
125
+ variant: "outline",
126
+ onClick: () => void C.refetch().catch(() => void 0),
127
+ children: h("eventfullymanaged.certificates.retry", "Retry")
128
+ })
129
+ ]
130
+ }) : null,
131
+ w ? /* @__PURE__ */ f(a, {
132
+ offset: x.offset,
133
+ limit: x.limit,
134
+ total: w.total,
135
+ loadedCount: w.items.length,
136
+ onPrev: x.prevPage,
137
+ onNext: x.nextPage,
138
+ loading: C.loading,
139
+ itemLabel: "registrations"
140
+ }) : null,
141
+ /* @__PURE__ */ p("div", {
142
+ className: "flex flex-wrap gap-2",
143
+ children: [/* @__PURE__ */ f(m, {
144
+ type: "button",
145
+ variant: "outline",
146
+ disabled: !L || !R,
147
+ onClick: () => void U(),
148
+ children: P ? h("eventfullymanaged.certificates.checking", "Checking…") : h("eventfullymanaged.certificates.checkEligibility", "Check eligibility")
149
+ }), /* @__PURE__ */ f(m, {
150
+ type: "submit",
151
+ disabled: !B?.eligible,
152
+ children: I ? h("eventfullymanaged.certificates.issuing", "Issuing…") : h("eventfullymanaged.certificates.issue", "Issue certificate")
153
+ })]
154
+ }),
155
+ /* @__PURE__ */ f(b, { eligibility: B }),
156
+ /* @__PURE__ */ f(S, { receipt: j })
157
+ ]
158
+ })
159
+ });
160
+ }
161
+ function b({ eligibility: e }) {
162
+ let t = i();
163
+ return e ? e.eligible ? /* @__PURE__ */ f("p", {
164
+ className: "text-sm",
165
+ "aria-live": "polite",
166
+ children: t("eventfullymanaged.certificates.eligible", "Eligible for this certificate.")
167
+ }) : /* @__PURE__ */ f("p", {
168
+ className: "text-sm",
169
+ "aria-live": "polite",
170
+ children: e.registrationEligible ? t("eventfullymanaged.certificates.sessionsIneligible", "Required sessions without completed attendance: {{count}}.", { count: e.missingSessionIds.length }) : t("eventfullymanaged.certificates.registrationIneligible", "The registration must be confirmed or checked in.")
171
+ }) : null;
172
+ }
173
+ function x({ eventId: e }) {
174
+ let n = i(), r = u(), [a, o] = d(null), [s, { loading: l }] = t({ fetchPolicy: "no-cache" });
175
+ return /* @__PURE__ */ p("section", {
176
+ className: v,
177
+ "aria-labelledby": r + "receiptHeading",
178
+ children: [
179
+ /* @__PURE__ */ f("h2", {
180
+ id: r + "receiptHeading",
181
+ className: "text-lg font-semibold",
182
+ children: n("eventfullymanaged.certificates.issuedReceipt", "Issuance receipt")
183
+ }),
184
+ /* @__PURE__ */ p("form", {
185
+ className: "space-y-2",
186
+ onSubmit: async (t) => {
187
+ t.preventDefault();
188
+ let r = String(new FormData(t.currentTarget).get("receiptId") ?? "").trim();
189
+ if (r && !l) {
190
+ o(null);
191
+ try {
192
+ let t = await s({ variables: {
193
+ eventId: e,
194
+ id: r
195
+ } });
196
+ if (t.error || !t.data?.eventfullyManagedCertificate) throw Error("Receipt not confirmed");
197
+ o(t.data.eventfullyManagedCertificate);
198
+ } catch {
199
+ c.error(n("eventfullymanaged.certificates.receiptError", "Could not find that receipt for this event"));
200
+ }
201
+ }
202
+ },
203
+ children: [/* @__PURE__ */ f(g, {
204
+ htmlFor: r + "receipt",
205
+ children: n("eventfullymanaged.certificates.receiptId", "Receipt ID")
206
+ }), /* @__PURE__ */ p("div", {
207
+ className: "flex flex-wrap items-center gap-2",
208
+ children: [/* @__PURE__ */ f(h, {
209
+ id: r + "receipt",
210
+ name: "receiptId",
211
+ className: "flex-1",
212
+ maxLength: 128,
213
+ required: !0
214
+ }), /* @__PURE__ */ f(m, {
215
+ type: "submit",
216
+ variant: "outline",
217
+ disabled: l,
218
+ children: l ? n("eventfullymanaged.certificates.finding", "Looking up…") : n("eventfullymanaged.certificates.find", "Find receipt")
219
+ })]
220
+ })]
221
+ }),
222
+ /* @__PURE__ */ f(S, { receipt: a })
223
+ ]
224
+ });
225
+ }
226
+ function S({ receipt: e }) {
227
+ let t = i();
228
+ return e ? /* @__PURE__ */ p("div", {
229
+ "aria-live": "polite",
230
+ className: "space-y-2 rounded-card border border-border-seam p-3 text-sm",
231
+ children: [
232
+ /* @__PURE__ */ f("h3", {
233
+ className: "font-medium break-words",
234
+ children: e.title
235
+ }),
236
+ /* @__PURE__ */ f("p", { children: t("eventfullymanaged.certificates.receiptIssuedAt", "Issued {{date}}", { date: l(e.issuedAt) }) }),
237
+ /* @__PURE__ */ f("p", { children: t("eventfullymanaged.certificates.receiptTemplateRevision", "Template revision {{revision}}", { revision: e.templateRevision }) }),
238
+ /* @__PURE__ */ f("p", {
239
+ className: "break-all text-text-secondary",
240
+ children: e.id
241
+ })
242
+ ]
243
+ }) : null;
244
+ }
245
+ function C(e) {
246
+ return /* @__PURE__ */ p("div", {
247
+ className: "grid gap-4 lg:grid-cols-2",
248
+ children: [/* @__PURE__ */ f(y, { ...e }), /* @__PURE__ */ f(x, { eventId: e.eventId })]
249
+ });
250
+ }
251
+ export { C as CertificateIssuance };
252
+
253
+ //# sourceMappingURL=CertificateIssuance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CertificateIssuance.js","names":["selectClass","cardClass","CertificateIssueForm","tr","useTr","id","useId","paging","usePagination","registrations","useEventCertificateRegistrationsQuery","registrationPage","registrationId","setRegistrationId","useState","templateId","setTemplateId","checked","setChecked","receipt","setReceipt","readEligibility","checking","useEventCertificateEligibilityLazyQuery","issueCertificate","issuing","useIssueEventCertificateMutation","template","templates","item","registration","checkKey","eligibility","busy","issueError","check","result","event","issued","mutationSucceeded","Label","Button","Pagination","AttendanceOutcome","CertificateReceiptDetails","CertificateReceiptLookup","findReceipt","finding","useEventCertificateReceiptLazyQuery","receiptId","Input","formatDateTime","CertificateIssuance","props"],"sources":["../../../../src/eventfullymanaged/pages/certificates/CertificateIssuance.tsx"],"sourcesContent":["import { useId, useState, type FormEvent } from 'react';\nimport { Button, Input, Label } from '@burdenoff/fe-libs/ui';\nimport {\n useEventCertificateEligibilityLazyQuery,\n useEventCertificateReceiptLazyQuery,\n useEventCertificateRegistrationsQuery,\n useIssueEventCertificateMutation,\n type EventCertificateEligibilityQuery,\n type EventCertificateReceiptFieldsFragment,\n type EventCertificateRegistrationsQuery,\n type EventCertificateTemplateFieldsFragment,\n} from '../../../generated/wspace-operations';\nimport { useTr } from '../../../shared/hooks/useTr';\nimport { Pagination, usePagination } from '../../components/Pagination';\nimport { mutationSucceeded } from '../../lib/mutationResult';\nimport { notify } from '../../lib/toast';\nimport { formatDateTime } from '../events/eventFormUtils';\n\nconst selectClass =\n 'min-h-10 w-full rounded-input border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus';\nconst cardClass = 'space-y-4 rounded-card border border-border-seam bg-bg-surface p-4';\n\ntype Eligibility = EventCertificateEligibilityQuery['eventfullyManagedCertificateEligibility'];\ntype Receipt = EventCertificateReceiptFieldsFragment;\n\ntype IssuanceProps = {\n eventId: string;\n templates: EventCertificateTemplateFieldsFragment[];\n};\n\nfunction CertificateIssueForm({ eventId, templates }: IssuanceProps) {\n const tr = useTr();\n const id = useId();\n const paging = usePagination();\n const registrations = useEventCertificateRegistrationsQuery({\n variables: { eventId, limit: paging.limit, offset: paging.offset },\n fetchPolicy: 'no-cache',\n });\n const registrationPage: EventCertificateRegistrationsQuery['eventfullyManagedRegistrations'] | undefined =\n registrations.data?.eventfullyManagedRegistrations;\n const [registrationId, setRegistrationId] = useState('');\n const [templateId, setTemplateId] = useState('');\n const [checked, setChecked] = useState<{ key: string; result: Eligibility } | null>(null);\n const [receipt, setReceipt] = useState<Receipt | null>(null);\n const [readEligibility, { loading: checking }] = useEventCertificateEligibilityLazyQuery({ fetchPolicy: 'no-cache' });\n const [issueCertificate, { loading: issuing }] = useIssueEventCertificateMutation();\n const template = templates.find((item) => item.id === templateId);\n const registration = registrationPage?.items.find((item) => item.id === registrationId);\n const checkKey = JSON.stringify([registration?.id, template?.id, template?.revision, template?.requiredSessionIds]);\n const eligibility = checked?.key === checkKey ? checked.result : undefined;\n const busy = checking || issuing;\n const issueError = tr('eventfullymanaged.certificates.issuanceError', 'Could not confirm certificate issuance');\n\n const check = async () => {\n if (!template || !registration || busy) return;\n setChecked(null);\n try {\n const result = await readEligibility({\n variables: { eventId, registrationId: registration.id, requiredSessionIds: template.requiredSessionIds },\n });\n if (result.error || !result.data?.eventfullyManagedCertificateEligibility)\n throw new Error('Eligibility not confirmed');\n setChecked({ key: checkKey, result: result.data.eventfullyManagedCertificateEligibility });\n } catch {\n notify.error(tr('eventfullymanaged.certificates.eligibilityError', 'Could not confirm attendance eligibility'));\n }\n };\n\n const issue = async (event: FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n if (!template || !registration || !eligibility?.eligible || busy) return;\n try {\n const result = await issueCertificate({\n variables: { eventId, registrationId: registration.id, templateId: template.id },\n });\n const issued = result.data?.eventfullyManagedIssueCertificate;\n if (!mutationSucceeded(result, issued?.id, issueError) || !issued) return;\n setReceipt(issued);\n } catch {\n notify.error(issueError);\n }\n };\n\n return (\n <form className={cardClass} onSubmit={issue}>\n <fieldset disabled={busy} className=\"space-y-4\">\n <legend className=\"mb-3 text-lg font-semibold\">\n {tr('eventfullymanaged.certificates.manualIssue', 'Issue a certificate')}\n </legend>\n <div className=\"space-y-1.5\">\n <Label id={id + 'templateLabel'} htmlFor={id + 'template'}>\n {tr('eventfullymanaged.certificates.template', 'Certificate template')}\n </Label>\n <select\n id={id + 'template'}\n aria-labelledby={id + 'templateLabel'}\n className={selectClass}\n value={template?.id ?? ''}\n onChange={(event) => {\n setTemplateId(event.target.value);\n setChecked(null);\n }}\n >\n <option value=\"\">{tr('eventfullymanaged.certificates.chooseTemplate', 'Choose a template')}</option>\n {templates.map((item) => (\n <option key={item.id} value={item.id}>\n {item.title}\n </option>\n ))}\n </select>\n </div>\n <div className=\"space-y-1.5\">\n <Label id={id + 'registrationLabel'} htmlFor={id + 'registration'}>\n {tr('eventfullymanaged.certificates.registration', 'Attendee registration')}\n </Label>\n <select\n id={id + 'registration'}\n aria-labelledby={id + 'registrationLabel'}\n className={selectClass}\n value={registration?.id ?? ''}\n onChange={(event) => {\n setRegistrationId(event.target.value);\n setChecked(null);\n }}\n >\n <option value=\"\">{tr('eventfullymanaged.certificates.chooseRegistration', 'Choose a registration')}</option>\n {registrationPage?.items.map((item) => (\n <option key={item.id} value={item.id}>\n {item.attendeeName || item.id} · {item.status}\n </option>\n ))}\n </select>\n </div>\n {registrations.error ? (\n <p role=\"alert\" className=\"text-sm text-status-error-text\">\n {tr('eventfullymanaged.certificates.registrationsError', 'Could not load registrations.')}{' '}\n <Button type=\"button\" variant=\"outline\" onClick={() => void registrations.refetch().catch(() => undefined)}>\n {tr('eventfullymanaged.certificates.retry', 'Retry')}\n </Button>\n </p>\n ) : null}\n {registrationPage ? (\n <Pagination\n offset={paging.offset}\n limit={paging.limit}\n total={registrationPage.total}\n loadedCount={registrationPage.items.length}\n onPrev={paging.prevPage}\n onNext={paging.nextPage}\n loading={registrations.loading}\n itemLabel=\"registrations\"\n />\n ) : null}\n <div className=\"flex flex-wrap gap-2\">\n <Button type=\"button\" variant=\"outline\" disabled={!template || !registration} onClick={() => void check()}>\n {checking\n ? tr('eventfullymanaged.certificates.checking', 'Checking…')\n : tr('eventfullymanaged.certificates.checkEligibility', 'Check eligibility')}\n </Button>\n <Button type=\"submit\" disabled={!eligibility?.eligible}>\n {issuing\n ? tr('eventfullymanaged.certificates.issuing', 'Issuing…')\n : tr('eventfullymanaged.certificates.issue', 'Issue certificate')}\n </Button>\n </div>\n <AttendanceOutcome eligibility={eligibility} />\n <CertificateReceiptDetails receipt={receipt} />\n </fieldset>\n </form>\n );\n}\n\nfunction AttendanceOutcome({ eligibility }: { eligibility?: Eligibility }) {\n const tr = useTr();\n if (!eligibility) return null;\n if (eligibility.eligible) {\n return (\n <p className=\"text-sm\" aria-live=\"polite\">\n {tr('eventfullymanaged.certificates.eligible', 'Eligible for this certificate.')}\n </p>\n );\n }\n return (\n <p className=\"text-sm\" aria-live=\"polite\">\n {!eligibility.registrationEligible\n ? tr(\n 'eventfullymanaged.certificates.registrationIneligible',\n 'The registration must be confirmed or checked in.'\n )\n : tr(\n 'eventfullymanaged.certificates.sessionsIneligible',\n 'Required sessions without completed attendance: {{count}}.',\n {\n count: eligibility.missingSessionIds.length,\n }\n )}\n </p>\n );\n}\n\nfunction CertificateReceiptLookup({ eventId }: { eventId: string }) {\n const tr = useTr();\n const id = useId();\n const [receipt, setReceipt] = useState<Receipt | null>(null);\n const [findReceipt, { loading: finding }] = useEventCertificateReceiptLazyQuery({ fetchPolicy: 'no-cache' });\n\n const lookup = async (event: FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n const receiptId = String(new FormData(event.currentTarget).get('receiptId') ?? '').trim();\n if (!receiptId || finding) return;\n setReceipt(null);\n try {\n const result = await findReceipt({ variables: { eventId, id: receiptId } });\n if (result.error || !result.data?.eventfullyManagedCertificate) throw new Error('Receipt not confirmed');\n setReceipt(result.data.eventfullyManagedCertificate);\n } catch {\n notify.error(tr('eventfullymanaged.certificates.receiptError', 'Could not find that receipt for this event'));\n }\n };\n\n return (\n <section className={cardClass} aria-labelledby={id + 'receiptHeading'}>\n <h2 id={id + 'receiptHeading'} className=\"text-lg font-semibold\">\n {tr('eventfullymanaged.certificates.issuedReceipt', 'Issuance receipt')}\n </h2>\n <form className=\"space-y-2\" onSubmit={lookup}>\n <Label htmlFor={id + 'receipt'}>{tr('eventfullymanaged.certificates.receiptId', 'Receipt ID')}</Label>\n <div className=\"flex flex-wrap items-center gap-2\">\n <Input id={id + 'receipt'} name=\"receiptId\" className=\"flex-1\" maxLength={128} required />\n <Button type=\"submit\" variant=\"outline\" disabled={finding}>\n {finding\n ? tr('eventfullymanaged.certificates.finding', 'Looking up…')\n : tr('eventfullymanaged.certificates.find', 'Find receipt')}\n </Button>\n </div>\n </form>\n <CertificateReceiptDetails receipt={receipt} />\n </section>\n );\n}\n\nfunction CertificateReceiptDetails({ receipt }: { receipt: Receipt | null }) {\n const tr = useTr();\n if (!receipt) return null;\n return (\n <div aria-live=\"polite\" className=\"space-y-2 rounded-card border border-border-seam p-3 text-sm\">\n <h3 className=\"font-medium break-words\">{receipt.title}</h3>\n <p>\n {tr('eventfullymanaged.certificates.receiptIssuedAt', 'Issued {{date}}', {\n date: formatDateTime(receipt.issuedAt),\n })}\n </p>\n <p>\n {tr('eventfullymanaged.certificates.receiptTemplateRevision', 'Template revision {{revision}}', {\n revision: receipt.templateRevision,\n })}\n </p>\n <p className=\"break-all text-text-secondary\">{receipt.id}</p>\n </div>\n );\n}\n\nexport function CertificateIssuance(props: IssuanceProps) {\n return (\n <div className=\"grid gap-4 lg:grid-cols-2\">\n <CertificateIssueForm {...props} />\n <CertificateReceiptLookup eventId={props.eventId} />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AAkBA,IAAMA,IACJ,gMACIC,IAAY;AAUlB,SAASC,EAAqB,EAAE,YAAS,gBAA4B;CACnE,IAAMC,IAAKC,EAAM,GACXC,IAAKC,EAAM,GACXC,IAASC,EAAc,GACvBC,IAAgBC,EAAsC;EAC1D,WAAW;GAAE;GAAS,OAAOH,EAAO;GAAO,QAAQA,EAAO;EAAO;EACjE,aAAa;CACf,CAAC,GACKI,IACJF,EAAc,MAAM,gCAChB,CAACG,GAAgBC,KAAqBC,EAAS,EAAE,GACjD,CAACC,GAAYC,KAAiBF,EAAS,EAAE,GACzC,CAACG,GAASC,KAAcJ,EAAsD,IAAI,GAClF,CAACK,GAASC,KAAcN,EAAyB,IAAI,GACrD,CAACO,GAAiB,EAAE,SAASC,OAAcC,EAAwC,EAAE,aAAa,WAAW,CAAC,GAC9G,CAACC,GAAkB,EAAE,SAASC,OAAaC,EAAiC,GAC5EC,IAAWC,EAAU,MAAM,MAASC,EAAK,OAAOd,CAAU,GAC1De,IAAenB,GAAkB,MAAM,MAAM,MAASkB,EAAK,OAAOjB,CAAc,GAChFmB,IAAW,KAAK,UAAU;EAACD,GAAc;EAAIH,GAAU;EAAIA,GAAU;EAAUA,GAAU;CAAkB,CAAC,GAC5GK,IAAcf,GAAS,QAAQc,IAAWd,EAAQ,SAAS,KAAA,GAC3DgB,IAAOX,KAAYG,GACnBS,IAAa/B,EAAG,gDAAgD,wCAAwC,GAExGgC,IAAQ,YAAY;EACxB,IAAKR,KAAaG,KAAgB,IAClC;KAAW,IAAI;GACf,IAAI;IACF,IAAMM,IAAS,MAAMf,EAAgB,EACnC,WAAW;KAAE;KAAS,gBAAgBS,EAAa;KAAI,oBAAoBH,EAAS;IA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D,EAAA,UACGhB,EAAG,0DAA0D,kCAAkC,EAC9F,UAAUgB,EAAQ,iBACpB,CAAC,EACA,CAAA;GACH,kBAAC,KAAD;IAAG,WAAU;IAAiC,UAAAA,EAAQ;GAAM,CAAA;EACzD;C,KAfc;AAiBvB;AAEA,SAAgBiC,EAAoB,GAAsB;CACxD,OACE,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,kBAAClD,GAAD,EAAsB,GAAImD,EAAQ,CAAA,GAClC,kBAACR,GAAD,EAA0B,SAASQ,EAAM,QAAU,CAAA,CAChD;;AAET"}
@@ -0,0 +1,8 @@
1
+ import { EventCertificateTemplateFieldsFragment } from '../../../generated/wspace-operations';
2
+ type Template = EventCertificateTemplateFieldsFragment;
3
+ export declare function CertificateTemplates({ eventId, templates, onChange, }: {
4
+ eventId: string;
5
+ templates: Template[];
6
+ onChange: () => void;
7
+ }): import('react').JSX.Element;
8
+ export {};
@@ -0,0 +1,260 @@
1
+ import { useArchiveEventCertificateTemplateMutation as e, useCreateEventCertificateTemplateMutation as t, useUpdateEventCertificateTemplateMutation as n } from "../../../generated/wspace-operations.js";
2
+ import { useTr as r } from "../../../shared/hooks/useTr.js";
3
+ import { useEventSessionsQuery as i } from "../../api/eventApi.js";
4
+ import { ActionMenu as a } from "../../components/ActionMenu.js";
5
+ import { Pagination as o, usePagination as s } from "../../components/Pagination.js";
6
+ import { mutationSucceeded as c } from "../../lib/mutationResult.js";
7
+ import { notify as l } from "../../lib/toast.js";
8
+ import { useId as u, useState as d } from "react";
9
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
10
+ import { Badge as m, Button as h, Dialog as g, DialogContent as _, DialogDescription as v, DialogHeader as y, DialogTitle as b, Input as x, Label as S, Textarea as C } from "@burdenoff/fe-libs/ui";
11
+ // src/eventfullymanaged/pages/certificates/CertificateTemplates.tsx
12
+ function w({ eventId: e, template: a, onClose: m, onSaved: w }) {
13
+ let T = r(), E = u(), D = s(), [O, k] = d(() => new Set(a?.requiredSessionIds ?? [])), [A, j] = d(!1), [M, { loading: N }] = t(), [P, { loading: F }] = n(), I = i({
14
+ eventId: e,
15
+ limit: D.limit,
16
+ offset: D.offset
17
+ }), L = I.data?.eventSessions, R = N || F, z = T("eventfullymanaged.certificates.templateSaveError", "Could not save template");
18
+ return /* @__PURE__ */ f(g, {
19
+ open: !0,
20
+ onOpenChange: (e) => {
21
+ !e && !R && m();
22
+ },
23
+ children: /* @__PURE__ */ p(_, {
24
+ className: "max-h-[90dvh] overflow-y-auto",
25
+ children: [/* @__PURE__ */ p(y, { children: [/* @__PURE__ */ f(b, { children: a ? T("eventfullymanaged.certificates.editTemplate", "Edit template") : T("eventfullymanaged.certificates.newTemplate", "New certificate template") }), /* @__PURE__ */ f(v, { children: T("eventfullymanaged.certificates.templateHelp", "Choose the sessions an attendee must complete to earn this certificate.") })] }), /* @__PURE__ */ f("form", {
26
+ onSubmit: async (t) => {
27
+ t.preventDefault();
28
+ let n = new FormData(t.currentTarget), r = String(n.get("title") ?? "").trim(), i = String(n.get("issuer") ?? "").trim(), o = String(n.get("statement") ?? "").trim() || null;
29
+ if (!r || !i || O.size === 0) {
30
+ j(!0);
31
+ return;
32
+ }
33
+ let s = {
34
+ title: r,
35
+ issuerName: i,
36
+ statement: o,
37
+ requiredSessionIds: [...O]
38
+ };
39
+ try {
40
+ if (a) {
41
+ let t = await P({ variables: {
42
+ eventId: e,
43
+ id: a.id,
44
+ revision: a.revision,
45
+ input: s
46
+ } });
47
+ if (!c(t, t.data?.eventfullyManagedUpdateCertificateTemplate.id, z)) return;
48
+ } else {
49
+ let t = await M({ variables: {
50
+ eventId: e,
51
+ input: s
52
+ } });
53
+ if (!c(t, t.data?.eventfullyManagedCreateCertificateTemplate.id, z)) return;
54
+ }
55
+ w();
56
+ } catch {
57
+ l.error(z);
58
+ }
59
+ },
60
+ onChange: () => j(!1),
61
+ children: /* @__PURE__ */ p("fieldset", {
62
+ disabled: R,
63
+ className: "space-y-4",
64
+ children: [
65
+ /* @__PURE__ */ p("div", {
66
+ className: "space-y-1.5",
67
+ children: [/* @__PURE__ */ f(S, {
68
+ htmlFor: E + "title",
69
+ children: T("eventfullymanaged.certificates.templateTitle", "Title")
70
+ }), /* @__PURE__ */ f(x, {
71
+ id: E + "title",
72
+ name: "title",
73
+ defaultValue: a?.title,
74
+ maxLength: 160,
75
+ required: !0
76
+ })]
77
+ }),
78
+ /* @__PURE__ */ p("div", {
79
+ className: "space-y-1.5",
80
+ children: [/* @__PURE__ */ f(S, {
81
+ htmlFor: E + "issuer",
82
+ children: T("eventfullymanaged.certificates.issuer", "Issuer")
83
+ }), /* @__PURE__ */ f(x, {
84
+ id: E + "issuer",
85
+ name: "issuer",
86
+ defaultValue: a?.issuerName,
87
+ maxLength: 160,
88
+ required: !0
89
+ })]
90
+ }),
91
+ /* @__PURE__ */ p("div", {
92
+ className: "space-y-1.5",
93
+ children: [/* @__PURE__ */ f(S, {
94
+ htmlFor: E + "statement",
95
+ children: T("eventfullymanaged.certificates.statement", "Statement (optional)")
96
+ }), /* @__PURE__ */ f(C, {
97
+ id: E + "statement",
98
+ name: "statement",
99
+ defaultValue: a?.statement ?? "",
100
+ maxLength: 500,
101
+ rows: 3
102
+ })]
103
+ }),
104
+ /* @__PURE__ */ p("fieldset", {
105
+ className: "space-y-2",
106
+ children: [
107
+ /* @__PURE__ */ f("legend", {
108
+ className: "mb-2 text-sm font-medium",
109
+ children: T("eventfullymanaged.certificates.requiredSessions", "Required sessions")
110
+ }),
111
+ I.loading ? /* @__PURE__ */ f("p", {
112
+ role: "status",
113
+ children: T("eventfullymanaged.certificates.loadingSessions", "Loading sessions…")
114
+ }) : null,
115
+ I.error ? /* @__PURE__ */ p("div", {
116
+ className: "space-y-2",
117
+ role: "alert",
118
+ children: [/* @__PURE__ */ f("p", { children: T("eventfullymanaged.certificates.sessionError", "Could not load sessions.") }), /* @__PURE__ */ f(h, {
119
+ type: "button",
120
+ variant: "outline",
121
+ onClick: () => void I.refetch().catch(() => void 0),
122
+ children: T("eventfullymanaged.certificates.retry", "Retry")
123
+ })]
124
+ }) : null,
125
+ L?.items.map((e) => /* @__PURE__ */ p("label", {
126
+ className: "flex min-h-10 items-center gap-2 text-sm",
127
+ children: [/* @__PURE__ */ f("input", {
128
+ type: "checkbox",
129
+ checked: O.has(e.id),
130
+ disabled: O.size >= 100 && !O.has(e.id),
131
+ onChange: (t) => {
132
+ let n = new Set(O);
133
+ t.target.checked ? n.add(e.id) : n.delete(e.id), k(n);
134
+ }
135
+ }), /* @__PURE__ */ f("span", { children: e.title })]
136
+ }, e.id)),
137
+ L && L.total === 0 ? /* @__PURE__ */ f("p", {
138
+ className: "text-sm text-text-secondary",
139
+ children: T("eventfullymanaged.certificates.noSessions", "Add an event session before creating a template.")
140
+ }) : null,
141
+ L ? /* @__PURE__ */ f(o, {
142
+ offset: D.offset,
143
+ limit: D.limit,
144
+ total: L.total,
145
+ loadedCount: L.items.length,
146
+ onPrev: D.prevPage,
147
+ onNext: D.nextPage,
148
+ loading: I.loading,
149
+ itemLabel: "sessions"
150
+ }) : null,
151
+ /* @__PURE__ */ f("p", {
152
+ className: "text-sm text-text-secondary",
153
+ "aria-live": "polite",
154
+ children: T("eventfullymanaged.certificates.requiredCount", "{{count}} selected", { count: O.size })
155
+ })
156
+ ]
157
+ }),
158
+ A ? /* @__PURE__ */ f("p", {
159
+ role: "alert",
160
+ className: "text-sm text-status-error-text",
161
+ children: T("eventfullymanaged.certificates.invalidTemplate", "Enter a title and issuer, and select at least one session.")
162
+ }) : null,
163
+ /* @__PURE__ */ p("div", {
164
+ className: "flex flex-wrap justify-end gap-2",
165
+ children: [/* @__PURE__ */ f(h, {
166
+ type: "button",
167
+ variant: "outline",
168
+ onClick: m,
169
+ children: T("eventfullymanaged.certificates.cancel", "Cancel")
170
+ }), /* @__PURE__ */ f(h, {
171
+ type: "submit",
172
+ disabled: !!I.error,
173
+ children: R ? T("eventfullymanaged.certificates.saving", "Saving…") : T("eventfullymanaged.certificates.save", "Save template")
174
+ })]
175
+ })
176
+ ]
177
+ })
178
+ })]
179
+ })
180
+ });
181
+ }
182
+ function T({ eventId: t, templates: n, onChange: i }) {
183
+ let o = r(), [s, u] = d(null), [g] = e(), _ = o("eventfullymanaged.certificates.archiveError", "Could not archive template"), v = async (e) => {
184
+ try {
185
+ let n = await g({ variables: {
186
+ eventId: t,
187
+ id: e.id,
188
+ revision: e.revision
189
+ } });
190
+ if (c(n, n.data?.eventfullyManagedArchiveCertificateTemplate ? e.id : null, _)) {
191
+ i();
192
+ return;
193
+ }
194
+ } catch {
195
+ l.error(_);
196
+ }
197
+ throw Error("Certificate template archive was not confirmed.");
198
+ };
199
+ return /* @__PURE__ */ p("section", {
200
+ className: "space-y-4",
201
+ children: [
202
+ /* @__PURE__ */ p("div", {
203
+ className: "flex flex-wrap items-center justify-between gap-3",
204
+ children: [/* @__PURE__ */ f("h2", {
205
+ className: "text-lg font-semibold",
206
+ children: o("eventfullymanaged.certificates.templates", "Templates")
207
+ }), /* @__PURE__ */ f(h, {
208
+ type: "button",
209
+ onClick: () => u("new"),
210
+ children: o("eventfullymanaged.certificates.newTemplate", "New certificate template")
211
+ })]
212
+ }),
213
+ n.length === 0 ? /* @__PURE__ */ f("p", {
214
+ className: "text-text-secondary",
215
+ children: o("eventfullymanaged.certificates.noTemplates", "No active templates on this page.")
216
+ }) : null,
217
+ /* @__PURE__ */ f("ul", {
218
+ className: "space-y-2",
219
+ children: n.map((e) => /* @__PURE__ */ p("li", {
220
+ className: "flex items-start justify-between gap-3 rounded-card border border-border-seam p-3",
221
+ children: [/* @__PURE__ */ p("div", {
222
+ className: "min-w-0 space-y-1",
223
+ children: [
224
+ /* @__PURE__ */ f("h3", {
225
+ className: "font-medium break-words",
226
+ children: e.title
227
+ }),
228
+ /* @__PURE__ */ f("p", {
229
+ className: "text-sm text-text-secondary break-words",
230
+ children: e.issuerName
231
+ }),
232
+ /* @__PURE__ */ f(m, {
233
+ variant: "secondary",
234
+ children: o("eventfullymanaged.certificates.revision", "Revision {{revision}}", { revision: e.revision })
235
+ })
236
+ ]
237
+ }), /* @__PURE__ */ f(a, {
238
+ ariaLabel: o("eventfullymanaged.certificates.templateActions", "Actions for {{title}}", { title: e.title }),
239
+ entityName: e.title,
240
+ onEdit: () => u(e),
241
+ deleteLabel: o("eventfullymanaged.certificates.archive", "Archive"),
242
+ confirmNote: o("eventfullymanaged.certificates.archiveNote", "Existing issued receipts remain available."),
243
+ onDelete: () => v(e)
244
+ })]
245
+ }, e.id))
246
+ }),
247
+ s ? /* @__PURE__ */ f(w, {
248
+ eventId: t,
249
+ template: s === "new" ? void 0 : s,
250
+ onClose: () => u(null),
251
+ onSaved: () => {
252
+ u(null), i();
253
+ }
254
+ }, s === "new" ? "new" : s.id) : null
255
+ ]
256
+ });
257
+ }
258
+ export { T as CertificateTemplates };
259
+
260
+ //# sourceMappingURL=CertificateTemplates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CertificateTemplates.js","names":["CertificateTemplateEditor","tr","useTr","id","useId","paging","usePagination","requiredIds","setRequiredIds","useState","template","error","setError","createTemplate","creating","useCreateEventCertificateTemplateMutation","updateTemplate","updating","useUpdateEventCertificateTemplateMutation","sessions","useEventSessionsQuery","page","saving","saveError","Dialog","open","onClose","DialogContent","DialogHeader","DialogTitle","DialogDescription","form","event","title","issuerName","statement","input","result","mutationSucceeded","Label","Input","Textarea","Button","session","next","Pagination","CertificateTemplates","editor","setEditor","archiveTemplate","useArchiveEventCertificateTemplateMutation","archiveError","archive","templates","Badge","ActionMenu","onChange"],"sources":["../../../../src/eventfullymanaged/pages/certificates/CertificateTemplates.tsx"],"sourcesContent":["import { useId, useState, type FormEvent } from 'react';\nimport {\n Badge,\n Button,\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n Input,\n Label,\n Textarea,\n} from '@burdenoff/fe-libs/ui';\nimport {\n useArchiveEventCertificateTemplateMutation,\n useCreateEventCertificateTemplateMutation,\n useUpdateEventCertificateTemplateMutation,\n type EventCertificateTemplateFieldsFragment,\n} from '../../../generated/wspace-operations';\nimport { useTr } from '../../../shared/hooks/useTr';\nimport { useEventSessionsQuery } from '../../api/eventApi';\nimport { ActionMenu } from '../../components/ActionMenu';\nimport { Pagination, usePagination } from '../../components/Pagination';\nimport { mutationSucceeded } from '../../lib/mutationResult';\nimport { notify } from '../../lib/toast';\n\ntype Template = EventCertificateTemplateFieldsFragment;\n\ntype EditorProps = {\n eventId: string;\n template?: Template;\n onClose: () => void;\n onSaved: () => void;\n};\n\nfunction CertificateTemplateEditor({ eventId, template, onClose, onSaved }: EditorProps) {\n const tr = useTr();\n const id = useId();\n const paging = usePagination();\n const [requiredIds, setRequiredIds] = useState(() => new Set(template?.requiredSessionIds ?? []));\n const [error, setError] = useState(false);\n const [createTemplate, { loading: creating }] = useCreateEventCertificateTemplateMutation();\n const [updateTemplate, { loading: updating }] = useUpdateEventCertificateTemplateMutation();\n const sessions = useEventSessionsQuery({ eventId, limit: paging.limit, offset: paging.offset });\n const page = sessions.data?.eventSessions;\n const saving = creating || updating;\n const saveError = tr('eventfullymanaged.certificates.templateSaveError', 'Could not save template');\n\n const submit = async (event: FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n const form = new FormData(event.currentTarget);\n const title = String(form.get('title') ?? '').trim();\n const issuerName = String(form.get('issuer') ?? '').trim();\n const statement = String(form.get('statement') ?? '').trim() || null;\n if (!title || !issuerName || requiredIds.size === 0) {\n setError(true);\n return;\n }\n const input = { title, issuerName, statement, requiredSessionIds: [...requiredIds] };\n try {\n if (template) {\n const result = await updateTemplate({\n variables: { eventId, id: template.id, revision: template.revision, input },\n });\n if (!mutationSucceeded(result, result.data?.eventfullyManagedUpdateCertificateTemplate.id, saveError)) return;\n } else {\n const result = await createTemplate({ variables: { eventId, input } });\n if (!mutationSucceeded(result, result.data?.eventfullyManagedCreateCertificateTemplate.id, saveError)) return;\n }\n onSaved();\n } catch {\n notify.error(saveError);\n }\n };\n\n return (\n <Dialog\n open\n onOpenChange={(open) => {\n if (!open && !saving) onClose();\n }}\n >\n <DialogContent className=\"max-h-[90dvh] overflow-y-auto\">\n <DialogHeader>\n <DialogTitle>\n {template\n ? tr('eventfullymanaged.certificates.editTemplate', 'Edit template')\n : tr('eventfullymanaged.certificates.newTemplate', 'New certificate template')}\n </DialogTitle>\n <DialogDescription>\n {tr(\n 'eventfullymanaged.certificates.templateHelp',\n 'Choose the sessions an attendee must complete to earn this certificate.'\n )}\n </DialogDescription>\n </DialogHeader>\n <form onSubmit={submit} onChange={() => setError(false)}>\n <fieldset disabled={saving} className=\"space-y-4\">\n <div className=\"space-y-1.5\">\n <Label htmlFor={id + 'title'}>{tr('eventfullymanaged.certificates.templateTitle', 'Title')}</Label>\n <Input id={id + 'title'} name=\"title\" defaultValue={template?.title} maxLength={160} required />\n </div>\n <div className=\"space-y-1.5\">\n <Label htmlFor={id + 'issuer'}>{tr('eventfullymanaged.certificates.issuer', 'Issuer')}</Label>\n <Input id={id + 'issuer'} name=\"issuer\" defaultValue={template?.issuerName} maxLength={160} required />\n </div>\n <div className=\"space-y-1.5\">\n <Label htmlFor={id + 'statement'}>\n {tr('eventfullymanaged.certificates.statement', 'Statement (optional)')}\n </Label>\n <Textarea\n id={id + 'statement'}\n name=\"statement\"\n defaultValue={template?.statement ?? ''}\n maxLength={500}\n rows={3}\n />\n </div>\n <fieldset className=\"space-y-2\">\n <legend className=\"mb-2 text-sm font-medium\">\n {tr('eventfullymanaged.certificates.requiredSessions', 'Required sessions')}\n </legend>\n {sessions.loading ? (\n <p role=\"status\">{tr('eventfullymanaged.certificates.loadingSessions', 'Loading sessions…')}</p>\n ) : null}\n {sessions.error ? (\n <div className=\"space-y-2\" role=\"alert\">\n <p>{tr('eventfullymanaged.certificates.sessionError', 'Could not load sessions.')}</p>\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={() => void sessions.refetch().catch(() => undefined)}\n >\n {tr('eventfullymanaged.certificates.retry', 'Retry')}\n </Button>\n </div>\n ) : null}\n {page?.items.map((session) => (\n <label key={session.id} className=\"flex min-h-10 items-center gap-2 text-sm\">\n <input\n type=\"checkbox\"\n checked={requiredIds.has(session.id)}\n disabled={requiredIds.size >= 100 && !requiredIds.has(session.id)}\n onChange={(event) => {\n const next = new Set(requiredIds);\n if (event.target.checked) next.add(session.id);\n else next.delete(session.id);\n setRequiredIds(next);\n }}\n />\n <span>{session.title}</span>\n </label>\n ))}\n {page && page.total === 0 ? (\n <p className=\"text-sm text-text-secondary\">\n {tr('eventfullymanaged.certificates.noSessions', 'Add an event session before creating a template.')}\n </p>\n ) : null}\n {page ? (\n <Pagination\n offset={paging.offset}\n limit={paging.limit}\n total={page.total}\n loadedCount={page.items.length}\n onPrev={paging.prevPage}\n onNext={paging.nextPage}\n loading={sessions.loading}\n itemLabel=\"sessions\"\n />\n ) : null}\n <p className=\"text-sm text-text-secondary\" aria-live=\"polite\">\n {tr('eventfullymanaged.certificates.requiredCount', '{{count}} selected', { count: requiredIds.size })}\n </p>\n </fieldset>\n {error ? (\n <p role=\"alert\" className=\"text-sm text-status-error-text\">\n {tr(\n 'eventfullymanaged.certificates.invalidTemplate',\n 'Enter a title and issuer, and select at least one session.'\n )}\n </p>\n ) : null}\n <div className=\"flex flex-wrap justify-end gap-2\">\n <Button type=\"button\" variant=\"outline\" onClick={onClose}>\n {tr('eventfullymanaged.certificates.cancel', 'Cancel')}\n </Button>\n <Button type=\"submit\" disabled={Boolean(sessions.error)}>\n {saving\n ? tr('eventfullymanaged.certificates.saving', 'Saving…')\n : tr('eventfullymanaged.certificates.save', 'Save template')}\n </Button>\n </div>\n </fieldset>\n </form>\n </DialogContent>\n </Dialog>\n );\n}\n\nexport function CertificateTemplates({\n eventId,\n templates,\n onChange,\n}: {\n eventId: string;\n templates: Template[];\n onChange: () => void;\n}) {\n const tr = useTr();\n const [editor, setEditor] = useState<Template | 'new' | null>(null);\n const [archiveTemplate] = useArchiveEventCertificateTemplateMutation();\n const archiveError = tr('eventfullymanaged.certificates.archiveError', 'Could not archive template');\n\n const archive = async (template: Template) => {\n try {\n const result = await archiveTemplate({\n variables: { eventId, id: template.id, revision: template.revision },\n });\n if (\n mutationSucceeded(\n result,\n result.data?.eventfullyManagedArchiveCertificateTemplate ? template.id : null,\n archiveError\n )\n ) {\n onChange();\n return;\n }\n } catch {\n notify.error(archiveError);\n }\n throw new Error('Certificate template archive was not confirmed.');\n };\n\n return (\n <section className=\"space-y-4\">\n <div className=\"flex flex-wrap items-center justify-between gap-3\">\n <h2 className=\"text-lg font-semibold\">{tr('eventfullymanaged.certificates.templates', 'Templates')}</h2>\n <Button type=\"button\" onClick={() => setEditor('new')}>\n {tr('eventfullymanaged.certificates.newTemplate', 'New certificate template')}\n </Button>\n </div>\n {templates.length === 0 ? (\n <p className=\"text-text-secondary\">\n {tr('eventfullymanaged.certificates.noTemplates', 'No active templates on this page.')}\n </p>\n ) : null}\n <ul className=\"space-y-2\">\n {templates.map((template) => (\n <li\n key={template.id}\n className=\"flex items-start justify-between gap-3 rounded-card border border-border-seam p-3\"\n >\n <div className=\"min-w-0 space-y-1\">\n <h3 className=\"font-medium break-words\">{template.title}</h3>\n <p className=\"text-sm text-text-secondary break-words\">{template.issuerName}</p>\n <Badge variant=\"secondary\">\n {tr('eventfullymanaged.certificates.revision', 'Revision {{revision}}', {\n revision: template.revision,\n })}\n </Badge>\n </div>\n <ActionMenu\n ariaLabel={tr('eventfullymanaged.certificates.templateActions', 'Actions for {{title}}', {\n title: template.title,\n })}\n entityName={template.title}\n onEdit={() => setEditor(template)}\n deleteLabel={tr('eventfullymanaged.certificates.archive', 'Archive')}\n confirmNote={tr(\n 'eventfullymanaged.certificates.archiveNote',\n 'Existing issued receipts remain available.'\n )}\n onDelete={() => archive(template)}\n />\n </li>\n ))}\n </ul>\n {editor ? (\n <CertificateTemplateEditor\n key={editor === 'new' ? 'new' : editor.id}\n eventId={eventId}\n template={editor === 'new' ? undefined : editor}\n onClose={() => setEditor(null)}\n onSaved={() => {\n setEditor(null);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