@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.
- package/dist/eventfullymanaged/EventfullyManagedRoutes.js +58 -54
- package/dist/eventfullymanaged/EventfullyManagedRoutes.js.map +1 -1
- package/dist/eventfullymanaged/components/ActionMenu.js +19 -19
- package/dist/eventfullymanaged/components/EntityFormShell.js +9 -9
- package/dist/eventfullymanaged/components/EntityTagsField.js +13 -13
- package/dist/eventfullymanaged/components/EntityTagsField.js.map +1 -1
- package/dist/eventfullymanaged/components/ImageUploadField.js +5 -5
- package/dist/eventfullymanaged/components/Pagination.js +7 -7
- package/dist/eventfullymanaged/components/floorPlanEditor/ZonePanels.js +51 -51
- package/dist/eventfullymanaged/components/floorPlanEditor/ZonePanels.js.map +1 -1
- package/dist/eventfullymanaged/pages/certificates/CertificateAccess.d.ts +7 -0
- package/dist/eventfullymanaged/pages/certificates/CertificateAccess.js +29 -0
- package/dist/eventfullymanaged/pages/certificates/CertificateAccess.js.map +1 -0
- package/dist/eventfullymanaged/pages/certificates/CertificateIssuance.d.ts +7 -0
- package/dist/eventfullymanaged/pages/certificates/CertificateIssuance.js +253 -0
- package/dist/eventfullymanaged/pages/certificates/CertificateIssuance.js.map +1 -0
- package/dist/eventfullymanaged/pages/certificates/CertificateTemplates.d.ts +8 -0
- package/dist/eventfullymanaged/pages/certificates/CertificateTemplates.js +260 -0
- package/dist/eventfullymanaged/pages/certificates/CertificateTemplates.js.map +1 -0
- package/dist/eventfullymanaged/pages/certificates/CertificatesPage.d.ts +1 -0
- package/dist/eventfullymanaged/pages/certificates/CertificatesPage.js +121 -0
- package/dist/eventfullymanaged/pages/certificates/CertificatesPage.js.map +1 -0
- package/dist/eventfullymanaged/pages/dashboard/DashboardPage.js +26 -26
- package/dist/eventfullymanaged/pages/events/EventDetailPage.js +150 -148
- package/dist/eventfullymanaged/pages/events/EventDetailPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/events/VirtualSessionPage.js +100 -100
- package/dist/eventfullymanaged/pages/events/VirtualSessionPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/exhibitors/ExhibitorsPage.js +19 -19
- package/dist/eventfullymanaged/pages/exhibitors/ExhibitorsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/leads/LeadCaptureDialog.js +16 -16
- package/dist/eventfullymanaged/pages/leads/LeadCaptureDialog.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/AnalyticsPage.js +103 -103
- package/dist/eventfullymanaged/pages/modules/AnalyticsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/AttendeeProfilePage.js +15 -15
- package/dist/eventfullymanaged/pages/modules/AttendeeRecommendations.js +12 -12
- package/dist/eventfullymanaged/pages/modules/AttendeeRecommendations.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/CommunicationPage.js +80 -80
- package/dist/eventfullymanaged/pages/modules/CommunicationPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/EventTemplatesSection.js +14 -14
- package/dist/eventfullymanaged/pages/modules/EventTemplatesSection.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/EventsPage.js +121 -121
- package/dist/eventfullymanaged/pages/modules/EventsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/IntegrationsPage.js +57 -57
- package/dist/eventfullymanaged/pages/modules/IntegrationsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/KioskPage.js +241 -241
- package/dist/eventfullymanaged/pages/modules/KioskPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/NetworkingPage.js +120 -120
- package/dist/eventfullymanaged/pages/modules/NetworkingPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/OperationsHubPage.js +17 -17
- package/dist/eventfullymanaged/pages/modules/OperationsHubPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/RegistrationPage.js +61 -61
- package/dist/eventfullymanaged/pages/modules/RegistrationPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/RoadmapPanel.js +23 -23
- package/dist/eventfullymanaged/pages/modules/RoadmapPanel.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/SponsorDetailsPage.js +17 -17
- package/dist/eventfullymanaged/pages/modules/SponsorDetailsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/SponsorLeadsPage.js +11 -11
- package/dist/eventfullymanaged/pages/modules/VenueResourcesPage.js +13 -13
- package/dist/eventfullymanaged/pages/modules/WorkflowsPage.js +108 -108
- package/dist/eventfullymanaged/pages/modules/WorkflowsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/registration/PromoCodeFormPage.js +22 -22
- package/dist/eventfullymanaged/pages/registration/PromoCodeFormPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/registration/RegisterAttendeePage.js +45 -45
- package/dist/eventfullymanaged/pages/speakers/SpeakersPage.js +24 -24
- package/dist/eventfullymanaged/pages/speakers/SpeakersPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/sponsors/SponsorFormPage.js +37 -37
- package/dist/eventfullymanaged/pages/sponsors/SponsorsListPage.js +23 -23
- package/dist/eventfullymanaged/pages/sponsors/SponsorsListPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/venues/FloorPlansPage.js +123 -123
- package/dist/eventfullymanaged/pages/venues/FloorPlansPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/venues/VenueDetailPage.js +37 -37
- package/dist/eventfullymanaged/pages/venues/VenueDetailPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/venues/VenueFormPage.js +25 -25
- package/dist/eventfullymanaged/pages/venues/VenueListPage.js +26 -26
- package/dist/eventfullymanaged/pages/venues/VenueListPage.js.map +1 -1
- package/dist/generated/wspace-operations.d.ts +383 -0
- package/dist/generated/wspace-operations.js +177 -11
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +29809 -1503
- package/dist/node_modules/@apollo/client/react/hooks/internal/useRenderGuard.js +19 -0
- package/dist/node_modules/@apollo/client/react/hooks/internal/useRenderGuard.js.map +1 -0
- package/dist/node_modules/@apollo/client/react/hooks/useLazyQuery.js +110 -0
- package/dist/node_modules/@apollo/client/react/hooks/useLazyQuery.js.map +1 -0
- package/dist/utils/pageContext.js +5 -0
- package/dist/utils/pageContext.js.map +1 -1
- package/package.json +1 -1
|
@@ -8,8 +8,8 @@ import { notify as d } from "../../lib/toast.js";
|
|
|
8
8
|
import { LeadCaptureDialog as f } from "../leads/LeadCaptureDialog.js";
|
|
9
9
|
import { useMemo as p, useState as m } from "react";
|
|
10
10
|
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { Badge as _, Button as v, EmphasisPanel as y, GlassCard as b, IllustratedEmptyState as x, Input as S, PagePurpose as C, ResponsiveTable as w } from "@burdenoff/fe-libs/ui";
|
|
12
|
+
import { ExternalLink as T, Plus as E, Search as D, Store as O, UserPlus as k } from "lucide-react";
|
|
13
13
|
// src/eventfullymanaged/pages/exhibitors/ExhibitorsPage.tsx
|
|
14
14
|
function A(e) {
|
|
15
15
|
if (e.website?.trim()) return e.website;
|
|
@@ -79,8 +79,8 @@ function N() {
|
|
|
79
79
|
return /* @__PURE__ */ g("div", {
|
|
80
80
|
className: "space-y-6 p-6",
|
|
81
81
|
children: [
|
|
82
|
-
/* @__PURE__ */ h(
|
|
83
|
-
/* @__PURE__ */ g(
|
|
82
|
+
/* @__PURE__ */ h(C, { children: "Exhibitors are the companies staffing booths at your event. Track each booth, the category it belongs to, and the contact who runs it — then log the leads their booth collects on the floor so you can prove the value of their stand. Start here to onboard a new exhibitor or work the booth pipeline." }),
|
|
83
|
+
/* @__PURE__ */ g(y, {
|
|
84
84
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
85
85
|
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h1", {
|
|
86
86
|
className: "text-2xl font-bold text-text-primary",
|
|
@@ -88,10 +88,10 @@ function N() {
|
|
|
88
88
|
}), /* @__PURE__ */ h("p", {
|
|
89
89
|
className: "mt-1 text-sm text-text-secondary",
|
|
90
90
|
children: "Manage booth exhibitors and capture floor leads from live backend data."
|
|
91
|
-
})] }), /* @__PURE__ */ g(
|
|
91
|
+
})] }), /* @__PURE__ */ g(v, {
|
|
92
92
|
type: "button",
|
|
93
93
|
onClick: () => N("/exhibitors/create"),
|
|
94
|
-
children: [/* @__PURE__ */ h(
|
|
94
|
+
children: [/* @__PURE__ */ h(E, { className: "h-4 w-4" }), "New Exhibitor"]
|
|
95
95
|
})]
|
|
96
96
|
}),
|
|
97
97
|
/* @__PURE__ */ g("div", {
|
|
@@ -127,7 +127,7 @@ function N() {
|
|
|
127
127
|
]
|
|
128
128
|
}), /* @__PURE__ */ g("div", {
|
|
129
129
|
className: "relative sm:w-72",
|
|
130
|
-
children: [/* @__PURE__ */ h(
|
|
130
|
+
children: [/* @__PURE__ */ h(D, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-muted" }), /* @__PURE__ */ h(S, {
|
|
131
131
|
type: "text",
|
|
132
132
|
value: P,
|
|
133
133
|
onChange: (e) => F(e.target.value),
|
|
@@ -137,27 +137,27 @@ function N() {
|
|
|
137
137
|
})]
|
|
138
138
|
})]
|
|
139
139
|
}),
|
|
140
|
-
R && K.length === 0 ? /* @__PURE__ */ h(
|
|
140
|
+
R && K.length === 0 ? /* @__PURE__ */ h(b, {
|
|
141
141
|
treatment: "plain",
|
|
142
142
|
className: "border-border-seam p-8 text-center text-sm text-text-secondary",
|
|
143
143
|
children: "Loading exhibitors..."
|
|
144
|
-
}) : K.length === 0 ? /* @__PURE__ */ h(
|
|
144
|
+
}) : K.length === 0 ? /* @__PURE__ */ h(b, {
|
|
145
145
|
treatment: "plain",
|
|
146
146
|
className: "border-border-seam",
|
|
147
|
-
children: /* @__PURE__ */ h(
|
|
147
|
+
children: /* @__PURE__ */ h(x, {
|
|
148
148
|
illustration: P ? "empty-search" : "empty-data",
|
|
149
149
|
title: P ? "No exhibitors match your search." : "No exhibitors yet.",
|
|
150
150
|
description: P ? "Try a different name or booth code." : "Add your first exhibitor to start building the booth floor.",
|
|
151
|
-
action: P ? void 0 : /* @__PURE__ */ g(
|
|
151
|
+
action: P ? void 0 : /* @__PURE__ */ g(v, {
|
|
152
152
|
type: "button",
|
|
153
153
|
onClick: () => N("/exhibitors/create"),
|
|
154
|
-
children: [/* @__PURE__ */ h(
|
|
154
|
+
children: [/* @__PURE__ */ h(E, { className: "h-4 w-4" }), "New Exhibitor"]
|
|
155
155
|
})
|
|
156
156
|
})
|
|
157
|
-
}) : /* @__PURE__ */ h(
|
|
157
|
+
}) : /* @__PURE__ */ h(b, {
|
|
158
158
|
treatment: "plain",
|
|
159
159
|
className: "overflow-hidden border-border-seam p-0",
|
|
160
|
-
children: /* @__PURE__ */ h(
|
|
160
|
+
children: /* @__PURE__ */ h(w, {
|
|
161
161
|
columns: [
|
|
162
162
|
{
|
|
163
163
|
key: "company",
|
|
@@ -176,7 +176,7 @@ function N() {
|
|
|
176
176
|
href: t,
|
|
177
177
|
className: "ml-2 inline-flex items-center gap-1 text-text-link hover:underline",
|
|
178
178
|
fallbackClassName: "text-text-secondary",
|
|
179
|
-
children: [/* @__PURE__ */ h(
|
|
179
|
+
children: [/* @__PURE__ */ h(T, { className: "h-3.5 w-3.5" }), "Website"]
|
|
180
180
|
}) : null]
|
|
181
181
|
})]
|
|
182
182
|
});
|
|
@@ -189,7 +189,7 @@ function N() {
|
|
|
189
189
|
mobileLabel: "Booth",
|
|
190
190
|
cell: (e) => e.boothCode ? /* @__PURE__ */ g("span", {
|
|
191
191
|
className: "inline-flex items-center gap-1 rounded-input bg-bg-sunken px-2 py-0.5 text-sm font-medium text-text-primary",
|
|
192
|
-
children: [/* @__PURE__ */ h(
|
|
192
|
+
children: [/* @__PURE__ */ h(O, { className: "h-3.5 w-3.5 text-text-muted" }), e.boothCode]
|
|
193
193
|
}) : /* @__PURE__ */ h("span", {
|
|
194
194
|
className: "text-sm text-text-muted",
|
|
195
195
|
children: "—"
|
|
@@ -200,7 +200,7 @@ function N() {
|
|
|
200
200
|
header: "Category",
|
|
201
201
|
priority: "secondary",
|
|
202
202
|
mobileLabel: "Category",
|
|
203
|
-
cell: (e) => e.category ? /* @__PURE__ */ h(
|
|
203
|
+
cell: (e) => e.category ? /* @__PURE__ */ h(_, {
|
|
204
204
|
variant: "outline",
|
|
205
205
|
children: e.category
|
|
206
206
|
}) : /* @__PURE__ */ h("span", {
|
|
@@ -213,7 +213,7 @@ function N() {
|
|
|
213
213
|
header: "Status",
|
|
214
214
|
priority: "primary",
|
|
215
215
|
mobileLabel: "Status",
|
|
216
|
-
cell: (e) => /* @__PURE__ */ h(
|
|
216
|
+
cell: (e) => /* @__PURE__ */ h(_, {
|
|
217
217
|
variant: j(e.status),
|
|
218
218
|
className: "uppercase",
|
|
219
219
|
children: e.status
|
|
@@ -246,7 +246,7 @@ function N() {
|
|
|
246
246
|
extraItems: [{
|
|
247
247
|
key: "add-lead",
|
|
248
248
|
label: "Add lead",
|
|
249
|
-
icon:
|
|
249
|
+
icon: k,
|
|
250
250
|
onSelect: () => G(e)
|
|
251
251
|
}]
|
|
252
252
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExhibitorsPage.js","names":["Badge","Badge$1","readWebsite","exhibitor","value","statusVariant","status","SummaryStat","loading","label","ExhibitorsPage","useEventfullyManaged","search","setSearch","useState","pagination","usePagination","useExhibitorsQuery","unfilteredExhibitorsQuery","exhibitorSummaryQuery","useExhibitorSummaryQuery","leadsQuery","useLeadsQuery","deleteExhibitor","useDeleteExhibitorMutation","leadTarget","setLeadTarget","exhibitors","useMemo","data","total","summary","summaryLoading","onDelete","response","deleted","mutationSucceeded","notify","refetch","error","describeError","PagePurpose","EmphasisPanel","Button","navigate","Plus","Search","Input","event","GlassCard","IllustratedEmptyState","ResponsiveTable","website","row","SafeLink","ExternalLink","Store","count","ActionMenu","UserPlus","Pagination","LeadCaptureDialog","next"],"sources":["../../../../src/eventfullymanaged/pages/exhibitors/ExhibitorsPage.tsx"],"sourcesContent":["import { ExternalLink, Plus, Search, Store, UserPlus } from 'lucide-react';\nimport {\n Badge,\n Button,\n EmphasisPanel,\n GlassCard,\n IllustratedEmptyState,\n Input,\n PagePurpose,\n ResponsiveTable,\n type ResponsiveTableColumn,\n} from '@burdenoff/fe-libs/ui';\nimport { useMemo, useState } from 'react';\n\nimport {\n useDeleteExhibitorMutation,\n useExhibitorSummaryQuery,\n useExhibitorsQuery,\n useLeadsQuery,\n} from '../../api/eventApi';\nimport { ActionMenu } from '../../components/ActionMenu';\nimport { Pagination, usePagination } from '../../components/Pagination';\nimport { SafeLink } from '../../components/SafeLink';\nimport { useEventfullyManaged } from '../../context/EventfullyManagedContext';\nimport { describeError, mutationSucceeded } from '../../lib/mutationResult';\nimport { notify } from '../../lib/toast';\nimport { LeadCaptureDialog } from '../leads/LeadCaptureDialog';\n\ntype ExhibitorItem = {\n id: string;\n eventId: string;\n name: string;\n boothCode?: string | null;\n category?: string | null;\n contactName?: string | null;\n contactEmail?: string | null;\n website?: string | null;\n status: string;\n metadata?: Record<string, unknown> | null;\n leadCount?: number;\n};\n\n// BOFF-11372 — website is now its own validated column; metadata is only\n// read as a fallback for any row the backfill migration somehow missed.\nfunction readWebsite(exhibitor: Pick<ExhibitorItem, 'website' | 'metadata'>): string | null {\n if (exhibitor.website?.trim()) {\n return exhibitor.website;\n }\n const value = exhibitor.metadata?.website;\n return typeof value === 'string' && value.trim() ? value : null;\n}\n\nfunction statusVariant(status: string): 'success' | 'warning' | 'secondary' | 'info' {\n const value = status.toLowerCase();\n if (['confirmed', 'active', 'approved'].includes(value)) {\n return 'success';\n }\n if (['cancelled', 'declined', 'expired'].includes(value)) {\n return 'warning';\n }\n if (['invited', 'pending', 'draft'].includes(value)) {\n return 'info';\n }\n return 'secondary';\n}\n\ninterface SummaryStatProps {\n label: string;\n value: number;\n loading: boolean;\n}\n\nfunction SummaryStat({ label, value, loading }: SummaryStatProps) {\n return (\n <div className=\"flex items-baseline gap-1.5\">\n <span className=\"text-xl font-bold tabular-nums text-text-primary\">{loading ? '—' : value.toLocaleString()}</span>\n <span className=\"text-sm text-text-secondary\">{label}</span>\n </div>\n );\n}\n\nexport default function ExhibitorsPage() {\n const { navigate } = useEventfullyManaged();\n const [search, setSearch] = useState('');\n const pagination = usePagination({ resetKey: search });\n const { data, loading, refetch } = useExhibitorsQuery({\n search,\n limit: pagination.limit,\n offset: pagination.offset,\n });\n\n // BOFF-11370 — real server-side aggregates, not a count over a capped\n // client-side fetch. The unfiltered exhibitor/lead totals were already\n // correct (the server's own `.total`, independent of `limit`) — only the\n // booth count and per-exhibitor lead counts were broken, so only those\n // two now come from dedicated server aggregates (booths from\n // `exhibitorSummaryQuery`, per-row leads from each row's own\n // `leadCount`). Both list queries use limit: 1 purely for their `.total`.\n const unfilteredExhibitorsQuery = useExhibitorsQuery({ limit: 1, offset: 0 });\n const exhibitorSummaryQuery = useExhibitorSummaryQuery();\n const leadsQuery = useLeadsQuery({ limit: 1, offset: 0 });\n\n const [deleteExhibitor] = useDeleteExhibitorMutation();\n const [leadTarget, setLeadTarget] = useState<ExhibitorItem | null>(null);\n\n const exhibitors = useMemo(() => (data?.exhibitors?.items ?? []) as ExhibitorItem[], [data]);\n const total = data?.exhibitors?.total ?? 0;\n\n const summary = useMemo(\n () => ({\n exhibitors: unfilteredExhibitorsQuery.data?.exhibitors?.total ?? 0,\n booths: exhibitorSummaryQuery.data?.exhibitorSummary?.boothCount ?? 0,\n leads: leadsQuery.data?.leads?.total ?? 0,\n }),\n [unfilteredExhibitorsQuery.data, exhibitorSummaryQuery.data, leadsQuery.data]\n );\n\n const summaryLoading = unfilteredExhibitorsQuery.loading || exhibitorSummaryQuery.loading || leadsQuery.loading;\n\n const onDelete = async (exhibitor: ExhibitorItem) => {\n try {\n const response = await deleteExhibitor({ variables: { id: exhibitor.id } });\n const deleted = response.data?.deleteExhibitor === true;\n if (!mutationSucceeded(response, deleted ? exhibitor.id : undefined, 'Could not delete exhibitor')) {\n return;\n }\n notify.success('Exhibitor removed', `${exhibitor.name} was deleted.`);\n await Promise.all([refetch(), unfilteredExhibitorsQuery.refetch(), exhibitorSummaryQuery.refetch()]);\n } catch (error) {\n notify.error('Could not delete exhibitor', describeError(error));\n }\n };\n\n const columns: ResponsiveTableColumn<ExhibitorItem>[] = [\n {\n key: 'company',\n header: 'Company',\n priority: 'primary',\n cell: (row) => {\n const website = readWebsite(row);\n return (\n <div className=\"min-w-0\">\n <p className=\"truncate font-medium text-text-primary\">{row.name}</p>\n <p className=\"truncate text-sm text-text-secondary\">\n {row.contactName ? row.contactName : 'No contact set'}\n {website ? (\n <SafeLink\n href={website}\n className=\"ml-2 inline-flex items-center gap-1 text-text-link hover:underline\"\n fallbackClassName=\"text-text-secondary\"\n >\n <ExternalLink className=\"h-3.5 w-3.5\" />\n Website\n </SafeLink>\n ) : null}\n </p>\n </div>\n );\n },\n },\n {\n key: 'booth',\n header: 'Booth',\n priority: 'secondary',\n mobileLabel: 'Booth',\n cell: (row) =>\n row.boothCode ? (\n <span className=\"inline-flex items-center gap-1 rounded-input bg-bg-sunken px-2 py-0.5 text-sm font-medium text-text-primary\">\n <Store className=\"h-3.5 w-3.5 text-text-muted\" />\n {row.boothCode}\n </span>\n ) : (\n <span className=\"text-sm text-text-muted\">—</span>\n ),\n },\n {\n key: 'category',\n header: 'Category',\n priority: 'secondary',\n mobileLabel: 'Category',\n cell: (row) =>\n row.category ? (\n <Badge variant=\"outline\">{row.category}</Badge>\n ) : (\n <span className=\"text-sm text-text-muted\">—</span>\n ),\n },\n {\n key: 'status',\n header: 'Status',\n priority: 'primary',\n mobileLabel: 'Status',\n cell: (row) => (\n <Badge variant={statusVariant(row.status)} className=\"uppercase\">\n {row.status}\n </Badge>\n ),\n },\n {\n key: 'leads',\n header: 'Leads',\n priority: 'primary',\n mobileLabel: 'Leads',\n cell: (row) => {\n const count = row.leadCount ?? 0;\n return (\n <span className=\"inline-flex items-center gap-1.5 text-sm text-text-secondary\">\n <span\n className={`inline-flex min-w-6 items-center justify-center rounded-full px-2 py-0.5 text-xs font-semibold tabular-nums ${\n count > 0 ? 'bg-action-primary-bg text-action-primary-text' : 'bg-bg-sunken text-text-muted'\n }`}\n >\n {count}\n </span>\n leads\n </span>\n );\n },\n },\n ];\n\n return (\n <div className=\"space-y-6 p-6\">\n <PagePurpose>\n Exhibitors are the companies staffing booths at your event. Track each booth, the category it belongs to, and\n the contact who runs it — then log the leads their booth collects on the floor so you can prove the value of\n their stand. Start here to onboard a new exhibitor or work the booth pipeline.\n </PagePurpose>\n\n <EmphasisPanel className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <h1 className=\"text-2xl font-bold text-text-primary\">Exhibitors</h1>\n <p className=\"mt-1 text-sm text-text-secondary\">\n Manage booth exhibitors and capture floor leads from live backend data.\n </p>\n </div>\n <Button type=\"button\" onClick={() => navigate('/exhibitors/create')}>\n <Plus className=\"h-4 w-4\" />\n New Exhibitor\n </Button>\n </EmphasisPanel>\n\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"flex flex-wrap items-center gap-x-5 gap-y-1\">\n <SummaryStat label=\"exhibitors\" value={summary.exhibitors} loading={summaryLoading} />\n <span className=\"text-border-strong\" aria-hidden=\"true\">\n ·\n </span>\n <SummaryStat label=\"booths\" value={summary.booths} loading={summaryLoading} />\n <span className=\"text-border-strong\" aria-hidden=\"true\">\n ·\n </span>\n <SummaryStat label=\"leads\" value={summary.leads} loading={summaryLoading} />\n </div>\n <div className=\"relative sm:w-72\">\n <Search className=\"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-muted\" />\n <Input\n type=\"text\"\n value={search}\n onChange={(event) => setSearch(event.target.value)}\n placeholder=\"Search exhibitors by name or booth\"\n aria-label=\"Search exhibitors by name or booth\"\n className=\"pl-10\"\n />\n </div>\n </div>\n\n {loading && exhibitors.length === 0 ? (\n <GlassCard treatment=\"plain\" className=\"border-border-seam p-8 text-center text-sm text-text-secondary\">\n Loading exhibitors...\n </GlassCard>\n ) : exhibitors.length === 0 ? (\n <GlassCard treatment=\"plain\" className=\"border-border-seam\">\n <IllustratedEmptyState\n illustration={search ? 'empty-search' : 'empty-data'}\n title={search ? 'No exhibitors match your search.' : 'No exhibitors yet.'}\n description={\n search\n ? 'Try a different name or booth code.'\n : 'Add your first exhibitor to start building the booth floor.'\n }\n action={\n !search ? (\n <Button type=\"button\" onClick={() => navigate('/exhibitors/create')}>\n <Plus className=\"h-4 w-4\" />\n New Exhibitor\n </Button>\n ) : undefined\n }\n />\n </GlassCard>\n ) : (\n <GlassCard treatment=\"plain\" className=\"overflow-hidden border-border-seam p-0\">\n <ResponsiveTable\n columns={columns}\n data={exhibitors}\n rowKey={(row) => row.id}\n rowActions={(row) => (\n <ActionMenu\n ariaLabel={`${row.name} actions`}\n entityName={row.name}\n onEdit={() => navigate(`/exhibitors/${row.id}/edit`)}\n onDelete={() => onDelete(row)}\n extraItems={[\n {\n key: 'add-lead',\n label: 'Add lead',\n icon: UserPlus,\n onSelect: () => setLeadTarget(row),\n },\n ]}\n />\n )}\n />\n </GlassCard>\n )}\n\n <Pagination\n offset={pagination.offset}\n limit={pagination.limit}\n loadedCount={exhibitors.length}\n total={total}\n onPrev={pagination.prevPage}\n onNext={pagination.nextPage}\n itemLabel=\"exhibitors\"\n loading={loading}\n />\n\n {leadTarget ? (\n <LeadCaptureDialog\n open={Boolean(leadTarget)}\n onOpenChange={(next) => {\n if (!next) {\n setLeadTarget(null);\n }\n }}\n eventId={leadTarget.eventId}\n exhibitorId={leadTarget.id}\n contextLabel={leadTarget.name}\n onCreated={() => {\n // Refresh both the leads total tile and this exhibitor's own\n // leadCount (now server-computed, not derived from leadsQuery).\n void leadsQuery.refetch();\n void refetch();\n }}\n />\n ) : null}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,UAAA,CACE,kBAAC,QAAD;UACE,WAAW,+GACTI,IAAQ,IAAI,kDAAkD;UAG/D,UAAAA;SACG,CAAA,GAAC,OAEH;;OAEV;MACF;KA4EiB;KACT,MAAM9B;KACN,SAAS,MAAQ0B,EAAI;KACrB,aAAa,MACX,kBAACK,GAAD;MACE,WAAW,GAAGL,EAAI,KAAK;MACvB,YAAYA,EAAI;MAChB,cAAcT,EAAS,eAAeS,EAAI,GAAG,MAAM;MACnD,gBAAgBpB,EAASoB,CAAG;MAC5B,YAAY,CACV;OACE,KAAK;OACL,OAAO;OACP,MAAMM;OACN,gBAAgBjC,EAAc2B,CAAG;MACnC,CACF;KACD,CAAA;IAEJ,CAAA;GACQ,CAAA;GAGb,kBAACO,GAAD;IACE,QAAQ7C,EAAW;IACnB,OAAOA,EAAW;IAClB,aAAaY,EAAW;IACjB;IACP,QAAQZ,EAAW;IACnB,QAAQA,EAAW;IACnB,WAAU;IACD;GACV,CAAA;GAEAU,IACC,kBAACoC,GAAD;IACE,MAAM,EAAQpC;IACd,eAAe,MAAS;KACtB,AAAKqC,KACHpC,EAAc,IAAI;IAEtB;IACA,SAASD,EAAW;IACpB,aAAaA,EAAW;IACxB,cAAcA,EAAW;IACzB,iBAAiB;KAIf,AADAJ,EAAgB,QAAQ,GACxBiB,EAAa;IACf;GACD,CAAA,IACC;EACD;;AAET"}
|
|
1
|
+
{"version":3,"file":"ExhibitorsPage.js","names":["readWebsite","exhibitor","value","statusVariant","status","SummaryStat","loading","label","ExhibitorsPage","useEventfullyManaged","search","setSearch","useState","pagination","usePagination","useExhibitorsQuery","unfilteredExhibitorsQuery","exhibitorSummaryQuery","useExhibitorSummaryQuery","leadsQuery","useLeadsQuery","deleteExhibitor","useDeleteExhibitorMutation","leadTarget","setLeadTarget","exhibitors","useMemo","data","total","summary","summaryLoading","onDelete","response","deleted","mutationSucceeded","notify","refetch","error","describeError","PagePurpose","EmphasisPanel","Button","navigate","Plus","Search","Input","event","GlassCard","IllustratedEmptyState","ResponsiveTable","website","row","SafeLink","ExternalLink","Store","Badge","count","ActionMenu","UserPlus","Pagination","LeadCaptureDialog","next"],"sources":["../../../../src/eventfullymanaged/pages/exhibitors/ExhibitorsPage.tsx"],"sourcesContent":["import { ExternalLink, Plus, Search, Store, UserPlus } from 'lucide-react';\nimport {\n Badge,\n Button,\n EmphasisPanel,\n GlassCard,\n IllustratedEmptyState,\n Input,\n PagePurpose,\n ResponsiveTable,\n type ResponsiveTableColumn,\n} from '@burdenoff/fe-libs/ui';\nimport { useMemo, useState } from 'react';\n\nimport {\n useDeleteExhibitorMutation,\n useExhibitorSummaryQuery,\n useExhibitorsQuery,\n useLeadsQuery,\n} from '../../api/eventApi';\nimport { ActionMenu } from '../../components/ActionMenu';\nimport { Pagination, usePagination } from '../../components/Pagination';\nimport { SafeLink } from '../../components/SafeLink';\nimport { useEventfullyManaged } from '../../context/EventfullyManagedContext';\nimport { describeError, mutationSucceeded } from '../../lib/mutationResult';\nimport { notify } from '../../lib/toast';\nimport { LeadCaptureDialog } from '../leads/LeadCaptureDialog';\n\ntype ExhibitorItem = {\n id: string;\n eventId: string;\n name: string;\n boothCode?: string | null;\n category?: string | null;\n contactName?: string | null;\n contactEmail?: string | null;\n website?: string | null;\n status: string;\n metadata?: Record<string, unknown> | null;\n leadCount?: number;\n};\n\n// BOFF-11372 — website is now its own validated column; metadata is only\n// read as a fallback for any row the backfill migration somehow missed.\nfunction readWebsite(exhibitor: Pick<ExhibitorItem, 'website' | 'metadata'>): string | null {\n if (exhibitor.website?.trim()) {\n return exhibitor.website;\n }\n const value = exhibitor.metadata?.website;\n return typeof value === 'string' && value.trim() ? value : null;\n}\n\nfunction statusVariant(status: string): 'success' | 'warning' | 'secondary' | 'info' {\n const value = status.toLowerCase();\n if (['confirmed', 'active', 'approved'].includes(value)) {\n return 'success';\n }\n if (['cancelled', 'declined', 'expired'].includes(value)) {\n return 'warning';\n }\n if (['invited', 'pending', 'draft'].includes(value)) {\n return 'info';\n }\n return 'secondary';\n}\n\ninterface SummaryStatProps {\n label: string;\n value: number;\n loading: boolean;\n}\n\nfunction SummaryStat({ label, value, loading }: SummaryStatProps) {\n return (\n <div className=\"flex items-baseline gap-1.5\">\n <span className=\"text-xl font-bold tabular-nums text-text-primary\">{loading ? '—' : value.toLocaleString()}</span>\n <span className=\"text-sm text-text-secondary\">{label}</span>\n </div>\n );\n}\n\nexport default function ExhibitorsPage() {\n const { navigate } = useEventfullyManaged();\n const [search, setSearch] = useState('');\n const pagination = usePagination({ resetKey: search });\n const { data, loading, refetch } = useExhibitorsQuery({\n search,\n limit: pagination.limit,\n offset: pagination.offset,\n });\n\n // BOFF-11370 — real server-side aggregates, not a count over a capped\n // client-side fetch. The unfiltered exhibitor/lead totals were already\n // correct (the server's own `.total`, independent of `limit`) — only the\n // booth count and per-exhibitor lead counts were broken, so only those\n // two now come from dedicated server aggregates (booths from\n // `exhibitorSummaryQuery`, per-row leads from each row's own\n // `leadCount`). Both list queries use limit: 1 purely for their `.total`.\n const unfilteredExhibitorsQuery = useExhibitorsQuery({ limit: 1, offset: 0 });\n const exhibitorSummaryQuery = useExhibitorSummaryQuery();\n const leadsQuery = useLeadsQuery({ limit: 1, offset: 0 });\n\n const [deleteExhibitor] = useDeleteExhibitorMutation();\n const [leadTarget, setLeadTarget] = useState<ExhibitorItem | null>(null);\n\n const exhibitors = useMemo(() => (data?.exhibitors?.items ?? []) as ExhibitorItem[], [data]);\n const total = data?.exhibitors?.total ?? 0;\n\n const summary = useMemo(\n () => ({\n exhibitors: unfilteredExhibitorsQuery.data?.exhibitors?.total ?? 0,\n booths: exhibitorSummaryQuery.data?.exhibitorSummary?.boothCount ?? 0,\n leads: leadsQuery.data?.leads?.total ?? 0,\n }),\n [unfilteredExhibitorsQuery.data, exhibitorSummaryQuery.data, leadsQuery.data]\n );\n\n const summaryLoading = unfilteredExhibitorsQuery.loading || exhibitorSummaryQuery.loading || leadsQuery.loading;\n\n const onDelete = async (exhibitor: ExhibitorItem) => {\n try {\n const response = await deleteExhibitor({ variables: { id: exhibitor.id } });\n const deleted = response.data?.deleteExhibitor === true;\n if (!mutationSucceeded(response, deleted ? exhibitor.id : undefined, 'Could not delete exhibitor')) {\n return;\n }\n notify.success('Exhibitor removed', `${exhibitor.name} was deleted.`);\n await Promise.all([refetch(), unfilteredExhibitorsQuery.refetch(), exhibitorSummaryQuery.refetch()]);\n } catch (error) {\n notify.error('Could not delete exhibitor', describeError(error));\n }\n };\n\n const columns: ResponsiveTableColumn<ExhibitorItem>[] = [\n {\n key: 'company',\n header: 'Company',\n priority: 'primary',\n cell: (row) => {\n const website = readWebsite(row);\n return (\n <div className=\"min-w-0\">\n <p className=\"truncate font-medium text-text-primary\">{row.name}</p>\n <p className=\"truncate text-sm text-text-secondary\">\n {row.contactName ? row.contactName : 'No contact set'}\n {website ? (\n <SafeLink\n href={website}\n className=\"ml-2 inline-flex items-center gap-1 text-text-link hover:underline\"\n fallbackClassName=\"text-text-secondary\"\n >\n <ExternalLink className=\"h-3.5 w-3.5\" />\n Website\n </SafeLink>\n ) : null}\n </p>\n </div>\n );\n },\n },\n {\n key: 'booth',\n header: 'Booth',\n priority: 'secondary',\n mobileLabel: 'Booth',\n cell: (row) =>\n row.boothCode ? (\n <span className=\"inline-flex items-center gap-1 rounded-input bg-bg-sunken px-2 py-0.5 text-sm font-medium text-text-primary\">\n <Store className=\"h-3.5 w-3.5 text-text-muted\" />\n {row.boothCode}\n </span>\n ) : (\n <span className=\"text-sm text-text-muted\">—</span>\n ),\n },\n {\n key: 'category',\n header: 'Category',\n priority: 'secondary',\n mobileLabel: 'Category',\n cell: (row) =>\n row.category ? (\n <Badge variant=\"outline\">{row.category}</Badge>\n ) : (\n <span className=\"text-sm text-text-muted\">—</span>\n ),\n },\n {\n key: 'status',\n header: 'Status',\n priority: 'primary',\n mobileLabel: 'Status',\n cell: (row) => (\n <Badge variant={statusVariant(row.status)} className=\"uppercase\">\n {row.status}\n </Badge>\n ),\n },\n {\n key: 'leads',\n header: 'Leads',\n priority: 'primary',\n mobileLabel: 'Leads',\n cell: (row) => {\n const count = row.leadCount ?? 0;\n return (\n <span className=\"inline-flex items-center gap-1.5 text-sm text-text-secondary\">\n <span\n className={`inline-flex min-w-6 items-center justify-center rounded-full px-2 py-0.5 text-xs font-semibold tabular-nums ${\n count > 0 ? 'bg-action-primary-bg text-action-primary-text' : 'bg-bg-sunken text-text-muted'\n }`}\n >\n {count}\n </span>\n leads\n </span>\n );\n },\n },\n ];\n\n return (\n <div className=\"space-y-6 p-6\">\n <PagePurpose>\n Exhibitors are the companies staffing booths at your event. Track each booth, the category it belongs to, and\n the contact who runs it — then log the leads their booth collects on the floor so you can prove the value of\n their stand. Start here to onboard a new exhibitor or work the booth pipeline.\n </PagePurpose>\n\n <EmphasisPanel className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <h1 className=\"text-2xl font-bold text-text-primary\">Exhibitors</h1>\n <p className=\"mt-1 text-sm text-text-secondary\">\n Manage booth exhibitors and capture floor leads from live backend data.\n </p>\n </div>\n <Button type=\"button\" onClick={() => navigate('/exhibitors/create')}>\n <Plus className=\"h-4 w-4\" />\n New Exhibitor\n </Button>\n </EmphasisPanel>\n\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"flex flex-wrap items-center gap-x-5 gap-y-1\">\n <SummaryStat label=\"exhibitors\" value={summary.exhibitors} loading={summaryLoading} />\n <span className=\"text-border-strong\" aria-hidden=\"true\">\n ·\n </span>\n <SummaryStat label=\"booths\" value={summary.booths} loading={summaryLoading} />\n <span className=\"text-border-strong\" aria-hidden=\"true\">\n ·\n </span>\n <SummaryStat label=\"leads\" value={summary.leads} loading={summaryLoading} />\n </div>\n <div className=\"relative sm:w-72\">\n <Search className=\"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-muted\" />\n <Input\n type=\"text\"\n value={search}\n onChange={(event) => setSearch(event.target.value)}\n placeholder=\"Search exhibitors by name or booth\"\n aria-label=\"Search exhibitors by name or booth\"\n className=\"pl-10\"\n />\n </div>\n </div>\n\n {loading && exhibitors.length === 0 ? (\n <GlassCard treatment=\"plain\" className=\"border-border-seam p-8 text-center text-sm text-text-secondary\">\n Loading exhibitors...\n </GlassCard>\n ) : exhibitors.length === 0 ? (\n <GlassCard treatment=\"plain\" className=\"border-border-seam\">\n <IllustratedEmptyState\n illustration={search ? 'empty-search' : 'empty-data'}\n title={search ? 'No exhibitors match your search.' : 'No exhibitors yet.'}\n description={\n search\n ? 'Try a different name or booth code.'\n : 'Add your first exhibitor to start building the booth floor.'\n }\n action={\n !search ? (\n <Button type=\"button\" onClick={() => navigate('/exhibitors/create')}>\n <Plus className=\"h-4 w-4\" />\n New Exhibitor\n </Button>\n ) : undefined\n }\n />\n </GlassCard>\n ) : (\n <GlassCard treatment=\"plain\" className=\"overflow-hidden border-border-seam p-0\">\n <ResponsiveTable\n columns={columns}\n data={exhibitors}\n rowKey={(row) => row.id}\n rowActions={(row) => (\n <ActionMenu\n ariaLabel={`${row.name} actions`}\n entityName={row.name}\n onEdit={() => navigate(`/exhibitors/${row.id}/edit`)}\n onDelete={() => onDelete(row)}\n extraItems={[\n {\n key: 'add-lead',\n label: 'Add lead',\n icon: UserPlus,\n onSelect: () => setLeadTarget(row),\n },\n ]}\n />\n )}\n />\n </GlassCard>\n )}\n\n <Pagination\n offset={pagination.offset}\n limit={pagination.limit}\n loadedCount={exhibitors.length}\n total={total}\n onPrev={pagination.prevPage}\n onNext={pagination.nextPage}\n itemLabel=\"exhibitors\"\n loading={loading}\n />\n\n {leadTarget ? (\n <LeadCaptureDialog\n open={Boolean(leadTarget)}\n onOpenChange={(next) => {\n if (!next) {\n setLeadTarget(null);\n }\n }}\n eventId={leadTarget.eventId}\n exhibitorId={leadTarget.id}\n contextLabel={leadTarget.name}\n onCreated={() => {\n // Refresh both the leads total tile and this exhibitor's own\n // leadCount (now server-computed, not derived from leadsQuery).\n void leadsQuery.refetch();\n void refet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AAM,WAAU;SAAhB,UAAA,CACE,kBAAC,QAAD;UACE,WAAW,+GACTK,IAAQ,IAAI,kDAAkD;UAG/D,UAAAA;SACG,CAAA,GAAC,OAEH;;OAEV;MACF;KA4EiB;KACT,MAAM/B;KACN,SAAS,MAAQ0B,EAAI;KACrB,aAAa,MACX,kBAACM,GAAD;MACE,WAAW,GAAGN,EAAI,KAAK;MACvB,YAAYA,EAAI;MAChB,cAAcT,EAAS,eAAeS,EAAI,GAAG,MAAM;MACnD,gBAAgBpB,EAASoB,CAAG;MAC5B,YAAY,CACV;OACE,KAAK;OACL,OAAO;OACP,MAAMO;OACN,gBAAgBlC,EAAc2B,CAAG;MACnC,CACF;KACD,CAAA;IAEJ,CAAA;GACQ,CAAA;GAGb,kBAACQ,GAAD;IACE,QAAQ9C,EAAW;IACnB,OAAOA,EAAW;IAClB,aAAaY,EAAW;IACjB;IACP,QAAQZ,EAAW;IACnB,QAAQA,EAAW;IACnB,WAAU;IACD;GACV,CAAA;GAEAU,IACC,kBAACqC,GAAD;IACE,MAAM,EAAQrC;IACd,eAAe,MAAS;KACtB,AAAKsC,KACHrC,EAAc,IAAI;IAEtB;IACA,SAASD,EAAW;IACpB,aAAaA,EAAW;IACxB,cAAcA,EAAW;IACzB,iBAAiB;KAIf,AADAJ,EAAgB,QAAQ,GACxBiB,EAAa;IACf;GACD,CAAA,IACC;EACD;;AAET"}
|
|
@@ -3,8 +3,8 @@ import { describeError as t, mutationSucceeded as n } from "../../lib/mutationRe
|
|
|
3
3
|
import { notify as r } from "../../lib/toast.js";
|
|
4
4
|
import { useState as i } from "react";
|
|
5
5
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { Badge as s, Button as c, Input as l, ResponsiveDialog as u, ResponsiveDialogContent as d, ResponsiveDialogDescription as f, ResponsiveDialogFooter as p, ResponsiveDialogHeader as m, ResponsiveDialogTitle as h, Textarea as g } from "@burdenoff/fe-libs/ui";
|
|
7
|
+
import { Store as _, UserPlus as v } from "lucide-react";
|
|
8
8
|
// src/eventfullymanaged/pages/leads/LeadCaptureDialog.tsx
|
|
9
9
|
function y() {
|
|
10
10
|
let e = /* @__PURE__ */ new Date(), t = e.getTimezoneOffset() * 60 * 1e3;
|
|
@@ -28,22 +28,22 @@ function x({ open: y, onOpenChange: x, eventId: S, exhibitorId: C, sponsorId: w,
|
|
|
28
28
|
[e]: t
|
|
29
29
|
}));
|
|
30
30
|
};
|
|
31
|
-
return /* @__PURE__ */ a(
|
|
31
|
+
return /* @__PURE__ */ a(u, {
|
|
32
32
|
open: y,
|
|
33
33
|
onOpenChange: x,
|
|
34
|
-
children: /* @__PURE__ */ o(
|
|
34
|
+
children: /* @__PURE__ */ o(d, { children: [/* @__PURE__ */ o(m, { children: [/* @__PURE__ */ o("div", {
|
|
35
35
|
className: "flex items-center gap-3",
|
|
36
36
|
children: [/* @__PURE__ */ a("span", {
|
|
37
37
|
className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-accent-primary/10 text-accent-primary",
|
|
38
38
|
"aria-hidden": "true",
|
|
39
|
-
children: /* @__PURE__ */ a(
|
|
40
|
-
}), /* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a(
|
|
39
|
+
children: /* @__PURE__ */ a(v, { className: "h-5 w-5" })
|
|
40
|
+
}), /* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a(h, { children: "Capture a lead" }), /* @__PURE__ */ a(f, { children: "Record a contact scanned on the floor. They are added to the event lead list for follow-up." })] })]
|
|
41
41
|
}), /* @__PURE__ */ a("div", {
|
|
42
42
|
className: "mt-1",
|
|
43
|
-
children: /* @__PURE__ */ o(
|
|
43
|
+
children: /* @__PURE__ */ o(s, {
|
|
44
44
|
variant: "secondary",
|
|
45
45
|
className: "gap-1.5",
|
|
46
|
-
children: [/* @__PURE__ */ a(
|
|
46
|
+
children: [/* @__PURE__ */ a(_, { className: "h-3.5 w-3.5" }), T]
|
|
47
47
|
})
|
|
48
48
|
})] }), /* @__PURE__ */ o("form", {
|
|
49
49
|
onSubmit: async (e) => {
|
|
@@ -78,7 +78,7 @@ function x({ open: y, onOpenChange: x, eventId: S, exhibitorId: C, sponsorId: w,
|
|
|
78
78
|
children: [/* @__PURE__ */ a("span", {
|
|
79
79
|
className: "font-medium text-text-primary",
|
|
80
80
|
children: "Name"
|
|
81
|
-
}), /* @__PURE__ */ a(
|
|
81
|
+
}), /* @__PURE__ */ a(l, {
|
|
82
82
|
value: D.attendeeName,
|
|
83
83
|
onChange: (e) => N("attendeeName", e.target.value),
|
|
84
84
|
required: !0
|
|
@@ -88,7 +88,7 @@ function x({ open: y, onOpenChange: x, eventId: S, exhibitorId: C, sponsorId: w,
|
|
|
88
88
|
children: [/* @__PURE__ */ a("span", {
|
|
89
89
|
className: "font-medium text-text-primary",
|
|
90
90
|
children: "Email"
|
|
91
|
-
}), /* @__PURE__ */ a(
|
|
91
|
+
}), /* @__PURE__ */ a(l, {
|
|
92
92
|
type: "email",
|
|
93
93
|
value: D.attendeeEmail,
|
|
94
94
|
onChange: (e) => N("attendeeEmail", e.target.value),
|
|
@@ -103,7 +103,7 @@ function x({ open: y, onOpenChange: x, eventId: S, exhibitorId: C, sponsorId: w,
|
|
|
103
103
|
children: [/* @__PURE__ */ a("span", {
|
|
104
104
|
className: "font-medium text-text-primary",
|
|
105
105
|
children: "Company"
|
|
106
|
-
}), /* @__PURE__ */ a(
|
|
106
|
+
}), /* @__PURE__ */ a(l, {
|
|
107
107
|
value: D.company,
|
|
108
108
|
onChange: (e) => N("company", e.target.value)
|
|
109
109
|
})]
|
|
@@ -112,7 +112,7 @@ function x({ open: y, onOpenChange: x, eventId: S, exhibitorId: C, sponsorId: w,
|
|
|
112
112
|
children: [/* @__PURE__ */ a("span", {
|
|
113
113
|
className: "font-medium text-text-primary",
|
|
114
114
|
children: "Scanned at"
|
|
115
|
-
}), /* @__PURE__ */ a(
|
|
115
|
+
}), /* @__PURE__ */ a(l, {
|
|
116
116
|
type: "datetime-local",
|
|
117
117
|
value: D.scannedAt,
|
|
118
118
|
onChange: (e) => N("scannedAt", e.target.value)
|
|
@@ -124,22 +124,22 @@ function x({ open: y, onOpenChange: x, eventId: S, exhibitorId: C, sponsorId: w,
|
|
|
124
124
|
children: [/* @__PURE__ */ a("span", {
|
|
125
125
|
className: "font-medium text-text-primary",
|
|
126
126
|
children: "Notes"
|
|
127
|
-
}), /* @__PURE__ */ a(
|
|
127
|
+
}), /* @__PURE__ */ a(g, {
|
|
128
128
|
value: D.notes,
|
|
129
129
|
onChange: (e) => N("notes", e.target.value),
|
|
130
130
|
rows: 3
|
|
131
131
|
})]
|
|
132
132
|
}),
|
|
133
|
-
/* @__PURE__ */ o(
|
|
133
|
+
/* @__PURE__ */ o(p, { children: [/* @__PURE__ */ a(c, {
|
|
134
134
|
type: "button",
|
|
135
135
|
variant: "outline",
|
|
136
136
|
onClick: () => x(!1),
|
|
137
137
|
disabled: A,
|
|
138
138
|
children: "Cancel"
|
|
139
|
-
}), /* @__PURE__ */ o(
|
|
139
|
+
}), /* @__PURE__ */ o(c, {
|
|
140
140
|
type: "submit",
|
|
141
141
|
disabled: A,
|
|
142
|
-
children: [/* @__PURE__ */ a(
|
|
142
|
+
children: [/* @__PURE__ */ a(v, { className: "h-4 w-4" }), A ? "Saving…" : "Capture lead"]
|
|
143
143
|
})] })
|
|
144
144
|
]
|
|
145
145
|
})] })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeadCaptureDialog.js","names":["Badge","Badge$1","nowLocalInput","now","offsetMs","makeInitialState","LeadCaptureDialog","form","setForm","useState","createLead","useCreateLeadMutation","wasOpen","setWasOpen","open","onChange","prev","field","value","ResponsiveDialog","ResponsiveDialogContent","ResponsiveDialogHeader","UserPlus","ResponsiveDialogTitle","ResponsiveDialogDescription","Store","contextLabel","event","eventId","capturedAt","input","exhibitorId","sponsorId","response","mutationSucceeded","notify","onOpenChange","onCreated","error","describeError","Input","Textarea","ResponsiveDialogFooter","Button","loading"],"sources":["../../../../src/eventfullymanaged/pages/leads/LeadCaptureDialog.tsx"],"sourcesContent":["import { Store, UserPlus } from 'lucide-react';\nimport {\n Badge,\n Button,\n Input,\n ResponsiveDialog,\n ResponsiveDialogContent,\n ResponsiveDialogDescription,\n ResponsiveDialogFooter,\n ResponsiveDialogHeader,\n ResponsiveDialogTitle,\n Textarea,\n} from '@burdenoff/fe-libs/ui';\nimport { useState } from 'react';\n\nimport { useCreateLeadMutation } from '../../api/eventApi';\nimport { describeError, mutationSucceeded } from '../../lib/mutationResult';\nimport { notify } from '../../lib/toast';\n\n/** Local YYYY-MM-DDTHH:mm string for a `datetime-local` input default. */\nfunction nowLocalInput(): string {\n const now = new Date();\n const offsetMs = now.getTimezoneOffset() * 60 * 1000;\n return new Date(now.getTime() - offsetMs).toISOString().slice(0, 16);\n}\n\nexport interface LeadCaptureDialogProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n /** Event the lead belongs to. */\n eventId: string;\n /** Booth/exhibitor that scanned the lead (mutually exclusive with sponsorId). */\n exhibitorId?: string;\n /** Sponsor that captured the lead. */\n sponsorId?: string;\n /** Friendly name shown in the dialog title, e.g. the exhibitor or sponsor name. */\n contextLabel: string;\n /** Fired after a lead is successfully persisted so the caller can refetch. */\n onCreated?: () => void;\n}\n\ntype LeadFormState = {\n attendeeName: string;\n attendeeEmail: string;\n company: string;\n notes: string;\n scannedAt: string;\n};\n\nfunction makeInitialState(): LeadFormState {\n return {\n attendeeName: '',\n attendeeEmail: '',\n company: '',\n notes: '',\n scannedAt: nowLocalInput(),\n };\n}\n\n/**\n * Booth/sponsor lead-capture dialog. Records the person a booth just scanned as\n * an EventfullyManaged lead via `useCreateLeadMutation`, attaching either the\n * `exhibitorId` or `sponsorId` context. The captured company is preserved in\n * `metadata.company` (no first-class column) and `scannedAt` maps to the\n * backend `capturedAt` timestamp.\n */\nexport function LeadCaptureDialog({\n open,\n onOpenChange,\n eventId,\n exhibitorId,\n sponsorId,\n contextLabel,\n onCreated,\n}: LeadCaptureDialogProps) {\n const [form, setForm] = useState<LeadFormState>(makeInitialState);\n const [createLead, { loading }] = useCreateLeadMutation();\n\n // Reset to a clean slate (and fresh timestamp) each time the dialog opens.\n // Deriving from the `open` transition during render is React's documented\n // alternative to an effect + setState (avoids a cascading render).\n const [wasOpen, setWasOpen] = useState(open);\n if (open !== wasOpen) {\n setWasOpen(open);\n if (open) {\n setForm(makeInitialState());\n }\n }\n\n const onChange = (field: keyof LeadFormState, value: string) => {\n setForm((prev) => ({ ...prev, [field]: value }));\n };\n\n const onSubmit = async (event: React.FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n if (!eventId) {\n notify.error('Event required', 'This record is not linked to an event yet.');\n return;\n }\n\n const capturedAt = form.scannedAt ? new Date(form.scannedAt).toISOString() : new Date().toISOString();\n const input: Record<string, unknown> = {\n eventId,\n attendeeName: form.attendeeName,\n attendeeEmail: form.attendeeEmail,\n notes: form.notes,\n status: 'NEW',\n capturedAt,\n metadata: form.company.trim() ? { company: form.company.trim() } : {},\n };\n if (exhibitorId) {\n input.exhibitorId = exhibitorId;\n }\n if (sponsorId) {\n input.sponsorId = sponsorId;\n }\n\n try {\n const response = await createLead({ variables: { input } });\n if (!mutationSucceeded(response, response.data?.createLead?.id, 'Could not capture lead')) {\n return;\n }\n notify.success('Lead captured', `${form.attendeeName} was added to the lead list.`);\n onOpenChange(false);\n onCreated?.();\n } catch (error) {\n notify.error('Could not capture lead', describeError(error));\n }\n };\n\n return (\n <ResponsiveDialog open={open} onOpenChange={onOpenChange}>\n <ResponsiveDialogContent>\n <ResponsiveDialogHeader>\n <div className=\"flex items-center gap-3\">\n <span\n className=\"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-accent-primary/10 text-accent-primary\"\n aria-hidden=\"true\"\n >\n <UserPlus className=\"h-5 w-5\" />\n </span>\n <div>\n <ResponsiveDialogTitle>Capture a lead</ResponsiveDialogTitle>\n <ResponsiveDialogDescription>\n Record a contact scanned on the floor. They are added to the event lead list for follow-up.\n </ResponsiveDialogDescription>\n </div>\n </div>\n <div className=\"mt-1\">\n <Badge variant=\"secondary\" className=\"gap-1.5\">\n <Store className=\"h-3.5 w-3.5\" />\n {contextLabel}\n </Badge>\n </div>\n </ResponsiveDialogHeader>\n <form onSubmit={onSubmit} className=\"space-y-4\">\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Name</span>\n <Input value={form.attendeeName} onChange={(e) => onChange('attendeeName', e.target.value)} required />\n </label>\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Email</span>\n <Input\n type=\"email\"\n value={form.attendeeEmail}\n onChange={(e) => onChange('attendeeEmail', e.target.value)}\n required\n />\n </label>\n </div>\n\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Company</span>\n <Input value={form.company} onChange={(e) => onChange('company', e.target.value)} />\n </label>\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Scanned at</span>\n <Input\n type=\"datetime-local\"\n value={form.scannedAt}\n onChange={(e) => onChange('scannedAt', e.target.value)}\n />\n </label>\n </div>\n\n <label className=\"block space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Notes</span>\n <Textarea value={form.notes} onChange={(e) => onChange('notes', e.target.value)} rows={3} />\n </label>\n\n <ResponsiveDialogFooter>\n <Button type=\"button\" variant=\"outline\" onClick={() => onOpenChange(false)} disabled={loading}>\n Cancel\n </Button>\n <Button type=\"submit\" disabled={loading}>\n <UserPlus className=\"h-4 w-4\" />\n {loading ? 'Saving…' : 'Capture lead'}\n </Button>\n </ResponsiveDialogFooter>\n </form>\n </ResponsiveDialogContent>\n </ResponsiveDialog>\n );\n}\n"],"mappings":";;;;;;;;AAoBA,SAASE,IAAwB;CAC/B,IAAMC,oBAAM,IAAI,KAAK,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":"LeadCaptureDialog.js","names":["nowLocalInput","now","offsetMs","makeInitialState","LeadCaptureDialog","form","setForm","useState","createLead","useCreateLeadMutation","wasOpen","setWasOpen","open","onChange","prev","field","value","ResponsiveDialog","ResponsiveDialogContent","ResponsiveDialogHeader","UserPlus","ResponsiveDialogTitle","ResponsiveDialogDescription","Badge","Store","contextLabel","event","eventId","capturedAt","input","exhibitorId","sponsorId","response","mutationSucceeded","notify","onOpenChange","onCreated","error","describeError","Input","Textarea","ResponsiveDialogFooter","Button","loading"],"sources":["../../../../src/eventfullymanaged/pages/leads/LeadCaptureDialog.tsx"],"sourcesContent":["import { Store, UserPlus } from 'lucide-react';\nimport {\n Badge,\n Button,\n Input,\n ResponsiveDialog,\n ResponsiveDialogContent,\n ResponsiveDialogDescription,\n ResponsiveDialogFooter,\n ResponsiveDialogHeader,\n ResponsiveDialogTitle,\n Textarea,\n} from '@burdenoff/fe-libs/ui';\nimport { useState } from 'react';\n\nimport { useCreateLeadMutation } from '../../api/eventApi';\nimport { describeError, mutationSucceeded } from '../../lib/mutationResult';\nimport { notify } from '../../lib/toast';\n\n/** Local YYYY-MM-DDTHH:mm string for a `datetime-local` input default. */\nfunction nowLocalInput(): string {\n const now = new Date();\n const offsetMs = now.getTimezoneOffset() * 60 * 1000;\n return new Date(now.getTime() - offsetMs).toISOString().slice(0, 16);\n}\n\nexport interface LeadCaptureDialogProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n /** Event the lead belongs to. */\n eventId: string;\n /** Booth/exhibitor that scanned the lead (mutually exclusive with sponsorId). */\n exhibitorId?: string;\n /** Sponsor that captured the lead. */\n sponsorId?: string;\n /** Friendly name shown in the dialog title, e.g. the exhibitor or sponsor name. */\n contextLabel: string;\n /** Fired after a lead is successfully persisted so the caller can refetch. */\n onCreated?: () => void;\n}\n\ntype LeadFormState = {\n attendeeName: string;\n attendeeEmail: string;\n company: string;\n notes: string;\n scannedAt: string;\n};\n\nfunction makeInitialState(): LeadFormState {\n return {\n attendeeName: '',\n attendeeEmail: '',\n company: '',\n notes: '',\n scannedAt: nowLocalInput(),\n };\n}\n\n/**\n * Booth/sponsor lead-capture dialog. Records the person a booth just scanned as\n * an EventfullyManaged lead via `useCreateLeadMutation`, attaching either the\n * `exhibitorId` or `sponsorId` context. The captured company is preserved in\n * `metadata.company` (no first-class column) and `scannedAt` maps to the\n * backend `capturedAt` timestamp.\n */\nexport function LeadCaptureDialog({\n open,\n onOpenChange,\n eventId,\n exhibitorId,\n sponsorId,\n contextLabel,\n onCreated,\n}: LeadCaptureDialogProps) {\n const [form, setForm] = useState<LeadFormState>(makeInitialState);\n const [createLead, { loading }] = useCreateLeadMutation();\n\n // Reset to a clean slate (and fresh timestamp) each time the dialog opens.\n // Deriving from the `open` transition during render is React's documented\n // alternative to an effect + setState (avoids a cascading render).\n const [wasOpen, setWasOpen] = useState(open);\n if (open !== wasOpen) {\n setWasOpen(open);\n if (open) {\n setForm(makeInitialState());\n }\n }\n\n const onChange = (field: keyof LeadFormState, value: string) => {\n setForm((prev) => ({ ...prev, [field]: value }));\n };\n\n const onSubmit = async (event: React.FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n if (!eventId) {\n notify.error('Event required', 'This record is not linked to an event yet.');\n return;\n }\n\n const capturedAt = form.scannedAt ? new Date(form.scannedAt).toISOString() : new Date().toISOString();\n const input: Record<string, unknown> = {\n eventId,\n attendeeName: form.attendeeName,\n attendeeEmail: form.attendeeEmail,\n notes: form.notes,\n status: 'NEW',\n capturedAt,\n metadata: form.company.trim() ? { company: form.company.trim() } : {},\n };\n if (exhibitorId) {\n input.exhibitorId = exhibitorId;\n }\n if (sponsorId) {\n input.sponsorId = sponsorId;\n }\n\n try {\n const response = await createLead({ variables: { input } });\n if (!mutationSucceeded(response, response.data?.createLead?.id, 'Could not capture lead')) {\n return;\n }\n notify.success('Lead captured', `${form.attendeeName} was added to the lead list.`);\n onOpenChange(false);\n onCreated?.();\n } catch (error) {\n notify.error('Could not capture lead', describeError(error));\n }\n };\n\n return (\n <ResponsiveDialog open={open} onOpenChange={onOpenChange}>\n <ResponsiveDialogContent>\n <ResponsiveDialogHeader>\n <div className=\"flex items-center gap-3\">\n <span\n className=\"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-accent-primary/10 text-accent-primary\"\n aria-hidden=\"true\"\n >\n <UserPlus className=\"h-5 w-5\" />\n </span>\n <div>\n <ResponsiveDialogTitle>Capture a lead</ResponsiveDialogTitle>\n <ResponsiveDialogDescription>\n Record a contact scanned on the floor. They are added to the event lead list for follow-up.\n </ResponsiveDialogDescription>\n </div>\n </div>\n <div className=\"mt-1\">\n <Badge variant=\"secondary\" className=\"gap-1.5\">\n <Store className=\"h-3.5 w-3.5\" />\n {contextLabel}\n </Badge>\n </div>\n </ResponsiveDialogHeader>\n <form onSubmit={onSubmit} className=\"space-y-4\">\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Name</span>\n <Input value={form.attendeeName} onChange={(e) => onChange('attendeeName', e.target.value)} required />\n </label>\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Email</span>\n <Input\n type=\"email\"\n value={form.attendeeEmail}\n onChange={(e) => onChange('attendeeEmail', e.target.value)}\n required\n />\n </label>\n </div>\n\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Company</span>\n <Input value={form.company} onChange={(e) => onChange('company', e.target.value)} />\n </label>\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Scanned at</span>\n <Input\n type=\"datetime-local\"\n value={form.scannedAt}\n onChange={(e) => onChange('scannedAt', e.target.value)}\n />\n </label>\n </div>\n\n <label className=\"block space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Notes</span>\n <Textarea value={form.notes} onChange={(e) => onChange('notes', e.target.value)} rows={3} />\n </label>\n\n <ResponsiveDialogFooter>\n <Button type=\"button\" variant=\"outline\" onClick={() => onOpenChange(false)} disabled={loading}>\n Cancel\n </Button>\n <Button type=\"submit\" disabled={loading}>\n <UserPlus className=\"h-4 w-4\" />\n {loading ? 'Saving…' : 'Capture lead'}\n </Button>\n </ResponsiveDialogFooter>\n </form>\n </ResponsiveDialogContent>\n </ResponsiveDialog>\n );\n}\n"],"mappings":";;;;;;;;AAoBA,SAASA,IAAwB;CAC/B,IAAMC,oBAAM,IAAI,KAAK,GACfC,IAAWD,EAAI,kBAAkB,IAAI,KAAK;CAChD,OAAO,IAAI,KAAKA,EAAI,QAAQ,IAAIC,CAAQ,CAAC,CAAC,YAAY,CAAC,CAAC,MAAM,GAAG,EAAE;AACrE;AAyBA,SAASC,IAAkC;CACzC,OAAO;EACL,cAAc;EACd,eAAe;EACf,SAAS;EACT,OAAO;EACP,WAAWH,EAAc;CAC3B;AACF;AASA,SAAgBI,EAAkB,EAChC,SACA,iBACA,YACA,gBACA,cACA,iBACA,gBACyB;CACzB,IAAM,CAACC,GAAMC,KAAWC,EAAwBJ,CAAgB,GAC1D,CAACK,GAAY,EAAE,gBAAaC,EAAsB,GAKlD,CAACC,GAASC,KAAcJ,EAASK,CAAI;CAC3C,AAAIA,MAASF,MACXC,EAAWC,CAAI,GACXA,KACFN,EAAQH,EAAiB,CAAC;CAI9B,IAAMU,KAAY,GAA4B,MAAkB;EAC9D,GAAS,OAAU;GAAE,GAAGC;IAAOC,IAAQC;EAAM,EAAE;CACjD;CAuCA,OACE,kBAACC,GAAD;EAAwB;EAAoB;EAC1C,UAAA,kBAACC,GAAD,EAAA,UAAA,CACE,kBAACC,GAAD,EAAA,UAAA,CACE,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,kBAAC,QAAD;IACE,WAAU;IACV,eAAY;IAEZ,UAAA,kBAACC,GAAD,EAAU,WAAU,UAAW,CAAA;GAC3B,CAAA,GACN,kBAAC,OAAD,EAAA,UAAA,CACE,kBAACC,GAAD,EAAA,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