@burdenoff/microfe-eventfullymanaged 2026.625.2 → 2026.703.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/eventfullymanaged/api/eventApi.js +83 -38
  2. package/dist/eventfullymanaged/api/eventApi.js.map +1 -1
  3. package/dist/eventfullymanaged/components/ImageUploadField.js +98 -0
  4. package/dist/eventfullymanaged/components/ImageUploadField.js.map +1 -0
  5. package/dist/eventfullymanaged/lib/mutationResult.js +12 -0
  6. package/dist/eventfullymanaged/lib/mutationResult.js.map +1 -0
  7. package/dist/eventfullymanaged/lib/toast.js +36 -0
  8. package/dist/eventfullymanaged/lib/toast.js.map +1 -0
  9. package/dist/eventfullymanaged/pages/modules/AnalyticsPage.js +40 -32
  10. package/dist/eventfullymanaged/pages/modules/AnalyticsPage.js.map +1 -1
  11. package/dist/eventfullymanaged/pages/modules/AttendeeProfilePage.js +71 -45
  12. package/dist/eventfullymanaged/pages/modules/AttendeeProfilePage.js.map +1 -1
  13. package/dist/eventfullymanaged/pages/modules/CommunicationPage.js +56 -46
  14. package/dist/eventfullymanaged/pages/modules/CommunicationPage.js.map +1 -1
  15. package/dist/eventfullymanaged/pages/modules/EventsPage.js +75 -67
  16. package/dist/eventfullymanaged/pages/modules/EventsPage.js.map +1 -1
  17. package/dist/eventfullymanaged/pages/modules/NetworkingPage.js +30 -11
  18. package/dist/eventfullymanaged/pages/modules/NetworkingPage.js.map +1 -1
  19. package/dist/eventfullymanaged/pages/modules/SponsorDetailsPage.js +35 -13
  20. package/dist/eventfullymanaged/pages/modules/SponsorDetailsPage.js.map +1 -1
  21. package/dist/eventfullymanaged/pages/modules/WorkflowsPage.js +68 -54
  22. package/dist/eventfullymanaged/pages/modules/WorkflowsPage.js.map +1 -1
  23. package/dist/eventfullymanaged/pages/sponsors/SponsorFormPage.js +153 -125
  24. package/dist/eventfullymanaged/pages/sponsors/SponsorFormPage.js.map +1 -1
  25. package/dist/eventfullymanaged/pages/venues/FloorPlansPage.js +107 -62
  26. package/dist/eventfullymanaged/pages/venues/FloorPlansPage.js.map +1 -1
  27. package/dist/eventfullymanaged/pages/venues/VenueFormPage.js +144 -135
  28. package/dist/eventfullymanaged/pages/venues/VenueFormPage.js.map +1 -1
  29. package/dist/node_modules/@apollo/client/react/context/ApolloContext.js.map +1 -1
  30. package/dist/node_modules/@apollo/client/react/hooks/internal/useDeepMemo.js.map +1 -1
  31. package/dist/node_modules/@apollo/client/react/hooks/internal/useIsomorphicLayoutEffect.js.map +1 -1
  32. package/dist/node_modules/@apollo/client/react/hooks/internal/wrapHook.js.map +1 -1
  33. package/dist/node_modules/@apollo/client/react/hooks/useApolloClient.js.map +1 -1
  34. package/dist/node_modules/@apollo/client/react/hooks/useMutation.js.map +1 -1
  35. package/dist/node_modules/@apollo/client/react/hooks/useQuery.js.map +1 -1
  36. package/dist/node_modules/@apollo/client/react/hooks/useSyncExternalStore.js.map +1 -1
  37. package/dist/node_modules/sonner/dist/index.js +163 -0
  38. package/dist/node_modules/sonner/dist/index.js.map +1 -0
  39. package/package.json +1 -1
@@ -1,109 +1,123 @@
1
1
  import { useEventfullyManaged as e } from "../../context/EventfullyManagedContext.js";
2
- import { useAutomationRulesQuery as t, useUpsertAutomationRuleMutation as n, useUpsertWorkflowTemplateMutation as r, useWorkflowTemplatesQuery as i } from "../../api/eventApi.js";
3
- import { EntityListSection as a } from "./EntityListSection.js";
4
- import { useMemo as o, useState as s } from "react";
5
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
6
- import { Megaphone as u, Play as d, Ticket as f } from "lucide-react";
7
- import { Button as p, CTAOverflowMenu as m, EmphasisPanel as h, GradientText as g, Input as _, NextSteps as v, PagePurpose as y } from "@burdenoff/fe-libs/ui";
2
+ import { notify as t } from "../../lib/toast.js";
3
+ import { useAutomationRulesQuery as n, useUpsertAutomationRuleMutation as r, useUpsertWorkflowTemplateMutation as i, useWorkflowTemplatesQuery as a } from "../../api/eventApi.js";
4
+ import { describeError as o, mutationSucceeded as s } from "../../lib/mutationResult.js";
5
+ import { EntityListSection as c } from "./EntityListSection.js";
6
+ import { useMemo as l, useState as u } from "react";
7
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
8
+ import { Megaphone as p, Play as m, Ticket as h } from "lucide-react";
9
+ import { Button as g, CTAOverflowMenu as _, EmphasisPanel as v, GradientText as y, Input as b, NextSteps as x, PagePurpose as S } from "@burdenoff/fe-libs/ui";
8
10
  //#region src/eventfullymanaged/pages/modules/WorkflowsPage.tsx
9
- function b() {
10
- let { navigate: b } = e(), x = i({
11
+ function C() {
12
+ let { navigate: C } = e(), w = a({
11
13
  limit: 100,
12
14
  offset: 0
13
- }), S = t({
15
+ }), T = n({
14
16
  limit: 100,
15
17
  offset: 0
16
- }), [C, { loading: w }] = r(), [T, { loading: E }] = n(), [D, O] = s("Post-event follow-up"), k = o(() => x.data?.workflowTemplates.items ?? [], [x.data]), A = o(() => S.data?.automationRules.items ?? [], [S.data]), j = async () => {
17
- D.trim() && await C({ variables: { input: {
18
- name: D,
19
- title: D,
20
- status: "active",
21
- metadata: {}
22
- } } });
23
- }, M = async () => {
24
- await T({ variables: { input: {
25
- name: `${D} Rule`,
26
- title: `${D} Rule`,
27
- status: "active",
28
- metadata: {}
29
- } } });
18
+ }), [E, { loading: D }] = i(), [O, { loading: k }] = r(), [A, j] = u("Post-event follow-up"), M = l(() => w.data?.workflowTemplates.items ?? [], [w.data]), N = l(() => T.data?.automationRules.items ?? [], [T.data]), P = async () => {
19
+ if (A.trim()) try {
20
+ let e = await E({ variables: { input: {
21
+ name: A,
22
+ title: A,
23
+ status: "active",
24
+ metadata: {}
25
+ } } });
26
+ if (!s(e, e.data?.upsertWorkflowTemplate?.id, "Could not save workflow template")) return;
27
+ t.success("Workflow template saved");
28
+ } catch (e) {
29
+ t.error("Could not save workflow template", o(e));
30
+ }
31
+ }, F = async () => {
32
+ if (A.trim()) try {
33
+ let e = await O({ variables: { input: {
34
+ name: `${A} Rule`,
35
+ title: `${A} Rule`,
36
+ status: "active",
37
+ metadata: {}
38
+ } } });
39
+ if (!s(e, e.data?.upsertAutomationRule?.id, "Could not save automation rule")) return;
40
+ t.success("Automation rule saved");
41
+ } catch (e) {
42
+ t.error("Could not save automation rule", o(e));
43
+ }
30
44
  };
31
- return /* @__PURE__ */ l("div", {
45
+ return /* @__PURE__ */ f("div", {
32
46
  className: "space-y-6 p-6",
33
47
  children: [
34
- /* @__PURE__ */ c(y, { children: "Workflows automate the repetitive parts of running an event. A template is a reusable recipe (e.g. a post-event follow-up sequence); an automation rule is a trigger that fires it (e.g. “when an attendee checks in, send a welcome message”). Build them here so the platform handles routine work for you while execution is delegated to the workflow services." }),
35
- /* @__PURE__ */ l(h, { children: [
36
- /* @__PURE__ */ c("h1", {
48
+ /* @__PURE__ */ d(S, { children: "Workflows automate the repetitive parts of running an event. A template is a reusable recipe (e.g. a post-event follow-up sequence); an automation rule is a trigger that fires it (e.g. “when an attendee checks in, send a welcome message”). Build them here so the platform handles routine work for you while execution is delegated to the workflow services." }),
49
+ /* @__PURE__ */ f(v, { children: [
50
+ /* @__PURE__ */ d("h1", {
37
51
  className: "text-2xl font-bold text-text-primary",
38
- children: /* @__PURE__ */ c(g, { children: "Workflows" })
52
+ children: /* @__PURE__ */ d(y, { children: "Workflows" })
39
53
  }),
40
- /* @__PURE__ */ c("p", {
54
+ /* @__PURE__ */ d("p", {
41
55
  className: "mt-1 text-sm text-text-secondary",
42
56
  children: "Manage event workflow templates and automation rules. Execution is delegated to workflow services."
43
57
  }),
44
- /* @__PURE__ */ l("div", {
58
+ /* @__PURE__ */ f("div", {
45
59
  className: "mt-4 flex flex-col gap-3 sm:flex-row sm:items-center",
46
- children: [/* @__PURE__ */ c(_, {
47
- value: D,
48
- onChange: (e) => O(e.target.value),
60
+ children: [/* @__PURE__ */ d(b, {
61
+ value: A,
62
+ onChange: (e) => j(e.target.value),
49
63
  "aria-label": "Workflow template name",
50
64
  className: "flex-1"
51
- }), /* @__PURE__ */ l("div", {
65
+ }), /* @__PURE__ */ f("div", {
52
66
  className: "flex items-center gap-2",
53
- children: [/* @__PURE__ */ l(p, {
67
+ children: [/* @__PURE__ */ f(g, {
54
68
  type: "button",
55
- onClick: j,
56
- disabled: w,
57
- children: [/* @__PURE__ */ c(d, { className: "h-4 w-4" }), w ? "Saving..." : "Add Template"]
58
- }), /* @__PURE__ */ c(m, { actions: [{
59
- label: E ? "Saving rule..." : "Add Rule",
69
+ onClick: P,
70
+ disabled: D,
71
+ children: [/* @__PURE__ */ d(m, { className: "h-4 w-4" }), D ? "Saving..." : "Add Template"]
72
+ }), /* @__PURE__ */ d(_, { actions: [{
73
+ label: k ? "Saving rule..." : "Add Rule",
60
74
  onSelect: () => {
61
- M();
75
+ F();
62
76
  },
63
- disabled: E
77
+ disabled: k
64
78
  }] })]
65
79
  })]
66
80
  })
67
81
  ] }),
68
- /* @__PURE__ */ c(a, {
69
- heading: x.loading ? "Loading templates..." : `Templates (${k.length})`,
82
+ /* @__PURE__ */ d(c, {
83
+ heading: w.loading ? "Loading templates..." : `Templates (${M.length})`,
70
84
  emptyLabel: "No workflow templates configured.",
71
- rows: k.map((e) => ({
85
+ rows: M.map((e) => ({
72
86
  id: e.id,
73
87
  title: e.name ?? e.title ?? `Template ${e.id}`,
74
88
  status: e.status ?? void 0
75
89
  }))
76
90
  }),
77
- /* @__PURE__ */ c(a, {
78
- heading: S.loading ? "Loading automation rules..." : `Automation Rules (${A.length})`,
91
+ /* @__PURE__ */ d(c, {
92
+ heading: T.loading ? "Loading automation rules..." : `Automation Rules (${N.length})`,
79
93
  emptyLabel: "No automation rules configured.",
80
- rows: A.map((e) => ({
94
+ rows: N.map((e) => ({
81
95
  id: e.id,
82
96
  title: e.name ?? e.title ?? `Rule ${e.id}`,
83
97
  status: e.status ?? void 0
84
98
  }))
85
99
  }),
86
- /* @__PURE__ */ c(v, {
100
+ /* @__PURE__ */ d(x, {
87
101
  storageKey: "eventfullymanaged-workflows",
88
102
  title: "Put your automations to work",
89
103
  steps: [{
90
104
  id: "wire-communication",
91
105
  label: "Connect a communication campaign",
92
106
  description: "Have a rule fire announcements or reminders automatically.",
93
- icon: /* @__PURE__ */ c(u, { className: "h-4 w-4" }),
94
- onClick: () => b("/communication")
107
+ icon: /* @__PURE__ */ d(p, { className: "h-4 w-4" }),
108
+ onClick: () => C("/communication")
95
109
  }, {
96
110
  id: "automate-checkin",
97
111
  label: "Automate around check-in",
98
112
  description: "Trigger welcome flows when attendees register or arrive.",
99
- icon: /* @__PURE__ */ c(f, { className: "h-4 w-4" }),
100
- onClick: () => b("/registration")
113
+ icon: /* @__PURE__ */ d(h, { className: "h-4 w-4" }),
114
+ onClick: () => C("/registration")
101
115
  }]
102
116
  })
103
117
  ]
104
118
  });
105
119
  }
106
120
  //#endregion
107
- export { b as default };
121
+ export { C as default };
108
122
 
109
123
  //# sourceMappingURL=WorkflowsPage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"WorkflowsPage.js","names":[],"sources":["../../../../src/eventfullymanaged/pages/modules/WorkflowsPage.tsx"],"sourcesContent":["import { Megaphone, Play, Ticket } from 'lucide-react';\nimport {\n Button,\n CTAOverflowMenu,\n EmphasisPanel,\n GradientText,\n Input,\n NextSteps,\n PagePurpose,\n} from '@burdenoff/fe-libs/ui';\nimport { useMemo, useState } from 'react';\n\nimport {\n useAutomationRulesQuery,\n useUpsertAutomationRuleMutation,\n useUpsertWorkflowTemplateMutation,\n useWorkflowTemplatesQuery,\n} from '../../api/eventApi';\nimport { useEventfullyManaged } from '../../context/EventfullyManagedContext';\nimport { EntityListSection } from './EntityListSection';\n\ntype SimpleRow = {\n id: string;\n name?: string;\n title?: string;\n status?: string;\n};\n\nexport default function WorkflowsPage() {\n const { navigate } = useEventfullyManaged();\n const templatesQuery = useWorkflowTemplatesQuery({ limit: 100, offset: 0 });\n const rulesQuery = useAutomationRulesQuery({ limit: 100, offset: 0 });\n const [upsertTemplate, { loading: creatingTemplate }] = useUpsertWorkflowTemplateMutation();\n const [upsertRule, { loading: creatingRule }] = useUpsertAutomationRuleMutation();\n const [templateName, setTemplateName] = useState('Post-event follow-up');\n\n const templates = useMemo(\n () => (templatesQuery.data?.workflowTemplates.items ?? []) as SimpleRow[],\n [templatesQuery.data]\n );\n const rules = useMemo(() => (rulesQuery.data?.automationRules.items ?? []) as SimpleRow[], [rulesQuery.data]);\n\n const onCreateTemplate = async () => {\n if (!templateName.trim()) return;\n await upsertTemplate({\n variables: {\n input: {\n name: templateName,\n title: templateName,\n status: 'active',\n metadata: {},\n },\n },\n });\n };\n\n const onCreateRule = async () => {\n await upsertRule({\n variables: {\n input: {\n name: `${templateName} Rule`,\n title: `${templateName} Rule`,\n status: 'active',\n metadata: {},\n },\n },\n });\n };\n\n return (\n <div className=\"space-y-6 p-6\">\n <PagePurpose>\n Workflows automate the repetitive parts of running an event. A template is a reusable recipe (e.g. a\n post-event follow-up sequence); an automation rule is a trigger that fires it (e.g. &ldquo;when an attendee\n checks in, send a welcome message&rdquo;). Build them here so the platform handles routine work for you while\n execution is delegated to the workflow services.\n </PagePurpose>\n\n <EmphasisPanel>\n <h1 className=\"text-2xl font-bold text-text-primary\">\n <GradientText>Workflows</GradientText>\n </h1>\n <p className=\"mt-1 text-sm text-text-secondary\">\n Manage event workflow templates and automation rules. Execution is delegated to workflow services.\n </p>\n <div className=\"mt-4 flex flex-col gap-3 sm:flex-row sm:items-center\">\n <Input\n value={templateName}\n onChange={(e) => setTemplateName(e.target.value)}\n aria-label=\"Workflow template name\"\n className=\"flex-1\"\n />\n <div className=\"flex items-center gap-2\">\n <Button type=\"button\" onClick={onCreateTemplate} disabled={creatingTemplate}>\n <Play className=\"h-4 w-4\" />\n {creatingTemplate ? 'Saving...' : 'Add Template'}\n </Button>\n <CTAOverflowMenu\n actions={[\n {\n label: creatingRule ? 'Saving rule...' : 'Add Rule',\n onSelect: () => {\n void onCreateRule();\n },\n disabled: creatingRule,\n },\n ]}\n />\n </div>\n </div>\n </EmphasisPanel>\n\n <EntityListSection\n heading={templatesQuery.loading ? 'Loading templates...' : `Templates (${templates.length})`}\n emptyLabel=\"No workflow templates configured.\"\n rows={templates.map((row) => ({\n id: row.id,\n title: row.name ?? row.title ?? `Template ${row.id}`,\n status: row.status ?? undefined,\n }))}\n />\n\n <EntityListSection\n heading={rulesQuery.loading ? 'Loading automation rules...' : `Automation Rules (${rules.length})`}\n emptyLabel=\"No automation rules configured.\"\n rows={rules.map((row) => ({\n id: row.id,\n title: row.name ?? row.title ?? `Rule ${row.id}`,\n status: row.status ?? undefined,\n }))}\n />\n\n <NextSteps\n storageKey=\"eventfullymanaged-workflows\"\n title=\"Put your automations to work\"\n steps={[\n {\n id: 'wire-communication',\n label: 'Connect a communication campaign',\n description: 'Have a rule fire announcements or reminders automatically.',\n icon: <Megaphone className=\"h-4 w-4\" />,\n onClick: () => navigate('/communication'),\n },\n {\n id: 'automate-checkin',\n label: 'Automate around check-in',\n description: 'Trigger welcome flows when attendees register or arrive.',\n icon: <Ticket className=\"h-4 w-4\" />,\n onClick: () => navigate('/registration'),\n },\n ]}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;AA4BA,SAAwB,IAAgB;CACtC,IAAM,EAAE,gBAAa,GAAsB,EACrC,IAAiB,EAA0B;EAAE,OAAO;EAAK,QAAQ;EAAG,CAAC,EACrE,IAAa,EAAwB;EAAE,OAAO;EAAK,QAAQ;EAAG,CAAC,EAC/D,CAAC,GAAgB,EAAE,SAAS,OAAsB,GAAmC,EACrF,CAAC,GAAY,EAAE,SAAS,OAAkB,GAAiC,EAC3E,CAAC,GAAc,KAAmB,EAAS,uBAAuB,EAElE,IAAY,QACT,EAAe,MAAM,kBAAkB,SAAS,EAAE,EACzD,CAAC,EAAe,KAAK,CACtB,EACK,IAAQ,QAAe,EAAW,MAAM,gBAAgB,SAAS,EAAE,EAAkB,CAAC,EAAW,KAAK,CAAC,EAEvG,IAAmB,YAAY;AAC9B,IAAa,MAAM,IACxB,MAAM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SAAS,EAAW,UAAU,gCAAgC,qBAAqB,EAAM,OAAO;IAChG,YAAW;IACX,MAAM,EAAM,KAAK,OAAS;KACxB,IAAI,EAAI;KACR,OAAO,EAAI,QAAQ,EAAI,SAAS,QAAQ,EAAI;KAC5C,QAAQ,EAAI,UAAU,KAAA;KACvB,EAAE;IACH,CAAA;GAEF,kBAAC,GAAD;IACE,YAAW;IACX,OAAM;IACN,OAAO,CACL;KACE,IAAI;KACJ,OAAO;KACP,aAAa;KACb,MAAM,kBAAC,GAAD,EAAW,WAAU,WAAY,CAAA;KACvC,eAAe,EAAS,iBAAiB;KAC1C,EACD;KACE,IAAI;KACJ,OAAO;KACP,aAAa;KACb,MAAM,kBAAC,GAAD,EAAQ,WAAU,WAAY,CAAA;KACpC,eAAe,EAAS,gBAAgB;KACzC,CACF;IACD,CAAA;GACE"}
1
+ {"version":3,"file":"WorkflowsPage.js","names":[],"sources":["../../../../src/eventfullymanaged/pages/modules/WorkflowsPage.tsx"],"sourcesContent":["import { Megaphone, Play, Ticket } from 'lucide-react';\nimport {\n Button,\n CTAOverflowMenu,\n EmphasisPanel,\n GradientText,\n Input,\n NextSteps,\n PagePurpose,\n} from '@burdenoff/fe-libs/ui';\nimport { useMemo, useState } from 'react';\n\nimport {\n useAutomationRulesQuery,\n useUpsertAutomationRuleMutation,\n useUpsertWorkflowTemplateMutation,\n useWorkflowTemplatesQuery,\n} from '../../api/eventApi';\nimport { useEventfullyManaged } from '../../context/EventfullyManagedContext';\nimport { describeError, mutationSucceeded } from '../../lib/mutationResult';\nimport { notify } from '../../lib/toast';\nimport { EntityListSection } from './EntityListSection';\n\ntype SimpleRow = {\n id: string;\n name?: string;\n title?: string;\n status?: string;\n};\n\nexport default function WorkflowsPage() {\n const { navigate } = useEventfullyManaged();\n const templatesQuery = useWorkflowTemplatesQuery({ limit: 100, offset: 0 });\n const rulesQuery = useAutomationRulesQuery({ limit: 100, offset: 0 });\n const [upsertTemplate, { loading: creatingTemplate }] = useUpsertWorkflowTemplateMutation();\n const [upsertRule, { loading: creatingRule }] = useUpsertAutomationRuleMutation();\n const [templateName, setTemplateName] = useState('Post-event follow-up');\n\n const templates = useMemo(\n () => (templatesQuery.data?.workflowTemplates.items ?? []) as SimpleRow[],\n [templatesQuery.data]\n );\n const rules = useMemo(() => (rulesQuery.data?.automationRules.items ?? []) as SimpleRow[], [rulesQuery.data]);\n\n const onCreateTemplate = async () => {\n if (!templateName.trim()) return;\n try {\n const response = await upsertTemplate({\n variables: {\n input: {\n name: templateName,\n title: templateName,\n status: 'active',\n metadata: {},\n },\n },\n });\n if (!mutationSucceeded(response, response.data?.upsertWorkflowTemplate?.id, 'Could not save workflow template')) {\n return;\n }\n notify.success('Workflow template saved');\n } catch (error) {\n notify.error('Could not save workflow template', describeError(error));\n }\n };\n\n const onCreateRule = async () => {\n if (!templateName.trim()) return;\n try {\n const response = await upsertRule({\n variables: {\n input: {\n name: `${templateName} Rule`,\n title: `${templateName} Rule`,\n status: 'active',\n metadata: {},\n },\n },\n });\n if (!mutationSucceeded(response, response.data?.upsertAutomationRule?.id, 'Could not save automation rule')) {\n return;\n }\n notify.success('Automation rule saved');\n } catch (error) {\n notify.error('Could not save automation rule', describeError(error));\n }\n };\n\n return (\n <div className=\"space-y-6 p-6\">\n <PagePurpose>\n Workflows automate the repetitive parts of running an event. A template is a reusable recipe (e.g. a post-event\n follow-up sequence); an automation rule is a trigger that fires it (e.g. &ldquo;when an attendee checks in, send\n a welcome message&rdquo;). Build them here so the platform handles routine work for you while execution is\n delegated to the workflow services.\n </PagePurpose>\n\n <EmphasisPanel>\n <h1 className=\"text-2xl font-bold text-text-primary\">\n <GradientText>Workflows</GradientText>\n </h1>\n <p className=\"mt-1 text-sm text-text-secondary\">\n Manage event workflow templates and automation rules. Execution is delegated to workflow services.\n </p>\n <div className=\"mt-4 flex flex-col gap-3 sm:flex-row sm:items-center\">\n <Input\n value={templateName}\n onChange={(e) => setTemplateName(e.target.value)}\n aria-label=\"Workflow template name\"\n className=\"flex-1\"\n />\n <div className=\"flex items-center gap-2\">\n <Button type=\"button\" onClick={onCreateTemplate} disabled={creatingTemplate}>\n <Play className=\"h-4 w-4\" />\n {creatingTemplate ? 'Saving...' : 'Add Template'}\n </Button>\n <CTAOverflowMenu\n actions={[\n {\n label: creatingRule ? 'Saving rule...' : 'Add Rule',\n onSelect: () => {\n void onCreateRule();\n },\n disabled: creatingRule,\n },\n ]}\n />\n </div>\n </div>\n </EmphasisPanel>\n\n <EntityListSection\n heading={templatesQuery.loading ? 'Loading templates...' : `Templates (${templates.length})`}\n emptyLabel=\"No workflow templates configured.\"\n rows={templates.map((row) => ({\n id: row.id,\n title: row.name ?? row.title ?? `Template ${row.id}`,\n status: row.status ?? undefined,\n }))}\n />\n\n <EntityListSection\n heading={rulesQuery.loading ? 'Loading automation rules...' : `Automation Rules (${rules.length})`}\n emptyLabel=\"No automation rules configured.\"\n rows={rules.map((row) => ({\n id: row.id,\n title: row.name ?? row.title ?? `Rule ${row.id}`,\n status: row.status ?? undefined,\n }))}\n />\n\n <NextSteps\n storageKey=\"eventfullymanaged-workflows\"\n title=\"Put your automations to work\"\n steps={[\n {\n id: 'wire-communication',\n label: 'Connect a communication campaign',\n description: 'Have a rule fire announcements or reminders automatically.',\n icon: <Megaphone className=\"h-4 w-4\" />,\n onClick: () => navigate('/communication'),\n },\n {\n id: 'automate-checkin',\n label: 'Automate around check-in',\n description: 'Trigger welcome flows when attendees register or arrive.',\n icon: <Ticket className=\"h-4 w-4\" />,\n onClick: () => navigate('/registration'),\n },\n ]}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AA8BA,SAAwB,IAAgB;CACtC,IAAM,EAAE,gBAAa,GAAsB,EACrC,IAAiB,EAA0B;EAAE,OAAO;EAAK,QAAQ;EAAG,CAAC,EACrE,IAAa,EAAwB;EAAE,OAAO;EAAK,QAAQ;EAAG,CAAC,EAC/D,CAAC,GAAgB,EAAE,SAAS,OAAsB,GAAmC,EACrF,CAAC,GAAY,E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ventfullyManagedContext.js";
2
- import { useCreateSponsorMutation as t, useEventsQuery as n, useSponsorsQuery as r, useUpdateSponsorMutation as i } from "../../api/eventApi.js";
3
- import { useEffect as a, useMemo as o, useState as s } from "react";
4
- import { useParams as c } from "react-router-dom";
5
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
6
- import { ArrowLeft as d, Save as f } from "lucide-react";
7
- import { Button as p, EmphasisPanel as m, Input as h, PagePurpose as g } from "@burdenoff/fe-libs/ui";
2
+ import { notify as t } from "../../lib/toast.js";
3
+ import { useCreateSponsorMutation as n, useEventsQuery as r, useSponsorsQuery as i, useUpdateSponsorMutation as a } from "../../api/eventApi.js";
4
+ import { describeError as o, mutationSucceeded as s } from "../../lib/mutationResult.js";
5
+ import { ImageUploadField as c } from "../../components/ImageUploadField.js";
6
+ import { useEffect as l, useMemo as u, useState as d } from "react";
7
+ import { useParams as f } from "react-router-dom";
8
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
9
+ import { ArrowLeft as h, Save as g } from "lucide-react";
10
+ import { Button as _, EmphasisPanel as v, Input as y, PagePurpose as b } from "@burdenoff/fe-libs/ui";
8
11
  //#region src/eventfullymanaged/pages/sponsors/SponsorFormPage.tsx
9
- var _ = {
12
+ var x = {
10
13
  eventId: "",
11
14
  name: "",
12
15
  level: "BRONZE",
16
+ logoUrl: "",
13
17
  website: "",
14
18
  contactName: "",
15
19
  contactEmail: "",
@@ -17,231 +21,255 @@ var _ = {
17
21
  value: "0",
18
22
  leads: "0"
19
23
  };
20
- function v() {
21
- let { id: v = "" } = c(), y = o(() => !!v, [v]), { navigate: b } = e(), { data: x } = n({
24
+ function S() {
25
+ let { id: S = "" } = f(), C = u(() => !!S, [S]), { navigate: w } = e(), { data: T } = r({
22
26
  limit: 100,
23
27
  offset: 0
24
- }), { data: S } = r({
28
+ }), { data: E } = i({
25
29
  limit: 100,
26
30
  offset: 0
27
- }), C = o(() => (S?.sponsors?.items ?? []).find((e) => e.id === v), [v, S]), [w, { loading: T }] = t(), [E, { loading: D }] = i(), [O, k] = s(() => C ? {
28
- eventId: C.eventId ?? "",
29
- name: C.name ?? "",
30
- level: C.level ?? "BRONZE",
31
- website: C.website ?? "",
32
- contactName: C.contactName ?? "",
33
- contactEmail: C.contactEmail ?? "",
34
- contactPhone: C.contactPhone ?? "",
35
- value: String(C.metrics?.value ?? 0),
36
- leads: String(C.metrics?.leads ?? 0)
37
- } : _);
38
- a(() => {
39
- C && k({
40
- eventId: C.eventId ?? "",
41
- name: C.name ?? "",
42
- level: C.level ?? "BRONZE",
43
- website: C.website ?? "",
44
- contactName: C.contactName ?? "",
45
- contactEmail: C.contactEmail ?? "",
46
- contactPhone: C.contactPhone ?? "",
47
- value: String(C.metrics?.value ?? 0),
48
- leads: String(C.metrics?.leads ?? 0)
31
+ }), D = u(() => (E?.sponsors?.items ?? []).find((e) => e.id === S), [S, E]), [O, { loading: k }] = n(), [A, { loading: j }] = a(), [M, N] = d(() => D ? {
32
+ eventId: D.eventId ?? "",
33
+ name: D.name ?? "",
34
+ level: D.level ?? "BRONZE",
35
+ logoUrl: D.logoUrl ?? "",
36
+ website: D.website ?? "",
37
+ contactName: D.contactName ?? "",
38
+ contactEmail: D.contactEmail ?? "",
39
+ contactPhone: D.contactPhone ?? "",
40
+ value: String(D.metrics?.value ?? 0),
41
+ leads: String(D.metrics?.leads ?? 0)
42
+ } : x);
43
+ l(() => {
44
+ D && N({
45
+ eventId: D.eventId ?? "",
46
+ name: D.name ?? "",
47
+ level: D.level ?? "BRONZE",
48
+ logoUrl: D.logoUrl ?? "",
49
+ website: D.website ?? "",
50
+ contactName: D.contactName ?? "",
51
+ contactEmail: D.contactEmail ?? "",
52
+ contactPhone: D.contactPhone ?? "",
53
+ value: String(D.metrics?.value ?? 0),
54
+ leads: String(D.metrics?.leads ?? 0)
49
55
  });
50
- }, [C]);
51
- let A = (e, t) => {
52
- k((n) => ({
56
+ }, [D]);
57
+ let P = (e, t) => {
58
+ N((n) => ({
53
59
  ...n,
54
60
  [e]: t
55
61
  }));
56
- }, j = async (e) => {
62
+ }, F = async (e) => {
57
63
  e.preventDefault();
58
- let t = {
59
- eventId: O.eventId,
60
- name: O.name,
61
- level: O.level,
62
- website: O.website,
63
- contactName: O.contactName,
64
- contactEmail: O.contactEmail,
65
- contactPhone: O.contactPhone,
64
+ let n = {
65
+ eventId: M.eventId,
66
+ name: M.name,
67
+ level: M.level,
68
+ logoUrl: M.logoUrl,
69
+ website: M.website,
70
+ contactName: M.contactName,
71
+ contactEmail: M.contactEmail,
72
+ contactPhone: M.contactPhone,
66
73
  metrics: {
67
- value: Number(O.value || 0),
68
- leads: Number(O.leads || 0)
74
+ value: Number(M.value || 0),
75
+ leads: Number(M.leads || 0)
69
76
  },
70
77
  metadata: {}
71
78
  };
72
- if (y) {
73
- await E({ variables: {
74
- id: v,
75
- input: t
76
- } }), b("/sponsors");
77
- return;
79
+ try {
80
+ if (C) {
81
+ let e = await A({ variables: {
82
+ id: S,
83
+ input: n
84
+ } });
85
+ if (!s(e, e.data?.updateSponsor?.id, "Could not update sponsor")) return;
86
+ w("/sponsors");
87
+ return;
88
+ }
89
+ let e = await O({ variables: { input: n } });
90
+ if (!s(e, e.data?.createSponsor?.id, "Could not create sponsor")) return;
91
+ w("/sponsors");
92
+ } catch (e) {
93
+ t.error("Could not save sponsor", o(e));
78
94
  }
79
- await w({ variables: { input: t } }), b("/sponsors");
80
- }, M = T || D, N = x?.events?.items ?? [], P = "w-full rounded-input border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary transition-colors focus-visible:border-border-focus focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus)] focus-visible:ring-1 focus-visible:ring-[var(--color-focus-ring)]";
81
- return /* @__PURE__ */ u("div", {
95
+ }, I = k || j, L = T?.events?.items ?? [], R = "w-full rounded-input border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary transition-colors focus-visible:border-border-focus focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus)] focus-visible:ring-1 focus-visible:ring-[var(--color-focus-ring)]";
96
+ return /* @__PURE__ */ m("div", {
82
97
  className: "space-y-6 p-6",
83
98
  children: [
84
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ u(p, {
99
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m(_, {
85
100
  type: "button",
86
101
  variant: "ghost",
87
102
  size: "sm",
88
- onClick: () => b("/sponsors"),
89
- children: [/* @__PURE__ */ l(d, { className: "h-4 w-4" }), "Back to Sponsors"]
90
- }), /* @__PURE__ */ l("h1", {
103
+ onClick: () => w("/sponsors"),
104
+ children: [/* @__PURE__ */ p(h, { className: "h-4 w-4" }), "Back to Sponsors"]
105
+ }), /* @__PURE__ */ p("h1", {
91
106
  className: "mt-3 text-2xl font-bold text-text-primary",
92
- children: y ? "Edit Sponsor" : "Create Sponsor"
107
+ children: C ? "Edit Sponsor" : "Create Sponsor"
93
108
  })] }),
94
- /* @__PURE__ */ l(g, { children: "Capture a sponsor and the deal behind it. Link them to an event, set their tier, and record the contract value and leads target so you can measure ROI later. The contact fields are who you will work with day to day, so keep them accurate." }),
95
- /* @__PURE__ */ l(m, { children: /* @__PURE__ */ u("form", {
96
- onSubmit: j,
109
+ /* @__PURE__ */ p(b, { children: "Capture a sponsor and the deal behind it. Link them to an event, set their tier, and record the contract value and leads target so you can measure ROI later. The contact fields are who you will work with day to day, so keep them accurate." }),
110
+ /* @__PURE__ */ p(v, { children: /* @__PURE__ */ m("form", {
111
+ onSubmit: F,
97
112
  className: "space-y-4",
98
113
  children: [
99
- /* @__PURE__ */ u("div", {
114
+ /* @__PURE__ */ m("div", {
100
115
  className: "grid grid-cols-1 gap-4 md:grid-cols-2",
101
- children: [/* @__PURE__ */ u("label", {
116
+ children: [/* @__PURE__ */ m("label", {
102
117
  className: "space-y-1 text-sm",
103
- children: [/* @__PURE__ */ l("span", {
118
+ children: [/* @__PURE__ */ p("span", {
104
119
  className: "font-medium text-text-primary",
105
120
  children: "Event"
106
- }), /* @__PURE__ */ u("select", {
107
- value: O.eventId,
108
- onChange: (e) => A("eventId", e.target.value),
121
+ }), /* @__PURE__ */ m("select", {
122
+ value: M.eventId,
123
+ onChange: (e) => P("eventId", e.target.value),
109
124
  required: !0,
110
- className: P,
111
- children: [/* @__PURE__ */ l("option", {
125
+ className: R,
126
+ children: [/* @__PURE__ */ p("option", {
112
127
  value: "",
113
128
  children: "Select Event"
114
- }), N.map((e) => /* @__PURE__ */ l("option", {
129
+ }), L.map((e) => /* @__PURE__ */ p("option", {
115
130
  value: e.id,
116
131
  children: e.name
117
132
  }, e.id))]
118
133
  })]
119
- }), /* @__PURE__ */ u("label", {
134
+ }), /* @__PURE__ */ m("label", {
120
135
  className: "space-y-1 text-sm",
121
- children: [/* @__PURE__ */ l("span", {
136
+ children: [/* @__PURE__ */ p("span", {
122
137
  className: "font-medium text-text-primary",
123
138
  children: "Sponsor Name"
124
- }), /* @__PURE__ */ l(h, {
125
- value: O.name,
126
- onChange: (e) => A("name", e.target.value),
139
+ }), /* @__PURE__ */ p(y, {
140
+ value: M.name,
141
+ onChange: (e) => P("name", e.target.value),
127
142
  required: !0
128
143
  })]
129
144
  })]
130
145
  }),
131
- /* @__PURE__ */ u("div", {
146
+ /* @__PURE__ */ m("div", {
132
147
  className: "grid grid-cols-1 gap-4 md:grid-cols-3",
133
148
  children: [
134
- /* @__PURE__ */ u("label", {
149
+ /* @__PURE__ */ m("label", {
135
150
  className: "space-y-1 text-sm",
136
- children: [/* @__PURE__ */ l("span", {
151
+ children: [/* @__PURE__ */ p("span", {
137
152
  className: "font-medium text-text-primary",
138
153
  children: "Level"
139
- }), /* @__PURE__ */ u("select", {
140
- value: O.level,
141
- onChange: (e) => A("level", e.target.value),
142
- className: P,
154
+ }), /* @__PURE__ */ m("select", {
155
+ value: M.level,
156
+ onChange: (e) => P("level", e.target.value),
157
+ className: R,
143
158
  children: [
144
- /* @__PURE__ */ l("option", {
159
+ /* @__PURE__ */ p("option", {
145
160
  value: "PLATINUM",
146
161
  children: "Platinum"
147
162
  }),
148
- /* @__PURE__ */ l("option", {
163
+ /* @__PURE__ */ p("option", {
149
164
  value: "GOLD",
150
165
  children: "Gold"
151
166
  }),
152
- /* @__PURE__ */ l("option", {
167
+ /* @__PURE__ */ p("option", {
153
168
  value: "SILVER",
154
169
  children: "Silver"
155
170
  }),
156
- /* @__PURE__ */ l("option", {
171
+ /* @__PURE__ */ p("option", {
157
172
  value: "BRONZE",
158
173
  children: "Bronze"
159
174
  }),
160
- /* @__PURE__ */ l("option", {
175
+ /* @__PURE__ */ p("option", {
161
176
  value: "COMMUNITY",
162
177
  children: "Community"
163
178
  })
164
179
  ]
165
180
  })]
166
181
  }),
167
- /* @__PURE__ */ u("label", {
182
+ /* @__PURE__ */ m("label", {
168
183
  className: "space-y-1 text-sm",
169
- children: [/* @__PURE__ */ l("span", {
184
+ children: [/* @__PURE__ */ p("span", {
170
185
  className: "font-medium text-text-primary",
171
186
  children: "Value"
172
- }), /* @__PURE__ */ l(h, {
187
+ }), /* @__PURE__ */ p(y, {
173
188
  type: "number",
174
189
  min: "0",
175
- value: O.value,
176
- onChange: (e) => A("value", e.target.value)
190
+ value: M.value,
191
+ onChange: (e) => P("value", e.target.value)
177
192
  })]
178
193
  }),
179
- /* @__PURE__ */ u("label", {
194
+ /* @__PURE__ */ m("label", {
180
195
  className: "space-y-1 text-sm",
181
- children: [/* @__PURE__ */ l("span", {
196
+ children: [/* @__PURE__ */ p("span", {
182
197
  className: "font-medium text-text-primary",
183
198
  children: "Leads"
184
- }), /* @__PURE__ */ l(h, {
199
+ }), /* @__PURE__ */ p(y, {
185
200
  type: "number",
186
201
  min: "0",
187
- value: O.leads,
188
- onChange: (e) => A("leads", e.target.value)
202
+ value: M.leads,
203
+ onChange: (e) => P("leads", e.target.value)
189
204
  })]
190
205
  })
191
206
  ]
192
207
  }),
193
- /* @__PURE__ */ u("label", {
208
+ /* @__PURE__ */ m("label", {
194
209
  className: "block space-y-1 text-sm",
195
- children: [/* @__PURE__ */ l("span", {
210
+ children: [/* @__PURE__ */ p("span", {
196
211
  className: "font-medium text-text-primary",
197
212
  children: "Website"
198
- }), /* @__PURE__ */ l(h, {
199
- value: O.website,
200
- onChange: (e) => A("website", e.target.value)
213
+ }), /* @__PURE__ */ p(y, {
214
+ value: M.website,
215
+ onChange: (e) => P("website", e.target.value)
201
216
  })]
202
217
  }),
203
- /* @__PURE__ */ u("div", {
218
+ /* @__PURE__ */ m("div", {
219
+ className: "space-y-1 text-sm",
220
+ children: [/* @__PURE__ */ p("span", {
221
+ className: "font-medium text-text-primary",
222
+ children: "Logo"
223
+ }), /* @__PURE__ */ p(c, {
224
+ label: "Upload logo",
225
+ folderPath: "/EventfullyManaged/Sponsors",
226
+ value: M.logoUrl || null,
227
+ onUploaded: (e) => P("logoUrl", e),
228
+ hint: "Stored securely in Files. Shown across sponsor listings and detail pages."
229
+ })]
230
+ }),
231
+ /* @__PURE__ */ m("div", {
204
232
  className: "grid grid-cols-1 gap-4 md:grid-cols-3",
205
233
  children: [
206
- /* @__PURE__ */ u("label", {
234
+ /* @__PURE__ */ m("label", {
207
235
  className: "space-y-1 text-sm",
208
- children: [/* @__PURE__ */ l("span", {
236
+ children: [/* @__PURE__ */ p("span", {
209
237
  className: "font-medium text-text-primary",
210
238
  children: "Contact Name"
211
- }), /* @__PURE__ */ l(h, {
212
- value: O.contactName,
213
- onChange: (e) => A("contactName", e.target.value)
239
+ }), /* @__PURE__ */ p(y, {
240
+ value: M.contactName,
241
+ onChange: (e) => P("contactName", e.target.value)
214
242
  })]
215
243
  }),
216
- /* @__PURE__ */ u("label", {
244
+ /* @__PURE__ */ m("label", {
217
245
  className: "space-y-1 text-sm",
218
- children: [/* @__PURE__ */ l("span", {
246
+ children: [/* @__PURE__ */ p("span", {
219
247
  className: "font-medium text-text-primary",
220
248
  children: "Contact Email"
221
- }), /* @__PURE__ */ l(h, {
249
+ }), /* @__PURE__ */ p(y, {
222
250
  type: "email",
223
- value: O.contactEmail,
224
- onChange: (e) => A("contactEmail", e.target.value)
251
+ value: M.contactEmail,
252
+ onChange: (e) => P("contactEmail", e.target.value)
225
253
  })]
226
254
  }),
227
- /* @__PURE__ */ u("label", {
255
+ /* @__PURE__ */ m("label", {
228
256
  className: "space-y-1 text-sm",
229
- children: [/* @__PURE__ */ l("span", {
257
+ children: [/* @__PURE__ */ p("span", {
230
258
  className: "font-medium text-text-primary",
231
259
  children: "Contact Phone"
232
- }), /* @__PURE__ */ l(h, {
233
- value: O.contactPhone,
234
- onChange: (e) => A("contactPhone", e.target.value)
260
+ }), /* @__PURE__ */ p(y, {
261
+ value: M.contactPhone,
262
+ onChange: (e) => P("contactPhone", e.target.value)
235
263
  })]
236
264
  })
237
265
  ]
238
266
  }),
239
- /* @__PURE__ */ l("div", {
267
+ /* @__PURE__ */ p("div", {
240
268
  className: "flex justify-end",
241
- children: /* @__PURE__ */ u(p, {
269
+ children: /* @__PURE__ */ m(_, {
242
270
  type: "submit",
243
- disabled: M,
244
- children: [/* @__PURE__ */ l(f, { className: "h-4 w-4" }), M ? "Saving..." : "Save Sponsor"]
271
+ disabled: I,
272
+ children: [/* @__PURE__ */ p(g, { className: "h-4 w-4" }), I ? "Saving..." : "Save Sponsor"]
245
273
  })
246
274
  })
247
275
  ]
@@ -250,6 +278,6 @@ function v() {
250
278
  });
251
279
  }
252
280
  //#endregion
253
- export { v as default };
281
+ export { S as default };
254
282
 
255
283
  //# sourceMappingURL=SponsorFormPage.js.map