@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,21 +1,22 @@
|
|
|
1
1
|
import { useSubscriberBot as e } from "../../context/SubscriberBotContext.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { useTr as t } from "../../hooks/useTr.js";
|
|
3
|
+
import { useFormatters as n } from "../../hooks/useFormatters.js";
|
|
4
|
+
import { cn as r } from "../../utils/cn.js";
|
|
5
|
+
import { PageLayout as i } from "../../components/PageLayout.js";
|
|
6
|
+
import { MetricsCard as a } from "../../components/MetricsCard.js";
|
|
6
7
|
import { EmptyState as o } from "../../components/EmptyState.js";
|
|
7
8
|
import { Modal as s } from "../../components/Modal.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { BarList as f, MiniProgress as p, Sparkline as m } from "../../components/viz.js";
|
|
9
|
+
import { ErrorView as c, LoadingView as l, Section as u } from "../../components/StateViews.js";
|
|
10
|
+
import { BarList as d, MiniProgress as f, Sparkline as p } from "../../components/viz.js";
|
|
11
11
|
import "../../components/index.js";
|
|
12
|
-
import { useEnterpriseSpendDashboard as
|
|
12
|
+
import { useEnterpriseSpendDashboard as m, useSetSpendBudget as h, useSpendBudgets as g } from "../../hooks/useSubscriberBotApi.js";
|
|
13
|
+
import { useFormError as _ } from "../../hooks/useFormError.js";
|
|
13
14
|
import { useMemo as v, useState as y } from "react";
|
|
14
15
|
import { AlertTriangle as b, Building2 as x, CalendarClock as S, Copy as C, EyeOff as w, Layers as T, PiggyBank as E, ShieldAlert as D, Target as O, Users as k, Wallet as A } from "lucide-react";
|
|
15
16
|
import { jsx as j, jsxs as M } from "react/jsx-runtime";
|
|
16
|
-
import { GlassCard as N, PagePurpose as
|
|
17
|
+
import { GlassCard as N, PagePurpose as ee } from "@burdenoff/fe-libs/ui";
|
|
17
18
|
//#region src/subscriberbot/pages/enterprise/EnterpriseSpendPage.tsx
|
|
18
|
-
var
|
|
19
|
+
var P = {
|
|
19
20
|
UNCATALOGUED: {
|
|
20
21
|
key: "enterprise.shadow.reasons.uncatalogued",
|
|
21
22
|
fallback: "Not in the catalogue"
|
|
@@ -28,7 +29,7 @@ var F = {
|
|
|
28
29
|
key: "enterprise.shadow.reasons.deprecated",
|
|
29
30
|
fallback: "Deprecated provider"
|
|
30
31
|
}
|
|
31
|
-
},
|
|
32
|
+
}, F = {
|
|
32
33
|
EXACT_DUPLICATE: {
|
|
33
34
|
key: "enterprise.duplicates.types.exact",
|
|
34
35
|
fallback: "Same vendor"
|
|
@@ -41,7 +42,7 @@ var F = {
|
|
|
41
42
|
key: "enterprise.duplicates.types.entitlement",
|
|
42
43
|
fallback: "Covered by another plan"
|
|
43
44
|
}
|
|
44
|
-
},
|
|
45
|
+
}, I = {
|
|
45
46
|
PAST_DUE: {
|
|
46
47
|
key: "enterprise.risks.kinds.pastDue",
|
|
47
48
|
fallback: "Payment failed"
|
|
@@ -58,31 +59,32 @@ var F = {
|
|
|
58
59
|
key: "enterprise.risks.kinds.highCostAi",
|
|
59
60
|
fallback: "High-cost AI service"
|
|
60
61
|
}
|
|
61
|
-
},
|
|
62
|
+
}, L = {
|
|
62
63
|
HIGH: "bg-status-error-bg-subtle text-status-error-text",
|
|
63
64
|
MEDIUM: "bg-status-warning-bg-subtle text-status-warning-text",
|
|
64
65
|
LOW: "bg-bg-sunken text-text-secondary"
|
|
65
|
-
},
|
|
66
|
-
function
|
|
66
|
+
}, R = "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)]", z = "mb-1.5 block text-xs font-medium text-text-secondary", B = "truncate text-start text-sm font-medium text-text-primary hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] rounded";
|
|
67
|
+
function V(e, t) {
|
|
67
68
|
return t ?? e("enterprise.departments.unassigned", "Unassigned");
|
|
68
69
|
}
|
|
69
|
-
var
|
|
70
|
+
var H = ({ status: e, fmt: t, tr: n }) => /* @__PURE__ */ M("div", {
|
|
70
71
|
className: "space-y-1.5",
|
|
71
|
-
children: [/* @__PURE__ */ j(
|
|
72
|
+
children: [/* @__PURE__ */ j(f, {
|
|
73
|
+
label: n("enterprise.budget.utilization", "Budget utilization"),
|
|
72
74
|
value: Math.min(e.utilizationPct, 100),
|
|
73
75
|
tone: e.overBudget ? "negative" : e.utilizationPct >= 85 ? "warning" : "positive"
|
|
74
76
|
}), /* @__PURE__ */ j("p", {
|
|
75
|
-
className:
|
|
76
|
-
children: e.overBudget ?
|
|
77
|
-
amount:
|
|
78
|
-
budget:
|
|
79
|
-
}) :
|
|
80
|
-
amount:
|
|
81
|
-
budget:
|
|
77
|
+
className: r("text-xs tabular-nums", e.overBudget ? "text-status-error-text" : "text-text-secondary"),
|
|
78
|
+
children: e.overBudget ? n("enterprise.budget.over", "{{amount}} over a {{budget}} budget", {
|
|
79
|
+
amount: t(-e.variance),
|
|
80
|
+
budget: t(e.monthlyBudget)
|
|
81
|
+
}) : n("enterprise.budget.under", "{{amount}} left of {{budget}} ({{pct}}% used)", {
|
|
82
|
+
amount: t(e.variance),
|
|
83
|
+
budget: t(e.monthlyBudget),
|
|
82
84
|
pct: e.utilizationPct
|
|
83
85
|
})
|
|
84
86
|
})]
|
|
85
|
-
}),
|
|
87
|
+
}), U = ({ title: e, icon: t, children: n, testId: r }) => /* @__PURE__ */ M(N, {
|
|
86
88
|
treatment: "plain",
|
|
87
89
|
className: "p-6",
|
|
88
90
|
"data-testid": r,
|
|
@@ -91,112 +93,116 @@ var U = ({ status: e, fmt: n, tr: r }) => /* @__PURE__ */ M("div", {
|
|
|
91
93
|
children: [/* @__PURE__ */ j("span", {
|
|
92
94
|
className: "text-text-secondary",
|
|
93
95
|
children: t
|
|
94
|
-
}), /* @__PURE__ */ j("
|
|
96
|
+
}), /* @__PURE__ */ j("h2", {
|
|
95
97
|
className: "text-sm font-semibold text-text-primary",
|
|
96
98
|
children: e
|
|
97
99
|
})]
|
|
98
100
|
}), n]
|
|
99
|
-
}),
|
|
100
|
-
let
|
|
101
|
-
|
|
101
|
+
}), W = ({ currency: e, departments: r, onClose: i }) => {
|
|
102
|
+
let { formatCurrency: a } = n(), o = t(), c = g(), u = h(), [d, f] = y(""), [p, m] = y(""), [v, b, x, S] = _(), C = (c.data ?? []).filter((t) => t.currency === e), w = (t, n) => {
|
|
103
|
+
b(null), u.mutate({
|
|
102
104
|
department: t,
|
|
103
105
|
currency: e,
|
|
104
106
|
monthlyAmount: n
|
|
105
107
|
}, {
|
|
106
108
|
onSuccess: () => {
|
|
107
|
-
|
|
109
|
+
m(""), f("");
|
|
108
110
|
},
|
|
109
|
-
onError: (e) =>
|
|
111
|
+
onError: (e) => b(e instanceof Error ? e.message : o("enterprise.budgets.error", "Could not save the budget."))
|
|
110
112
|
});
|
|
111
113
|
};
|
|
112
114
|
return /* @__PURE__ */ M(s, {
|
|
113
|
-
title:
|
|
114
|
-
description:
|
|
115
|
-
onClose:
|
|
115
|
+
title: o("enterprise.budgets.title", "Monthly budgets"),
|
|
116
|
+
description: o("enterprise.budgets.description", "Budgets apply to spend billed in {{currency}}. Leave the department empty for the company-wide budget.", { currency: e }),
|
|
117
|
+
onClose: i,
|
|
116
118
|
maxWidthClassName: "max-w-xl",
|
|
117
119
|
children: [/* @__PURE__ */ M("form", {
|
|
118
120
|
onSubmit: (e) => {
|
|
119
121
|
e.preventDefault();
|
|
120
|
-
let t = Number(
|
|
121
|
-
if (!
|
|
122
|
-
|
|
122
|
+
let t = Number(p);
|
|
123
|
+
if (!p.trim() || !Number.isFinite(t) || t <= 0) {
|
|
124
|
+
b(o("enterprise.budgets.amountRequired", "Enter a monthly amount above zero."), "budget-amount");
|
|
123
125
|
return;
|
|
124
126
|
}
|
|
125
|
-
|
|
127
|
+
w(d.trim() || null, t);
|
|
126
128
|
},
|
|
127
129
|
className: "space-y-4",
|
|
128
|
-
children: [
|
|
130
|
+
children: [v && /* @__PURE__ */ j("div", {
|
|
131
|
+
role: "alert",
|
|
132
|
+
id: S,
|
|
133
|
+
tabIndex: -1,
|
|
129
134
|
className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
|
|
130
|
-
children:
|
|
135
|
+
children: v
|
|
131
136
|
}), /* @__PURE__ */ M("div", {
|
|
132
137
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-[1fr_10rem_auto] sm:items-end",
|
|
133
138
|
children: [
|
|
134
139
|
/* @__PURE__ */ M("div", { children: [
|
|
135
140
|
/* @__PURE__ */ j("label", {
|
|
136
141
|
htmlFor: "budget-department",
|
|
137
|
-
className:
|
|
138
|
-
children:
|
|
142
|
+
className: z,
|
|
143
|
+
children: o("enterprise.budgets.department", "Department (optional)")
|
|
139
144
|
}),
|
|
140
145
|
/* @__PURE__ */ j("input", {
|
|
141
146
|
id: "budget-department",
|
|
142
147
|
list: "budget-department-options",
|
|
143
|
-
value:
|
|
148
|
+
value: d,
|
|
144
149
|
maxLength: 120,
|
|
145
|
-
onChange: (e) =>
|
|
146
|
-
placeholder:
|
|
147
|
-
className:
|
|
150
|
+
onChange: (e) => f(e.target.value),
|
|
151
|
+
placeholder: o("enterprise.budgets.companyWide", "Company-wide"),
|
|
152
|
+
className: R
|
|
148
153
|
}),
|
|
149
154
|
/* @__PURE__ */ j("datalist", {
|
|
150
155
|
id: "budget-department-options",
|
|
151
|
-
children:
|
|
156
|
+
children: r.map((e) => /* @__PURE__ */ j("option", { value: e }, e))
|
|
152
157
|
})
|
|
153
158
|
] }),
|
|
154
159
|
/* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j("label", {
|
|
155
160
|
htmlFor: "budget-amount",
|
|
156
|
-
className:
|
|
157
|
-
children:
|
|
161
|
+
className: z,
|
|
162
|
+
children: o("enterprise.budgets.amount", "Per month ({{currency}})", { currency: e })
|
|
158
163
|
}), /* @__PURE__ */ j("input", {
|
|
159
164
|
id: "budget-amount",
|
|
165
|
+
...x("budget-amount"),
|
|
160
166
|
type: "number",
|
|
161
167
|
min: "0",
|
|
162
168
|
step: "0.01",
|
|
163
169
|
inputMode: "decimal",
|
|
164
|
-
value:
|
|
165
|
-
onChange: (e) =>
|
|
166
|
-
className:
|
|
170
|
+
value: p,
|
|
171
|
+
onChange: (e) => m(e.target.value),
|
|
172
|
+
className: R
|
|
167
173
|
})] }),
|
|
168
174
|
/* @__PURE__ */ j("button", {
|
|
169
175
|
type: "submit",
|
|
170
|
-
disabled:
|
|
176
|
+
disabled: u.isPending,
|
|
171
177
|
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-60",
|
|
172
|
-
children:
|
|
178
|
+
children: o("enterprise.budgets.save", "Save budget")
|
|
173
179
|
})
|
|
174
180
|
]
|
|
175
181
|
})]
|
|
176
182
|
}), /* @__PURE__ */ j("div", {
|
|
177
183
|
className: "mt-6",
|
|
178
|
-
children:
|
|
184
|
+
children: c.isLoading ? /* @__PURE__ */ j(l, { label: o("enterprise.budgets.loading", "Loading budgets…") }) : C.length === 0 ? /* @__PURE__ */ j("p", {
|
|
179
185
|
className: "text-sm text-text-secondary",
|
|
180
|
-
children:
|
|
186
|
+
children: o("enterprise.budgets.none", "No budgets set for {{currency}} yet.", { currency: e })
|
|
181
187
|
}) : /* @__PURE__ */ j("ul", {
|
|
182
188
|
className: "divide-y divide-border-subtle rounded-lg border border-border-subtle",
|
|
183
|
-
children:
|
|
189
|
+
children: C.map((e) => /* @__PURE__ */ M("li", {
|
|
184
190
|
className: "flex items-center justify-between gap-3 px-4 py-3",
|
|
185
191
|
children: [/* @__PURE__ */ j("span", {
|
|
186
192
|
className: "truncate text-sm text-text-primary",
|
|
187
|
-
children: e.department ??
|
|
193
|
+
children: e.department ?? o("enterprise.budgets.companyWide", "Company-wide")
|
|
188
194
|
}), /* @__PURE__ */ M("span", {
|
|
189
195
|
className: "flex items-center gap-3",
|
|
190
196
|
children: [/* @__PURE__ */ j("span", {
|
|
191
197
|
className: "text-sm font-semibold tabular-nums text-text-primary",
|
|
192
|
-
children:
|
|
198
|
+
children: a(e.monthlyAmount, e.currency)
|
|
193
199
|
}), /* @__PURE__ */ j("button", {
|
|
194
200
|
type: "button",
|
|
195
|
-
onClick: () =>
|
|
196
|
-
disabled:
|
|
197
|
-
"aria-label":
|
|
201
|
+
onClick: () => w(e.department, null),
|
|
202
|
+
disabled: u.isPending,
|
|
203
|
+
"aria-label": o("enterprise.budgets.removeAria", "Remove the {{name}} budget", { name: e.department ?? o("enterprise.budgets.companyWide", "Company-wide") }),
|
|
198
204
|
className: "text-xs font-medium text-status-error-text hover:underline disabled:opacity-60",
|
|
199
|
-
children:
|
|
205
|
+
children: o("enterprise.budgets.remove", "Remove")
|
|
200
206
|
})]
|
|
201
207
|
})]
|
|
202
208
|
}, e.id))
|
|
@@ -204,26 +210,26 @@ var U = ({ status: e, fmt: n, tr: r }) => /* @__PURE__ */ M("div", {
|
|
|
204
210
|
})]
|
|
205
211
|
});
|
|
206
212
|
};
|
|
207
|
-
function
|
|
208
|
-
let s =
|
|
213
|
+
function G() {
|
|
214
|
+
let { formatCurrency: s, formatDate: h } = n(), g = t(), { navigateTo: _ } = e(), [R, z] = y(null), [G, K] = y(!1), q = m(R), J = q.data, Y = v(() => {
|
|
209
215
|
let e = J?.currency ?? "USD";
|
|
210
|
-
return (t) =>
|
|
211
|
-
}, [J?.currency]), X = (e) =>
|
|
212
|
-
if (q.isLoading) return /* @__PURE__ */ j(
|
|
213
|
-
if (q.isError || !J) return /* @__PURE__ */ j(
|
|
214
|
-
message:
|
|
216
|
+
return (t) => s(t, e);
|
|
217
|
+
}, [J?.currency, s]), X = (e) => _(`/relationships/${e}`);
|
|
218
|
+
if (q.isLoading) return /* @__PURE__ */ j(l, { label: g("enterprise.loading", "Aggregating company-wide spend…") });
|
|
219
|
+
if (q.isError || !J) return /* @__PURE__ */ j(c, {
|
|
220
|
+
message: g("enterprise.error", "Could not load the enterprise spend dashboard."),
|
|
215
221
|
onRetry: () => void q.refetch()
|
|
216
222
|
});
|
|
217
|
-
let Z = J.renewalPipeline[0], Q = J.monthlySpendChangePct, $ = [J.currency, ...J.otherCurrencies.map((e) => e.currency)],
|
|
218
|
-
return /* @__PURE__ */ M(
|
|
219
|
-
title:
|
|
220
|
-
description:
|
|
223
|
+
let Z = J.renewalPipeline[0], Q = J.monthlySpendChangePct, $ = [J.currency, ...J.otherCurrencies.map((e) => e.currency)], te = J.departments.map((e) => e.department).filter((e) => !!e), ne = J.activeRelationshipCount === 0 && J.shadowItCount === 0 && J.riskFlagCount === 0 && J.departments.length === 0;
|
|
224
|
+
return /* @__PURE__ */ M(i, {
|
|
225
|
+
title: g("enterprise.title", "SaaS spend management"),
|
|
226
|
+
description: g("enterprise.description", "Company-wide recurring spend by department, with duplicate tools, shadow IT, renewals and risks."),
|
|
221
227
|
actions: /* @__PURE__ */ M("div", {
|
|
222
228
|
className: "flex items-center gap-2",
|
|
223
229
|
children: [$.length > 1 && /* @__PURE__ */ M("label", {
|
|
224
230
|
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
225
|
-
children: [
|
|
226
|
-
"aria-label":
|
|
231
|
+
children: [g("enterprise.currency", "Currency"), /* @__PURE__ */ j("select", {
|
|
232
|
+
"aria-label": g("enterprise.currency", "Currency"),
|
|
227
233
|
value: J.currency,
|
|
228
234
|
onChange: (e) => z(e.target.value),
|
|
229
235
|
className: "rounded-lg border border-border-subtle bg-bg-surface px-2 py-1.5 text-xs text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
@@ -242,28 +248,28 @@ function K() {
|
|
|
242
248
|
"aria-hidden": !0
|
|
243
249
|
}),
|
|
244
250
|
" ",
|
|
245
|
-
|
|
251
|
+
g("enterprise.manageBudgets", "Budgets")
|
|
246
252
|
]
|
|
247
253
|
})]
|
|
248
254
|
}),
|
|
249
255
|
children: [
|
|
250
|
-
/* @__PURE__ */ j(
|
|
256
|
+
/* @__PURE__ */ j(ee, {
|
|
251
257
|
className: "mb-6",
|
|
252
|
-
children:
|
|
258
|
+
children: g("enterprise.purpose", "For finance, IT and procurement. Spend is the monthly run-rate of every subscription billing right now, computed live from your portfolio in one currency at a time. Allocate subscriptions to a department on the subscription itself.")
|
|
253
259
|
}),
|
|
254
260
|
J.truncated && /* @__PURE__ */ j("p", {
|
|
255
261
|
className: "mb-4 rounded-lg bg-status-warning-bg-subtle px-4 py-2 text-sm text-status-warning-text",
|
|
256
|
-
children:
|
|
262
|
+
children: g("enterprise.truncated", "This workspace has more subscriptions than one dashboard aggregates; figures cover the most recent ones.")
|
|
257
263
|
}),
|
|
258
|
-
|
|
264
|
+
ne ? /* @__PURE__ */ j(o, {
|
|
259
265
|
icon: /* @__PURE__ */ j(x, { className: "h-8 w-8" }),
|
|
260
|
-
title:
|
|
261
|
-
description:
|
|
266
|
+
title: g("enterprise.emptyTitle", "No company spend to analyse yet"),
|
|
267
|
+
description: g("enterprise.emptyDescription", "Add your SaaS subscriptions and allocate them to departments to see spend, duplicates, shadow IT and renewals here."),
|
|
262
268
|
action: /* @__PURE__ */ j("button", {
|
|
263
269
|
type: "button",
|
|
264
|
-
onClick: () =>
|
|
270
|
+
onClick: () => _("/relationships/new"),
|
|
265
271
|
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
|
|
266
|
-
children:
|
|
272
|
+
children: g("enterprise.emptyAction", "Add a subscription")
|
|
267
273
|
})
|
|
268
274
|
}) : /* @__PURE__ */ M("div", {
|
|
269
275
|
className: "space-y-6",
|
|
@@ -272,101 +278,101 @@ function K() {
|
|
|
272
278
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-4",
|
|
273
279
|
"data-testid": "enterprise-kpis",
|
|
274
280
|
children: [
|
|
275
|
-
/* @__PURE__ */ j(
|
|
281
|
+
/* @__PURE__ */ j(a, {
|
|
276
282
|
featured: !0,
|
|
277
283
|
icon: /* @__PURE__ */ j(A, { className: "h-5 w-5" }),
|
|
278
284
|
value: Y(J.annualSpend),
|
|
279
|
-
label:
|
|
285
|
+
label: g("enterprise.kpis.annualSpend", "Total SaaS spend / year ({{monthly}} / month)", { monthly: Y(J.monthlySpend) }),
|
|
280
286
|
trend: Q == null ? void 0 : Q > 0 ? "up" : Q < 0 ? "down" : "neutral",
|
|
281
287
|
trendValue: Q == null ? void 0 : `${Q > 0 ? "+" : ""}${Q}%`
|
|
282
288
|
}),
|
|
283
|
-
/* @__PURE__ */ j(
|
|
289
|
+
/* @__PURE__ */ j(a, {
|
|
284
290
|
icon: /* @__PURE__ */ j(T, { className: "h-5 w-5" }),
|
|
285
291
|
value: J.activeRelationshipCount,
|
|
286
|
-
label:
|
|
292
|
+
label: g("enterprise.kpis.activeLicenses", "Active licences")
|
|
287
293
|
}),
|
|
288
|
-
/* @__PURE__ */ j(
|
|
294
|
+
/* @__PURE__ */ j(a, {
|
|
289
295
|
icon: /* @__PURE__ */ j(k, { className: "h-5 w-5" }),
|
|
290
296
|
value: J.seatUtilizationPct == null ? "—" : `${J.seatUtilizationPct}%`,
|
|
291
|
-
label: J.seatUtilizationPct == null ?
|
|
297
|
+
label: J.seatUtilizationPct == null ? g("enterprise.kpis.seatsUntracked", "Seats utilised (no seat data yet)") : g("enterprise.kpis.seats", "Seats utilised ({{used}} of {{assigned}})", {
|
|
292
298
|
used: J.seatsUsed,
|
|
293
299
|
assigned: J.seatsAssigned
|
|
294
300
|
})
|
|
295
301
|
}),
|
|
296
|
-
/* @__PURE__ */ j(
|
|
302
|
+
/* @__PURE__ */ j(a, {
|
|
297
303
|
icon: /* @__PURE__ */ j(S, { className: "h-5 w-5" }),
|
|
298
304
|
value: Z ? Z.relationshipCount : 0,
|
|
299
|
-
label:
|
|
305
|
+
label: g("enterprise.kpis.renewals", "Renewals this quarter ({{amount}})", { amount: Y(Z?.amount ?? 0) })
|
|
300
306
|
})
|
|
301
307
|
]
|
|
302
308
|
}),
|
|
303
309
|
/* @__PURE__ */ M("div", {
|
|
304
310
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-3",
|
|
305
311
|
children: [
|
|
306
|
-
/* @__PURE__ */ M(
|
|
307
|
-
title:
|
|
312
|
+
/* @__PURE__ */ M(U, {
|
|
313
|
+
title: g("enterprise.trend.title", "Monthly run-rate, last 150 days"),
|
|
308
314
|
icon: /* @__PURE__ */ j(A, { className: "h-4 w-4" }),
|
|
309
|
-
children: [/* @__PURE__ */ j(
|
|
315
|
+
children: [/* @__PURE__ */ j(p, {
|
|
310
316
|
points: J.trend.map((e) => e.monthlySpend),
|
|
311
317
|
positive: (Q ?? 0) <= 0,
|
|
312
318
|
className: "w-full"
|
|
313
319
|
}), /* @__PURE__ */ j("p", {
|
|
314
320
|
className: "mt-2 text-xs text-text-secondary",
|
|
315
|
-
children:
|
|
321
|
+
children: g("enterprise.trend.vs", "{{now}} now vs {{before}} 30 days ago", {
|
|
316
322
|
now: Y(J.monthlySpend),
|
|
317
323
|
before: Y(J.previousMonthlySpend)
|
|
318
324
|
})
|
|
319
325
|
})]
|
|
320
326
|
}),
|
|
321
|
-
/* @__PURE__ */ j(
|
|
322
|
-
title:
|
|
327
|
+
/* @__PURE__ */ j(U, {
|
|
328
|
+
title: g("enterprise.budget.title", "Company budget"),
|
|
323
329
|
icon: /* @__PURE__ */ j(O, { className: "h-4 w-4" }),
|
|
324
330
|
testId: "enterprise-budget",
|
|
325
|
-
children: J.budget ? /* @__PURE__ */ j(
|
|
331
|
+
children: J.budget ? /* @__PURE__ */ j(H, {
|
|
326
332
|
status: J.budget,
|
|
327
333
|
fmt: Y,
|
|
328
|
-
tr:
|
|
334
|
+
tr: g
|
|
329
335
|
}) : /* @__PURE__ */ M("div", {
|
|
330
336
|
className: "space-y-3",
|
|
331
337
|
children: [/* @__PURE__ */ j("p", {
|
|
332
338
|
className: "text-sm text-text-secondary",
|
|
333
|
-
children:
|
|
339
|
+
children: g("enterprise.budget.none", "No company-wide budget set for {{currency}}.", { currency: J.currency })
|
|
334
340
|
}), /* @__PURE__ */ j("button", {
|
|
335
341
|
type: "button",
|
|
336
342
|
onClick: () => K(!0),
|
|
337
343
|
className: "text-sm font-medium text-text-primary underline",
|
|
338
|
-
children:
|
|
344
|
+
children: g("enterprise.budget.set", "Set a budget")
|
|
339
345
|
})]
|
|
340
346
|
})
|
|
341
347
|
}),
|
|
342
|
-
/* @__PURE__ */ M(
|
|
343
|
-
title:
|
|
348
|
+
/* @__PURE__ */ M(U, {
|
|
349
|
+
title: g("enterprise.savings.title", "Consolidation opportunity"),
|
|
344
350
|
icon: /* @__PURE__ */ j(E, { className: "h-4 w-4" }),
|
|
345
351
|
children: [/* @__PURE__ */ M("p", {
|
|
346
352
|
className: "text-2xl font-bold tabular-nums text-text-primary",
|
|
347
353
|
children: [Y(J.duplicatePotentialMonthlySavings), /* @__PURE__ */ j("span", {
|
|
348
354
|
className: "text-sm font-normal text-text-secondary",
|
|
349
|
-
children:
|
|
355
|
+
children: g("enterprise.perMonth", "/mo")
|
|
350
356
|
})]
|
|
351
357
|
}), /* @__PURE__ */ j("p", {
|
|
352
358
|
className: "mt-1 text-xs text-text-secondary",
|
|
353
|
-
children:
|
|
359
|
+
children: g("enterprise.savings.detail", "Upper bound if each duplicated tool is consolidated into one subscription; shadow IT costs {{shadow}} / month.", { shadow: Y(J.shadowItMonthlySpend) })
|
|
354
360
|
})]
|
|
355
361
|
})
|
|
356
362
|
]
|
|
357
363
|
}),
|
|
358
|
-
/* @__PURE__ */ j(
|
|
359
|
-
title:
|
|
360
|
-
description:
|
|
364
|
+
/* @__PURE__ */ j(u, {
|
|
365
|
+
title: g("enterprise.departments.title", "Spend by department"),
|
|
366
|
+
description: g("enterprise.departments.description", "Monthly run-rate per department, with each department budget."),
|
|
361
367
|
children: /* @__PURE__ */ j(N, {
|
|
362
368
|
treatment: "plain",
|
|
363
369
|
className: "p-6",
|
|
364
370
|
"data-testid": "enterprise-departments",
|
|
365
371
|
children: J.departments.length ? /* @__PURE__ */ M("div", {
|
|
366
372
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-2",
|
|
367
|
-
children: [/* @__PURE__ */ j(
|
|
373
|
+
children: [/* @__PURE__ */ j(d, {
|
|
368
374
|
data: J.departments.map((e) => ({
|
|
369
|
-
label:
|
|
375
|
+
label: V(g, e.department),
|
|
370
376
|
value: e.monthlySpend
|
|
371
377
|
})),
|
|
372
378
|
valueFormat: Y
|
|
@@ -378,34 +384,34 @@ function K() {
|
|
|
378
384
|
className: "flex items-center justify-between gap-3 text-sm",
|
|
379
385
|
children: [/* @__PURE__ */ j("span", {
|
|
380
386
|
className: "truncate font-medium text-text-primary",
|
|
381
|
-
children:
|
|
387
|
+
children: V(g, e.department)
|
|
382
388
|
}), /* @__PURE__ */ j("span", {
|
|
383
389
|
className: "shrink-0 tabular-nums text-text-secondary",
|
|
384
|
-
children:
|
|
390
|
+
children: g("enterprise.departments.row", "{{count}} subs · {{share}}%", {
|
|
385
391
|
count: e.relationshipCount,
|
|
386
392
|
share: e.sharePct
|
|
387
393
|
})
|
|
388
394
|
})]
|
|
389
395
|
}), e.budget && /* @__PURE__ */ j("div", {
|
|
390
396
|
className: "mt-2",
|
|
391
|
-
children: /* @__PURE__ */ j(
|
|
397
|
+
children: /* @__PURE__ */ j(H, {
|
|
392
398
|
status: e.budget,
|
|
393
399
|
fmt: Y,
|
|
394
|
-
tr:
|
|
400
|
+
tr: g
|
|
395
401
|
})
|
|
396
402
|
})]
|
|
397
403
|
}, e.department ?? "__unassigned"))
|
|
398
404
|
})]
|
|
399
405
|
}) : /* @__PURE__ */ j("p", {
|
|
400
406
|
className: "text-sm text-text-secondary",
|
|
401
|
-
children:
|
|
407
|
+
children: g("enterprise.departments.none", "No spend is billing right now.")
|
|
402
408
|
})
|
|
403
409
|
})
|
|
404
410
|
}),
|
|
405
411
|
/* @__PURE__ */ M("div", {
|
|
406
412
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
407
|
-
children: [/* @__PURE__ */ j(
|
|
408
|
-
title:
|
|
413
|
+
children: [/* @__PURE__ */ j(U, {
|
|
414
|
+
title: g("enterprise.duplicates.title", "Duplicate tools ({{count}})", { count: J.duplicateTools.length }),
|
|
409
415
|
icon: /* @__PURE__ */ j(C, { className: "h-4 w-4" }),
|
|
410
416
|
testId: "enterprise-duplicates",
|
|
411
417
|
children: J.duplicateTools.length ? /* @__PURE__ */ j("ul", {
|
|
@@ -419,22 +425,22 @@ function K() {
|
|
|
419
425
|
className: "min-w-0",
|
|
420
426
|
children: [e.providerId ? /* @__PURE__ */ j("button", {
|
|
421
427
|
type: "button",
|
|
422
|
-
className:
|
|
423
|
-
onClick: () =>
|
|
428
|
+
className: B,
|
|
429
|
+
onClick: () => _(`/providers/${e.providerId}`),
|
|
424
430
|
children: e.name
|
|
425
431
|
}) : /* @__PURE__ */ j("p", {
|
|
426
432
|
className: "truncate text-sm font-medium text-text-primary",
|
|
427
433
|
children: e.name
|
|
428
434
|
}), /* @__PURE__ */ j("p", {
|
|
429
435
|
className: "text-xs text-text-secondary",
|
|
430
|
-
children:
|
|
436
|
+
children: g("enterprise.duplicates.summary", "{{count}} subscriptions · {{teams}}", {
|
|
431
437
|
count: e.relationshipCount,
|
|
432
|
-
teams: e.departments.length ? e.departments.join(", ") :
|
|
438
|
+
teams: e.departments.length ? e.departments.join(", ") : g("enterprise.departments.unassigned", "Unassigned")
|
|
433
439
|
})
|
|
434
440
|
})]
|
|
435
441
|
}), /* @__PURE__ */ j("span", {
|
|
436
|
-
className: "shrink-0 text-
|
|
437
|
-
children:
|
|
442
|
+
className: "shrink-0 text-end text-xs text-status-warning-text",
|
|
443
|
+
children: g("enterprise.duplicates.save", "Save up to {{amount}}/mo", { amount: Y(e.potentialMonthlySavings) })
|
|
438
444
|
})]
|
|
439
445
|
}),
|
|
440
446
|
/* @__PURE__ */ j("ul", {
|
|
@@ -442,9 +448,9 @@ function K() {
|
|
|
442
448
|
children: e.relationships.map((e) => /* @__PURE__ */ j("li", { children: /* @__PURE__ */ M("button", {
|
|
443
449
|
type: "button",
|
|
444
450
|
onClick: () => X(e.relationshipId),
|
|
445
|
-
className:
|
|
451
|
+
className: r("rounded-md px-2 py-1 text-xs hover:bg-bg-sunken", e.keep ? "border border-status-success-text/40 bg-status-success-bg-subtle text-status-success-text" : "bg-bg-surface text-text-primary"),
|
|
446
452
|
children: [
|
|
447
|
-
e.keep ? `${
|
|
453
|
+
e.keep ? `${g("enterprise.duplicates.keep", "Keep")}: ` : "",
|
|
448
454
|
e.label,
|
|
449
455
|
" · ",
|
|
450
456
|
Y(e.monthlySpend)
|
|
@@ -454,7 +460,7 @@ function K() {
|
|
|
454
460
|
/* @__PURE__ */ M("p", {
|
|
455
461
|
className: "mt-2 text-xs text-text-secondary",
|
|
456
462
|
children: [
|
|
457
|
-
|
|
463
|
+
g(F[e.type].key, F[e.type].fallback),
|
|
458
464
|
" ·",
|
|
459
465
|
" ",
|
|
460
466
|
e.rationale
|
|
@@ -464,10 +470,10 @@ function K() {
|
|
|
464
470
|
}, e.key))
|
|
465
471
|
}) : /* @__PURE__ */ j("p", {
|
|
466
472
|
className: "text-sm text-text-secondary",
|
|
467
|
-
children:
|
|
473
|
+
children: g("enterprise.duplicates.none", "No duplicate or overlapping tools found.")
|
|
468
474
|
})
|
|
469
|
-
}), /* @__PURE__ */ j(
|
|
470
|
-
title:
|
|
475
|
+
}), /* @__PURE__ */ j(U, {
|
|
476
|
+
title: g("enterprise.shadow.title", "Shadow IT ({{count}})", { count: J.shadowItCount }),
|
|
471
477
|
icon: /* @__PURE__ */ j(w, { className: "h-4 w-4" }),
|
|
472
478
|
testId: "enterprise-shadow-it",
|
|
473
479
|
children: J.shadowIt.length ? /* @__PURE__ */ j("ul", {
|
|
@@ -478,17 +484,17 @@ function K() {
|
|
|
478
484
|
className: "min-w-0",
|
|
479
485
|
children: [/* @__PURE__ */ j("button", {
|
|
480
486
|
type: "button",
|
|
481
|
-
className:
|
|
487
|
+
className: B,
|
|
482
488
|
onClick: () => X(e.relationshipId),
|
|
483
489
|
children: e.label
|
|
484
490
|
}), /* @__PURE__ */ M("p", {
|
|
485
491
|
className: "text-xs text-text-secondary",
|
|
486
492
|
children: [
|
|
487
|
-
|
|
493
|
+
g(P[e.reason].key, P[e.reason].fallback),
|
|
488
494
|
" · ",
|
|
489
|
-
|
|
495
|
+
V(g, e.department),
|
|
490
496
|
" · ",
|
|
491
|
-
|
|
497
|
+
g("enterprise.shadow.found", "found {{date}}", { date: h(e.detectedAt) })
|
|
492
498
|
]
|
|
493
499
|
})]
|
|
494
500
|
}), /* @__PURE__ */ j("span", {
|
|
@@ -498,13 +504,13 @@ function K() {
|
|
|
498
504
|
}, e.relationshipId))
|
|
499
505
|
}) : /* @__PURE__ */ j("p", {
|
|
500
506
|
className: "text-sm text-text-secondary",
|
|
501
|
-
children:
|
|
507
|
+
children: g("enterprise.shadow.none", "Every discovered tool is linked to an approved provider.")
|
|
502
508
|
})
|
|
503
509
|
})]
|
|
504
510
|
}),
|
|
505
|
-
/* @__PURE__ */ j(
|
|
506
|
-
title:
|
|
507
|
-
description:
|
|
511
|
+
/* @__PURE__ */ j(u, {
|
|
512
|
+
title: g("enterprise.renewals.title", "Renewal pipeline"),
|
|
513
|
+
description: g("enterprise.renewals.description", "Renewal charges due by quarter, for planning renegotiations."),
|
|
508
514
|
children: /* @__PURE__ */ j("div", {
|
|
509
515
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-4",
|
|
510
516
|
"data-testid": "enterprise-renewals",
|
|
@@ -522,7 +528,7 @@ function K() {
|
|
|
522
528
|
}),
|
|
523
529
|
/* @__PURE__ */ j("p", {
|
|
524
530
|
className: "text-xs text-text-secondary",
|
|
525
|
-
children:
|
|
531
|
+
children: g("enterprise.renewals.counts", "{{renewals}} renewals · {{subs}} subscriptions", {
|
|
526
532
|
renewals: e.renewalCount,
|
|
527
533
|
subs: e.relationshipCount
|
|
528
534
|
})
|
|
@@ -533,13 +539,13 @@ function K() {
|
|
|
533
539
|
className: "flex items-center justify-between gap-2",
|
|
534
540
|
children: [/* @__PURE__ */ j("button", {
|
|
535
541
|
type: "button",
|
|
536
|
-
className:
|
|
542
|
+
className: r(B, "text-xs"),
|
|
537
543
|
onClick: () => X(e.relationshipId),
|
|
538
544
|
children: e.label
|
|
539
545
|
}), /* @__PURE__ */ M("span", {
|
|
540
546
|
className: "shrink-0 text-xs tabular-nums text-text-secondary",
|
|
541
547
|
children: [
|
|
542
|
-
|
|
548
|
+
h(e.renewsAt),
|
|
543
549
|
" · ",
|
|
544
550
|
Y(e.amount)
|
|
545
551
|
]
|
|
@@ -550,8 +556,8 @@ function K() {
|
|
|
550
556
|
}, e.label))
|
|
551
557
|
})
|
|
552
558
|
}),
|
|
553
|
-
/* @__PURE__ */ j(
|
|
554
|
-
title:
|
|
559
|
+
/* @__PURE__ */ j(u, {
|
|
560
|
+
title: g("enterprise.risks.title", "Compliance and risk flags ({{count}})", { count: J.riskFlagCount }),
|
|
555
561
|
children: /* @__PURE__ */ j(N, {
|
|
556
562
|
treatment: "plain",
|
|
557
563
|
className: "p-2",
|
|
@@ -563,13 +569,13 @@ function K() {
|
|
|
563
569
|
children: [/* @__PURE__ */ M("div", {
|
|
564
570
|
className: "flex min-w-0 items-start gap-3",
|
|
565
571
|
children: [/* @__PURE__ */ j("span", {
|
|
566
|
-
className:
|
|
567
|
-
children:
|
|
572
|
+
className: r("shrink-0 rounded-md px-2 py-0.5 text-xs font-medium", L[e.severity]),
|
|
573
|
+
children: g(I[e.kind].key, I[e.kind].fallback)
|
|
568
574
|
}), /* @__PURE__ */ M("div", {
|
|
569
575
|
className: "min-w-0",
|
|
570
576
|
children: [/* @__PURE__ */ j("button", {
|
|
571
577
|
type: "button",
|
|
572
|
-
className:
|
|
578
|
+
className: B,
|
|
573
579
|
onClick: () => X(e.relationshipId),
|
|
574
580
|
children: e.label
|
|
575
581
|
}), /* @__PURE__ */ j("p", {
|
|
@@ -580,10 +586,10 @@ function K() {
|
|
|
580
586
|
}), /* @__PURE__ */ M("span", {
|
|
581
587
|
className: "shrink-0 text-xs text-text-secondary",
|
|
582
588
|
children: [
|
|
583
|
-
|
|
589
|
+
V(g, e.department),
|
|
584
590
|
" · ",
|
|
585
591
|
Y(e.monthlySpend),
|
|
586
|
-
|
|
592
|
+
g("enterprise.perMonth", "/mo")
|
|
587
593
|
]
|
|
588
594
|
})]
|
|
589
595
|
}, `${e.kind}-${e.relationshipId}`))
|
|
@@ -592,44 +598,47 @@ function K() {
|
|
|
592
598
|
children: [/* @__PURE__ */ j(D, {
|
|
593
599
|
className: "h-4 w-4",
|
|
594
600
|
"aria-hidden": !0
|
|
595
|
-
}),
|
|
601
|
+
}), g("enterprise.risks.none", "No compliance or risk issues found.")]
|
|
596
602
|
})
|
|
597
603
|
})
|
|
598
604
|
}),
|
|
599
|
-
/* @__PURE__ */ j(
|
|
600
|
-
title:
|
|
605
|
+
/* @__PURE__ */ j(u, {
|
|
606
|
+
title: g("enterprise.licenses.title", "Licences"),
|
|
601
607
|
children: /* @__PURE__ */ M(N, {
|
|
602
608
|
treatment: "plain",
|
|
603
|
-
|
|
609
|
+
role: "region",
|
|
610
|
+
"aria-label": g("enterprise.licenses.title", "Licences"),
|
|
611
|
+
tabIndex: 0,
|
|
612
|
+
className: "overflow-x-auto focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--color-focus-ring)]",
|
|
604
613
|
"data-testid": "enterprise-licenses",
|
|
605
614
|
children: [/* @__PURE__ */ M("table", {
|
|
606
615
|
className: "w-full min-w-[640px] text-sm",
|
|
607
616
|
children: [/* @__PURE__ */ j("thead", { children: /* @__PURE__ */ M("tr", {
|
|
608
|
-
className: "border-b border-border-subtle text-
|
|
617
|
+
className: "border-b border-border-subtle text-start text-xs text-text-secondary",
|
|
609
618
|
children: [
|
|
610
619
|
/* @__PURE__ */ j("th", {
|
|
611
620
|
className: "px-4 py-3 font-medium",
|
|
612
|
-
children:
|
|
621
|
+
children: g("enterprise.licenses.app", "App")
|
|
613
622
|
}),
|
|
614
623
|
/* @__PURE__ */ j("th", {
|
|
615
624
|
className: "px-4 py-3 font-medium",
|
|
616
|
-
children:
|
|
625
|
+
children: g("enterprise.licenses.department", "Department")
|
|
617
626
|
}),
|
|
618
627
|
/* @__PURE__ */ j("th", {
|
|
619
628
|
className: "px-4 py-3 font-medium",
|
|
620
|
-
children:
|
|
629
|
+
children: g("enterprise.licenses.seats", "Seats used / assigned")
|
|
621
630
|
}),
|
|
622
631
|
/* @__PURE__ */ j("th", {
|
|
623
632
|
className: "px-4 py-3 font-medium",
|
|
624
|
-
children:
|
|
633
|
+
children: g("enterprise.licenses.utilization", "Utilisation")
|
|
625
634
|
}),
|
|
626
635
|
/* @__PURE__ */ j("th", {
|
|
627
|
-
className: "px-4 py-3 text-
|
|
628
|
-
children:
|
|
636
|
+
className: "px-4 py-3 text-end font-medium",
|
|
637
|
+
children: g("enterprise.licenses.annualCost", "Annual cost")
|
|
629
638
|
}),
|
|
630
639
|
/* @__PURE__ */ j("th", {
|
|
631
640
|
className: "px-4 py-3 font-medium",
|
|
632
|
-
children:
|
|
641
|
+
children: g("enterprise.licenses.renews", "Renews")
|
|
633
642
|
})
|
|
634
643
|
]
|
|
635
644
|
}) }), /* @__PURE__ */ j("tbody", {
|
|
@@ -639,7 +648,7 @@ function K() {
|
|
|
639
648
|
className: "max-w-[16rem] px-4 py-3",
|
|
640
649
|
children: [/* @__PURE__ */ j("button", {
|
|
641
650
|
type: "button",
|
|
642
|
-
className:
|
|
651
|
+
className: B,
|
|
643
652
|
onClick: () => X(e.relationshipId),
|
|
644
653
|
children: e.label
|
|
645
654
|
}), e.providerName && /* @__PURE__ */ j("p", {
|
|
@@ -649,7 +658,7 @@ function K() {
|
|
|
649
658
|
}),
|
|
650
659
|
/* @__PURE__ */ j("td", {
|
|
651
660
|
className: "px-4 py-3 text-text-secondary",
|
|
652
|
-
children:
|
|
661
|
+
children: V(g, e.department)
|
|
653
662
|
}),
|
|
654
663
|
/* @__PURE__ */ j("td", {
|
|
655
664
|
className: "px-4 py-3 tabular-nums text-text-primary",
|
|
@@ -660,24 +669,25 @@ function K() {
|
|
|
660
669
|
children: e.utilizationPct == null ? /* @__PURE__ */ j("span", {
|
|
661
670
|
className: "text-text-secondary",
|
|
662
671
|
children: "—"
|
|
663
|
-
}) : /* @__PURE__ */ j(
|
|
672
|
+
}) : /* @__PURE__ */ j(f, {
|
|
673
|
+
label: g("enterprise.seats.utilization", "Seat utilization"),
|
|
664
674
|
value: e.utilizationPct,
|
|
665
675
|
tone: e.utilizationPct >= 70 ? "positive" : "warning"
|
|
666
676
|
})
|
|
667
677
|
}),
|
|
668
678
|
/* @__PURE__ */ j("td", {
|
|
669
|
-
className: "px-4 py-3 text-
|
|
679
|
+
className: "px-4 py-3 text-end font-semibold tabular-nums text-text-primary",
|
|
670
680
|
children: Y(e.annualCost)
|
|
671
681
|
}),
|
|
672
682
|
/* @__PURE__ */ j("td", {
|
|
673
683
|
className: "px-4 py-3 text-text-secondary",
|
|
674
|
-
children: e.renewsAt ?
|
|
684
|
+
children: e.renewsAt ? h(e.renewsAt) : "—"
|
|
675
685
|
})
|
|
676
686
|
] }, e.relationshipId))
|
|
677
687
|
})]
|
|
678
688
|
}), J.licenses.length === 0 && /* @__PURE__ */ j("p", {
|
|
679
689
|
className: "p-4 text-sm text-text-secondary",
|
|
680
|
-
children:
|
|
690
|
+
children: g("enterprise.licenses.none", "No subscription is billing right now.")
|
|
681
691
|
})]
|
|
682
692
|
})
|
|
683
693
|
}),
|
|
@@ -686,19 +696,19 @@ function K() {
|
|
|
686
696
|
children: [/* @__PURE__ */ j(b, {
|
|
687
697
|
className: "mt-0.5 h-3.5 w-3.5 shrink-0",
|
|
688
698
|
"aria-hidden": !0
|
|
689
|
-
}),
|
|
699
|
+
}), g("enterprise.otherCurrencies", "Not included above (amounts are never converted): {{list}}. Switch currency to see them.", { list: J.otherCurrencies.map((e) => `${s(e.monthlySpend, e.currency)}/mo`).join(", ") })]
|
|
690
700
|
})
|
|
691
701
|
]
|
|
692
702
|
}),
|
|
693
|
-
|
|
703
|
+
G && /* @__PURE__ */ j(W, {
|
|
694
704
|
currency: J.currency,
|
|
695
|
-
departments:
|
|
705
|
+
departments: te,
|
|
696
706
|
onClose: () => K(!1)
|
|
697
707
|
})
|
|
698
708
|
]
|
|
699
709
|
});
|
|
700
710
|
}
|
|
701
711
|
//#endregion
|
|
702
|
-
export {
|
|
712
|
+
export { G as EnterpriseSpendPage };
|
|
703
713
|
|
|
704
714
|
//# sourceMappingURL=EnterpriseSpendPage.js.map
|