@burdenoff/microfe-eventfullymanaged 2026.1110.5 → 2026.1110.7

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.
@@ -1,4 +1,4 @@
1
- import { useCreateExhibitorMutation as e, useEventsQuery as t, useExhibitorsQuery as n, useUpdateExhibitorMutation as r } from "../../api/eventApi.js";
1
+ import { useCreateExhibitorMutation as e, useEventsQuery as t, useExhibitorQuery as n, useUpdateExhibitorMutation as r } from "../../api/eventApi.js";
2
2
  import { EntityFormShell as i } from "../../components/EntityFormShell.js";
3
3
  import { safeUrl as a } from "../../components/SafeLink.js";
4
4
  import { useEventfullyManaged as o } from "../../context/EventfullyManagedContext.js";
@@ -40,20 +40,15 @@ function w() {
40
40
  let { id: w = "" } = p(), T = d(() => !!w, [w]), { navigate: E } = o(), { data: D } = t({
41
41
  limit: 100,
42
42
  offset: 0
43
- }), { data: O } = n({
44
- limit: 100,
45
- offset: 0
46
- }), k = d(() => (O?.exhibitors?.items ?? []).find((e) => e.id === w), [O, w]), [A, { loading: j }] = e(), [M, { loading: N }] = r(), [P, F] = f(S);
43
+ }), { data: O } = n(w), k = O?.exhibitor ?? void 0, [A, { loading: j }] = e(), [M, { loading: N }] = r(), [P, F] = f(S);
47
44
  u(() => {
48
- if (!T || !k) return;
49
- let e = k.metadata ?? {}, t = typeof e.website == "string" ? e.website : "";
50
- F({
45
+ T && k && F({
51
46
  eventId: k.eventId ?? "",
52
47
  name: k.name ?? "",
53
48
  boothCode: k.boothCode ?? "",
54
49
  category: k.category ?? "",
55
50
  status: k.status ?? "CONFIRMED",
56
- website: t,
51
+ website: k.website ?? "",
57
52
  contactName: k.contactName ?? "",
58
53
  contactEmail: k.contactEmail ?? ""
59
54
  });
@@ -73,7 +68,7 @@ function w() {
73
68
  l.error("Invalid website", "Enter a valid http(s) URL, or leave it blank.");
74
69
  return;
75
70
  }
76
- let n = k?.metadata ?? {}, r = {
71
+ let n = {
77
72
  eventId: P.eventId,
78
73
  name: P.name,
79
74
  boothCode: P.boothCode,
@@ -81,22 +76,20 @@ function w() {
81
76
  status: P.status,
82
77
  contactName: P.contactName,
83
78
  contactEmail: P.contactEmail,
84
- metadata: {
85
- ...n,
86
- website: t ?? ""
87
- }
79
+ website: t ?? "",
80
+ metadata: k?.metadata ?? {}
88
81
  };
89
82
  try {
90
83
  if (T) {
91
84
  let e = await M({ variables: {
92
85
  id: w,
93
- input: r
86
+ input: n
94
87
  } });
95
88
  if (!c(e, e.data?.updateExhibitor?.id, "Could not update exhibitor")) return;
96
89
  E("/exhibitors");
97
90
  return;
98
91
  }
99
- let e = await A({ variables: { input: r } });
92
+ let e = await A({ variables: { input: n } });
100
93
  if (!c(e, e.data?.createExhibitor?.id, "Could not create exhibitor")) return;
101
94
  E("/exhibitors");
102
95
  } catch (e) {
@@ -106,7 +99,7 @@ function w() {
106
99
  return /* @__PURE__ */ h(i, {
107
100
  title: T ? "Edit Exhibitor" : "New Exhibitor",
108
101
  description: "Manage a booth exhibitor with live backend persistence.",
109
- purpose: "Register a company staffing a booth: link it to the event, give it a booth code and category, and record who to contact. Once saved, capture the leads their booth scans from the exhibitor list.",
102
+ purpose: "Register a company staffing a booth: link it to the event, give it a booth code and category, and record who to contact. Once saved, log the leads their booth collects from the exhibitor list — entered manually, there is no badge-scan capture yet.",
110
103
  backLabel: "Back to Exhibitors",
111
104
  onBack: () => E("/exhibitors"),
112
105
  onSubmit: L,
@@ -1 +1 @@
1
- {"version":3,"file":"ExhibitorFormPage.js","names":["initialState","STATUS_OPTIONS","ExhibitorFormPage","useParams","isEdit","useMemo","id","useEventfullyManaged","eventsData","useEventsQuery","exhibitorsData","useExhibitorsQuery","existing","item","createExhibitor","creating","useCreateExhibitorMutation","updateExhibitor","updating","useUpdateExhibitorMutation","form","setForm","useState","metadata","website","onChange","prev","field","value","onSubmit","event","normalizedWebsite","safeUrl","existingMetadata","input","response","mutationSucceeded","error","describeError","saving","events","EntityFormShell","navigate","Select","SelectTrigger","SelectValue","SelectContent","SelectItem","eventItem","Input","option"],"sources":["../../../../src/eventfullymanaged/pages/exhibitors/ExhibitorFormPage.tsx"],"sourcesContent":["/* eslint-disable react-hooks/set-state-in-effect */\nimport { Input, Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@burdenoff/fe-libs/ui';\nimport { useEffect, useMemo, useState } from 'react';\nimport { useParams } from 'react-router';\n\nimport {\n useCreateExhibitorMutation,\n useEventsQuery,\n useExhibitorsQuery,\n useUpdateExhibitorMutation,\n} from '../../api/eventApi';\nimport { EntityFormShell } from '../../components/EntityFormShell';\nimport { safeUrl } from '../../components/SafeLink';\nimport { useEventfullyManaged } from '../../context/EventfullyManagedContext';\nimport { describeError, mutationSucceeded } from '../../lib/mutationResult';\nimport { notify } from '../../lib/toast';\n\ntype ExhibitorFormState = {\n eventId: string;\n name: string;\n boothCode: string;\n category: string;\n status: string;\n website: string;\n contactName: string;\n contactEmail: string;\n};\n\nconst initialState: ExhibitorFormState = {\n eventId: '',\n name: '',\n boothCode: '',\n category: '',\n status: 'CONFIRMED',\n website: '',\n contactName: '',\n contactEmail: '',\n};\n\nconst STATUS_OPTIONS = [\n { value: 'INVITED', label: 'Invited' },\n { value: 'CONFIRMED', label: 'Confirmed' },\n { value: 'ACTIVE', label: 'Active' },\n { value: 'CANCELLED', label: 'Cancelled' },\n];\n\nexport default function ExhibitorFormPage() {\n const { id = '' } = useParams<{ id: string }>();\n const isEdit = useMemo(() => Boolean(id), [id]);\n const { navigate } = useEventfullyManaged();\n\n const { data: eventsData } = useEventsQuery({ limit: 100, offset: 0 });\n // No by-id resolver exists for exhibitors, so the edit initial-state is derived\n // from the list query row.\n const { data: exhibitorsData } = useExhibitorsQuery({ limit: 100, offset: 0 });\n\n const existing = useMemo(\n () => (exhibitorsData?.exhibitors?.items ?? []).find((item) => item.id === id),\n [exhibitorsData, id]\n );\n\n const [createExhibitor, { loading: creating }] = useCreateExhibitorMutation();\n const [updateExhibitor, { loading: updating }] = useUpdateExhibitorMutation();\n const [form, setForm] = useState<ExhibitorFormState>(initialState);\n\n useEffect(() => {\n if (!isEdit || !existing) {\n return;\n }\n const metadata = existing.metadata ?? {};\n const website = typeof metadata.website === 'string' ? metadata.website : '';\n setForm({\n eventId: existing.eventId ?? '',\n name: existing.name ?? '',\n boothCode: existing.boothCode ?? '',\n category: existing.category ?? '',\n status: existing.status ?? 'CONFIRMED',\n website,\n contactName: existing.contactName ?? '',\n contactEmail: existing.contactEmail ?? '',\n });\n }, [existing, isEdit]);\n\n const onChange = (field: keyof ExhibitorFormState, value: string) => {\n setForm((prev) => ({ ...prev, [field]: value }));\n };\n\n const onSubmit = async (event: React.FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n\n if (!form.eventId) {\n notify.error('Event required', 'Choose the event this exhibitor belongs to.');\n return;\n }\n\n // The website is free text persisted verbatim, so normalise/reject it before\n // it is stored and later rendered as a link.\n const normalizedWebsite = safeUrl(form.website);\n if (form.website.trim() && !normalizedWebsite) {\n notify.error('Invalid website', 'Enter a valid http(s) URL, or leave it blank.');\n return;\n }\n\n const existingMetadata = existing?.metadata ?? {};\n const input = {\n eventId: form.eventId,\n name: form.name,\n boothCode: form.boothCode,\n category: form.category,\n status: form.status,\n contactName: form.contactName,\n contactEmail: form.contactEmail,\n metadata: { ...existingMetadata, website: normalizedWebsite ?? '' },\n };\n\n try {\n if (isEdit) {\n const response = await updateExhibitor({ variables: { id, input } });\n if (!mutationSucceeded(response, response.data?.updateExhibitor?.id, 'Could not update exhibitor')) {\n return;\n }\n navigate('/exhibitors');\n return;\n }\n\n const response = await createExhibitor({ variables: { input } });\n if (!mutationSucceeded(response, response.data?.createExhibitor?.id, 'Could not create exhibitor')) {\n return;\n }\n navigate('/exhibitors');\n } catch (error) {\n notify.error('Could not save exhibitor', describeError(error));\n }\n };\n\n const saving = creating || updating;\n const events = eventsData?.events?.items ?? [];\n\n return (\n <EntityFormShell\n title={isEdit ? 'Edit Exhibitor' : 'New Exhibitor'}\n description=\"Manage a booth exhibitor with live backend persistence.\"\n purpose=\"Register a company staffing a booth: link it to the event, give it a booth code and category, and record who to contact. Once saved, capture the leads their booth scans from the exhibitor list.\"\n backLabel=\"Back to Exhibitors\"\n onBack={() => navigate('/exhibitors')}\n onSubmit={onSubmit}\n submitLabel={isEdit ? 'Save Exhibitor' : 'Create Exhibitor'}\n saving={saving}\n >\n <div className=\"grid grid-cols-1 gap-4 md:grid-cols-2\">\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Event</span>\n <Select value={form.eventId} onValueChange={(value) => onChange('eventId', value)}>\n <SelectTrigger aria-label=\"Event\">\n <SelectValue placeholder=\"Select event\" />\n </SelectTrigger>\n <SelectContent>\n {events.map((eventItem) => (\n <SelectItem key={eventItem.id} value={eventItem.id}>\n {eventItem.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </label>\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Name</span>\n <Input value={form.name} onChange={(e) => onChange('name', e.target.value)} required />\n </label>\n </div>\n\n <div className=\"grid grid-cols-1 gap-4 md:grid-cols-3\">\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Booth Code</span>\n <Input value={form.boothCode} onChange={(e) => onChange('boothCode', e.target.value)} />\n </label>\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Category</span>\n <Input value={form.category} onChange={(e) => onChange('category', e.target.value)} />\n </label>\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Status</span>\n <Select value={form.status} onValueChange={(value) => onChange('status', value)}>\n <SelectTrigger aria-label=\"Status\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {STATUS_OPTIONS.map((option) => (\n <SelectItem key={option.value} value={option.value}>\n {option.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </label>\n </div>\n\n <label className=\"block space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Website</span>\n <Input\n value={form.website}\n onChange={(e) => onChange('website', e.target.value)}\n placeholder=\"https://example.com\"\n />\n </label>\n\n <div className=\"grid grid-cols-1 gap-4 md:grid-cols-2\">\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Contact Name</span>\n <Input value={form.contactName} onChange={(e) => onChange('contactName', e.target.value)} />\n </label>\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Contact Email</span>\n <Input type=\"email\" value={form.contactEmail} onChange={(e) => onChange('contactEmail', e.target.value)} />\n </label>\n </div>\n </EntityFormShell>\n );\n}\n"],"mappings":";;;;;;;;;;;AA4BA,IAAMA,IAAmC;CACvC,SAAS;CACT,MAAM;CACN,WAAW;CACX,UAAU;CACV,QAAQ;CACR,SAAS;CACT,aAAa;CACb,cAAc;AAChB,GAEMC,IAAiB;CACrB;EAAE,OAAO;EAAW,OAAO;CAAU;CACrC;EAAE,OAAO;EAAa,OAAO;CAAY;CACzC;EAAE,OAAO;EAAU,OAAO;CAAS;CACnC;EAAE,OAAO;EAAa,OAAO;CAAY;AAC3C;AAEA,SAAwBC,IAAoB;CAC1C,IAAM,EAAE,QAAK,OAAOC,EAA0B,GACxCC,IAASC,QAAc,EAAQC,GAAK,CAACA,CAAE,CAAC,GACxC,EAAE,gBAAaC,EAAqB,GAEpC,EAAE,MAAMC,MAAeC,EAAe;EAAE,OAAO;EAAK,QAAQ;CAAE,CAAC,GAG/D,EAAE,MAAMC,MAAmBC,EAAmB;EAAE,OAAO;EAAK,QAAQ;CAAE,CAAC,GAEvEC,IAAWP,SACRK,GAAgB,YAAY,SAAS,CAAC,EAAA,CAAG,MAAM,MAASG,EAAK,OAAOP,CAAE,GAC7E,CAACI,GAAgBJ,CAAE,CACrB,GAEM,CAACQ,GAAiB,EAAE,SAASC,OAAcC,EAA2B,GACtE,CAACC,GAAiB,EAAE,SAASC,OAAcC,EAA2B,GACtE,CAACC,GAAMC,KAAWC,EAA6BtB,CAAY;CAEjE,QAAgB;EACd,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kBAACwB,GAAD;MAAO,OAAO7B,EAAK;MAAa,WAAW,MAAMK,EAAS,eAAe,EAAE,OAAO,KAAK;KAAI,CAAA,CACtF;IACP,CAAA,GAAA,kBAAC,SAAD;KAAO,WAAU;KAAjB,UAAA,CACE,kBAAC,QAAD;MAAM,WAAU;MAAgC,UAAA;KAAmB,CAAA,GACnE,kBAACwB,GAAD;MAAO,MAAK;MAAQ,OAAO7B,EAAK;MAAc,WAAW,MAAMK,EAAS,gBAAgB,EAAE,OAAO,KAAK;KAAI,CAAA,CACrG;IACJ,CAAA,CAAA;;EACU;;AAErB"}
1
+ {"version":3,"file":"ExhibitorFormPage.js","names":["initialState","STATUS_OPTIONS","ExhibitorFormPage","useParams","isEdit","useMemo","id","useEventfullyManaged","eventsData","useEventsQuery","exhibitorData","useExhibitorQuery","existing","createExhibitor","creating","useCreateExhibitorMutation","updateExhibitor","updating","useUpdateExhibitorMutation","form","setForm","useState","onChange","prev","field","value","onSubmit","event","normalizedWebsite","safeUrl","input","response","mutationSucceeded","error","describeError","saving","events","EntityFormShell","navigate","Select","SelectTrigger","SelectValue","SelectContent","SelectItem","eventItem","Input","option"],"sources":["../../../../src/eventfullymanaged/pages/exhibitors/ExhibitorFormPage.tsx"],"sourcesContent":["/* eslint-disable react-hooks/set-state-in-effect */\nimport { Input, Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@burdenoff/fe-libs/ui';\nimport { useEffect, useMemo, useState } from 'react';\nimport { useParams } from 'react-router';\n\nimport {\n useCreateExhibitorMutation,\n useEventsQuery,\n useExhibitorQuery,\n useUpdateExhibitorMutation,\n} from '../../api/eventApi';\nimport { EntityFormShell } from '../../components/EntityFormShell';\nimport { safeUrl } from '../../components/SafeLink';\nimport { useEventfullyManaged } from '../../context/EventfullyManagedContext';\nimport { describeError, mutationSucceeded } from '../../lib/mutationResult';\nimport { notify } from '../../lib/toast';\n\ntype ExhibitorFormState = {\n eventId: string;\n name: string;\n boothCode: string;\n category: string;\n status: string;\n website: string;\n contactName: string;\n contactEmail: string;\n};\n\nconst initialState: ExhibitorFormState = {\n eventId: '',\n name: '',\n boothCode: '',\n category: '',\n status: 'CONFIRMED',\n website: '',\n contactName: '',\n contactEmail: '',\n};\n\nconst STATUS_OPTIONS = [\n { value: 'INVITED', label: 'Invited' },\n { value: 'CONFIRMED', label: 'Confirmed' },\n { value: 'ACTIVE', label: 'Active' },\n { value: 'CANCELLED', label: 'Cancelled' },\n];\n\nexport default function ExhibitorFormPage() {\n const { id = '' } = useParams<{ id: string }>();\n const isEdit = useMemo(() => Boolean(id), [id]);\n const { navigate } = useEventfullyManaged();\n\n const { data: eventsData } = useEventsQuery({ limit: 100, offset: 0 });\n // BOFF-11369 — loads the exhibitor directly by id instead of finding it\n // inside a capped list query, so editing the 101st+ exhibitor no longer\n // opens a blank form and wipes its data on save.\n const { data: exhibitorData } = useExhibitorQuery(id);\n const existing = exhibitorData?.exhibitor ?? undefined;\n\n const [createExhibitor, { loading: creating }] = useCreateExhibitorMutation();\n const [updateExhibitor, { loading: updating }] = useUpdateExhibitorMutation();\n const [form, setForm] = useState<ExhibitorFormState>(initialState);\n\n useEffect(() => {\n if (!isEdit || !existing) {\n return;\n }\n setForm({\n eventId: existing.eventId ?? '',\n name: existing.name ?? '',\n boothCode: existing.boothCode ?? '',\n category: existing.category ?? '',\n status: existing.status ?? 'CONFIRMED',\n website: existing.website ?? '',\n contactName: existing.contactName ?? '',\n contactEmail: existing.contactEmail ?? '',\n });\n }, [existing, isEdit]);\n\n const onChange = (field: keyof ExhibitorFormState, value: string) => {\n setForm((prev) => ({ ...prev, [field]: value }));\n };\n\n const onSubmit = async (event: React.FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n\n if (!form.eventId) {\n notify.error('Event required', 'Choose the event this exhibitor belongs to.');\n return;\n }\n\n // The website is free text persisted verbatim, so normalise/reject it before\n // it is stored and later rendered as a link.\n const normalizedWebsite = safeUrl(form.website);\n if (form.website.trim() && !normalizedWebsite) {\n notify.error('Invalid website', 'Enter a valid http(s) URL, or leave it blank.');\n return;\n }\n\n const input = {\n eventId: form.eventId,\n name: form.name,\n boothCode: form.boothCode,\n category: form.category,\n status: form.status,\n contactName: form.contactName,\n contactEmail: form.contactEmail,\n website: normalizedWebsite ?? '',\n metadata: existing?.metadata ?? {},\n };\n\n try {\n if (isEdit) {\n const response = await updateExhibitor({ variables: { id, input } });\n if (!mutationSucceeded(response, response.data?.updateExhibitor?.id, 'Could not update exhibitor')) {\n return;\n }\n navigate('/exhibitors');\n return;\n }\n\n const response = await createExhibitor({ variables: { input } });\n if (!mutationSucceeded(response, response.data?.createExhibitor?.id, 'Could not create exhibitor')) {\n return;\n }\n navigate('/exhibitors');\n } catch (error) {\n notify.error('Could not save exhibitor', describeError(error));\n }\n };\n\n const saving = creating || updating;\n const events = eventsData?.events?.items ?? [];\n\n return (\n <EntityFormShell\n title={isEdit ? 'Edit Exhibitor' : 'New Exhibitor'}\n description=\"Manage a booth exhibitor with live backend persistence.\"\n purpose=\"Register a company staffing a booth: link it to the event, give it a booth code and category, and record who to contact. Once saved, log the leads their booth collects from the exhibitor list — entered manually, there is no badge-scan capture yet.\"\n backLabel=\"Back to Exhibitors\"\n onBack={() => navigate('/exhibitors')}\n onSubmit={onSubmit}\n submitLabel={isEdit ? 'Save Exhibitor' : 'Create Exhibitor'}\n saving={saving}\n >\n <div className=\"grid grid-cols-1 gap-4 md:grid-cols-2\">\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Event</span>\n <Select value={form.eventId} onValueChange={(value) => onChange('eventId', value)}>\n <SelectTrigger aria-label=\"Event\">\n <SelectValue placeholder=\"Select event\" />\n </SelectTrigger>\n <SelectContent>\n {events.map((eventItem) => (\n <SelectItem key={eventItem.id} value={eventItem.id}>\n {eventItem.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </label>\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Name</span>\n <Input value={form.name} onChange={(e) => onChange('name', e.target.value)} required />\n </label>\n </div>\n\n <div className=\"grid grid-cols-1 gap-4 md:grid-cols-3\">\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Booth Code</span>\n <Input value={form.boothCode} onChange={(e) => onChange('boothCode', e.target.value)} />\n </label>\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Category</span>\n <Input value={form.category} onChange={(e) => onChange('category', e.target.value)} />\n </label>\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Status</span>\n <Select value={form.status} onValueChange={(value) => onChange('status', value)}>\n <SelectTrigger aria-label=\"Status\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {STATUS_OPTIONS.map((option) => (\n <SelectItem key={option.value} value={option.value}>\n {option.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </label>\n </div>\n\n <label className=\"block space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Website</span>\n <Input\n value={form.website}\n onChange={(e) => onChange('website', e.target.value)}\n placeholder=\"https://example.com\"\n />\n </label>\n\n <div className=\"grid grid-cols-1 gap-4 md:grid-cols-2\">\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Contact Name</span>\n <Input value={form.contactName} onChange={(e) => onChange('contactName', e.target.value)} />\n </label>\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">Contact Email</span>\n <Input type=\"email\" value={form.contactEmail} onChange={(e) => onChange('contactEmail', e.target.value)} />\n </label>\n </div>\n </EntityFormShell>\n );\n}\n"],"mappings":";;;;;;;;;;;AA4BA,IAAMA,IAAmC;CACvC,SAAS;CACT,MAAM;CACN,WAAW;CACX,UAAU;CACV,QAAQ;CACR,SAAS;CACT,aAAa;CACb,cAAc;AAChB,GAEMC,IAAiB;CACrB;EAAE,OAAO;EAAW,OAAO;CAAU;CACrC;EAAE,OAAO;EAAa,OAAO;CAAY;CACzC;EAAE,OAAO;EAAU,OAAO;CAAS;CACn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AAC,SAAD;IAAO,WAAU;IAAjB,UAAA,CACE,kBAAC,QAAD;KAAM,WAAU;KAAgC,UAAA;IAAa,CAAA,GAC7D,kBAACD,GAAD;KACE,OAAO1B,EAAK;KACZ,WAAW,MAAMG,EAAS,WAAW,EAAE,OAAO,KAAK;KACnD,aAAY;IACb,CAAA,CACI;;GAEP,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,kBAAC,SAAD;KAAO,WAAU;KAAjB,UAAA,CACE,kBAAC,QAAD;MAAM,WAAU;MAAgC,UAAA;KAAkB,CAAA,GAClE,kBAACuB,GAAD;MAAO,OAAO1B,EAAK;MAAa,WAAW,MAAMG,EAAS,eAAe,EAAE,OAAO,KAAK;KAAI,CAAA,CACtF;IACP,CAAA,GAAA,kBAAC,SAAD;KAAO,WAAU;KAAjB,UAAA,CACE,kBAAC,QAAD;MAAM,WAAU;MAAgC,UAAA;KAAmB,CAAA,GACnE,kBAACuB,GAAD;MAAO,MAAK;MAAQ,OAAO1B,EAAK;MAAc,WAAW,MAAMG,EAAS,gBAAgB,EAAE,OAAO,KAAK;KAAI,CAAA,CACrG;IACJ,CAAA,CAAA;;EACU;;AAErB"}
@@ -13,7 +13,8 @@ import { Badge as x, Button as S, EmphasisPanel as C, GlassCard as w, Illustrate
13
13
  // src/eventfullymanaged/pages/exhibitors/ExhibitorsPage.tsx
14
14
  var k = 200, A = 500;
15
15
  function j(e) {
16
- let t = e?.website;
16
+ if (e.website?.trim()) return e.website;
17
+ let t = e.metadata?.website;
17
18
  return typeof t == "string" && t.trim() ? t : null;
18
19
  }
19
20
  function M(e) {
@@ -79,7 +80,7 @@ function P() {
79
80
  return /* @__PURE__ */ h("div", {
80
81
  className: "space-y-6 p-6",
81
82
  children: [
82
- /* @__PURE__ */ m(D, { 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 capture the leads they scan 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__ */ m(D, { 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
84
  /* @__PURE__ */ h(C, {
84
85
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
85
86
  children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h1", {
@@ -164,7 +165,7 @@ function P() {
164
165
  header: "Company",
165
166
  priority: "primary",
166
167
  cell: (e) => {
167
- let t = j(e.metadata);
168
+ let t = j(e);
168
169
  return /* @__PURE__ */ h("div", {
169
170
  className: "min-w-0",
170
171
  children: [/* @__PURE__ */ m("p", {
@@ -1 +1 @@
1
- {"version":3,"file":"ExhibitorsPage.js","names":["Badge","Badge$1","SUMMARY_FETCH","LEADS_FETCH","readWebsite","value","metadata","statusVariant","status","SummaryStat","loading","label","ExhibitorsPage","useEventfullyManaged","search","setSearch","useState","pagination","usePagination","useExhibitorsQuery","summaryQuery","leadsQuery","useLeadsQuery","deleteExhibitor","useDeleteExhibitorMutation","leadTarget","setLeadTarget","exhibitors","useMemo","data","total","leadsByExhibitor","map","lead","summary","items","booths","item","summaryLoading","onDelete","response","exhibitor","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 { useDeleteExhibitorMutation, useExhibitorsQuery, useLeadsQuery } 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 status: string;\n metadata?: Record<string, unknown> | null;\n};\n\nconst SUMMARY_FETCH = 200;\nconst LEADS_FETCH = 500;\n\nfunction readWebsite(metadata: Record<string, unknown> | null | undefined): string | null {\n const value = 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 // Broad, unfiltered fetches power the summary strip and the per-exhibitor lead\n // counts — all real data, never fabricated.\n const summaryQuery = useExhibitorsQuery({ limit: SUMMARY_FETCH, offset: 0 });\n const leadsQuery = useLeadsQuery({ limit: LEADS_FETCH, 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 leadsByExhibitor = useMemo(() => {\n const map = new Map<string, number>();\n for (const lead of leadsQuery.data?.leads?.items ?? []) {\n if (lead.exhibitorId) {\n map.set(lead.exhibitorId, (map.get(lead.exhibitorId) ?? 0) + 1);\n }\n }\n return map;\n }, [leadsQuery.data]);\n\n const summary = useMemo(() => {\n const items = (summaryQuery.data?.exhibitors?.items ?? []) as ExhibitorItem[];\n const booths = new Set<string>();\n for (const item of items) {\n if (item.boothCode?.trim()) {\n booths.add(item.boothCode.trim());\n }\n }\n return {\n exhibitors: summaryQuery.data?.exhibitors?.total ?? 0,\n booths: booths.size,\n leads: leadsQuery.data?.leads?.total ?? 0,\n };\n }, [summaryQuery.data, leadsQuery.data]);\n\n const summaryLoading = summaryQuery.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(), summaryQuery.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.metadata);\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 = leadsByExhibitor.get(row.id) ?? 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 capture the leads they scan on the floor so you can prove the value of their\n 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 void leadsQuery.refetch();\n }}\n />\n ) : null}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAmCA,IAAME,IAAgB,KAChBC,IAAc;AAEpB,SAASC,EAAY,GAAqE;CACxF,IAAMC,IAAQC,GAAU;CACxB,OAAO,OAAOD,KAAU,YAAYA,EAAM,KAAK,IAAIA,IAAQ;AAC7D;AAEA,SAASE,EAAc,GAA8D;CACnF,IAAMF,IAAQG,EAAO,YAAY;CAUjC,OATI;EAAC;EAAa;EAAU;CAAU,CAAC,CAAC,SAASH,CAAK,IAC7C,YAEL;EAAC;EAAa;EAAY;CAAS,CAAC,CAAC,SAASA,CAAK,IAC9C,YAEL;EAAC;EAAW;EAAW;CAAO,CAAC,CAAC,SAASA,CAAK,IACzC,SAEF;AACT;AAQA,SAASI,EAAY,EAAE,UAAO,UAAO,cAA6B;CAChE,OACE,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,kBAAC,QAAD;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AACK,GAAD;MACE,WAAW,GAAGL,EAAI,KAAK;MACvB,YAAYA,EAAI;MAChB,cAAcT,EAAS,eAAeS,EAAI,GAAG,MAAM;MACnD,gBAAgBrB,EAASqB,CAAG;MAC5B,YAAY,CACV;OACE,KAAK;OACL,OAAO;OACP,MAAMM;OACN,gBAAgBxC,EAAckC,CAAG;MACnC,CACF;KACD,CAAA;IAEJ,CAAA;GACQ,CAAA;GAGb,kBAACO,GAAD;IACE,QAAQlD,EAAW;IACnB,OAAOA,EAAW;IAClB,aAAaU,EAAW;IACjB;IACP,QAAQV,EAAW;IACnB,QAAQA,EAAW;IACnB,WAAU;IACD;GACV,CAAA;GAEAQ,IACC,kBAAC2C,GAAD;IACE,MAAM,EAAQ3C;IACd,eAAe,MAAS;KACtB,AAAK4C,KACH3C,EAAc,IAAI;IAEtB;IACA,SAASD,EAAW;IACpB,aAAaA,EAAW;IACxB,cAAcA,EAAW;IACzB,iBAAiB;KACf,EAAgB,QAAQ;IAC1B;GACD,CAAA,IACC;EACD;;AAET"}
1
+ {"version":3,"file":"ExhibitorsPage.js","names":["Badge","Badge$1","SUMMARY_FETCH","LEADS_FETCH","readWebsite","exhibitor","value","statusVariant","status","SummaryStat","loading","label","ExhibitorsPage","useEventfullyManaged","search","setSearch","useState","pagination","usePagination","useExhibitorsQuery","summaryQuery","leadsQuery","useLeadsQuery","deleteExhibitor","useDeleteExhibitorMutation","leadTarget","setLeadTarget","exhibitors","useMemo","data","total","leadsByExhibitor","map","lead","summary","items","booths","item","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 { useDeleteExhibitorMutation, useExhibitorsQuery, useLeadsQuery } 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};\n\nconst SUMMARY_FETCH = 200;\nconst LEADS_FETCH = 500;\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 // Broad, unfiltered fetches power the summary strip and the per-exhibitor lead\n // counts — all real data, never fabricated.\n const summaryQuery = useExhibitorsQuery({ limit: SUMMARY_FETCH, offset: 0 });\n const leadsQuery = useLeadsQuery({ limit: LEADS_FETCH, 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 leadsByExhibitor = useMemo(() => {\n const map = new Map<string, number>();\n for (const lead of leadsQuery.data?.leads?.items ?? []) {\n if (lead.exhibitorId) {\n map.set(lead.exhibitorId, (map.get(lead.exhibitorId) ?? 0) + 1);\n }\n }\n return map;\n }, [leadsQuery.data]);\n\n const summary = useMemo(() => {\n const items = (summaryQuery.data?.exhibitors?.items ?? []) as ExhibitorItem[];\n const booths = new Set<string>();\n for (const item of items) {\n if (item.boothCode?.trim()) {\n booths.add(item.boothCode.trim());\n }\n }\n return {\n exhibitors: summaryQuery.data?.exhibitors?.total ?? 0,\n booths: booths.size,\n leads: leadsQuery.data?.leads?.total ?? 0,\n };\n }, [summaryQuery.data, leadsQuery.data]);\n\n const summaryLoading = summaryQuery.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(), summaryQuery.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 = leadsByExhibitor.get(row.id) ?? 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 void leadsQuery.refetch();\n }}\n />\n ) : null}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAoCA,IAAME,IAAgB,KAChBC,IAAc;AAIpB,SAASC,EAAY,GAAuE;CAC1F,IAAIC,EAAU,SAAS,KAAK,GAC1B,OAAOA,EAAU;CAEnB,IAAMC,IAAQD,EAAU,UAAU;CAClC,OAAO,OAAOC,KAAU,YAAYA,EAAM,KAAK,IAAIA,IAAQ;AA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