@burdenoff/microfe-subscriberbot 2026.1031.1 → 2026.1102.2
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/stories/pages/NegotiationDetailPage.stories.d.ts +11 -0
- package/dist/stories/pages/NegotiationDetailPage.stories.d.ts.map +1 -0
- package/dist/stories/pages/NegotiationNewPage.stories.d.ts +9 -0
- package/dist/stories/pages/NegotiationNewPage.stories.d.ts.map +1 -0
- package/dist/stories/pages/NegotiationsPage.stories.d.ts +11 -0
- package/dist/stories/pages/NegotiationsPage.stories.d.ts.map +1 -0
- package/dist/stories/pages/ProcurementDetailPage.stories.d.ts +10 -0
- package/dist/stories/pages/ProcurementDetailPage.stories.d.ts.map +1 -0
- package/dist/stories/pages/ProcurementNewPage.stories.d.ts +9 -0
- package/dist/stories/pages/ProcurementNewPage.stories.d.ts.map +1 -0
- package/dist/stories/pages/ProcurementPage.stories.d.ts +11 -0
- package/dist/stories/pages/ProcurementPage.stories.d.ts.map +1 -0
- package/dist/stories/support/negotiationFixtures.d.ts +14 -0
- package/dist/stories/support/negotiationFixtures.d.ts.map +1 -0
- package/dist/stories/support/procurementFixtures.d.ts +14 -0
- package/dist/stories/support/procurementFixtures.d.ts.map +1 -0
- package/dist/subscriberbot/SubscriberBotRoutes.d.ts.map +1 -1
- package/dist/subscriberbot/SubscriberBotRoutes.js +30 -6
- package/dist/subscriberbot/SubscriberBotRoutes.js.map +1 -1
- package/dist/subscriberbot/admin/AdminDashboardPage.d.ts.map +1 -1
- package/dist/subscriberbot/admin/AdminDashboardPage.js +166 -146
- package/dist/subscriberbot/admin/AdminDashboardPage.js.map +1 -1
- package/dist/subscriberbot/admin/NegotiationDeskPanel.d.ts +4 -0
- package/dist/subscriberbot/admin/NegotiationDeskPanel.d.ts.map +1 -0
- package/dist/subscriberbot/admin/NegotiationDeskPanel.js +210 -0
- package/dist/subscriberbot/admin/NegotiationDeskPanel.js.map +1 -0
- package/dist/subscriberbot/admin/ProcurementDeskPanel.d.ts +4 -0
- package/dist/subscriberbot/admin/ProcurementDeskPanel.d.ts.map +1 -0
- package/dist/subscriberbot/admin/ProcurementDeskPanel.js +450 -0
- package/dist/subscriberbot/admin/ProcurementDeskPanel.js.map +1 -0
- package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.d.ts +8 -0
- package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.d.ts.map +1 -0
- package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.js +18 -0
- package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.js.map +1 -0
- package/dist/subscriberbot/components/negotiations/NegotiationTimeline.d.ts +8 -0
- package/dist/subscriberbot/components/negotiations/NegotiationTimeline.d.ts.map +1 -0
- package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js +49 -0
- package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js.map +1 -0
- package/dist/subscriberbot/components/negotiations/OutcomeForm.d.ts +13 -0
- package/dist/subscriberbot/components/negotiations/OutcomeForm.d.ts.map +1 -0
- package/dist/subscriberbot/components/negotiations/OutcomeForm.js +112 -0
- package/dist/subscriberbot/components/negotiations/OutcomeForm.js.map +1 -0
- package/dist/subscriberbot/components/negotiations/index.d.ts +5 -0
- package/dist/subscriberbot/components/negotiations/index.d.ts.map +1 -0
- package/dist/subscriberbot/components/negotiations/index.js +4 -0
- package/dist/subscriberbot/components/negotiations/labels.d.ts +16 -0
- package/dist/subscriberbot/components/negotiations/labels.d.ts.map +1 -0
- package/dist/subscriberbot/components/negotiations/labels.js +179 -0
- package/dist/subscriberbot/components/negotiations/labels.js.map +1 -0
- package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.d.ts +12 -0
- package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.d.ts.map +1 -0
- package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js +155 -0
- package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js.map +1 -0
- package/dist/subscriberbot/components/procurement/ProcurementStatusPill.d.ts +8 -0
- package/dist/subscriberbot/components/procurement/ProcurementStatusPill.d.ts.map +1 -0
- package/dist/subscriberbot/components/procurement/ProcurementStatusPill.js +18 -0
- package/dist/subscriberbot/components/procurement/ProcurementStatusPill.js.map +1 -0
- package/dist/subscriberbot/components/procurement/ProcurementThread.d.ts +13 -0
- package/dist/subscriberbot/components/procurement/ProcurementThread.d.ts.map +1 -0
- package/dist/subscriberbot/components/procurement/ProcurementThread.js +51 -0
- package/dist/subscriberbot/components/procurement/ProcurementThread.js.map +1 -0
- package/dist/subscriberbot/components/procurement/index.d.ts +5 -0
- package/dist/subscriberbot/components/procurement/index.d.ts.map +1 -0
- package/dist/subscriberbot/components/procurement/index.js +4 -0
- package/dist/subscriberbot/components/procurement/labels.d.ts +16 -0
- package/dist/subscriberbot/components/procurement/labels.d.ts.map +1 -0
- package/dist/subscriberbot/components/procurement/labels.js +154 -0
- package/dist/subscriberbot/components/procurement/labels.js.map +1 -0
- package/dist/subscriberbot/hooks/useNegotiationApi.d.ts +51 -0
- package/dist/subscriberbot/hooks/useNegotiationApi.d.ts.map +1 -0
- package/dist/subscriberbot/hooks/useNegotiationApi.js +106 -0
- package/dist/subscriberbot/hooks/useNegotiationApi.js.map +1 -0
- package/dist/subscriberbot/hooks/useProcurementApi.d.ts +58 -0
- package/dist/subscriberbot/hooks/useProcurementApi.d.ts.map +1 -0
- package/dist/subscriberbot/hooks/useProcurementApi.js +128 -0
- package/dist/subscriberbot/hooks/useProcurementApi.js.map +1 -0
- package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts +1 -0
- package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts.map +1 -1
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js +1 -1
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.d.ts +11 -0
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.d.ts.map +1 -0
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js +312 -0
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js.map +1 -0
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.d.ts +11 -0
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.d.ts.map +1 -0
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js +375 -0
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js.map +1 -0
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.d.ts +10 -0
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.d.ts.map +1 -0
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js +155 -0
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js.map +1 -0
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.d.ts +11 -0
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.d.ts.map +1 -0
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js +276 -0
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js.map +1 -0
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.d.ts +12 -0
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.d.ts.map +1 -0
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js +362 -0
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js.map +1 -0
- package/dist/subscriberbot/pages/procurement/ProcurementPage.d.ts +11 -0
- package/dist/subscriberbot/pages/procurement/ProcurementPage.d.ts.map +1 -0
- package/dist/subscriberbot/pages/procurement/ProcurementPage.js +156 -0
- package/dist/subscriberbot/pages/procurement/ProcurementPage.js.map +1 -0
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +149 -124
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
- package/dist/subscriberbot/types/negotiation.d.ts +101 -0
- package/dist/subscriberbot/types/negotiation.d.ts.map +1 -0
- package/dist/subscriberbot/types/procurement.d.ts +127 -0
- package/dist/subscriberbot/types/procurement.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Expert procurement request detail
|
|
3
|
+
* @module subscriberbot/pages/procurement
|
|
4
|
+
*
|
|
5
|
+
* `/subscriberbot/procurement/:id` — the contract details, submission under
|
|
6
|
+
* the procurement authorisation, the assigned expert, the message thread with
|
|
7
|
+
* the expert, the negotiated outcome with savings and the success fee. Every
|
|
8
|
+
* action is a real `Sub*Procurement*` mutation.
|
|
9
|
+
*/
|
|
10
|
+
export declare function ProcurementDetailPage(): import("react").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=ProcurementDetailPage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProcurementDetailPage.d.ts","sourceRoot":"","sources":["../../../../src/subscriberbot/pages/procurement/ProcurementDetailPage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA0MH,wBAAgB,qBAAqB,gCA0IpC"}
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import { useSubscriberBot as e } from "../../context/SubscriberBotContext.js";
|
|
2
|
+
import { PageLayout as t } from "../../components/PageLayout.js";
|
|
3
|
+
import { formatCurrency as n, formatDate as r, formatDateTime as i } from "../../utils/formatters.js";
|
|
4
|
+
import { useTr as a } from "../../hooks/useTr.js";
|
|
5
|
+
import { ErrorView as o, LoadingView as s, Section as c } from "../../components/StateViews.js";
|
|
6
|
+
import "../../components/index.js";
|
|
7
|
+
import { FEE_STATUS_LABEL as l, OPEN_STATUSES as u, REQUEST_TYPE_LABEL as d } from "../../components/procurement/labels.js";
|
|
8
|
+
import { ProcurementStatusPill as f } from "../../components/procurement/ProcurementStatusPill.js";
|
|
9
|
+
import { ProcurementThread as p } from "../../components/procurement/ProcurementThread.js";
|
|
10
|
+
import "../../components/procurement/index.js";
|
|
11
|
+
import { useCancelProcurementRequest as m, useProcurementRequest as h, useProcurementTerms as g, useSendProcurementMessage as _, useSubmitProcurementRequest as v } from "../../hooks/useProcurementApi.js";
|
|
12
|
+
import { useState as y } from "react";
|
|
13
|
+
import { ArrowLeft as b, UserRoundCheck as x } from "lucide-react";
|
|
14
|
+
import { useParams as S } from "react-router";
|
|
15
|
+
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
16
|
+
import { GlassCard as T } from "@burdenoff/fe-libs/ui";
|
|
17
|
+
//#region src/subscriberbot/pages/procurement/ProcurementDetailPage.tsx
|
|
18
|
+
var E = "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)]", D = "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50", O = "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-50", k = (e) => e ? e instanceof Error ? e.message : String(e) : null;
|
|
19
|
+
function A({ label: e, value: t }) {
|
|
20
|
+
return /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("dt", {
|
|
21
|
+
className: "text-xs text-text-secondary",
|
|
22
|
+
children: e
|
|
23
|
+
}), /* @__PURE__ */ C("dd", {
|
|
24
|
+
className: "mt-0.5 text-sm font-medium text-text-primary",
|
|
25
|
+
children: t
|
|
26
|
+
})] });
|
|
27
|
+
}
|
|
28
|
+
function j({ request: e }) {
|
|
29
|
+
let t = a(), n = g(), r = v(), [i, o] = y(!1);
|
|
30
|
+
return /* @__PURE__ */ w(T, {
|
|
31
|
+
treatment: "metric",
|
|
32
|
+
className: "space-y-3 p-5",
|
|
33
|
+
"data-testid": "procurement-submit",
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ C("p", {
|
|
36
|
+
className: "text-sm text-text-primary",
|
|
37
|
+
children: t("procurement.submit.intro", "Submit this request to the Subscriber Bot procurement desk. An expert is assigned, negotiates with the vendor and keeps you posted here.")
|
|
38
|
+
}),
|
|
39
|
+
n.data && /* @__PURE__ */ w("div", {
|
|
40
|
+
className: "rounded-lg border border-border-subtle bg-bg-sunken p-3",
|
|
41
|
+
children: [/* @__PURE__ */ C("p", {
|
|
42
|
+
className: "text-xs leading-relaxed text-text-secondary",
|
|
43
|
+
"data-testid": "procurement-terms",
|
|
44
|
+
children: n.data.authorizationText
|
|
45
|
+
}), /* @__PURE__ */ w("label", {
|
|
46
|
+
className: "mt-3 inline-flex items-start gap-2 text-sm text-text-primary",
|
|
47
|
+
children: [/* @__PURE__ */ C("input", {
|
|
48
|
+
type: "checkbox",
|
|
49
|
+
checked: i,
|
|
50
|
+
onChange: (e) => o(e.target.checked),
|
|
51
|
+
className: "mt-0.5"
|
|
52
|
+
}), t("procurement.submit.accept", "I authorise the procurement desk on these terms")]
|
|
53
|
+
})]
|
|
54
|
+
}),
|
|
55
|
+
r.error && /* @__PURE__ */ C("p", {
|
|
56
|
+
role: "alert",
|
|
57
|
+
className: "text-sm text-status-error-text",
|
|
58
|
+
children: k(r.error)
|
|
59
|
+
}),
|
|
60
|
+
/* @__PURE__ */ C("button", {
|
|
61
|
+
type: "button",
|
|
62
|
+
onClick: () => n.data && r.mutate({
|
|
63
|
+
id: e.id,
|
|
64
|
+
input: {
|
|
65
|
+
acceptAuthorization: i,
|
|
66
|
+
authorizationVersion: n.data.authorizationVersion
|
|
67
|
+
}
|
|
68
|
+
}),
|
|
69
|
+
disabled: r.isPending || !i || !n.data,
|
|
70
|
+
className: D,
|
|
71
|
+
children: t("procurement.submit.cta", "Submit to the procurement desk")
|
|
72
|
+
})
|
|
73
|
+
]
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
function M({ request: e }) {
|
|
77
|
+
let t = a(), n = _(), [r, i] = y(""), o = e.status === "AWAITING_CUSTOMER";
|
|
78
|
+
return /* @__PURE__ */ w("div", {
|
|
79
|
+
className: "space-y-2",
|
|
80
|
+
"data-testid": "procurement-message",
|
|
81
|
+
children: [
|
|
82
|
+
o && /* @__PURE__ */ C("p", {
|
|
83
|
+
className: "rounded-lg bg-status-warning-bg-subtle px-3 py-2 text-sm text-status-warning-text",
|
|
84
|
+
children: t("procurement.message.awaiting", "Your procurement expert is waiting for your reply. See the latest message below.")
|
|
85
|
+
}),
|
|
86
|
+
/* @__PURE__ */ C("label", {
|
|
87
|
+
htmlFor: "proc-message",
|
|
88
|
+
className: "sr-only",
|
|
89
|
+
children: t("procurement.message.label", "Message")
|
|
90
|
+
}),
|
|
91
|
+
/* @__PURE__ */ C("textarea", {
|
|
92
|
+
id: "proc-message",
|
|
93
|
+
rows: 2,
|
|
94
|
+
value: r,
|
|
95
|
+
onChange: (e) => i(e.target.value),
|
|
96
|
+
placeholder: t("procurement.message.placeholder", "Write to your procurement expert…"),
|
|
97
|
+
className: E
|
|
98
|
+
}),
|
|
99
|
+
n.error && /* @__PURE__ */ C("p", {
|
|
100
|
+
role: "alert",
|
|
101
|
+
className: "text-sm text-status-error-text",
|
|
102
|
+
children: k(n.error)
|
|
103
|
+
}),
|
|
104
|
+
/* @__PURE__ */ C("button", {
|
|
105
|
+
type: "button",
|
|
106
|
+
disabled: n.isPending || !r.trim(),
|
|
107
|
+
onClick: () => n.mutate({
|
|
108
|
+
id: e.id,
|
|
109
|
+
message: r
|
|
110
|
+
}, { onSuccess: () => i("") }),
|
|
111
|
+
className: O,
|
|
112
|
+
children: o ? t("procurement.message.reply", "Reply to the expert") : t("procurement.message.send", "Send message")
|
|
113
|
+
})
|
|
114
|
+
]
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
function N({ request: e }) {
|
|
118
|
+
let t = a(), r = l[e.feeStatus];
|
|
119
|
+
return /* @__PURE__ */ w(T, {
|
|
120
|
+
treatment: "metric",
|
|
121
|
+
className: "p-5",
|
|
122
|
+
"data-testid": "procurement-outcome",
|
|
123
|
+
children: [
|
|
124
|
+
/* @__PURE__ */ w("dl", {
|
|
125
|
+
className: "grid grid-cols-2 gap-4 sm:grid-cols-4",
|
|
126
|
+
children: [
|
|
127
|
+
/* @__PURE__ */ C(A, {
|
|
128
|
+
label: t("procurement.outcome.baseline", "Baseline per year"),
|
|
129
|
+
value: e.baselineAnnualValue == null ? "—" : n(e.baselineAnnualValue, e.currency)
|
|
130
|
+
}),
|
|
131
|
+
/* @__PURE__ */ C(A, {
|
|
132
|
+
label: t("procurement.outcome.final", "Negotiated per year"),
|
|
133
|
+
value: e.finalAnnualValue == null ? "—" : n(e.finalAnnualValue, e.currency)
|
|
134
|
+
}),
|
|
135
|
+
/* @__PURE__ */ C(A, {
|
|
136
|
+
label: t("procurement.outcome.firstYear", "First-year savings"),
|
|
137
|
+
value: n(e.firstYearSavings, e.currency)
|
|
138
|
+
}),
|
|
139
|
+
/* @__PURE__ */ C(A, {
|
|
140
|
+
label: t("procurement.outcome.contract", "Savings over the term"),
|
|
141
|
+
value: n(e.contractSavings, e.currency)
|
|
142
|
+
}),
|
|
143
|
+
/* @__PURE__ */ C(A, {
|
|
144
|
+
label: t("procurement.outcome.term", "Final term"),
|
|
145
|
+
value: t("procurement.fact.months", "{{count}} months", { count: e.finalTermMonths ?? e.termMonths })
|
|
146
|
+
}),
|
|
147
|
+
/* @__PURE__ */ C(A, {
|
|
148
|
+
label: t("procurement.outcome.fee", "Success fee"),
|
|
149
|
+
value: e.feeStatus === "NONE" ? t(r.key, r.fallback) : `${n(e.feeAmount, e.currency)} · ${t(r.key, r.fallback)}`
|
|
150
|
+
})
|
|
151
|
+
]
|
|
152
|
+
}),
|
|
153
|
+
e.nonPriceWins && /* @__PURE__ */ C("p", {
|
|
154
|
+
className: "mt-4 text-sm text-text-primary",
|
|
155
|
+
children: t("procurement.outcome.winsLabel", "Non-price wins: {{wins}}", { wins: e.nonPriceWins })
|
|
156
|
+
}),
|
|
157
|
+
e.outcomeSummary && /* @__PURE__ */ C("p", {
|
|
158
|
+
className: "mt-2 text-sm text-text-primary",
|
|
159
|
+
children: e.outcomeSummary
|
|
160
|
+
})
|
|
161
|
+
]
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
function P() {
|
|
165
|
+
let l = a(), { id: g } = S(), { navigateTo: _ } = e(), { data: v, isLoading: y, isError: E, error: D, refetch: P } = h(g), F = m(), I = /* @__PURE__ */ w("button", {
|
|
166
|
+
type: "button",
|
|
167
|
+
onClick: () => _("/procurement"),
|
|
168
|
+
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",
|
|
169
|
+
children: [
|
|
170
|
+
/* @__PURE__ */ C(b, { className: "h-4 w-4" }),
|
|
171
|
+
" ",
|
|
172
|
+
l("procurement.back", "Back")
|
|
173
|
+
]
|
|
174
|
+
});
|
|
175
|
+
if (y) return /* @__PURE__ */ C(s, { label: l("procurement.loadingOne", "Loading request…") });
|
|
176
|
+
if (E || !v) return /* @__PURE__ */ C(t, {
|
|
177
|
+
title: l("procurement.title", "Expert procurement"),
|
|
178
|
+
actions: I,
|
|
179
|
+
children: /* @__PURE__ */ C(o, {
|
|
180
|
+
title: l("procurement.notFound", "Procurement request not found"),
|
|
181
|
+
message: D instanceof Error ? D.message : void 0,
|
|
182
|
+
onRetry: () => void P()
|
|
183
|
+
})
|
|
184
|
+
});
|
|
185
|
+
let L = u.includes(v.status), R = v.status === "SUCCEEDED" || v.status === "NO_SAVINGS", z = d[v.requestType];
|
|
186
|
+
return /* @__PURE__ */ w(t, {
|
|
187
|
+
title: v.productName ? `${v.vendorName} · ${v.productName}` : v.vendorName,
|
|
188
|
+
description: `${l(z.key, z.fallback)}${v.category ? ` · ${v.category}` : ""}`,
|
|
189
|
+
actions: I,
|
|
190
|
+
children: [
|
|
191
|
+
/* @__PURE__ */ w("div", {
|
|
192
|
+
className: "flex flex-wrap items-center gap-3",
|
|
193
|
+
children: [
|
|
194
|
+
/* @__PURE__ */ C(f, { status: v.status }),
|
|
195
|
+
/* @__PURE__ */ C("span", {
|
|
196
|
+
className: "text-sm text-text-secondary",
|
|
197
|
+
children: l("procurement.deadline", "Decide by {{date}}", { date: r(v.deadline) })
|
|
198
|
+
}),
|
|
199
|
+
v.submittedAt && /* @__PURE__ */ C("span", {
|
|
200
|
+
className: "text-xs text-text-secondary",
|
|
201
|
+
children: l("procurement.submittedAt", "Submitted {{when}}", { when: i(v.submittedAt) })
|
|
202
|
+
})
|
|
203
|
+
]
|
|
204
|
+
}),
|
|
205
|
+
v.expertName && /* @__PURE__ */ w("p", {
|
|
206
|
+
className: "mt-3 inline-flex items-center gap-2 rounded-lg bg-[var(--color-accent-soft)] px-3 py-1.5 text-sm text-text-primary",
|
|
207
|
+
"data-testid": "procurement-expert",
|
|
208
|
+
children: [/* @__PURE__ */ C(x, {
|
|
209
|
+
className: "h-4 w-4",
|
|
210
|
+
"aria-hidden": !0
|
|
211
|
+
}), l("procurement.expert", "Your procurement expert: {{name}}", { name: v.expertName })]
|
|
212
|
+
}),
|
|
213
|
+
/* @__PURE__ */ w(T, {
|
|
214
|
+
treatment: "metric",
|
|
215
|
+
className: "mt-4 p-5",
|
|
216
|
+
children: [/* @__PURE__ */ w("dl", {
|
|
217
|
+
className: "grid grid-cols-2 gap-4 sm:grid-cols-4",
|
|
218
|
+
children: [
|
|
219
|
+
/* @__PURE__ */ C(A, {
|
|
220
|
+
label: l("procurement.fact.current", "Current per year"),
|
|
221
|
+
value: v.currentAnnualValue == null ? "—" : n(v.currentAnnualValue, v.currency)
|
|
222
|
+
}),
|
|
223
|
+
/* @__PURE__ */ C(A, {
|
|
224
|
+
label: l("procurement.fact.quoted", "Vendor quote per year"),
|
|
225
|
+
value: v.quotedAnnualValue == null ? "—" : n(v.quotedAnnualValue, v.currency)
|
|
226
|
+
}),
|
|
227
|
+
/* @__PURE__ */ C(A, {
|
|
228
|
+
label: l("procurement.fact.target", "Target per year"),
|
|
229
|
+
value: v.targetAnnualValue == null ? "—" : n(v.targetAnnualValue, v.currency)
|
|
230
|
+
}),
|
|
231
|
+
/* @__PURE__ */ C(A, {
|
|
232
|
+
label: l("procurement.fact.term", "Term and seats"),
|
|
233
|
+
value: `${l("procurement.fact.months", "{{count}} months", { count: v.termMonths })}${v.seats == null ? "" : ` · ${v.seats}`}`
|
|
234
|
+
})
|
|
235
|
+
]
|
|
236
|
+
}), v.notes && /* @__PURE__ */ C("p", {
|
|
237
|
+
className: "mt-3 whitespace-pre-wrap text-sm text-text-secondary",
|
|
238
|
+
children: v.notes
|
|
239
|
+
})]
|
|
240
|
+
}),
|
|
241
|
+
R && /* @__PURE__ */ C(c, {
|
|
242
|
+
title: l("procurement.section.outcome", "Outcome"),
|
|
243
|
+
children: /* @__PURE__ */ C(N, { request: v })
|
|
244
|
+
}),
|
|
245
|
+
v.status === "DRAFT" && /* @__PURE__ */ C(c, {
|
|
246
|
+
title: l("procurement.section.submit", "Submit"),
|
|
247
|
+
children: /* @__PURE__ */ C(j, { request: v })
|
|
248
|
+
}),
|
|
249
|
+
/* @__PURE__ */ w(c, {
|
|
250
|
+
title: l("procurement.section.thread", "Messages and timeline"),
|
|
251
|
+
children: [L && v.status !== "DRAFT" && /* @__PURE__ */ C("div", {
|
|
252
|
+
className: "mb-4",
|
|
253
|
+
children: /* @__PURE__ */ C(M, { request: v })
|
|
254
|
+
}), /* @__PURE__ */ C(p, { events: v.events ?? [] })]
|
|
255
|
+
}),
|
|
256
|
+
L && /* @__PURE__ */ w("div", {
|
|
257
|
+
className: "mt-8 border-t border-border-subtle pt-4",
|
|
258
|
+
children: [F.error && /* @__PURE__ */ C("p", {
|
|
259
|
+
role: "alert",
|
|
260
|
+
className: "mb-2 text-sm text-status-error-text",
|
|
261
|
+
children: k(F.error)
|
|
262
|
+
}), /* @__PURE__ */ C("button", {
|
|
263
|
+
type: "button",
|
|
264
|
+
disabled: F.isPending,
|
|
265
|
+
onClick: () => F.mutate({ id: v.id }),
|
|
266
|
+
className: O,
|
|
267
|
+
children: v.status === "DRAFT" ? l("procurement.cancel.draft", "Discard draft") : l("procurement.cancel.submitted", "Withdraw request and authorisation")
|
|
268
|
+
})]
|
|
269
|
+
})
|
|
270
|
+
]
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
//#endregion
|
|
274
|
+
export { P as ProcurementDetailPage };
|
|
275
|
+
|
|
276
|
+
//# sourceMappingURL=ProcurementDetailPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProcurementDetailPage.js","names":[],"sources":["../../../../src/subscriberbot/pages/procurement/ProcurementDetailPage.tsx"],"sourcesContent":["/**\n * Expert procurement request detail\n * @module subscriberbot/pages/procurement\n *\n * `/subscriberbot/procurement/:id` — the contract details, submission under\n * the procurement authorisation, the assigned expert, the message thread with\n * the expert, the negotiated outcome with savings and the success fee. Every\n * action is a real `Sub*Procurement*` mutation.\n */\n\nimport { useState } from 'react';\nimport { useParams } from 'react-router';\nimport { ArrowLeft, UserRoundCheck } from 'lucide-react';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\nimport { ErrorView, LoadingView, PageLayout, Section } from '../../components';\nimport {\n FEE_STATUS_LABEL,\n OPEN_STATUSES,\n ProcurementStatusPill,\n ProcurementThread,\n REQUEST_TYPE_LABEL,\n} from '../../components/procurement';\nimport { useSubscriberBot } from '../../context/SubscriberBotContext';\nimport {\n useCancelProcurementRequest,\n useProcurementRequest,\n useProcurementTerms,\n useSendProcurementMessage,\n useSubmitProcurementRequest,\n} from '../../hooks/useProcurementApi';\nimport { useTr } from '../../hooks/useTr';\nimport { formatCurrency, formatDate, formatDateTime } from '../../utils/formatters';\nimport type { SubProcurementRequest } from '../../types/procurement';\n\nconst inputCls =\n '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)]';\nconst primaryBtn =\n 'rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50';\nconst secondaryBtn =\n 'rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-50';\n\nconst errorText = (err: unknown): string | null =>\n err ? (err instanceof Error ? err.message : String(err)) : null;\n\nfunction Fact({ label, value }: { label: string; value: string }) {\n return (\n <div>\n <dt className=\"text-xs text-text-secondary\">{label}</dt>\n <dd className=\"mt-0.5 text-sm font-medium text-text-primary\">{value}</dd>\n </div>\n );\n}\n\nfunction SubmitPanel({ request }: { request: SubProcurementRequest }) {\n const tr = useTr();\n const terms = useProcurementTerms();\n const submit = useSubmitProcurementRequest();\n const [accepted, setAccepted] = useState(false);\n\n return (\n <GlassCard treatment=\"metric\" className=\"space-y-3 p-5\" data-testid=\"procurement-submit\">\n <p className=\"text-sm text-text-primary\">\n {tr(\n 'procurement.submit.intro',\n 'Submit this request to the Subscriber Bot procurement desk. An expert is assigned, negotiates with the vendor and keeps you posted here.'\n )}\n </p>\n {terms.data && (\n <div className=\"rounded-lg border border-border-subtle bg-bg-sunken p-3\">\n <p\n className=\"text-xs leading-relaxed text-text-secondary\"\n data-testid=\"procurement-terms\"\n >\n {terms.data.authorizationText}\n </p>\n <label className=\"mt-3 inline-flex items-start gap-2 text-sm text-text-primary\">\n <input\n type=\"checkbox\"\n checked={accepted}\n onChange={(e) => setAccepted(e.target.checked)}\n className=\"mt-0.5\"\n />\n {tr('procurement.submit.accept', 'I authorise the procurement desk on these terms')}\n </label>\n </div>\n )}\n {submit.error && (\n <p role=\"alert\" className=\"text-sm text-status-error-text\">\n {errorText(submit.error)}\n </p>\n )}\n <button\n type=\"button\"\n onClick={() =>\n terms.data &&\n submit.mutate({\n id: request.id,\n input: {\n acceptAuthorization: accepted,\n authorizationVersion: terms.data.authorizationVersion,\n },\n })\n }\n disabled={submit.isPending || !accepted || !terms.data}\n className={primaryBtn}\n >\n {tr('procurement.submit.cta', 'Submit to the procurement desk')}\n </button>\n </GlassCard>\n );\n}\n\nfunction MessagePanel({ request }: { request: SubProcurementRequest }) {\n const tr = useTr();\n const send = useSendProcurementMessage();\n const [message, setMessage] = useState('');\n const awaiting = request.status === 'AWAITING_CUSTOMER';\n return (\n <div className=\"space-y-2\" data-testid=\"procurement-message\">\n {awaiting && (\n <p className=\"rounded-lg bg-status-warning-bg-subtle px-3 py-2 text-sm text-status-warning-text\">\n {tr(\n 'procurement.message.awaiting',\n 'Your procurement expert is waiting for your reply. See the latest message below.'\n )}\n </p>\n )}\n <label htmlFor=\"proc-message\" className=\"sr-only\">\n {tr('procurement.message.label', 'Message')}\n </label>\n <textarea\n id=\"proc-message\"\n rows={2}\n value={message}\n onChange={(e) => setMessage(e.target.value)}\n placeholder={tr('procurement.message.placeholder', 'Write to your procurement expert…')}\n className={inputCls}\n />\n {send.error && (\n <p role=\"alert\" className=\"text-sm text-status-error-text\">\n {errorText(send.error)}\n </p>\n )}\n <button\n type=\"button\"\n disabled={send.isPending || !message.trim()}\n onClick={() =>\n send.mutate({ id: request.id, message }, { onSuccess: () => setMessage('') })\n }\n className={secondaryBtn}\n >\n {awaiting\n ? tr('procurement.message.reply', 'Reply to the expert')\n : tr('procurement.message.send', 'Send message')}\n </button>\n </div>\n );\n}\n\nfunction OutcomeSummary({ request: p }: { request: SubProcurementRequest }) {\n const tr = useTr();\n const fee = FEE_STATUS_LABEL[p.feeStatus];\n return (\n <GlassCard treatment=\"metric\" className=\"p-5\" data-testid=\"procurement-outcome\">\n <dl className=\"grid grid-cols-2 gap-4 sm:grid-cols-4\">\n <Fact\n label={tr('procurement.outcome.baseline', 'Baseline per year')}\n value={\n p.baselineAnnualValue != null ? formatCurrency(p.baselineAnnualValue, p.currency) : '—'\n }\n />\n <Fact\n label={tr('procurement.outcome.final', 'Negotiated per year')}\n value={p.finalAnnualValue != null ? formatCurrency(p.finalAnnualValue, p.currency) : '—'}\n />\n <Fact\n label={tr('procurement.outcome.firstYear', 'First-year savings')}\n value={formatCurrency(p.firstYearSavings, p.currency)}\n />\n <Fact\n label={tr('procurement.outcome.contract', 'Savings over the term')}\n value={formatCurrency(p.contractSavings, p.currency)}\n />\n <Fact\n label={tr('procurement.outcome.term', 'Final term')}\n value={tr('procurement.fact.months', '{{count}} months', {\n count: p.finalTermMonths ?? p.termMonths,\n })}\n />\n <Fact\n label={tr('procurement.outcome.fee', 'Success fee')}\n value={\n p.feeStatus === 'NONE'\n ? tr(fee.key, fee.fallback)\n : `${formatCurrency(p.feeAmount, p.currency)} · ${tr(fee.key, fee.fallback)}`\n }\n />\n </dl>\n {p.nonPriceWins && (\n <p className=\"mt-4 text-sm text-text-primary\">\n {tr('procurement.outcome.winsLabel', 'Non-price wins: {{wins}}', {\n wins: p.nonPriceWins,\n })}\n </p>\n )}\n {p.outcomeSummary && <p className=\"mt-2 text-sm text-text-primary\">{p.outcomeSummary}</p>}\n </GlassCard>\n );\n}\n\nexport function ProcurementDetailPage() {\n const tr = useTr();\n const { id } = useParams<{ id: string }>();\n const { navigateTo } = useSubscriberBot();\n const { data: p, isLoading, isError, error, refetch } = useProcurementRequest(id);\n const cancel = useCancelProcurementRequest();\n\n const back = (\n <button\n type=\"button\"\n onClick={() => navigateTo('/procurement')}\n 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\"\n >\n <ArrowLeft className=\"h-4 w-4\" /> {tr('procurement.back', 'Back')}\n </button>\n );\n\n if (isLoading) return <LoadingView label={tr('procurement.loadingOne', 'Loading request…')} />;\n if (isError || !p) {\n return (\n <PageLayout title={tr('procurement.title', 'Expert procurement')} actions={back}>\n <ErrorView\n title={tr('procurement.notFound', 'Procurement request not found')}\n message={error instanceof Error ? error.message : undefined}\n onRetry={() => void refetch()}\n />\n </PageLayout>\n );\n }\n\n const open = OPEN_STATUSES.includes(p.status);\n const finished = p.status === 'SUCCEEDED' || p.status === 'NO_SAVINGS';\n const typeLabel = REQUEST_TYPE_LABEL[p.requestType];\n\n return (\n <PageLayout\n title={p.productName ? `${p.vendorName} · ${p.productName}` : p.vendorName}\n description={`${tr(typeLabel.key, typeLabel.fallback)}${p.category ? ` · ${p.category}` : ''}`}\n actions={back}\n >\n <div className=\"flex flex-wrap items-center gap-3\">\n <ProcurementStatusPill status={p.status} />\n <span className=\"text-sm text-text-secondary\">\n {tr('procurement.deadline', 'Decide by {{date}}', { date: formatDate(p.deadline) })}\n </span>\n {p.submittedAt && (\n <span className=\"text-xs text-text-secondary\">\n {tr('procurement.submittedAt', 'Submitted {{when}}', {\n when: formatDateTime(p.submittedAt),\n })}\n </span>\n )}\n </div>\n\n {p.expertName && (\n <p\n className=\"mt-3 inline-flex items-center gap-2 rounded-lg bg-[var(--color-accent-soft)] px-3 py-1.5 text-sm text-text-primary\"\n data-testid=\"procurement-expert\"\n >\n <UserRoundCheck className=\"h-4 w-4\" aria-hidden />\n {tr('procurement.expert', 'Your procurement expert: {{name}}', { name: p.expertName })}\n </p>\n )}\n\n <GlassCard treatment=\"metric\" className=\"mt-4 p-5\">\n <dl className=\"grid grid-cols-2 gap-4 sm:grid-cols-4\">\n <Fact\n label={tr('procurement.fact.current', 'Current per year')}\n value={\n p.currentAnnualValue != null ? formatCurrency(p.currentAnnualValue, p.currency) : '—'\n }\n />\n <Fact\n label={tr('procurement.fact.quoted', 'Vendor quote per year')}\n value={\n p.quotedAnnualValue != null ? formatCurrency(p.quotedAnnualValue, p.currency) : '—'\n }\n />\n <Fact\n label={tr('procurement.fact.target', 'Target per year')}\n value={\n p.targetAnnualValue != null ? formatCurrency(p.targetAnnualValue, p.currency) : '—'\n }\n />\n <Fact\n label={tr('procurement.fact.term', 'Term and seats')}\n value={`${tr('procurement.fact.months', '{{count}} months', { count: p.termMonths })}${\n p.seats != null ? ` · ${p.seats}` : ''\n }`}\n />\n </dl>\n {p.notes && (\n <p className=\"mt-3 whitespace-pre-wrap text-sm text-text-secondary\">{p.notes}</p>\n )}\n </GlassCard>\n\n {finished && (\n <Section title={tr('procurement.section.outcome', 'Outcome')}>\n <OutcomeSummary request={p} />\n </Section>\n )}\n\n {p.status === 'DRAFT' && (\n <Section title={tr('procurement.section.submit', 'Submit')}>\n <SubmitPanel request={p} />\n </Section>\n )}\n\n <Section title={tr('procurement.section.thread', 'Messages and timeline')}>\n {open && p.status !== 'DRAFT' && (\n <div className=\"mb-4\">\n <MessagePanel request={p} />\n </div>\n )}\n <ProcurementThread events={p.events ?? []} />\n </Section>\n\n {open && (\n <div className=\"mt-8 border-t border-border-subtle pt-4\">\n {cancel.error && (\n <p role=\"alert\" className=\"mb-2 text-sm text-status-error-text\">\n {errorText(cancel.error)}\n </p>\n )}\n <button\n type=\"button\"\n disabled={cancel.isPending}\n onClick={() => cancel.mutate({ id: p.id })}\n className={secondaryBtn}\n >\n {p.status === 'DRAFT'\n ? tr('procurement.cancel.draft', 'Discard draft')\n : tr('procurement.cancel.submitted', 'Withdraw request and authorisation')}\n </button>\n </div>\n )}\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAkCA,IAAM,IACJ,wMACI,IACJ,+HACI,IACJ,iIAEI,KAAa,MACjB,IAAO,aAAe,QAAQ,EAAI,UAAU,OAAO,CAAG,IAAK;AAE7D,SAAS,EAAK,EAAE,UAAO,YAA2C;CAChE,OACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;EAAI,WAAU;YAA+B;CAAU,CAAA,GACvD,kBAAC,MAAD;EAAI,WAAU;YAAgD;CAAU,CAAA,CACrE,EAAA,CAAA;AAET;AAEA,SAAS,EAAY,EAAE,cAA+C;CACpE,IAAM,IAAK,EAAM,GACX,IAAQ,EAAoB,GAC5B,IAAS,EAA4B,GACrC,CAAC,GAAU,KAAe,EAAS,EAAK;CAE9C,OACE,kBAAC,GAAD;EAAW,WAAU;EAAS,WAAU;EAAgB,eAAY;YAApE;GACE,kBAAC,KAAD;IAAG,WAAU;cACV,EACC,4BACA,0IACF;GACC,CAAA;GACF,EAAM,QACL,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC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AAS,CAAA,CAEzE;;GAEV,KACC,kBAAC,GAAD;IAAS,OAAO,EAAG,+BAA+B,SAAS;cACzD,kBAAC,GAAD,EAAgB,SAAS,EAAI,CAAA;GACtB,CAAA;GAGV,EAAE,WAAW,WACZ,kBAAC,GAAD;IAAS,OAAO,EAAG,8BAA8B,QAAQ;cACvD,kBAAC,GAAD,EAAa,SAAS,EAAI,CAAA;GACnB,CAAA;GAGX,kBAAC,GAAD;IAAS,OAAO,EAAG,8BAA8B,uBAAuB;cAAxE,CACG,KAAQ,EAAE,WAAW,WACpB,kBAAC,OAAD;KAAK,WAAU;eACb,kBAAC,GAAD,EAAc,SAAS,EAAI,CAAA;IACxB,CAAA,GAEP,kBAAC,GAAD,EAAmB,QAAQ,EAAE,UAAU,CAAC,EAAI,CAAA,CACrC;;GAER,KACC,kBAAC,OAAD;IAAK,WAAU;cAAf,CACG,EAAO,SACN,kBAAC,KAAD;KAAG,MAAK;KAAQ,WAAU;eACvB,EAAU,EAAO,KAAK;IACtB,CAAA,GAEL,kBAAC,UAAD;KACE,MAAK;KACL,UAAU,EAAO;KACjB,eAAe,EAAO,OAAO,EAAE,IAAI,EAAE,GAAG,CAAC;KACzC,WAAW;eAEV,EAAE,WAAW,UACV,EAAG,4BAA4B,eAAe,IAC9C,EAAG,gCAAgC,oCAAoC;IACrE,CAAA,CACL;;EAEG;;AAEhB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* New expert procurement request
|
|
3
|
+
* @module subscriberbot/pages/procurement
|
|
4
|
+
*
|
|
5
|
+
* `/subscriberbot/procurement/new[?relationshipId=…]` — describe the contract
|
|
6
|
+
* (vendor, current price or quote, term, seats, decision deadline,
|
|
7
|
+
* priorities). Creates a DRAFT through `subCreateProcurementRequest`; the
|
|
8
|
+
* customer accepts the procurement authorisation and submits from the detail
|
|
9
|
+
* page.
|
|
10
|
+
*/
|
|
11
|
+
export declare function ProcurementNewPage(): import("react").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=ProcurementNewPage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProcurementNewPage.d.ts","sourceRoot":"","sources":["../../../../src/subscriberbot/pages/procurement/ProcurementNewPage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAqEH,wBAAgB,kBAAkB,gCA0YjC"}
|