@burdenoff/microfe-subscriberbot 2026.1107.8 → 2026.1110.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 (184) hide show
  1. package/dist/node_modules/clsx/dist/clsx.js +8 -7
  2. package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
  3. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +134 -151
  4. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
  5. package/dist/subscriberbot/SubscriberBotRoot.js +10 -7
  6. package/dist/subscriberbot/SubscriberBotRoot.js.map +1 -1
  7. package/dist/subscriberbot/SubscriberBotRoutes.js +1 -2
  8. package/dist/subscriberbot/SubscriberBotRoutes.js.map +1 -1
  9. package/dist/subscriberbot/admin/AdminDashboardPage.js +9 -10
  10. package/dist/subscriberbot/admin/AdminDashboardPage.js.map +1 -1
  11. package/dist/subscriberbot/admin/AdminRoot.js +2 -3
  12. package/dist/subscriberbot/admin/AdminRoot.js.map +1 -1
  13. package/dist/subscriberbot/admin/NegotiationDeskPanel.js +56 -57
  14. package/dist/subscriberbot/admin/NegotiationDeskPanel.js.map +1 -1
  15. package/dist/subscriberbot/admin/ProcurementDeskPanel.js +107 -108
  16. package/dist/subscriberbot/admin/ProcurementDeskPanel.js.map +1 -1
  17. package/dist/subscriberbot/admin/index.js +1 -1
  18. package/dist/subscriberbot/components/EmptyState.js +1 -2
  19. package/dist/subscriberbot/components/EmptyState.js.map +1 -1
  20. package/dist/subscriberbot/components/MetricsCard.js +1 -2
  21. package/dist/subscriberbot/components/MetricsCard.js.map +1 -1
  22. package/dist/subscriberbot/components/Modal.js +2 -3
  23. package/dist/subscriberbot/components/Modal.js.map +1 -1
  24. package/dist/subscriberbot/components/PageLayout.js +1 -2
  25. package/dist/subscriberbot/components/PageLayout.js.map +1 -1
  26. package/dist/subscriberbot/components/PostureOptions.js +7 -8
  27. package/dist/subscriberbot/components/PostureOptions.js.map +1 -1
  28. package/dist/subscriberbot/components/StateViews.js +1 -2
  29. package/dist/subscriberbot/components/StateViews.js.map +1 -1
  30. package/dist/subscriberbot/components/StatusBadge.js +2 -3
  31. package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
  32. package/dist/subscriberbot/components/decisions/DecisionBanners.js +7 -8
  33. package/dist/subscriberbot/components/decisions/DecisionBanners.js.map +1 -1
  34. package/dist/subscriberbot/components/decisions/DecisionCard.js +65 -66
  35. package/dist/subscriberbot/components/decisions/DecisionCard.js.map +1 -1
  36. package/dist/subscriberbot/components/decisions/decisionModel.js +2 -3
  37. package/dist/subscriberbot/components/decisions/decisionModel.js.map +1 -1
  38. package/dist/subscriberbot/components/decisions/index.js +4 -3
  39. package/dist/subscriberbot/components/index.js +8 -7
  40. package/dist/subscriberbot/components/mobile/MobileDashboard.js +23 -24
  41. package/dist/subscriberbot/components/mobile/MobileDashboard.js.map +1 -1
  42. package/dist/subscriberbot/components/mobile/MobileRelationshipList.js +40 -49
  43. package/dist/subscriberbot/components/mobile/MobileRelationshipList.js.map +1 -1
  44. package/dist/subscriberbot/components/mobile/MobileScreen.js +1 -2
  45. package/dist/subscriberbot/components/mobile/MobileScreen.js.map +1 -1
  46. package/dist/subscriberbot/components/mobile/RelationshipGlyph.js +1 -2
  47. package/dist/subscriberbot/components/mobile/RelationshipGlyph.js.map +1 -1
  48. package/dist/subscriberbot/components/mobile/index.js +4 -3
  49. package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.js +1 -2
  50. package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.js.map +1 -1
  51. package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js +4 -5
  52. package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js.map +1 -1
  53. package/dist/subscriberbot/components/negotiations/OutcomeForm.js +4 -5
  54. package/dist/subscriberbot/components/negotiations/OutcomeForm.js.map +1 -1
  55. package/dist/subscriberbot/components/negotiations/index.js +5 -4
  56. package/dist/subscriberbot/components/negotiations/labels.js +1 -2
  57. package/dist/subscriberbot/components/negotiations/labels.js.map +1 -1
  58. package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js +4 -5
  59. package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js.map +1 -1
  60. package/dist/subscriberbot/components/procurement/ProcurementStatusPill.js +1 -2
  61. package/dist/subscriberbot/components/procurement/ProcurementStatusPill.js.map +1 -1
  62. package/dist/subscriberbot/components/procurement/ProcurementThread.js +4 -5
  63. package/dist/subscriberbot/components/procurement/ProcurementThread.js.map +1 -1
  64. package/dist/subscriberbot/components/procurement/index.js +5 -4
  65. package/dist/subscriberbot/components/procurement/labels.js +1 -2
  66. package/dist/subscriberbot/components/procurement/labels.js.map +1 -1
  67. package/dist/subscriberbot/components/savings/SavingsCards.js +90 -91
  68. package/dist/subscriberbot/components/savings/SavingsCards.js.map +1 -1
  69. package/dist/subscriberbot/components/savings/index.js +3 -2
  70. package/dist/subscriberbot/components/savings/savingsModel.js +2 -3
  71. package/dist/subscriberbot/components/savings/savingsModel.js.map +1 -1
  72. package/dist/subscriberbot/components/viz.js +2 -3
  73. package/dist/subscriberbot/components/viz.js.map +1 -1
  74. package/dist/subscriberbot/context/SubscriberBotContext.js +3 -3
  75. package/dist/subscriberbot/context/SubscriberBotContext.js.map +1 -1
  76. package/dist/subscriberbot/context/index.js +1 -1
  77. package/dist/subscriberbot/hooks/index.js +2 -2
  78. package/dist/subscriberbot/hooks/useAutonomousAgentMode.js +2 -3
  79. package/dist/subscriberbot/hooks/useAutonomousAgentMode.js.map +1 -1
  80. package/dist/subscriberbot/hooks/useBankingApi.js +2 -3
  81. package/dist/subscriberbot/hooks/useBankingApi.js.map +1 -1
  82. package/dist/subscriberbot/hooks/useCompactViewport.js +1 -2
  83. package/dist/subscriberbot/hooks/useCompactViewport.js.map +1 -1
  84. package/dist/subscriberbot/hooks/useFormError.js +1 -2
  85. package/dist/subscriberbot/hooks/useFormError.js.map +1 -1
  86. package/dist/subscriberbot/hooks/useFormatters.js +1 -2
  87. package/dist/subscriberbot/hooks/useFormatters.js.map +1 -1
  88. package/dist/subscriberbot/hooks/useNegotiationApi.js +2 -3
  89. package/dist/subscriberbot/hooks/useNegotiationApi.js.map +1 -1
  90. package/dist/subscriberbot/hooks/useProcurementApi.js +2 -3
  91. package/dist/subscriberbot/hooks/useProcurementApi.js.map +1 -1
  92. package/dist/subscriberbot/hooks/useRouteSelection.js +3 -3
  93. package/dist/subscriberbot/hooks/useRouteSelection.js.map +1 -1
  94. package/dist/subscriberbot/hooks/useSubscriberBotApi.js +1 -2
  95. package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
  96. package/dist/subscriberbot/hooks/useTr.js +1 -2
  97. package/dist/subscriberbot/hooks/useTr.js.map +1 -1
  98. package/dist/subscriberbot/index.js +9 -8
  99. package/dist/subscriberbot/pages/AssetVaultPage.js +34 -35
  100. package/dist/subscriberbot/pages/AssetVaultPage.js.map +1 -1
  101. package/dist/subscriberbot/pages/DashboardPage.js +86 -87
  102. package/dist/subscriberbot/pages/DashboardPage.js.map +1 -1
  103. package/dist/subscriberbot/pages/InboxPage.js +194 -199
  104. package/dist/subscriberbot/pages/InboxPage.js.map +1 -1
  105. package/dist/subscriberbot/pages/InsightsPage.js +28 -29
  106. package/dist/subscriberbot/pages/InsightsPage.js.map +1 -1
  107. package/dist/subscriberbot/pages/InvoicesPage.js +179 -188
  108. package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -1
  109. package/dist/subscriberbot/pages/RenewalsPage.js +293 -298
  110. package/dist/subscriberbot/pages/RenewalsPage.js.map +1 -1
  111. package/dist/subscriberbot/pages/SavingsPage.js +25 -26
  112. package/dist/subscriberbot/pages/SavingsPage.js.map +1 -1
  113. package/dist/subscriberbot/pages/WorkflowsPage.js +67 -68
  114. package/dist/subscriberbot/pages/WorkflowsPage.js.map +1 -1
  115. package/dist/subscriberbot/pages/agents/AgentDetailPage.js +126 -127
  116. package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -1
  117. package/dist/subscriberbot/pages/agents/AgentNewPage.js +10 -11
  118. package/dist/subscriberbot/pages/agents/AgentNewPage.js.map +1 -1
  119. package/dist/subscriberbot/pages/agents/AgentsListPage.js +23 -24
  120. package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -1
  121. package/dist/subscriberbot/pages/banking/BankConnectionsPage.js +337 -359
  122. package/dist/subscriberbot/pages/banking/BankConnectionsPage.js.map +1 -1
  123. package/dist/subscriberbot/pages/banking/ConnectBankModal.js +22 -27
  124. package/dist/subscriberbot/pages/banking/ConnectBankModal.js.map +1 -1
  125. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js +25 -26
  126. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js.map +1 -1
  127. package/dist/subscriberbot/pages/decisions/DecisionsPage.js +34 -35
  128. package/dist/subscriberbot/pages/decisions/DecisionsPage.js.map +1 -1
  129. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js +125 -130
  130. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js.map +1 -1
  131. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js +94 -95
  132. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js.map +1 -1
  133. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js +15 -16
  134. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js.map +1 -1
  135. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js +20 -21
  136. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js.map +1 -1
  137. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js +86 -87
  138. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js.map +1 -1
  139. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js +164 -165
  140. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js.map +1 -1
  141. package/dist/subscriberbot/pages/procurement/ProcurementPage.js +20 -21
  142. package/dist/subscriberbot/pages/procurement/ProcurementPage.js.map +1 -1
  143. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +350 -351
  144. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -1
  145. package/dist/subscriberbot/pages/providers/ProviderInsights.js +95 -96
  146. package/dist/subscriberbot/pages/providers/ProviderInsights.js.map +1 -1
  147. package/dist/subscriberbot/pages/providers/ProviderNewPage.js +11 -12
  148. package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -1
  149. package/dist/subscriberbot/pages/providers/ProvidersListPage.js +62 -63
  150. package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -1
  151. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +166 -172
  152. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
  153. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +12 -13
  154. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -1
  155. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +21 -22
  156. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -1
  157. package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js +242 -255
  158. package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js.map +1 -1
  159. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js +2 -3
  160. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js.map +1 -1
  161. package/dist/subscriberbot/services/createSandboxAssistantTransport.js +1 -2
  162. package/dist/subscriberbot/services/createSandboxAssistantTransport.js.map +1 -1
  163. package/dist/subscriberbot/store/index.js +1 -1
  164. package/dist/subscriberbot/store/subscriberbotStore.js +1 -2
  165. package/dist/subscriberbot/store/subscriberbotStore.js.map +1 -1
  166. package/dist/subscriberbot/utils/bankRedirectLink.js +18 -19
  167. package/dist/subscriberbot/utils/bankRedirectLink.js.map +1 -1
  168. package/dist/subscriberbot/utils/chartScale.js +1 -2
  169. package/dist/subscriberbot/utils/chartScale.js.map +1 -1
  170. package/dist/subscriberbot/utils/cn.js +2 -3
  171. package/dist/subscriberbot/utils/cn.js.map +1 -1
  172. package/dist/subscriberbot/utils/formatters.js +4 -5
  173. package/dist/subscriberbot/utils/formatters.js.map +1 -1
  174. package/dist/subscriberbot/utils/navigation.js +1 -2
  175. package/dist/subscriberbot/utils/navigation.js.map +1 -1
  176. package/dist/subscriberbot/utils/pageContext.js +3 -4
  177. package/dist/subscriberbot/utils/pageContext.js.map +1 -1
  178. package/dist/subscriberbot/utils/plaidLink.js +21 -22
  179. package/dist/subscriberbot/utils/plaidLink.js.map +1 -1
  180. package/dist/subscriberbot/utils/portfolio.js +5 -6
  181. package/dist/subscriberbot/utils/portfolio.js.map +1 -1
  182. package/dist/subscriberbot/utils/renewals.js +1 -2
  183. package/dist/subscriberbot/utils/renewals.js.map +1 -1
  184. package/package.json +2 -2
@@ -1,15 +1,15 @@
1
- import { useTr as e } from "../hooks/useTr.js";
2
- import { useFormatters as t } from "../hooks/useFormatters.js";
3
- import { cn as n } from "../utils/cn.js";
4
- import { FEE_STATUS_LABEL as r, REQUEST_TYPE_LABEL as i, STATUS_LABEL as a, WORKING_STATUSES as o } from "../components/procurement/labels.js";
5
- import { ProcurementStatusPill as s } from "../components/procurement/ProcurementStatusPill.js";
6
- import { ProcurementThread as c } from "../components/procurement/ProcurementThread.js";
7
- import { ProcurementOutcomeForm as l } from "../components/procurement/ProcurementOutcomeForm.js";
1
+ import { useFormatters as e } from "../hooks/useFormatters.js";
8
2
  import "../components/procurement/index.js";
9
- import { useDeskAssignProcurement as u, useDeskProcurementRequests as d, useDeskRecordProcurementOutcome as f, useDeskRetryProcurementFee as p, useDeskSendProcurementMessage as m, useDeskSetProcurementStatus as h, useDeskWaiveProcurementFee as g, useProcurementExperts as _, useUpsertProcurementExpert as v } from "../hooks/useProcurementApi.js";
3
+ import { useDeskAssignProcurement as t, useDeskProcurementRequests as n, useDeskRecordProcurementOutcome as r, useDeskRetryProcurementFee as i, useDeskSendProcurementMessage as a, useDeskSetProcurementStatus as o, useDeskWaiveProcurementFee as s, useProcurementExperts as c, useUpsertProcurementExpert as l } from "../hooks/useProcurementApi.js";
4
+ import { FEE_STATUS_LABEL as u, REQUEST_TYPE_LABEL as d, STATUS_LABEL as f, WORKING_STATUSES as p } from "../components/procurement/labels.js";
5
+ import { ProcurementStatusPill as m } from "../components/procurement/ProcurementStatusPill.js";
6
+ import { ProcurementThread as h } from "../components/procurement/ProcurementThread.js";
7
+ import { ProcurementOutcomeForm as g } from "../components/procurement/ProcurementOutcomeForm.js";
8
+ import { useTr as _ } from "../hooks/useTr.js";
9
+ import { cn as v } from "../utils/cn.js";
10
10
  import { useState as y } from "react";
11
11
  import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
12
- //#region src/subscriberbot/admin/ProcurementDeskPanel.tsx
12
+ // src/subscriberbot/admin/ProcurementDeskPanel.tsx
13
13
  var C = [
14
14
  null,
15
15
  "SUBMITTED",
@@ -35,8 +35,8 @@ var C = [
35
35
  key: "admin.procurement.view.mine",
36
36
  fallback: "Assigned to me"
37
37
  }
38
- ], T = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", E = "rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-50", D = "mb-1 block text-xs font-medium text-text-secondary", O = (e) => e ? e instanceof Error ? e.message : String(e) : null, k = ["SUBMITTED", ...o], A = ({ request: a, experts: d }) => {
39
- let { formatCurrency: _, formatDate: v } = t(), C = e(), w = u(), D = h(), A = m(), j = f(), M = p(), N = g(), [P, F] = y(""), [I, L] = y(""), [R, z] = y(!1), B = o.includes(a.status), V = a.status === "SUBMITTED" || B, H = r[a.feeStatus], U = i[a.requestType], W = O(w.error) ?? O(D.error) ?? O(A.error) ?? O(M.error) ?? O(N.error), G = { onSuccess: () => F("") };
38
+ ], T = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", E = "rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-50", D = "mb-1 block text-xs font-medium text-text-secondary", O = (e) => e ? e instanceof Error ? e.message : String(e) : null, k = ["SUBMITTED", ...p], A = ({ request: n, experts: c }) => {
39
+ let { formatCurrency: l, formatDate: f } = e(), C = _(), w = t(), D = o(), A = a(), j = r(), M = i(), N = s(), [P, F] = y(""), [I, L] = y(""), [R, z] = y(!1), B = p.includes(n.status), V = n.status === "SUBMITTED" || B, H = u[n.feeStatus], U = d[n.requestType], W = O(w.error) ?? O(D.error) ?? O(A.error) ?? O(M.error) ?? O(N.error), G = { onSuccess: () => F("") };
40
40
  return /* @__PURE__ */ S("li", {
41
41
  className: "rounded-xl border border-border-subtle bg-bg-surface p-4",
42
42
  "data-testid": "procurement-desk-item",
@@ -48,53 +48,53 @@ var C = [
48
48
  children: [/* @__PURE__ */ S("p", {
49
49
  className: "text-sm font-semibold text-text-primary",
50
50
  children: [
51
- a.vendorName,
52
- a.productName ? ` · ${a.productName}` : "",
51
+ n.vendorName,
52
+ n.productName ? ` · ${n.productName}` : "",
53
53
  " · ",
54
54
  C(U.key, U.fallback)
55
55
  ]
56
56
  }), /* @__PURE__ */ S("p", {
57
57
  className: "mt-0.5 text-xs text-text-secondary",
58
58
  children: [
59
- a.baselineAnnualValue == null ? "—" : C("admin.procurement.baseline", "{{amount}} / year baseline", { amount: _(a.baselineAnnualValue, a.currency) }),
60
- a.targetAnnualValue != null && ` → ${C("admin.procurement.target", "target")} ${_(a.targetAnnualValue, a.currency)}`,
59
+ n.baselineAnnualValue == null ? "—" : C("admin.procurement.baseline", "{{amount}} / year baseline", { amount: l(n.baselineAnnualValue, n.currency) }),
60
+ n.targetAnnualValue != null && ` → ${C("admin.procurement.target", "target")} ${l(n.targetAnnualValue, n.currency)}`,
61
61
  " · ",
62
- C("admin.procurement.deadline", "decide by {{date}}", { date: v(a.deadline) }),
63
- a.seats == null ? "" : ` · ${a.seats} ${C("admin.procurement.seats", "seats")}`,
62
+ C("admin.procurement.deadline", "decide by {{date}}", { date: f(n.deadline) }),
63
+ n.seats == null ? "" : ` · ${n.seats} ${C("admin.procurement.seats", "seats")}`,
64
64
  " · ",
65
- a.expertName ?? C("admin.procurement.unassigned", "unassigned")
65
+ n.expertName ?? C("admin.procurement.unassigned", "unassigned")
66
66
  ]
67
67
  })]
68
68
  }), /* @__PURE__ */ S("div", {
69
69
  className: "flex items-center gap-2",
70
- children: [a.feeStatus !== "NONE" && /* @__PURE__ */ S("span", {
70
+ children: [n.feeStatus !== "NONE" && /* @__PURE__ */ S("span", {
71
71
  className: "text-xs text-text-secondary",
72
72
  children: [
73
- _(a.feeAmount, a.currency),
73
+ l(n.feeAmount, n.currency),
74
74
  " · ",
75
75
  C(H.key, H.fallback)
76
76
  ]
77
- }), /* @__PURE__ */ x(s, { status: a.status })]
77
+ }), /* @__PURE__ */ x(m, { status: n.status })]
78
78
  })]
79
79
  }),
80
80
  /* @__PURE__ */ S("div", {
81
81
  className: "mt-3 flex flex-wrap items-end gap-2",
82
82
  children: [
83
- k.includes(a.status) && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ S("div", {
83
+ k.includes(n.status) && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ S("div", {
84
84
  className: "min-w-48",
85
85
  children: [/* @__PURE__ */ x("label", {
86
- htmlFor: `assign-${a.id}`,
86
+ htmlFor: `assign-${n.id}`,
87
87
  className: "sr-only",
88
88
  children: C("admin.procurement.expert", "Expert")
89
89
  }), /* @__PURE__ */ S("select", {
90
- id: `assign-${a.id}`,
90
+ id: `assign-${n.id}`,
91
91
  value: I,
92
92
  onChange: (e) => L(e.target.value),
93
- className: n(T, "py-1.5 text-xs"),
93
+ className: v(T, "py-1.5 text-xs"),
94
94
  children: [/* @__PURE__ */ x("option", {
95
95
  value: "",
96
96
  children: C("admin.procurement.autoPick", "Best available expert")
97
- }), d.filter((e) => e.active).map((e) => /* @__PURE__ */ S("option", {
97
+ }), c.filter((e) => e.active).map((e) => /* @__PURE__ */ S("option", {
98
98
  value: e.id,
99
99
  children: [
100
100
  e.displayName,
@@ -111,33 +111,33 @@ var C = [
111
111
  className: E,
112
112
  disabled: w.isPending,
113
113
  onClick: () => w.mutate({
114
- id: a.id,
114
+ id: n.id,
115
115
  expertId: I || null
116
116
  }),
117
- children: a.expertId ? C("admin.procurement.reassign", "Reassign") : C("admin.procurement.assign", "Assign")
117
+ children: n.expertId ? C("admin.procurement.reassign", "Reassign") : C("admin.procurement.assign", "Assign")
118
118
  })] }),
119
- (a.status === "ASSIGNED" || a.status === "AWAITING_CUSTOMER") && /* @__PURE__ */ x("button", {
119
+ (n.status === "ASSIGNED" || n.status === "AWAITING_CUSTOMER") && /* @__PURE__ */ x("button", {
120
120
  type: "button",
121
121
  className: E,
122
122
  disabled: D.isPending,
123
123
  onClick: () => D.mutate({
124
- id: a.id,
124
+ id: n.id,
125
125
  status: "IN_PROGRESS"
126
126
  }),
127
- children: a.status === "ASSIGNED" ? C("admin.procurement.start", "Start negotiating") : C("admin.procurement.resume", "Resume")
127
+ children: n.status === "ASSIGNED" ? C("admin.procurement.start", "Start negotiating") : C("admin.procurement.resume", "Resume")
128
128
  }),
129
- a.feeStatus === "PENDING_BILLING" && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x("button", {
129
+ n.feeStatus === "PENDING_BILLING" && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x("button", {
130
130
  type: "button",
131
131
  className: E,
132
132
  disabled: M.isPending,
133
- onClick: () => M.mutate({ id: a.id }),
133
+ onClick: () => M.mutate({ id: n.id }),
134
134
  children: C("admin.procurement.retryFee", "Retry fee billing")
135
135
  }), /* @__PURE__ */ x("button", {
136
136
  type: "button",
137
137
  className: E,
138
138
  disabled: N.isPending || !P.trim(),
139
139
  onClick: () => N.mutate({
140
- id: a.id,
140
+ id: n.id,
141
141
  reason: P.trim()
142
142
  }, G),
143
143
  children: C("admin.procurement.waiveFee", "Waive fee (reason below)")
@@ -167,7 +167,7 @@ var C = [
167
167
  className: E,
168
168
  disabled: A.isPending || !P.trim(),
169
169
  onClick: () => A.mutate({
170
- id: a.id,
170
+ id: n.id,
171
171
  message: P.trim()
172
172
  }, G),
173
173
  children: C("admin.procurement.sendMessage", "Message the customer")
@@ -177,18 +177,18 @@ var C = [
177
177
  className: E,
178
178
  disabled: A.isPending || !P.trim(),
179
179
  onClick: () => A.mutate({
180
- id: a.id,
180
+ id: n.id,
181
181
  message: P.trim(),
182
182
  internal: !0
183
183
  }, G),
184
184
  children: C("admin.procurement.internalNote", "Add internal note")
185
185
  }),
186
- (a.status === "ASSIGNED" || a.status === "IN_PROGRESS") && /* @__PURE__ */ x("button", {
186
+ (n.status === "ASSIGNED" || n.status === "IN_PROGRESS") && /* @__PURE__ */ x("button", {
187
187
  type: "button",
188
188
  className: E,
189
189
  disabled: D.isPending || !P.trim(),
190
190
  onClick: () => D.mutate({
191
- id: a.id,
191
+ id: n.id,
192
192
  status: "AWAITING_CUSTOMER",
193
193
  message: P.trim()
194
194
  }, G),
@@ -199,7 +199,7 @@ var C = [
199
199
  className: E,
200
200
  disabled: D.isPending,
201
201
  onClick: () => D.mutate({
202
- id: a.id,
202
+ id: n.id,
203
203
  status: "CANCELLED",
204
204
  message: P.trim() || null
205
205
  }, G),
@@ -218,31 +218,31 @@ var C = [
218
218
  children: [/* @__PURE__ */ x("p", {
219
219
  className: "mb-2 text-xs font-medium text-text-secondary",
220
220
  children: C("admin.procurement.recordOutcome", "Record the outcome")
221
- }), /* @__PURE__ */ x(l, {
222
- request: a,
221
+ }), /* @__PURE__ */ x(g, {
222
+ request: n,
223
223
  pending: j.isPending,
224
224
  error: O(j.error),
225
225
  onSubmit: (e) => j.mutate({
226
- id: a.id,
226
+ id: n.id,
227
227
  input: e
228
228
  })
229
229
  })]
230
230
  }),
231
231
  R && /* @__PURE__ */ S("div", {
232
232
  className: "mt-4 space-y-3",
233
- children: [a.notes && /* @__PURE__ */ x("p", {
233
+ children: [n.notes && /* @__PURE__ */ x("p", {
234
234
  className: "whitespace-pre-wrap rounded-lg bg-bg-sunken p-3 text-sm text-text-primary",
235
- children: a.notes
236
- }), /* @__PURE__ */ x(c, {
237
- events: a.events ?? [],
235
+ children: n.notes
236
+ }), /* @__PURE__ */ x(h, {
237
+ events: n.events ?? [],
238
238
  customerLabel: C("admin.procurement.customer", "Customer")
239
239
  })]
240
240
  })
241
241
  ]
242
242
  });
243
- }, j = ({ experts: t }) => {
244
- let n = e(), r = v(), [i, a] = y(""), [o, s] = y(""), [c, l] = y(""), [u, d] = y(""), [f, p] = y("10"), [m, h] = y(!0), g = (e) => {
245
- h(e.active), a(e.userId), s(e.displayName), l(e.email ?? ""), d(e.specialties.join(", ")), p(String(e.maxOpenRequests));
243
+ }, j = ({ experts: e }) => {
244
+ let t = _(), n = l(), [r, i] = y(""), [a, o] = y(""), [s, c] = y(""), [u, d] = y(""), [f, p] = y("10"), [m, h] = y(!0), g = (e) => {
245
+ h(e.active), i(e.userId), o(e.displayName), c(e.email ?? ""), d(e.specialties.join(", ")), p(String(e.maxOpenRequests));
246
246
  };
247
247
  return /* @__PURE__ */ S("div", {
248
248
  className: "mt-8 border-t border-border-subtle pt-6",
@@ -250,18 +250,18 @@ var C = [
250
250
  children: [
251
251
  /* @__PURE__ */ x("h3", {
252
252
  className: "text-sm font-semibold text-text-primary",
253
- children: n("admin.procurement.experts.title", "Procurement experts")
253
+ children: t("admin.procurement.experts.title", "Procurement experts")
254
254
  }),
255
255
  /* @__PURE__ */ x("p", {
256
256
  className: "mt-0.5 text-xs text-text-secondary",
257
- children: n("admin.procurement.experts.description", "Automatic assignment picks an active expert with free capacity, preferring a specialty match with the vendor or category.")
257
+ children: t("admin.procurement.experts.description", "Automatic assignment picks an active expert with free capacity, preferring a specialty match with the vendor or category.")
258
258
  }),
259
- t.length === 0 ? /* @__PURE__ */ x("p", {
259
+ e.length === 0 ? /* @__PURE__ */ x("p", {
260
260
  className: "mt-3 text-sm text-text-secondary",
261
- children: n("admin.procurement.experts.empty", "No experts yet. Add the first one below.")
261
+ children: t("admin.procurement.experts.empty", "No experts yet. Add the first one below.")
262
262
  }) : /* @__PURE__ */ x("ul", {
263
263
  className: "mt-3 space-y-2",
264
- children: t.map((e) => /* @__PURE__ */ S("li", {
264
+ children: e.map((e) => /* @__PURE__ */ S("li", {
265
265
  className: "flex flex-wrap items-center justify-between gap-2 rounded-lg border border-border-subtle p-3 text-sm",
266
266
  children: [/* @__PURE__ */ S("span", {
267
267
  className: "text-text-primary",
@@ -276,22 +276,22 @@ var C = [
276
276
  }), /* @__PURE__ */ S("span", {
277
277
  className: "flex items-center gap-2 text-xs text-text-secondary",
278
278
  children: [
279
- n("admin.procurement.experts.load", "{{open}} of {{max}} open", {
279
+ t("admin.procurement.experts.load", "{{open}} of {{max}} open", {
280
280
  open: e.openRequests,
281
281
  max: e.maxOpenRequests
282
282
  }),
283
- !e.active && ` · ${n("admin.procurement.experts.inactive", "inactive")}`,
283
+ !e.active && ` · ${t("admin.procurement.experts.inactive", "inactive")}`,
284
284
  /* @__PURE__ */ x("button", {
285
285
  type: "button",
286
286
  className: E,
287
287
  onClick: () => g(e),
288
- children: n("admin.procurement.experts.edit", "Edit")
288
+ children: t("admin.procurement.experts.edit", "Edit")
289
289
  }),
290
290
  /* @__PURE__ */ x("button", {
291
291
  type: "button",
292
292
  className: E,
293
- disabled: r.isPending,
294
- onClick: () => r.mutate({ input: {
293
+ disabled: n.isPending,
294
+ onClick: () => n.mutate({ input: {
295
295
  userId: e.userId,
296
296
  displayName: e.displayName,
297
297
  ...e.email ? { email: e.email } : {},
@@ -299,7 +299,7 @@ var C = [
299
299
  maxOpenRequests: e.maxOpenRequests,
300
300
  active: !e.active
301
301
  } }),
302
- children: e.active ? n("admin.procurement.experts.deactivate", "Deactivate") : n("admin.procurement.experts.activate", "Activate")
302
+ children: e.active ? t("admin.procurement.experts.deactivate", "Deactivate") : t("admin.procurement.experts.activate", "Activate")
303
303
  })
304
304
  ]
305
305
  })]
@@ -307,15 +307,15 @@ var C = [
307
307
  }),
308
308
  /* @__PURE__ */ S("form", {
309
309
  onSubmit: (e) => {
310
- e.preventDefault(), r.mutate({ input: {
311
- userId: i.trim(),
312
- displayName: o.trim(),
313
- ...c.trim() ? { email: c.trim() } : {},
310
+ e.preventDefault(), n.mutate({ input: {
311
+ userId: r.trim(),
312
+ displayName: a.trim(),
313
+ ...s.trim() ? { email: s.trim() } : {},
314
314
  specialties: u.split(",").map((e) => e.trim()).filter(Boolean),
315
315
  maxOpenRequests: Number(f) || 10,
316
316
  active: m
317
317
  } }, { onSuccess: () => {
318
- h(!0), a(""), s(""), l(""), d(""), p("10");
318
+ h(!0), i(""), o(""), c(""), d(""), p("10");
319
319
  } });
320
320
  },
321
321
  className: "mt-4 grid grid-cols-1 gap-3 sm:grid-cols-5",
@@ -323,38 +323,38 @@ var C = [
323
323
  /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
324
324
  htmlFor: "expert-user",
325
325
  className: D,
326
- children: n("admin.procurement.experts.userId", "User id")
326
+ children: t("admin.procurement.experts.userId", "User id")
327
327
  }), /* @__PURE__ */ x("input", {
328
328
  id: "expert-user",
329
- value: i,
330
- onChange: (e) => a(e.target.value),
329
+ value: r,
330
+ onChange: (e) => i(e.target.value),
331
331
  className: T
332
332
  })] }),
333
333
  /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
334
334
  htmlFor: "expert-name",
335
335
  className: D,
336
- children: n("admin.procurement.experts.name", "Display name")
336
+ children: t("admin.procurement.experts.name", "Display name")
337
337
  }), /* @__PURE__ */ x("input", {
338
338
  id: "expert-name",
339
- value: o,
340
- onChange: (e) => s(e.target.value),
339
+ value: a,
340
+ onChange: (e) => o(e.target.value),
341
341
  className: T
342
342
  })] }),
343
343
  /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
344
344
  htmlFor: "expert-email",
345
345
  className: D,
346
- children: n("admin.procurement.experts.email", "Work email")
346
+ children: t("admin.procurement.experts.email", "Work email")
347
347
  }), /* @__PURE__ */ x("input", {
348
348
  id: "expert-email",
349
349
  type: "email",
350
- value: c,
351
- onChange: (e) => l(e.target.value),
350
+ value: s,
351
+ onChange: (e) => c(e.target.value),
352
352
  className: T
353
353
  })] }),
354
354
  /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
355
355
  htmlFor: "expert-specialties",
356
356
  className: D,
357
- children: n("admin.procurement.experts.specialties", "Specialties (comma separated)")
357
+ children: t("admin.procurement.experts.specialties", "Specialties (comma separated)")
358
358
  }), /* @__PURE__ */ x("input", {
359
359
  id: "expert-specialties",
360
360
  value: u,
@@ -364,7 +364,7 @@ var C = [
364
364
  /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
365
365
  htmlFor: "expert-capacity",
366
366
  className: D,
367
- children: n("admin.procurement.experts.capacity", "Max open requests")
367
+ children: t("admin.procurement.experts.capacity", "Max open requests")
368
368
  }), /* @__PURE__ */ x("input", {
369
369
  id: "expert-capacity",
370
370
  type: "number",
@@ -376,15 +376,15 @@ var C = [
376
376
  })] }),
377
377
  /* @__PURE__ */ S("div", {
378
378
  className: "sm:col-span-5",
379
- children: [r.error && /* @__PURE__ */ x("p", {
379
+ children: [n.error && /* @__PURE__ */ x("p", {
380
380
  role: "alert",
381
381
  className: "mb-2 text-sm text-status-error-text",
382
- children: O(r.error)
382
+ children: O(n.error)
383
383
  }), /* @__PURE__ */ x("button", {
384
384
  type: "submit",
385
- disabled: r.isPending || !i.trim() || !o.trim(),
385
+ disabled: n.isPending || !r.trim() || !a.trim(),
386
386
  className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50",
387
- children: n("admin.procurement.experts.save", "Save expert")
387
+ children: t("admin.procurement.experts.save", "Save expert")
388
388
  })]
389
389
  })
390
390
  ]
@@ -392,59 +392,58 @@ var C = [
392
392
  ]
393
393
  });
394
394
  }, M = () => {
395
- let t = e(), [r, i] = y(null), [o, s] = y("ALL"), { data: c, isLoading: l, isError: u, error: f, hasNextPage: p, fetchNextPage: m, isFetchingNextPage: h } = d(r, o), g = _().data ?? [], v = c?.pages.flatMap((e) => e.items) ?? [], b = (e) => n("rounded-lg px-3 py-1.5 text-xs font-medium", e ? "bg-action-primary-bg text-action-primary-text" : "border border-border-subtle text-text-primary hover:bg-bg-sunken");
395
+ let e = _(), [t, r] = y(null), [i, a] = y("ALL"), { data: o, isLoading: s, isError: l, error: u, hasNextPage: d, fetchNextPage: p, isFetchingNextPage: m } = n(t, i), h = c().data ?? [], g = o?.pages.flatMap((e) => e.items) ?? [], b = (e) => v("rounded-lg px-3 py-1.5 text-xs font-medium", e ? "bg-action-primary-bg text-action-primary-text" : "border border-border-subtle text-text-primary hover:bg-bg-sunken");
396
396
  return /* @__PURE__ */ S("div", {
397
397
  "data-testid": "procurement-desk",
398
398
  children: [
399
399
  /* @__PURE__ */ x("div", {
400
400
  className: "mb-2 flex flex-wrap gap-1.5",
401
- children: w.map((e) => /* @__PURE__ */ x("button", {
401
+ children: w.map((t) => /* @__PURE__ */ x("button", {
402
402
  type: "button",
403
- "aria-pressed": o === e.value,
404
- onClick: () => s(e.value),
405
- className: b(o === e.value),
406
- children: t(e.key, e.fallback)
407
- }, e.value))
403
+ "aria-pressed": i === t.value,
404
+ onClick: () => a(t.value),
405
+ className: b(i === t.value),
406
+ children: e(t.key, t.fallback)
407
+ }, t.value))
408
408
  }),
409
409
  /* @__PURE__ */ x("div", {
410
410
  className: "mb-4 flex flex-wrap gap-1.5",
411
- children: C.map((e) => /* @__PURE__ */ x("button", {
411
+ children: C.map((n) => /* @__PURE__ */ x("button", {
412
412
  type: "button",
413
- "aria-pressed": r === e,
414
- onClick: () => i(e),
415
- className: b(r === e),
416
- children: e ? t(a[e].key, a[e].fallback) : t("admin.procurement.allStatuses", "All statuses")
417
- }, e ?? "ALL"))
413
+ "aria-pressed": t === n,
414
+ onClick: () => r(n),
415
+ className: b(t === n),
416
+ children: n ? e(f[n].key, f[n].fallback) : e("admin.procurement.allStatuses", "All statuses")
417
+ }, n ?? "ALL"))
418
418
  }),
419
- l ? /* @__PURE__ */ x("p", {
419
+ s ? /* @__PURE__ */ x("p", {
420
420
  className: "text-sm text-text-secondary",
421
- children: t("admin.procurement.loading", "Loading queue…")
422
- }) : u ? /* @__PURE__ */ x("p", {
421
+ children: e("admin.procurement.loading", "Loading queue…")
422
+ }) : l ? /* @__PURE__ */ x("p", {
423
423
  role: "alert",
424
424
  className: "text-sm text-status-error-text",
425
- children: O(f)
426
- }) : v.length === 0 ? /* @__PURE__ */ x("p", {
425
+ children: O(u)
426
+ }) : g.length === 0 ? /* @__PURE__ */ x("p", {
427
427
  className: "text-sm text-text-secondary",
428
- children: t("admin.procurement.empty", "No procurement requests in this view.")
428
+ children: e("admin.procurement.empty", "No procurement requests in this view.")
429
429
  }) : /* @__PURE__ */ x("ul", {
430
430
  className: "space-y-3",
431
- children: v.map((e) => /* @__PURE__ */ x(A, {
431
+ children: g.map((e) => /* @__PURE__ */ x(A, {
432
432
  request: e,
433
- experts: g
433
+ experts: h
434
434
  }, e.id))
435
435
  }),
436
- p && /* @__PURE__ */ x("button", {
436
+ d && /* @__PURE__ */ x("button", {
437
437
  type: "button",
438
- className: n(E, "mt-3"),
439
- disabled: h,
440
- onClick: () => void m(),
441
- children: h ? t("admin.procurement.loadingMore", "Loading…") : t("admin.procurement.loadMore", "Load more")
438
+ className: v(E, "mt-3"),
439
+ disabled: m,
440
+ onClick: () => void p(),
441
+ children: m ? e("admin.procurement.loadingMore", "Loading…") : e("admin.procurement.loadMore", "Load more")
442
442
  }),
443
- /* @__PURE__ */ x(j, { experts: g })
443
+ /* @__PURE__ */ x(j, { experts: h })
444
444
  ]
445
445
  });
446
446
  };
447
- //#endregion
448
447
  export { M as ProcurementDeskPanel };
449
448
 
450
449
  //# sourceMappingURL=ProcurementDeskPanel.js.map