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