@burdenoff/microfe-subscriberbot 2026.1103.2 → 2026.1105.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/dist/stories/Accessibility.stories.d.ts +13 -0
- package/dist/stories/Accessibility.stories.d.ts.map +1 -0
- package/dist/stories/pages/AgentNewPage.stories.d.ts.map +1 -1
- package/dist/stories/pages/BankConnectionsPage.stories.d.ts +1 -0
- package/dist/stories/pages/BankConnectionsPage.stories.d.ts.map +1 -1
- package/dist/stories/pages/EnterpriseSpendPage.stories.d.ts.map +1 -1
- package/dist/stories/pages/InboxPage.stories.d.ts.map +1 -1
- package/dist/subscriberbot/admin/AdminDashboardPage.d.ts.map +1 -1
- package/dist/subscriberbot/admin/AdminDashboardPage.js +168 -168
- package/dist/subscriberbot/admin/AdminDashboardPage.js.map +1 -1
- package/dist/subscriberbot/admin/NegotiationDeskPanel.d.ts.map +1 -1
- package/dist/subscriberbot/admin/NegotiationDeskPanel.js +116 -116
- package/dist/subscriberbot/admin/NegotiationDeskPanel.js.map +1 -1
- package/dist/subscriberbot/admin/ProcurementDeskPanel.d.ts.map +1 -1
- package/dist/subscriberbot/admin/ProcurementDeskPanel.js +211 -211
- package/dist/subscriberbot/admin/ProcurementDeskPanel.js.map +1 -1
- package/dist/subscriberbot/components/Modal.d.ts.map +1 -1
- package/dist/subscriberbot/components/Modal.js +43 -33
- package/dist/subscriberbot/components/Modal.js.map +1 -1
- package/dist/subscriberbot/components/PostureOptions.d.ts.map +1 -1
- package/dist/subscriberbot/components/PostureOptions.js +10 -10
- package/dist/subscriberbot/components/PostureOptions.js.map +1 -1
- package/dist/subscriberbot/components/StateViews.d.ts.map +1 -1
- package/dist/subscriberbot/components/StateViews.js +45 -37
- package/dist/subscriberbot/components/StateViews.js.map +1 -1
- package/dist/subscriberbot/components/StatusBadge.d.ts.map +1 -1
- package/dist/subscriberbot/components/StatusBadge.js +6 -6
- package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
- package/dist/subscriberbot/components/decisions/DecisionBanners.js +6 -6
- package/dist/subscriberbot/components/decisions/DecisionCard.d.ts.map +1 -1
- package/dist/subscriberbot/components/decisions/DecisionCard.js +149 -147
- package/dist/subscriberbot/components/decisions/DecisionCard.js.map +1 -1
- package/dist/subscriberbot/components/mobile/MobileDashboard.d.ts.map +1 -1
- package/dist/subscriberbot/components/mobile/MobileDashboard.js +127 -127
- package/dist/subscriberbot/components/mobile/MobileDashboard.js.map +1 -1
- package/dist/subscriberbot/components/mobile/MobileRelationshipList.d.ts.map +1 -1
- package/dist/subscriberbot/components/mobile/MobileRelationshipList.js +114 -114
- package/dist/subscriberbot/components/mobile/MobileRelationshipList.js.map +1 -1
- package/dist/subscriberbot/components/mobile/MobileScreen.js +1 -1
- package/dist/subscriberbot/components/mobile/MobileScreen.js.map +1 -1
- package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.js +4 -4
- package/dist/subscriberbot/components/negotiations/NegotiationTimeline.d.ts.map +1 -1
- package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js +11 -11
- package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js.map +1 -1
- package/dist/subscriberbot/components/negotiations/OutcomeForm.d.ts.map +1 -1
- package/dist/subscriberbot/components/negotiations/OutcomeForm.js +29 -29
- package/dist/subscriberbot/components/negotiations/OutcomeForm.js.map +1 -1
- package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.d.ts.map +1 -1
- package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js +43 -43
- package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js.map +1 -1
- package/dist/subscriberbot/components/procurement/ProcurementStatusPill.js +4 -4
- package/dist/subscriberbot/components/procurement/ProcurementThread.d.ts.map +1 -1
- package/dist/subscriberbot/components/procurement/ProcurementThread.js +14 -14
- package/dist/subscriberbot/components/procurement/ProcurementThread.js.map +1 -1
- package/dist/subscriberbot/components/savings/SavingsCards.d.ts.map +1 -1
- package/dist/subscriberbot/components/savings/SavingsCards.js +242 -237
- package/dist/subscriberbot/components/savings/SavingsCards.js.map +1 -1
- package/dist/subscriberbot/components/viz.d.ts +1 -0
- package/dist/subscriberbot/components/viz.d.ts.map +1 -1
- package/dist/subscriberbot/components/viz.js +100 -101
- package/dist/subscriberbot/components/viz.js.map +1 -1
- package/dist/subscriberbot/hooks/index.js +1 -1
- package/dist/subscriberbot/hooks/useFormError.d.ts +7 -0
- package/dist/subscriberbot/hooks/useFormError.d.ts.map +1 -0
- package/dist/subscriberbot/hooks/useFormError.js +28 -0
- package/dist/subscriberbot/hooks/useFormError.js.map +1 -0
- package/dist/subscriberbot/hooks/useFormatters.d.ts +11 -0
- package/dist/subscriberbot/hooks/useFormatters.d.ts.map +1 -0
- package/dist/subscriberbot/hooks/useFormatters.js +13 -0
- package/dist/subscriberbot/hooks/useFormatters.js.map +1 -0
- package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts.map +1 -1
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js +371 -370
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
- package/dist/subscriberbot/hooks/useTr.d.ts.map +1 -1
- package/dist/subscriberbot/hooks/useTr.js +1 -1
- package/dist/subscriberbot/hooks/useTr.js.map +1 -1
- package/dist/subscriberbot/index.js +1 -1
- package/dist/subscriberbot/pages/AssetVaultPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/AssetVaultPage.js +124 -124
- package/dist/subscriberbot/pages/AssetVaultPage.js.map +1 -1
- package/dist/subscriberbot/pages/DashboardPage.d.ts +0 -10
- package/dist/subscriberbot/pages/DashboardPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/DashboardPage.js +107 -98
- package/dist/subscriberbot/pages/DashboardPage.js.map +1 -1
- package/dist/subscriberbot/pages/InboxPage.d.ts +0 -10
- package/dist/subscriberbot/pages/InboxPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/InboxPage.js +421 -402
- package/dist/subscriberbot/pages/InboxPage.js.map +1 -1
- package/dist/subscriberbot/pages/InsightsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/InsightsPage.js +130 -121
- package/dist/subscriberbot/pages/InsightsPage.js.map +1 -1
- package/dist/subscriberbot/pages/InvoicesPage.d.ts +0 -12
- package/dist/subscriberbot/pages/InvoicesPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/InvoicesPage.js +237 -215
- package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -1
- package/dist/subscriberbot/pages/RenewalsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/RenewalsPage.js +303 -295
- package/dist/subscriberbot/pages/RenewalsPage.js.map +1 -1
- package/dist/subscriberbot/pages/SavingsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/SavingsPage.js +57 -57
- package/dist/subscriberbot/pages/SavingsPage.js.map +1 -1
- package/dist/subscriberbot/pages/WorkflowsPage.d.ts +0 -13
- package/dist/subscriberbot/pages/WorkflowsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/WorkflowsPage.js +202 -196
- package/dist/subscriberbot/pages/WorkflowsPage.js.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts +0 -18
- package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentDetailPage.js +283 -275
- package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentNewPage.d.ts +0 -6
- package/dist/subscriberbot/pages/agents/AgentNewPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentNewPage.js +85 -77
- package/dist/subscriberbot/pages/agents/AgentNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentsListPage.d.ts +0 -9
- package/dist/subscriberbot/pages/agents/AgentsListPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentsListPage.js +136 -136
- package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -1
- package/dist/subscriberbot/pages/banking/BankConnectionsPage.d.ts +0 -9
- package/dist/subscriberbot/pages/banking/BankConnectionsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/banking/BankConnectionsPage.js +267 -260
- package/dist/subscriberbot/pages/banking/BankConnectionsPage.js.map +1 -1
- package/dist/subscriberbot/pages/decisions/DecisionDetailPage.d.ts +0 -10
- package/dist/subscriberbot/pages/decisions/DecisionDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js +96 -96
- package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/decisions/DecisionsPage.d.ts +0 -11
- package/dist/subscriberbot/pages/decisions/DecisionsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/decisions/DecisionsPage.js +46 -46
- package/dist/subscriberbot/pages/decisions/DecisionsPage.js.map +1 -1
- package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.d.ts +0 -11
- package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js +181 -171
- package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.d.ts +0 -9
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js +164 -164
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.d.ts +0 -9
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js +197 -181
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.d.ts +0 -8
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js +79 -79
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.d.ts +0 -9
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js +147 -147
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.d.ts +0 -10
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js +204 -188
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementPage.d.ts +0 -9
- package/dist/subscriberbot/pages/procurement/ProcurementPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementPage.js +80 -80
- package/dist/subscriberbot/pages/procurement/ProcurementPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.d.ts +0 -10
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +484 -458
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderNewPage.d.ts +0 -8
- package/dist/subscriberbot/pages/providers/ProviderNewPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderNewPage.js +146 -136
- package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProvidersListPage.d.ts +0 -10
- package/dist/subscriberbot/pages/providers/ProvidersListPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/providers/ProvidersListPage.js +88 -87
- package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts +0 -11
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +520 -490
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.d.ts +0 -8
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +104 -90
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.d.ts +0 -8
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +97 -96
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -1
- package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js +76 -74
- package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js.map +1 -1
- package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.d.ts +5 -3
- package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.d.ts.map +1 -1
- package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js +26 -25
- package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js.map +1 -1
- package/dist/subscriberbot/utils/formatters.d.ts +16 -5
- package/dist/subscriberbot/utils/formatters.d.ts.map +1 -1
- package/dist/subscriberbot/utils/formatters.js +57 -25
- package/dist/subscriberbot/utils/formatters.js.map +1 -1
- package/dist/subscriberbot/utils/plaidLink.d.ts +2 -1
- package/dist/subscriberbot/utils/plaidLink.d.ts.map +1 -1
- package/dist/subscriberbot/utils/plaidLink.js +21 -21
- package/dist/subscriberbot/utils/plaidLink.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,355 +1,371 @@
|
|
|
1
1
|
import { useSubscriberBot as e } from "../../context/SubscriberBotContext.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useTr as t } from "../../hooks/useTr.js";
|
|
3
|
+
import { PageLayout as n } from "../../components/PageLayout.js";
|
|
4
4
|
import { useRelationship as r, useRelationships as i } from "../../hooks/useSubscriberBotApi.js";
|
|
5
5
|
import { REQUEST_TYPES as a, REQUEST_TYPE_LABEL as o } from "../../components/procurement/labels.js";
|
|
6
6
|
import "../../components/procurement/index.js";
|
|
7
|
-
import { useCreateProcurementRequest as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
7
|
+
import { useCreateProcurementRequest as s, useProcurementTerms as c } from "../../hooks/useProcurementApi.js";
|
|
8
|
+
import { useFormError as ee } from "../../hooks/useFormError.js";
|
|
9
|
+
import { useEffect as l, useMemo as u, useRef as te, useState as d } from "react";
|
|
10
|
+
import { ArrowLeft as ne, CalendarClock as re, FileText as ie, Target as ae } from "lucide-react";
|
|
11
|
+
import { useSearchParams as f } from "react-router";
|
|
12
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
13
|
+
import { GlassCard as h, PagePurpose as oe } from "@burdenoff/fe-libs/ui";
|
|
13
14
|
//#region src/subscriberbot/pages/procurement/ProcurementNewPage.tsx
|
|
14
|
-
var
|
|
15
|
+
var se = {
|
|
15
16
|
DAILY: 365,
|
|
16
17
|
WEEKLY: 52,
|
|
17
18
|
MONTHLY: 12,
|
|
18
19
|
QUARTERLY: 4,
|
|
19
20
|
YEARLY: 1
|
|
20
|
-
},
|
|
21
|
-
function
|
|
22
|
-
return /* @__PURE__ */ h
|
|
21
|
+
}, g = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", _ = "mb-1.5 block text-xs font-medium text-text-secondary";
|
|
22
|
+
function v({ icon: e, title: t, description: n, children: r }) {
|
|
23
|
+
return /* @__PURE__ */ m(h, {
|
|
23
24
|
treatment: "metric",
|
|
24
25
|
className: "p-5 sm:p-6",
|
|
25
|
-
children: [/* @__PURE__ */
|
|
26
|
+
children: [/* @__PURE__ */ m("div", {
|
|
26
27
|
className: "flex items-start gap-3",
|
|
27
|
-
children: [/* @__PURE__ */
|
|
28
|
+
children: [/* @__PURE__ */ p("span", {
|
|
28
29
|
className: "mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-bg-sunken text-text-secondary",
|
|
29
30
|
children: e
|
|
30
|
-
}), /* @__PURE__ */
|
|
31
|
+
}), /* @__PURE__ */ m("div", {
|
|
31
32
|
className: "min-w-0",
|
|
32
|
-
children: [/* @__PURE__ */
|
|
33
|
+
children: [/* @__PURE__ */ p("h2", {
|
|
33
34
|
className: "text-sm font-semibold text-text-primary",
|
|
34
35
|
children: t
|
|
35
|
-
}), /* @__PURE__ */
|
|
36
|
+
}), /* @__PURE__ */ p("p", {
|
|
36
37
|
className: "mt-0.5 text-xs text-text-secondary",
|
|
37
38
|
children: n
|
|
38
39
|
})]
|
|
39
40
|
})]
|
|
40
|
-
}), /* @__PURE__ */
|
|
41
|
+
}), /* @__PURE__ */ p("div", {
|
|
41
42
|
className: "mt-4",
|
|
42
43
|
children: r
|
|
43
44
|
})]
|
|
44
45
|
});
|
|
45
46
|
}
|
|
46
|
-
function
|
|
47
|
+
function y(e) {
|
|
47
48
|
if (!e) return "";
|
|
48
49
|
let t = e instanceof Date ? e : new Date(e);
|
|
49
50
|
return Number.isNaN(t.getTime()) ? "" : t.toISOString().slice(0, 10);
|
|
50
51
|
}
|
|
51
|
-
var
|
|
52
|
+
var b = (e) => {
|
|
52
53
|
if (!e.trim()) return null;
|
|
53
54
|
let t = Number(e);
|
|
54
55
|
return Number.isFinite(t) && t > 0 ? t : null;
|
|
55
56
|
};
|
|
56
|
-
function
|
|
57
|
-
let
|
|
57
|
+
function x() {
|
|
58
|
+
let h = t(), { navigateTo: x } = e(), [ce] = f(), S = s(), C = c(), w = i({ pagination: {
|
|
58
59
|
limit: 100,
|
|
59
60
|
offset: 0
|
|
60
|
-
} }), [
|
|
61
|
-
let e =
|
|
61
|
+
} }), [T, E] = d(ce.get("relationshipId") ?? ""), D = r(T || void 0), O = u(() => {
|
|
62
|
+
let e = w.data?.items ?? [], t = D.data;
|
|
62
63
|
return t && !e.some((e) => e.id === t.id) ? [t, ...e] : e;
|
|
63
|
-
}, [
|
|
64
|
-
|
|
64
|
+
}, [w.data, D.data]), [k, A] = d(""), [j, M] = d(""), [N, le] = d(""), [P, ue] = d("RENEWAL"), [F, I] = d("USD"), [L, R] = d(""), [z, B] = d(""), [V, H] = d(""), [U, de] = d("12"), [W, fe] = d(""), [G, K] = d(""), [q, pe] = d(""), [J, Y, X, me] = ee(), Z = T ? O.find((e) => e.id === T) : void 0, Q = te(null);
|
|
65
|
+
l(() => {
|
|
65
66
|
if (!Z || Q.current === Z.id) return;
|
|
66
|
-
Q.current = Z.id,
|
|
67
|
-
let e =
|
|
68
|
-
|
|
67
|
+
Q.current = Z.id, A(Z.label), I(Z.currency);
|
|
68
|
+
let e = se[Z.interval] ?? 0;
|
|
69
|
+
R(Z.amount > 0 && e > 0 ? String(Math.round(Z.amount * e * 100) / 100) : ""), K(Z.renewsAt ? y(Z.renewsAt) : "");
|
|
69
70
|
}, [Z]);
|
|
70
|
-
let $ =
|
|
71
|
-
return /* @__PURE__ */
|
|
72
|
-
title:
|
|
73
|
-
description:
|
|
74
|
-
actions: /* @__PURE__ */
|
|
71
|
+
let $ = C.data ? Math.round(C.data.feeRate * 100) : null, he = y(/* @__PURE__ */ new Date());
|
|
72
|
+
return /* @__PURE__ */ m(n, {
|
|
73
|
+
title: h("procurement.new.title", "Request an expert negotiation"),
|
|
74
|
+
description: h("procurement.new.description", "Tell the procurement desk about the contract and what matters to you."),
|
|
75
|
+
actions: /* @__PURE__ */ m("button", {
|
|
75
76
|
type: "button",
|
|
76
|
-
onClick: () =>
|
|
77
|
+
onClick: () => x("/procurement"),
|
|
77
78
|
className: "inline-flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
78
79
|
children: [
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ p(ne, { className: "rtl:rotate-180 h-4 w-4" }),
|
|
80
81
|
" ",
|
|
81
|
-
|
|
82
|
+
h("procurement.back", "Back")
|
|
82
83
|
]
|
|
83
84
|
}),
|
|
84
|
-
children: [/* @__PURE__ */
|
|
85
|
+
children: [/* @__PURE__ */ p(oe, {
|
|
85
86
|
className: "mb-6",
|
|
86
|
-
children: $ == null ?
|
|
87
|
-
}), /* @__PURE__ */
|
|
87
|
+
children: $ == null ? h("procurement.new.purpose", "Nothing reaches the vendor until you submit the request. You only pay a share of the savings the expert secures.") : h("procurement.new.purposeFee", "Nothing reaches the vendor until you submit the request. The fee is {{pct}}% of the first-year savings against the vendor quote (or your current price), and only when the expert gets the price down.", { pct: $ })
|
|
88
|
+
}), /* @__PURE__ */ m("form", {
|
|
88
89
|
onSubmit: (e) => {
|
|
89
|
-
e.preventDefault(),
|
|
90
|
-
let t =
|
|
91
|
-
if (!
|
|
92
|
-
|
|
90
|
+
e.preventDefault(), Y(null);
|
|
91
|
+
let t = b(L), n = b(z), r = Number(U);
|
|
92
|
+
if (!k.trim()) {
|
|
93
|
+
Y(h("procurement.form.vendorRequired", "Which vendor is the contract with?"), "proc-vendor");
|
|
93
94
|
return;
|
|
94
95
|
}
|
|
95
96
|
if (t == null && n == null) {
|
|
96
|
-
|
|
97
|
+
Y(h("procurement.form.baselineRequired", "Enter what you pay per year today or the annual value of the vendor quote."), ["proc-current", "proc-quoted"]);
|
|
97
98
|
return;
|
|
98
99
|
}
|
|
99
|
-
if (!
|
|
100
|
-
|
|
100
|
+
if (!G) {
|
|
101
|
+
Y(h("procurement.form.deadlineRequired", "When must the decision be made?"), "proc-deadline");
|
|
101
102
|
return;
|
|
102
103
|
}
|
|
103
|
-
if (!Number.isInteger(r) || r < 1 || r > (
|
|
104
|
-
|
|
104
|
+
if (!Number.isInteger(r) || r < 1 || r > (C.data?.maxTermMonths ?? 60)) {
|
|
105
|
+
Y(h("procurement.form.termInvalid", "The term must be between 1 and {{max}} months.", { max: C.data?.maxTermMonths ?? 60 }), "proc-term");
|
|
105
106
|
return;
|
|
106
107
|
}
|
|
107
|
-
let i =
|
|
108
|
-
vendorName:
|
|
109
|
-
requestType:
|
|
110
|
-
currency:
|
|
108
|
+
let i = b(V), a = b(W), o = {
|
|
109
|
+
vendorName: k.trim(),
|
|
110
|
+
requestType: P,
|
|
111
|
+
currency: F.trim().toUpperCase() || "USD",
|
|
111
112
|
termMonths: r,
|
|
112
|
-
deadline: (/* @__PURE__ */ new Date(`${
|
|
113
|
-
...
|
|
114
|
-
...
|
|
115
|
-
...
|
|
113
|
+
deadline: (/* @__PURE__ */ new Date(`${G}T23:59:59`)).toISOString(),
|
|
114
|
+
...T ? { relationshipId: T } : {},
|
|
115
|
+
...j.trim() ? { productName: j.trim() } : {},
|
|
116
|
+
...N.trim() ? { category: N.trim() } : {},
|
|
116
117
|
...t == null ? {} : { currentAnnualValue: t },
|
|
117
118
|
...n == null ? {} : { quotedAnnualValue: n },
|
|
118
119
|
...i == null ? {} : { targetAnnualValue: i },
|
|
119
120
|
...a == null ? {} : { seats: Math.round(a) },
|
|
120
|
-
...
|
|
121
|
+
...q.trim() ? { notes: q.trim() } : {}
|
|
121
122
|
};
|
|
122
|
-
|
|
123
|
-
onSuccess: (e) =>
|
|
124
|
-
onError: (e) =>
|
|
123
|
+
S.mutate({ input: o }, {
|
|
124
|
+
onSuccess: (e) => x(`/procurement/${e.id}`),
|
|
125
|
+
onError: (e) => Y(e instanceof Error ? e.message : h("procurement.form.error", "Could not create the request."))
|
|
125
126
|
});
|
|
126
127
|
},
|
|
127
128
|
className: "max-w-3xl space-y-5",
|
|
128
129
|
"data-testid": "procurement-form",
|
|
129
130
|
children: [
|
|
130
|
-
|
|
131
|
+
J && /* @__PURE__ */ p("div", {
|
|
132
|
+
id: me,
|
|
133
|
+
tabIndex: -1,
|
|
131
134
|
role: "alert",
|
|
132
135
|
className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
|
|
133
|
-
children:
|
|
136
|
+
children: J
|
|
134
137
|
}),
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
-
icon: /* @__PURE__ */
|
|
137
|
-
title:
|
|
138
|
-
description:
|
|
139
|
-
children: /* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ p(v, {
|
|
139
|
+
icon: /* @__PURE__ */ p(ie, { className: "h-4 w-4" }),
|
|
140
|
+
title: h("procurement.form.contract.title", "The contract"),
|
|
141
|
+
description: h("procurement.form.contract.description", "Link a tracked subscription to prefill it, or describe the contract."),
|
|
142
|
+
children: /* @__PURE__ */ m("div", {
|
|
140
143
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
141
144
|
children: [
|
|
142
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ m("div", {
|
|
143
146
|
className: "sm:col-span-2",
|
|
144
|
-
children: [/* @__PURE__ */
|
|
147
|
+
children: [/* @__PURE__ */ p("label", {
|
|
145
148
|
htmlFor: "proc-relationship",
|
|
146
|
-
className:
|
|
147
|
-
children:
|
|
148
|
-
}), /* @__PURE__ */
|
|
149
|
+
className: _,
|
|
150
|
+
children: h("procurement.form.relationship", "Tracked subscription (optional)")
|
|
151
|
+
}), /* @__PURE__ */ m("select", {
|
|
152
|
+
...X("proc-relationship"),
|
|
149
153
|
id: "proc-relationship",
|
|
150
|
-
value:
|
|
151
|
-
onChange: (e) =>
|
|
152
|
-
className:
|
|
153
|
-
children: [/* @__PURE__ */
|
|
154
|
+
value: T,
|
|
155
|
+
onChange: (e) => E(e.target.value),
|
|
156
|
+
className: g,
|
|
157
|
+
children: [/* @__PURE__ */ p("option", {
|
|
154
158
|
value: "",
|
|
155
|
-
children:
|
|
156
|
-
}),
|
|
159
|
+
children: h("procurement.form.noRelationship", "Not linked")
|
|
160
|
+
}), O.map((e) => /* @__PURE__ */ p("option", {
|
|
157
161
|
value: e.id,
|
|
158
162
|
children: e.label
|
|
159
163
|
}, e.id))]
|
|
160
164
|
})]
|
|
161
165
|
}),
|
|
162
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
|
|
163
167
|
htmlFor: "proc-vendor",
|
|
164
|
-
className:
|
|
168
|
+
className: _,
|
|
165
169
|
children: [
|
|
166
|
-
|
|
170
|
+
h("procurement.form.vendor", "Vendor"),
|
|
167
171
|
" ",
|
|
168
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ p("span", {
|
|
169
173
|
className: "text-status-error-text",
|
|
170
174
|
children: "*"
|
|
171
175
|
})
|
|
172
176
|
]
|
|
173
|
-
}), /* @__PURE__ */
|
|
177
|
+
}), /* @__PURE__ */ p("input", {
|
|
178
|
+
...X("proc-vendor"),
|
|
174
179
|
id: "proc-vendor",
|
|
175
|
-
value:
|
|
176
|
-
onChange: (e) =>
|
|
177
|
-
placeholder:
|
|
178
|
-
className:
|
|
180
|
+
value: k,
|
|
181
|
+
onChange: (e) => A(e.target.value),
|
|
182
|
+
placeholder: h("procurement.form.vendorPlaceholder", "e.g. Salesforce"),
|
|
183
|
+
className: g
|
|
179
184
|
})] }),
|
|
180
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
181
186
|
htmlFor: "proc-product",
|
|
182
|
-
className:
|
|
183
|
-
children:
|
|
184
|
-
}), /* @__PURE__ */
|
|
187
|
+
className: _,
|
|
188
|
+
children: h("procurement.form.product", "Product or plan")
|
|
189
|
+
}), /* @__PURE__ */ p("input", {
|
|
190
|
+
...X("proc-product"),
|
|
185
191
|
id: "proc-product",
|
|
186
|
-
value:
|
|
187
|
-
onChange: (e) =>
|
|
188
|
-
placeholder:
|
|
189
|
-
className:
|
|
192
|
+
value: j,
|
|
193
|
+
onChange: (e) => M(e.target.value),
|
|
194
|
+
placeholder: h("procurement.form.productPlaceholder", "e.g. Sales Cloud Enterprise"),
|
|
195
|
+
className: g
|
|
190
196
|
})] }),
|
|
191
|
-
/* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
192
198
|
htmlFor: "proc-type",
|
|
193
|
-
className:
|
|
194
|
-
children:
|
|
195
|
-
}), /* @__PURE__ */
|
|
199
|
+
className: _,
|
|
200
|
+
children: h("procurement.form.type", "Type of request")
|
|
201
|
+
}), /* @__PURE__ */ p("select", {
|
|
202
|
+
...X("proc-type"),
|
|
196
203
|
id: "proc-type",
|
|
197
|
-
value:
|
|
198
|
-
onChange: (e) =>
|
|
199
|
-
className:
|
|
200
|
-
children: a.map((e) => /* @__PURE__ */
|
|
204
|
+
value: P,
|
|
205
|
+
onChange: (e) => ue(e.target.value),
|
|
206
|
+
className: g,
|
|
207
|
+
children: a.map((e) => /* @__PURE__ */ p("option", {
|
|
201
208
|
value: e,
|
|
202
|
-
children:
|
|
209
|
+
children: h(o[e].key, o[e].fallback)
|
|
203
210
|
}, e))
|
|
204
211
|
})] }),
|
|
205
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
206
213
|
htmlFor: "proc-category",
|
|
207
|
-
className:
|
|
208
|
-
children:
|
|
209
|
-
}), /* @__PURE__ */
|
|
214
|
+
className: _,
|
|
215
|
+
children: h("procurement.form.category", "Software category")
|
|
216
|
+
}), /* @__PURE__ */ p("input", {
|
|
217
|
+
...X("proc-category"),
|
|
210
218
|
id: "proc-category",
|
|
211
|
-
value:
|
|
212
|
-
onChange: (e) =>
|
|
213
|
-
placeholder:
|
|
214
|
-
className:
|
|
219
|
+
value: N,
|
|
220
|
+
onChange: (e) => le(e.target.value),
|
|
221
|
+
placeholder: h("procurement.form.categoryPlaceholder", "e.g. CRM, Security, HR"),
|
|
222
|
+
className: g
|
|
215
223
|
})] })
|
|
216
224
|
]
|
|
217
225
|
})
|
|
218
226
|
}),
|
|
219
|
-
/* @__PURE__ */
|
|
220
|
-
icon: /* @__PURE__ */
|
|
221
|
-
title:
|
|
222
|
-
description:
|
|
223
|
-
children: /* @__PURE__ */
|
|
227
|
+
/* @__PURE__ */ p(v, {
|
|
228
|
+
icon: /* @__PURE__ */ p(ae, { className: "h-4 w-4" }),
|
|
229
|
+
title: h("procurement.form.value.title", "Price and terms"),
|
|
230
|
+
description: h("procurement.form.value.description", "Annual values. Savings are measured against the quote, or the current price when there is no quote."),
|
|
231
|
+
children: /* @__PURE__ */ m("div", {
|
|
224
232
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
225
233
|
children: [
|
|
226
|
-
/* @__PURE__ */
|
|
234
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
227
235
|
htmlFor: "proc-current",
|
|
228
|
-
className:
|
|
229
|
-
children:
|
|
230
|
-
}), /* @__PURE__ */
|
|
236
|
+
className: _,
|
|
237
|
+
children: h("procurement.form.current", "What you pay per year today")
|
|
238
|
+
}), /* @__PURE__ */ p("input", {
|
|
239
|
+
...X("proc-current"),
|
|
231
240
|
id: "proc-current",
|
|
232
241
|
type: "number",
|
|
233
242
|
min: "0",
|
|
234
243
|
step: "0.01",
|
|
235
|
-
value:
|
|
236
|
-
onChange: (e) =>
|
|
237
|
-
className:
|
|
244
|
+
value: L,
|
|
245
|
+
onChange: (e) => R(e.target.value),
|
|
246
|
+
className: g
|
|
238
247
|
})] }),
|
|
239
|
-
/* @__PURE__ */
|
|
248
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
240
249
|
htmlFor: "proc-quoted",
|
|
241
|
-
className:
|
|
242
|
-
children:
|
|
243
|
-
}), /* @__PURE__ */
|
|
250
|
+
className: _,
|
|
251
|
+
children: h("procurement.form.quoted", "Vendor quote per year")
|
|
252
|
+
}), /* @__PURE__ */ p("input", {
|
|
253
|
+
...X("proc-quoted"),
|
|
244
254
|
id: "proc-quoted",
|
|
245
255
|
type: "number",
|
|
246
256
|
min: "0",
|
|
247
257
|
step: "0.01",
|
|
248
|
-
value:
|
|
249
|
-
onChange: (e) =>
|
|
250
|
-
className:
|
|
258
|
+
value: z,
|
|
259
|
+
onChange: (e) => B(e.target.value),
|
|
260
|
+
className: g
|
|
251
261
|
})] }),
|
|
252
|
-
/* @__PURE__ */
|
|
262
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
253
263
|
htmlFor: "proc-target",
|
|
254
|
-
className:
|
|
255
|
-
children:
|
|
256
|
-
}), /* @__PURE__ */
|
|
264
|
+
className: _,
|
|
265
|
+
children: h("procurement.form.target", "Annual price you would be happy with")
|
|
266
|
+
}), /* @__PURE__ */ p("input", {
|
|
267
|
+
...X("proc-target"),
|
|
257
268
|
id: "proc-target",
|
|
258
269
|
type: "number",
|
|
259
270
|
min: "0",
|
|
260
271
|
step: "0.01",
|
|
261
|
-
value:
|
|
262
|
-
onChange: (e) =>
|
|
263
|
-
className:
|
|
272
|
+
value: V,
|
|
273
|
+
onChange: (e) => H(e.target.value),
|
|
274
|
+
className: g
|
|
264
275
|
})] }),
|
|
265
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
266
277
|
htmlFor: "proc-currency",
|
|
267
|
-
className:
|
|
268
|
-
children:
|
|
269
|
-
}), /* @__PURE__ */
|
|
278
|
+
className: _,
|
|
279
|
+
children: h("procurement.form.currency", "Currency")
|
|
280
|
+
}), /* @__PURE__ */ p("input", {
|
|
281
|
+
...X("proc-currency"),
|
|
270
282
|
id: "proc-currency",
|
|
271
|
-
value:
|
|
283
|
+
value: F,
|
|
272
284
|
maxLength: 3,
|
|
273
|
-
onChange: (e) =>
|
|
274
|
-
className:
|
|
285
|
+
onChange: (e) => I(e.target.value),
|
|
286
|
+
className: g
|
|
275
287
|
})] }),
|
|
276
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
277
289
|
htmlFor: "proc-term",
|
|
278
|
-
className:
|
|
279
|
-
children:
|
|
280
|
-
}), /* @__PURE__ */
|
|
290
|
+
className: _,
|
|
291
|
+
children: h("procurement.form.term", "Contract term (months)")
|
|
292
|
+
}), /* @__PURE__ */ p("input", {
|
|
293
|
+
...X("proc-term"),
|
|
281
294
|
id: "proc-term",
|
|
282
295
|
type: "number",
|
|
283
296
|
min: "1",
|
|
284
|
-
max:
|
|
297
|
+
max: C.data?.maxTermMonths ?? 60,
|
|
285
298
|
step: "1",
|
|
286
|
-
value:
|
|
287
|
-
onChange: (e) =>
|
|
288
|
-
className:
|
|
299
|
+
value: U,
|
|
300
|
+
onChange: (e) => de(e.target.value),
|
|
301
|
+
className: g
|
|
289
302
|
})] }),
|
|
290
|
-
/* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
291
304
|
htmlFor: "proc-seats",
|
|
292
|
-
className:
|
|
293
|
-
children:
|
|
294
|
-
}), /* @__PURE__ */
|
|
305
|
+
className: _,
|
|
306
|
+
children: h("procurement.form.seats", "Seats or licences")
|
|
307
|
+
}), /* @__PURE__ */ p("input", {
|
|
308
|
+
...X("proc-seats"),
|
|
295
309
|
id: "proc-seats",
|
|
296
310
|
type: "number",
|
|
297
311
|
min: "1",
|
|
298
312
|
step: "1",
|
|
299
|
-
value:
|
|
300
|
-
onChange: (e) =>
|
|
301
|
-
className:
|
|
313
|
+
value: W,
|
|
314
|
+
onChange: (e) => fe(e.target.value),
|
|
315
|
+
className: g
|
|
302
316
|
})] })
|
|
303
317
|
]
|
|
304
318
|
})
|
|
305
319
|
}),
|
|
306
|
-
/* @__PURE__ */
|
|
307
|
-
icon: /* @__PURE__ */
|
|
308
|
-
title:
|
|
309
|
-
description:
|
|
310
|
-
children: /* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ p(v, {
|
|
321
|
+
icon: /* @__PURE__ */ p(re, { className: "h-4 w-4" }),
|
|
322
|
+
title: h("procurement.form.deadline.title", "Deadline and priorities"),
|
|
323
|
+
description: h("procurement.form.deadline.description", "The earlier the expert starts, the more leverage there is. Requests are worked in deadline order."),
|
|
324
|
+
children: /* @__PURE__ */ m("div", {
|
|
311
325
|
className: "grid grid-cols-1 gap-4",
|
|
312
|
-
children: [/* @__PURE__ */
|
|
326
|
+
children: [/* @__PURE__ */ m("div", {
|
|
313
327
|
className: "sm:max-w-xs",
|
|
314
|
-
children: [/* @__PURE__ */
|
|
328
|
+
children: [/* @__PURE__ */ m("label", {
|
|
315
329
|
htmlFor: "proc-deadline",
|
|
316
|
-
className:
|
|
330
|
+
className: _,
|
|
317
331
|
children: [
|
|
318
|
-
|
|
332
|
+
h("procurement.form.deadline", "Decision deadline (renewal or signature date)"),
|
|
319
333
|
" ",
|
|
320
|
-
/* @__PURE__ */
|
|
334
|
+
/* @__PURE__ */ p("span", {
|
|
321
335
|
className: "text-status-error-text",
|
|
322
336
|
children: "*"
|
|
323
337
|
})
|
|
324
338
|
]
|
|
325
|
-
}), /* @__PURE__ */
|
|
339
|
+
}), /* @__PURE__ */ p("input", {
|
|
340
|
+
...X("proc-deadline"),
|
|
326
341
|
id: "proc-deadline",
|
|
327
342
|
type: "date",
|
|
328
|
-
min:
|
|
329
|
-
value:
|
|
330
|
-
onChange: (e) =>
|
|
331
|
-
className:
|
|
343
|
+
min: he,
|
|
344
|
+
value: G,
|
|
345
|
+
onChange: (e) => K(e.target.value),
|
|
346
|
+
className: g
|
|
332
347
|
})]
|
|
333
|
-
}), /* @__PURE__ */
|
|
348
|
+
}), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
334
349
|
htmlFor: "proc-notes",
|
|
335
|
-
className:
|
|
336
|
-
children:
|
|
337
|
-
}), /* @__PURE__ */
|
|
350
|
+
className: _,
|
|
351
|
+
children: h("procurement.form.notes", "Priorities and constraints (must-have features, budget, flexibility on term or seats)")
|
|
352
|
+
}), /* @__PURE__ */ p("textarea", {
|
|
353
|
+
...X("proc-notes"),
|
|
338
354
|
id: "proc-notes",
|
|
339
355
|
rows: 4,
|
|
340
|
-
value:
|
|
341
|
-
onChange: (e) =>
|
|
342
|
-
className:
|
|
356
|
+
value: q,
|
|
357
|
+
onChange: (e) => pe(e.target.value),
|
|
358
|
+
className: g
|
|
343
359
|
})] })]
|
|
344
360
|
})
|
|
345
361
|
}),
|
|
346
|
-
/* @__PURE__ */
|
|
362
|
+
/* @__PURE__ */ p("div", {
|
|
347
363
|
className: "flex justify-end",
|
|
348
|
-
children: /* @__PURE__ */
|
|
364
|
+
children: /* @__PURE__ */ p("button", {
|
|
349
365
|
type: "submit",
|
|
350
|
-
disabled:
|
|
366
|
+
disabled: S.isPending,
|
|
351
367
|
className: "rounded-lg bg-action-primary-bg px-5 py-2.5 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50",
|
|
352
|
-
children:
|
|
368
|
+
children: S.isPending ? h("procurement.form.creating", "Creating…") : h("procurement.form.create", "Create request")
|
|
353
369
|
})
|
|
354
370
|
})
|
|
355
371
|
]
|
|
@@ -357,6 +373,6 @@ function C() {
|
|
|
357
373
|
});
|
|
358
374
|
}
|
|
359
375
|
//#endregion
|
|
360
|
-
export {
|
|
376
|
+
export { x as ProcurementNewPage };
|
|
361
377
|
|
|
362
378
|
//# sourceMappingURL=ProcurementNewPage.js.map
|