@burdenoff/microfe-subscriberbot 2026.1107.7 → 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.d.ts +4 -3
- package/dist/subscriberbot/utils/portfolio.d.ts.map +1 -1
- package/dist/subscriberbot/utils/portfolio.js +10 -11
- 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,25 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import { Gauge as
|
|
1
|
+
import { useFormatters as e } from "../../hooks/useFormatters.js";
|
|
2
|
+
import { useFormError as t } from "../../hooks/useFormError.js";
|
|
3
|
+
import { PageLayout as n } from "../../components/PageLayout.js";
|
|
4
|
+
import { StatusBadge as r } from "../../components/StatusBadge.js";
|
|
5
|
+
import { EmptyState as i } from "../../components/EmptyState.js";
|
|
6
|
+
import { Modal as a } from "../../components/Modal.js";
|
|
7
|
+
import { ErrorView as o, LoadingView as s, Section as c } from "../../components/StateViews.js";
|
|
8
|
+
import "../../components/decisions/index.js";
|
|
9
|
+
import { Gauge as l, MiniProgress as u, Timeline as d } from "../../components/viz.js";
|
|
10
10
|
import "../../components/index.js";
|
|
11
|
+
import { useSubscriberBot as f } from "../../context/SubscriberBotContext.js";
|
|
11
12
|
import { useCancelRelationship as p, useCreateAsset as m, useCreateEntitlement as h, useDecisions as g, useFileDownloadUrl as _, useInvoices as v, usePlans as y, useProviders as b, useRelationship as x, useTransitionRelationship as S, useUpdateRelationship as C, useUploadFile as w } from "../../hooks/useSubscriberBotApi.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import "../../components/decisions/index.js";
|
|
13
|
+
import { useTr as T } from "../../hooks/useTr.js";
|
|
14
|
+
import { DecisionCard as E } from "../../components/decisions/DecisionCard.js";
|
|
15
|
+
import { AiDisclaimer as D } from "../../components/decisions/DecisionBanners.js";
|
|
16
|
+
import { canTransition as O } from "../../utils/portfolio.js";
|
|
17
17
|
import { useState as k } from "react";
|
|
18
18
|
import { Activity as A, ArrowLeft as j, Ban as M, Briefcase as N, CalendarClock as P, CreditCard as F, Download as I, Handshake as L, Paperclip as R, Pause as z, Pencil as ee, Play as B, Plus as V, ShieldCheck as te, Tag as ne, Wallet as re } from "lucide-react";
|
|
19
19
|
import { useParams as ie } from "react-router";
|
|
20
20
|
import { Fragment as ae, jsx as H, jsxs as U } from "react/jsx-runtime";
|
|
21
21
|
import { GlassCard as W } from "@burdenoff/fe-libs/ui";
|
|
22
|
-
|
|
22
|
+
// src/subscriberbot/pages/relationships/RelationshipDetailPage.tsx
|
|
23
23
|
var G = "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)]", K = "mb-1 block text-xs font-medium text-text-secondary", q = [
|
|
24
24
|
"MONTHLY",
|
|
25
25
|
"YEARLY",
|
|
@@ -95,14 +95,14 @@ function Z(e) {
|
|
|
95
95
|
return Number.isNaN(t.getTime()) ? "" : t.toISOString().slice(0, 10);
|
|
96
96
|
}
|
|
97
97
|
function le({ relationship: e, onClose: n }) {
|
|
98
|
-
let r =
|
|
98
|
+
let r = T(), i = C(), o = b({ pagination: {
|
|
99
99
|
limit: 100,
|
|
100
100
|
offset: 0
|
|
101
|
-
} }), [s, c] = k(e.label), [l, u] = k(e.providerId ?? ""), [d, f] = k(e.planId ?? ""), [p, m] = k(String(e.amount ?? "")), [h, g] = k(e.currency), [_, v] = k(e.interval), [x, S] = k(Z(e.renewsAt)), [w,
|
|
102
|
-
let t =
|
|
101
|
+
} }), [s, c] = k(e.label), [l, u] = k(e.providerId ?? ""), [d, f] = k(e.planId ?? ""), [p, m] = k(String(e.amount ?? "")), [h, g] = k(e.currency), [_, v] = k(e.interval), [x, S] = k(Z(e.renewsAt)), [w, E] = k(e.autoRenew), [D, O] = k(e.notes ?? ""), [A, j] = k(e.department ?? ""), [M, N, P, F] = t(), I = y(l || void 0), L = (() => {
|
|
102
|
+
let t = o.data?.items ?? [];
|
|
103
103
|
return e.provider && !t.some((t) => t.id === e.provider?.id) ? [e.provider, ...t] : t;
|
|
104
104
|
})(), R = I.data ?? [];
|
|
105
|
-
return /* @__PURE__ */ H(
|
|
105
|
+
return /* @__PURE__ */ H(a, {
|
|
106
106
|
title: r("relationships.detail.editModal.title", "Edit relationship"),
|
|
107
107
|
onClose: n,
|
|
108
108
|
maxWidthClassName: "max-w-2xl",
|
|
@@ -283,7 +283,7 @@ function le({ relationship: e, onClose: n }) {
|
|
|
283
283
|
children: [/* @__PURE__ */ H("input", {
|
|
284
284
|
type: "checkbox",
|
|
285
285
|
checked: w,
|
|
286
|
-
onChange: (e) =>
|
|
286
|
+
onChange: (e) => E(e.target.checked),
|
|
287
287
|
className: "size-4 rounded border-border-subtle"
|
|
288
288
|
}), r("relationships.detail.editModal.autoRenews", "Auto-renews")]
|
|
289
289
|
})
|
|
@@ -320,19 +320,15 @@ function le({ relationship: e, onClose: n }) {
|
|
|
320
320
|
});
|
|
321
321
|
}
|
|
322
322
|
function ue({ relationshipId: e, onClose: n }) {
|
|
323
|
-
let r =
|
|
324
|
-
return /* @__PURE__ */ H(
|
|
323
|
+
let r = T(), i = h(), [o, s] = k(""), [c, l] = k("FEATURE_ACCESS"), [u, d] = k(""), [f, p] = k(""), [m, g] = k(""), [_, v, y, b] = t();
|
|
324
|
+
return /* @__PURE__ */ H(a, {
|
|
325
325
|
title: r("relationships.detail.addEntitlementModal.title", "Add entitlement"),
|
|
326
326
|
onClose: n,
|
|
327
327
|
children: /* @__PURE__ */ U("form", {
|
|
328
328
|
onSubmit: (t) => {
|
|
329
|
-
|
|
330
|
-
v(r("relationships.detail.addEntitlementModal.nameRequired", "An entitlement name is required."), "ent-name");
|
|
331
|
-
return;
|
|
332
|
-
}
|
|
333
|
-
i.mutate({
|
|
329
|
+
t.preventDefault(), v(null), o.trim() ? i.mutate({
|
|
334
330
|
relationshipId: e,
|
|
335
|
-
name:
|
|
331
|
+
name: o.trim(),
|
|
336
332
|
type: c,
|
|
337
333
|
...u.trim() ? { quota: Number(u) } : {},
|
|
338
334
|
...f.trim() ? { unit: f.trim() } : {},
|
|
@@ -340,7 +336,7 @@ function ue({ relationshipId: e, onClose: n }) {
|
|
|
340
336
|
}, {
|
|
341
337
|
onSuccess: () => n(),
|
|
342
338
|
onError: (e) => v(e instanceof Error ? e.message : r("relationships.detail.addEntitlementModal.error", "Could not add entitlement."))
|
|
343
|
-
});
|
|
339
|
+
}) : v(r("relationships.detail.addEntitlementModal.nameRequired", "An entitlement name is required."), "ent-name");
|
|
344
340
|
},
|
|
345
341
|
className: "space-y-4",
|
|
346
342
|
children: [
|
|
@@ -366,7 +362,7 @@ function ue({ relationshipId: e, onClose: n }) {
|
|
|
366
362
|
...y("ent-name"),
|
|
367
363
|
id: "ent-name",
|
|
368
364
|
type: "text",
|
|
369
|
-
value:
|
|
365
|
+
value: o,
|
|
370
366
|
onChange: (e) => s(e.target.value),
|
|
371
367
|
placeholder: r("relationships.detail.addEntitlementModal.namePlaceholder", "e.g. Seats, API calls, Priority support"),
|
|
372
368
|
className: G,
|
|
@@ -450,18 +446,15 @@ function ue({ relationshipId: e, onClose: n }) {
|
|
|
450
446
|
});
|
|
451
447
|
}
|
|
452
448
|
function de({ relationshipId: e, onClose: n }) {
|
|
453
|
-
let r =
|
|
454
|
-
return /* @__PURE__ */ H(
|
|
449
|
+
let r = T(), i = m(), { uploadFile: o, progress: s, isUploading: c } = w(), [l, u] = k(""), [d, f] = k("RECEIPT"), [p, h] = k(null), [g, _] = k(""), [v, y, b, x] = t(), S = c || i.isPending;
|
|
450
|
+
return /* @__PURE__ */ H(a, {
|
|
455
451
|
title: r("relationships.detail.attachAssetModal.title", "Attach asset"),
|
|
456
452
|
onClose: n,
|
|
457
453
|
children: /* @__PURE__ */ U("form", {
|
|
458
454
|
onSubmit: async (t) => {
|
|
459
|
-
if (t.preventDefault(), y(null), !p)
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
}
|
|
463
|
-
try {
|
|
464
|
-
let { fileId: t, fileName: r } = await a(p);
|
|
455
|
+
if (t.preventDefault(), y(null), !p) y(r("relationships.detail.attachAssetModal.chooseFile", "Choose a file to attach."), "asset-file");
|
|
456
|
+
else try {
|
|
457
|
+
let { fileId: t, fileName: r } = await o(p);
|
|
465
458
|
await i.mutateAsync({
|
|
466
459
|
relationshipId: e,
|
|
467
460
|
name: l.trim() || r,
|
|
@@ -574,8 +567,8 @@ function de({ relationshipId: e, onClose: n }) {
|
|
|
574
567
|
})
|
|
575
568
|
});
|
|
576
569
|
}
|
|
577
|
-
function fe({ asset:
|
|
578
|
-
let { formatDate:
|
|
570
|
+
function fe({ asset: t }) {
|
|
571
|
+
let { formatDate: n, formatEnumLabel: r } = e(), i = T(), a = _(), [o, s] = k(!1);
|
|
579
572
|
return /* @__PURE__ */ U("div", {
|
|
580
573
|
className: "flex items-center justify-between gap-3 p-3",
|
|
581
574
|
children: [/* @__PURE__ */ U("div", {
|
|
@@ -584,43 +577,43 @@ function fe({ asset: e }) {
|
|
|
584
577
|
className: "min-w-0",
|
|
585
578
|
children: [/* @__PURE__ */ H("p", {
|
|
586
579
|
className: "truncate text-sm font-medium text-text-primary",
|
|
587
|
-
children:
|
|
580
|
+
children: t.name
|
|
588
581
|
}), /* @__PURE__ */ H("p", {
|
|
589
582
|
className: "text-xs text-text-secondary",
|
|
590
|
-
children:
|
|
583
|
+
children: r(t.type)
|
|
591
584
|
})]
|
|
592
585
|
})]
|
|
593
586
|
}), /* @__PURE__ */ U("div", {
|
|
594
587
|
className: "flex shrink-0 items-center gap-3",
|
|
595
|
-
children: [
|
|
588
|
+
children: [t.expiresAt && /* @__PURE__ */ H("span", {
|
|
596
589
|
className: "text-xs text-text-secondary",
|
|
597
|
-
children:
|
|
598
|
-
}),
|
|
590
|
+
children: i("relationships.detail.assetRow.expires", "Expires {{date}}", { date: n(t.expiresAt) })
|
|
591
|
+
}), t.file?.id && /* @__PURE__ */ U("button", {
|
|
599
592
|
type: "button",
|
|
600
593
|
onClick: async () => {
|
|
601
|
-
if (
|
|
602
|
-
|
|
594
|
+
if (t.file?.id) {
|
|
595
|
+
s(!0);
|
|
603
596
|
try {
|
|
604
|
-
let
|
|
605
|
-
window.open(
|
|
597
|
+
let e = await a(t.file.id);
|
|
598
|
+
window.open(e, "_blank", "noopener,noreferrer");
|
|
606
599
|
} catch {} finally {
|
|
607
|
-
|
|
600
|
+
s(!1);
|
|
608
601
|
}
|
|
609
602
|
}
|
|
610
603
|
},
|
|
611
|
-
disabled:
|
|
604
|
+
disabled: o,
|
|
612
605
|
className: "inline-flex items-center gap-1 rounded-lg border border-border-subtle px-2.5 py-1 text-xs font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-50",
|
|
613
606
|
children: [
|
|
614
607
|
/* @__PURE__ */ H(I, { className: "h-3.5 w-3.5" }),
|
|
615
608
|
" ",
|
|
616
|
-
|
|
609
|
+
o ? i("relationships.detail.assetRow.opening", "Opening…") : i("relationships.detail.assetRow.download", "Download")
|
|
617
610
|
]
|
|
618
611
|
})]
|
|
619
612
|
})]
|
|
620
613
|
});
|
|
621
614
|
}
|
|
622
|
-
function pe({ invoice:
|
|
623
|
-
let { formatCurrency:
|
|
615
|
+
function pe({ invoice: t }) {
|
|
616
|
+
let { formatCurrency: n, formatDate: r, formatEnumLabel: i } = e(), a = T(), o = t.number ?? a("relationships.detail.invoiceRow.unnumbered", "Unnumbered invoice");
|
|
624
617
|
return /* @__PURE__ */ U("div", {
|
|
625
618
|
className: "flex items-center justify-between gap-3 p-3",
|
|
626
619
|
children: [/* @__PURE__ */ U("div", {
|
|
@@ -629,79 +622,79 @@ function pe({ invoice: e }) {
|
|
|
629
622
|
className: "min-w-0",
|
|
630
623
|
children: [/* @__PURE__ */ H("p", {
|
|
631
624
|
className: "truncate text-sm font-medium text-text-primary",
|
|
632
|
-
children:
|
|
625
|
+
children: o
|
|
633
626
|
}), /* @__PURE__ */ U("p", {
|
|
634
627
|
className: "text-xs text-text-secondary",
|
|
635
|
-
children: [
|
|
628
|
+
children: [i(t.status), t.dueDate ? ` · ${a("relationships.detail.invoiceRow.due", "due {{date}}", { date: r(t.dueDate) })}` : t.issueDate ? ` · ${r(t.issueDate)}` : ""]
|
|
636
629
|
})]
|
|
637
630
|
})]
|
|
638
631
|
}), /* @__PURE__ */ H("span", {
|
|
639
632
|
className: "shrink-0 text-sm font-medium tabular-nums text-text-primary",
|
|
640
|
-
children:
|
|
633
|
+
children: n(t.total, t.currency)
|
|
641
634
|
})]
|
|
642
635
|
});
|
|
643
636
|
}
|
|
644
637
|
function me() {
|
|
645
|
-
let { formatCurrency:
|
|
646
|
-
relationshipId:
|
|
638
|
+
let { formatCurrency: t, formatDate: a, formatEnumLabel: m, formatIntervalSuffix: h } = e(), _ = T(), { id: y } = ie(), { navigateTo: b } = f(), { data: C, isLoading: w, isError: I, refetch: R } = x(y), z = S(), B = p(), [G, K] = k(null), [q, J] = k(!1), [Y, Z] = k(!1), [me, Q] = k(!1), he = v({
|
|
639
|
+
relationshipId: y,
|
|
647
640
|
pagination: {
|
|
648
641
|
limit: 50,
|
|
649
642
|
offset: 0
|
|
650
643
|
}
|
|
651
|
-
}, { enabled: !!
|
|
652
|
-
relationshipId:
|
|
644
|
+
}, { enabled: !!y }), ge = g({
|
|
645
|
+
relationshipId: y,
|
|
653
646
|
status: "PROPOSED"
|
|
654
|
-
}, { enabled: !!
|
|
655
|
-
if (
|
|
656
|
-
title:
|
|
657
|
-
children: /* @__PURE__ */ H(
|
|
647
|
+
}, { enabled: !!y });
|
|
648
|
+
if (w) return /* @__PURE__ */ H(n, {
|
|
649
|
+
title: _("relationships.title", "Relationship"),
|
|
650
|
+
children: /* @__PURE__ */ H(s, { label: _("relationships.detail.loading", "Loading relationship…") })
|
|
658
651
|
});
|
|
659
|
-
if (I) return /* @__PURE__ */ H(
|
|
660
|
-
title:
|
|
661
|
-
children: /* @__PURE__ */ H(
|
|
662
|
-
message:
|
|
652
|
+
if (I) return /* @__PURE__ */ H(n, {
|
|
653
|
+
title: _("relationships.title", "Relationship"),
|
|
654
|
+
children: /* @__PURE__ */ H(o, {
|
|
655
|
+
message: _("relationships.detail.error", "Could not load this relationship."),
|
|
663
656
|
onRetry: () => void R()
|
|
664
657
|
})
|
|
665
658
|
});
|
|
666
|
-
if (!
|
|
667
|
-
title:
|
|
668
|
-
children: /* @__PURE__ */ H(
|
|
659
|
+
if (!C) return /* @__PURE__ */ H(n, {
|
|
660
|
+
title: _("relationships.title", "Relationship"),
|
|
661
|
+
children: /* @__PURE__ */ H(i, {
|
|
669
662
|
illustration: "empty-data",
|
|
670
|
-
title:
|
|
671
|
-
description:
|
|
663
|
+
title: _("relationships.detail.notFoundTitle", "Relationship not found"),
|
|
664
|
+
description: _("relationships.detail.notFoundDescription", "It may have been removed, or you may not have access to it."),
|
|
672
665
|
action: /* @__PURE__ */ H("button", {
|
|
673
666
|
type: "button",
|
|
674
|
-
onClick: () =>
|
|
667
|
+
onClick: () => b("/relationships"),
|
|
675
668
|
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
|
|
676
|
-
children:
|
|
669
|
+
children: _("relationships.detail.backToRelationships", "Back to relationships")
|
|
677
670
|
})
|
|
678
671
|
})
|
|
679
672
|
});
|
|
680
|
-
let $ =
|
|
673
|
+
let $ = C, _e = z.isPending || B.isPending, ve = (e) => {
|
|
681
674
|
K(null), z.mutate({
|
|
682
675
|
id: $.id,
|
|
683
676
|
status: e
|
|
684
|
-
}, { onError: (e) => K(e instanceof Error ? e.message :
|
|
677
|
+
}, { onError: (e) => K(e instanceof Error ? e.message : _("relationships.detail.transitionError", "Transition failed")) });
|
|
685
678
|
}, ye = () => {
|
|
686
|
-
K(null), B.mutate($.id, { onError: (e) => K(e instanceof Error ? e.message :
|
|
679
|
+
K(null), B.mutate($.id, { onError: (e) => K(e instanceof Error ? e.message : _("relationships.detail.cancelError", "Cancel failed")) });
|
|
687
680
|
}, be = [...$.renewalEvents ?? []].sort((e, t) => new Date(e.occursAt).getTime() - new Date(t.occursAt).getTime()).map((e) => {
|
|
688
|
-
let
|
|
681
|
+
let n = new Date(e.occursAt).getTime(), r = !Number.isNaN(n) && n > Date.now();
|
|
689
682
|
return {
|
|
690
|
-
title:
|
|
691
|
-
sub: `${
|
|
692
|
-
meta: e.amount == null ? void 0 :
|
|
693
|
-
tone:
|
|
683
|
+
title: m(e.eventType),
|
|
684
|
+
sub: `${a(e.occursAt)}${e.detail ? ` · ${e.detail}` : ""}`,
|
|
685
|
+
meta: e.amount == null ? void 0 : t(e.amount, e.currency ?? $.currency),
|
|
686
|
+
tone: r ? "warning" : "muted"
|
|
694
687
|
};
|
|
695
688
|
}), xe = $.autoRenew ? /* @__PURE__ */ H("span", {
|
|
696
689
|
className: "inline-flex items-center rounded-full bg-status-success-bg-subtle px-2 py-0.5 text-xs font-medium text-status-success-text",
|
|
697
|
-
children:
|
|
690
|
+
children: _("relationships.detail.autoRenewOn", "On")
|
|
698
691
|
}) : /* @__PURE__ */ H("span", {
|
|
699
692
|
className: "inline-flex items-center rounded-full bg-bg-sunken px-2 py-0.5 text-xs font-medium text-text-secondary",
|
|
700
|
-
children:
|
|
701
|
-
}), Se = se.filter((e) =>
|
|
702
|
-
return /* @__PURE__ */ U(
|
|
693
|
+
children: _("relationships.detail.autoRenewOff", "Off")
|
|
694
|
+
}), Se = se.filter((e) => O($.status, e.status)), Ce = $.plan?.features ?? [];
|
|
695
|
+
return /* @__PURE__ */ U(n, {
|
|
703
696
|
title: $.label,
|
|
704
|
-
description: $.provider?.name ??
|
|
697
|
+
description: $.provider?.name ?? _(oe[$.kind], m($.kind)),
|
|
705
698
|
actions: /* @__PURE__ */ U("div", {
|
|
706
699
|
className: "flex flex-wrap items-center gap-2",
|
|
707
700
|
children: [
|
|
@@ -712,39 +705,39 @@ function me() {
|
|
|
712
705
|
children: [
|
|
713
706
|
/* @__PURE__ */ H(ee, { className: "h-4 w-4" }),
|
|
714
707
|
" ",
|
|
715
|
-
|
|
708
|
+
_("relationships.detail.edit", "Edit")
|
|
716
709
|
]
|
|
717
710
|
}),
|
|
718
711
|
/* @__PURE__ */ U("button", {
|
|
719
712
|
type: "button",
|
|
720
713
|
"data-testid": "negotiate-bill",
|
|
721
|
-
onClick: () =>
|
|
714
|
+
onClick: () => b(`/negotiations/new?relationshipId=${encodeURIComponent($.id)}`),
|
|
722
715
|
className: "inline-flex items-center gap-2 whitespace-nowrap rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
723
716
|
children: [
|
|
724
717
|
/* @__PURE__ */ H(L, { className: "h-4 w-4" }),
|
|
725
718
|
" ",
|
|
726
|
-
|
|
719
|
+
_("relationships.detail.negotiate", "Negotiate this bill")
|
|
727
720
|
]
|
|
728
721
|
}),
|
|
729
722
|
/* @__PURE__ */ U("button", {
|
|
730
723
|
type: "button",
|
|
731
724
|
"data-testid": "request-procurement",
|
|
732
|
-
onClick: () =>
|
|
725
|
+
onClick: () => b(`/procurement/new?relationshipId=${encodeURIComponent($.id)}`),
|
|
733
726
|
className: "inline-flex items-center gap-2 whitespace-nowrap rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
734
727
|
children: [
|
|
735
728
|
/* @__PURE__ */ H(N, { className: "h-4 w-4" }),
|
|
736
729
|
" ",
|
|
737
|
-
|
|
730
|
+
_("relationships.detail.procurement", "Ask an expert to negotiate")
|
|
738
731
|
]
|
|
739
732
|
}),
|
|
740
733
|
/* @__PURE__ */ U("button", {
|
|
741
734
|
type: "button",
|
|
742
|
-
onClick: () =>
|
|
735
|
+
onClick: () => b("/relationships"),
|
|
743
736
|
className: "inline-flex items-center gap-2 whitespace-nowrap rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
744
737
|
children: [
|
|
745
738
|
/* @__PURE__ */ H(j, { className: "rtl:rotate-180 h-4 w-4" }),
|
|
746
739
|
" ",
|
|
747
|
-
|
|
740
|
+
_("relationships.detail.back", "Back")
|
|
748
741
|
]
|
|
749
742
|
})
|
|
750
743
|
]
|
|
@@ -761,33 +754,33 @@ function me() {
|
|
|
761
754
|
children: [
|
|
762
755
|
/* @__PURE__ */ H("p", {
|
|
763
756
|
className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
764
|
-
children:
|
|
757
|
+
children: _(oe[$.kind], m($.kind))
|
|
765
758
|
}),
|
|
766
759
|
/* @__PURE__ */ U("div", {
|
|
767
760
|
className: "mt-2 flex flex-wrap items-center gap-3",
|
|
768
761
|
children: [/* @__PURE__ */ U("span", {
|
|
769
762
|
className: "text-3xl font-bold tabular-nums text-text-primary",
|
|
770
|
-
children: [
|
|
763
|
+
children: [t($.amount, $.currency), /* @__PURE__ */ H("span", {
|
|
771
764
|
className: "text-base font-normal text-text-secondary",
|
|
772
|
-
children:
|
|
765
|
+
children: h($.interval)
|
|
773
766
|
})]
|
|
774
|
-
}), /* @__PURE__ */ H(
|
|
767
|
+
}), /* @__PURE__ */ H(r, { status: $.status })]
|
|
775
768
|
}),
|
|
776
769
|
/* @__PURE__ */ U("div", {
|
|
777
770
|
className: "mt-2 flex flex-wrap items-center gap-x-4 gap-y-1 text-sm text-text-secondary",
|
|
778
771
|
children: [
|
|
779
772
|
/* @__PURE__ */ U("span", {
|
|
780
773
|
className: "inline-flex items-center gap-1.5",
|
|
781
|
-
children: [/* @__PURE__ */ H(P, { className: "h-3.5 w-3.5" }), $.renewsAt ?
|
|
774
|
+
children: [/* @__PURE__ */ H(P, { className: "h-3.5 w-3.5" }), $.renewsAt ? _("relationships.detail.renews", "Renews {{date}}", { date: a($.renewsAt) }) : _("relationships.detail.noRenewalScheduled", "No renewal scheduled")]
|
|
782
775
|
}),
|
|
783
776
|
/* @__PURE__ */ U("span", {
|
|
784
777
|
className: "inline-flex items-center gap-1.5",
|
|
785
|
-
children: [/* @__PURE__ */ H(te, { className: "h-3.5 w-3.5" }),
|
|
778
|
+
children: [/* @__PURE__ */ H(te, { className: "h-3.5 w-3.5" }), m($.discoverySource)]
|
|
786
779
|
}),
|
|
787
780
|
/* @__PURE__ */ U("span", {
|
|
788
781
|
className: "inline-flex items-center gap-1.5",
|
|
789
782
|
children: [
|
|
790
|
-
|
|
783
|
+
_("relationships.detail.autoRenew", "Auto-renew"),
|
|
791
784
|
" ",
|
|
792
785
|
xe
|
|
793
786
|
]
|
|
@@ -814,10 +807,10 @@ function me() {
|
|
|
814
807
|
children: [
|
|
815
808
|
/* @__PURE__ */ H(t, { className: "h-3.5 w-3.5" }),
|
|
816
809
|
" ",
|
|
817
|
-
|
|
810
|
+
_(e.labelKey, e.defaultLabel)
|
|
818
811
|
]
|
|
819
812
|
}, e.status);
|
|
820
|
-
}),
|
|
813
|
+
}), O($.status, "CANCELLED") && /* @__PURE__ */ U("button", {
|
|
821
814
|
type: "button",
|
|
822
815
|
disabled: _e,
|
|
823
816
|
onClick: ye,
|
|
@@ -825,7 +818,7 @@ function me() {
|
|
|
825
818
|
children: [
|
|
826
819
|
/* @__PURE__ */ H(M, { className: "h-3.5 w-3.5" }),
|
|
827
820
|
" ",
|
|
828
|
-
|
|
821
|
+
_("relationships.detail.actions.cancel", "Cancel")
|
|
829
822
|
]
|
|
830
823
|
})]
|
|
831
824
|
})]
|
|
@@ -851,29 +844,29 @@ function me() {
|
|
|
851
844
|
children: [
|
|
852
845
|
/* @__PURE__ */ H(F, { className: "h-4 w-4 text-text-secondary" }),
|
|
853
846
|
" ",
|
|
854
|
-
|
|
847
|
+
_("relationships.detail.sections.planPricing", "Plan & pricing")
|
|
855
848
|
]
|
|
856
849
|
}),
|
|
857
850
|
/* @__PURE__ */ U("div", {
|
|
858
851
|
className: "mt-3",
|
|
859
852
|
children: [
|
|
860
853
|
/* @__PURE__ */ H(X, {
|
|
861
|
-
label:
|
|
854
|
+
label: _("relationships.detail.info.plan", "Plan"),
|
|
862
855
|
value: $.plan?.name ?? "—"
|
|
863
856
|
}),
|
|
864
857
|
/* @__PURE__ */ H(X, {
|
|
865
|
-
label:
|
|
866
|
-
value: /* @__PURE__ */ U(ae, { children: [
|
|
858
|
+
label: _("relationships.detail.info.price", "Price"),
|
|
859
|
+
value: /* @__PURE__ */ U(ae, { children: [t($.amount, $.currency), /* @__PURE__ */ H("span", {
|
|
867
860
|
className: "font-normal text-text-secondary",
|
|
868
|
-
children:
|
|
861
|
+
children: h($.interval)
|
|
869
862
|
})] })
|
|
870
863
|
}),
|
|
871
864
|
/* @__PURE__ */ H(X, {
|
|
872
|
-
label:
|
|
873
|
-
value:
|
|
865
|
+
label: _("relationships.detail.info.billingInterval", "Billing interval"),
|
|
866
|
+
value: m($.interval)
|
|
874
867
|
}),
|
|
875
868
|
/* @__PURE__ */ H(X, {
|
|
876
|
-
label:
|
|
869
|
+
label: _("relationships.detail.info.provider", "Provider"),
|
|
877
870
|
value: $.provider?.name ?? "—"
|
|
878
871
|
})
|
|
879
872
|
]
|
|
@@ -894,49 +887,49 @@ function me() {
|
|
|
894
887
|
children: [
|
|
895
888
|
/* @__PURE__ */ H(re, { className: "h-4 w-4 text-text-secondary" }),
|
|
896
889
|
" ",
|
|
897
|
-
|
|
890
|
+
_("relationships.detail.sections.paymentBilling", "Payment & billing")
|
|
898
891
|
]
|
|
899
892
|
}), /* @__PURE__ */ U("div", {
|
|
900
893
|
className: "mt-3",
|
|
901
894
|
children: [
|
|
902
895
|
/* @__PURE__ */ H(X, {
|
|
903
|
-
label:
|
|
896
|
+
label: _("relationships.detail.info.currency", "Currency"),
|
|
904
897
|
value: $.currency
|
|
905
898
|
}),
|
|
906
899
|
/* @__PURE__ */ H(X, {
|
|
907
|
-
label:
|
|
900
|
+
label: _("relationships.detail.info.autoRenew", "Auto-renew"),
|
|
908
901
|
value: xe
|
|
909
902
|
}),
|
|
910
903
|
/* @__PURE__ */ H(X, {
|
|
911
|
-
label:
|
|
912
|
-
value: $.renewsAt ?
|
|
904
|
+
label: _("relationships.detail.info.nextRenewal", "Next renewal"),
|
|
905
|
+
value: $.renewsAt ? a($.renewsAt) : "—"
|
|
913
906
|
}),
|
|
914
907
|
/* @__PURE__ */ H(X, {
|
|
915
|
-
label:
|
|
916
|
-
value: $.startedAt ?
|
|
908
|
+
label: _("relationships.detail.info.started", "Started"),
|
|
909
|
+
value: $.startedAt ? a($.startedAt) : "—"
|
|
917
910
|
}),
|
|
918
911
|
$.trialEndsAt && /* @__PURE__ */ H(X, {
|
|
919
|
-
label:
|
|
920
|
-
value:
|
|
912
|
+
label: _("relationships.detail.info.trialEnds", "Trial ends"),
|
|
913
|
+
value: a($.trialEndsAt)
|
|
921
914
|
})
|
|
922
915
|
]
|
|
923
916
|
})]
|
|
924
917
|
})]
|
|
925
918
|
}),
|
|
926
|
-
(ge.data?.items.length ?? 0) > 0 && /* @__PURE__ */ U(
|
|
919
|
+
(ge.data?.items.length ?? 0) > 0 && /* @__PURE__ */ U(c, {
|
|
927
920
|
className: "mt-0",
|
|
928
|
-
title:
|
|
929
|
-
description:
|
|
930
|
-
children: [/* @__PURE__ */ H(
|
|
921
|
+
title: _("relationships.detail.sections.aiRecommendations", "AI recommendations"),
|
|
922
|
+
description: _("relationships.detail.sections.aiRecommendationsDescription", "Open recommendations about this subscription. You can also make any of these changes by hand above."),
|
|
923
|
+
children: [/* @__PURE__ */ H(D, { className: "mb-3" }), /* @__PURE__ */ H("div", {
|
|
931
924
|
className: "grid grid-cols-1 gap-3",
|
|
932
925
|
"data-testid": "relationship-decisions",
|
|
933
|
-
children: ge.data?.items.map((e) => /* @__PURE__ */ H(
|
|
926
|
+
children: ge.data?.items.map((e) => /* @__PURE__ */ H(E, { decision: e }, e.id))
|
|
934
927
|
})]
|
|
935
928
|
}),
|
|
936
|
-
/* @__PURE__ */ H(
|
|
929
|
+
/* @__PURE__ */ H(c, {
|
|
937
930
|
className: "mt-0",
|
|
938
|
-
title:
|
|
939
|
-
description:
|
|
931
|
+
title: _("relationships.detail.sections.entitlements", "Entitlements"),
|
|
932
|
+
description: _("relationships.detail.sections.entitlementsDescription", "What this relationship grants you"),
|
|
940
933
|
action: /* @__PURE__ */ U("button", {
|
|
941
934
|
type: "button",
|
|
942
935
|
onClick: () => Z(!0),
|
|
@@ -944,13 +937,13 @@ function me() {
|
|
|
944
937
|
children: [
|
|
945
938
|
/* @__PURE__ */ H(V, { className: "h-3.5 w-3.5" }),
|
|
946
939
|
" ",
|
|
947
|
-
|
|
940
|
+
_("relationships.detail.sections.addEntitlement", "Add entitlement")
|
|
948
941
|
]
|
|
949
942
|
}),
|
|
950
|
-
children: !$.entitlements || $.entitlements.length === 0 ? /* @__PURE__ */ H(
|
|
943
|
+
children: !$.entitlements || $.entitlements.length === 0 ? /* @__PURE__ */ H(i, {
|
|
951
944
|
illustration: "empty-data",
|
|
952
|
-
title:
|
|
953
|
-
description:
|
|
945
|
+
title: _("relationships.detail.empty.noEntitlementsTitle", "No entitlements"),
|
|
946
|
+
description: _("relationships.detail.empty.noEntitlementsDescription", "Entitlements (seats, quotas, feature access) will appear here.")
|
|
954
947
|
}) : /* @__PURE__ */ H("div", {
|
|
955
948
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
956
949
|
children: $.entitlements.map((e) => {
|
|
@@ -964,11 +957,11 @@ function me() {
|
|
|
964
957
|
children: [/* @__PURE__ */ H("p", {
|
|
965
958
|
className: "min-w-0 truncate text-sm font-medium text-text-primary",
|
|
966
959
|
children: e.name
|
|
967
|
-
}), /* @__PURE__ */ H(
|
|
960
|
+
}), /* @__PURE__ */ H(r, { status: e.isActive ? "ACTIVE" : "DISABLED" })]
|
|
968
961
|
}),
|
|
969
962
|
/* @__PURE__ */ H("p", {
|
|
970
963
|
className: "mt-1 text-xs text-text-secondary",
|
|
971
|
-
children:
|
|
964
|
+
children: m(e.type)
|
|
972
965
|
}),
|
|
973
966
|
t && /* @__PURE__ */ U("div", {
|
|
974
967
|
className: "mt-3",
|
|
@@ -983,8 +976,8 @@ function me() {
|
|
|
983
976
|
className: "tabular-nums",
|
|
984
977
|
children: [Math.round(e.used / e.quota * 100), "%"]
|
|
985
978
|
})]
|
|
986
|
-
}), /* @__PURE__ */ H(
|
|
987
|
-
label:
|
|
979
|
+
}), /* @__PURE__ */ H(u, {
|
|
980
|
+
label: _("common.quotaUtilization", "Quota utilization"),
|
|
988
981
|
value: e.used,
|
|
989
982
|
max: e.quota,
|
|
990
983
|
tone: e.used / e.quota >= .9 ? "negative" : e.used / e.quota >= .7 ? "warning" : "accent",
|
|
@@ -996,10 +989,10 @@ function me() {
|
|
|
996
989
|
})
|
|
997
990
|
})
|
|
998
991
|
}),
|
|
999
|
-
/* @__PURE__ */ H(
|
|
992
|
+
/* @__PURE__ */ H(c, {
|
|
1000
993
|
className: "mt-0",
|
|
1001
|
-
title:
|
|
1002
|
-
description:
|
|
994
|
+
title: _("relationships.detail.sections.assets", "Assets"),
|
|
995
|
+
description: _("relationships.detail.sections.assetsDescription", "Invoices, contracts, licenses and credentials"),
|
|
1003
996
|
action: /* @__PURE__ */ U("button", {
|
|
1004
997
|
type: "button",
|
|
1005
998
|
onClick: () => Q(!0),
|
|
@@ -1007,27 +1000,29 @@ function me() {
|
|
|
1007
1000
|
children: [
|
|
1008
1001
|
/* @__PURE__ */ H(V, { className: "h-3.5 w-3.5" }),
|
|
1009
1002
|
" ",
|
|
1010
|
-
|
|
1003
|
+
_("relationships.detail.sections.attachAsset", "Attach asset")
|
|
1011
1004
|
]
|
|
1012
1005
|
}),
|
|
1013
1006
|
children: (() => {
|
|
1014
1007
|
let e = $.assets ?? [], t = he.data?.items ?? [];
|
|
1015
|
-
|
|
1008
|
+
if (!(e.length > 0 || t.length > 0)) return /* @__PURE__ */ H(i, {
|
|
1009
|
+
illustration: "empty-data",
|
|
1010
|
+
title: _("relationships.detail.empty.noAssetsTitle", "No assets attached"),
|
|
1011
|
+
description: _("relationships.detail.empty.noAssetsDescription", "Attach invoices, contracts, licenses or receipts to this relationship.")
|
|
1012
|
+
});
|
|
1013
|
+
let n = [...e.map((e) => ({
|
|
1014
|
+
kind: "asset",
|
|
1015
|
+
sort: new Date(e.createdAt).getTime() || 0,
|
|
1016
|
+
asset: e
|
|
1017
|
+
})), ...t.map((e) => ({
|
|
1018
|
+
kind: "invoice",
|
|
1019
|
+
sort: new Date(e.createdAt).getTime() || 0,
|
|
1020
|
+
invoice: e
|
|
1021
|
+
}))].sort((e, t) => t.sort - e.sort);
|
|
1022
|
+
return /* @__PURE__ */ H(W, {
|
|
1016
1023
|
treatment: "plain",
|
|
1017
1024
|
className: "divide-y divide-border-subtle p-0",
|
|
1018
|
-
children:
|
|
1019
|
-
kind: "asset",
|
|
1020
|
-
sort: new Date(e.createdAt).getTime() || 0,
|
|
1021
|
-
asset: e
|
|
1022
|
-
})), ...t.map((e) => ({
|
|
1023
|
-
kind: "invoice",
|
|
1024
|
-
sort: new Date(e.createdAt).getTime() || 0,
|
|
1025
|
-
invoice: e
|
|
1026
|
-
}))].sort((e, t) => t.sort - e.sort).map((e) => e.kind === "asset" ? /* @__PURE__ */ H(fe, { asset: e.asset }, `a-${e.asset.id}`) : /* @__PURE__ */ H(pe, { invoice: e.invoice }, `i-${e.invoice.id}`))
|
|
1027
|
-
}) : /* @__PURE__ */ H(a, {
|
|
1028
|
-
illustration: "empty-data",
|
|
1029
|
-
title: y("relationships.detail.empty.noAssetsTitle", "No assets attached"),
|
|
1030
|
-
description: y("relationships.detail.empty.noAssetsDescription", "Attach invoices, contracts, licenses or receipts to this relationship.")
|
|
1025
|
+
children: n.map((e) => e.kind === "asset" ? /* @__PURE__ */ H(fe, { asset: e.asset }, `a-${e.asset.id}`) : /* @__PURE__ */ H(pe, { invoice: e.invoice }, `i-${e.invoice.id}`))
|
|
1031
1026
|
});
|
|
1032
1027
|
})()
|
|
1033
1028
|
}),
|
|
@@ -1036,7 +1031,7 @@ function me() {
|
|
|
1036
1031
|
className: "p-4",
|
|
1037
1032
|
children: [/* @__PURE__ */ H("p", {
|
|
1038
1033
|
className: "text-xs font-medium text-text-secondary",
|
|
1039
|
-
children:
|
|
1034
|
+
children: _("relationships.detail.sections.notes", "Notes")
|
|
1040
1035
|
}), /* @__PURE__ */ H("p", {
|
|
1041
1036
|
className: "mt-1 whitespace-pre-wrap text-sm text-text-primary",
|
|
1042
1037
|
children: $.notes
|
|
@@ -1053,24 +1048,24 @@ function me() {
|
|
|
1053
1048
|
children: [
|
|
1054
1049
|
/* @__PURE__ */ H(A, { className: "h-4 w-4 text-text-secondary" }),
|
|
1055
1050
|
" ",
|
|
1056
|
-
|
|
1051
|
+
_("relationships.detail.sections.healthScore", "Health score")
|
|
1057
1052
|
]
|
|
1058
1053
|
}), $.healthScore == null ? /* @__PURE__ */ H("p", {
|
|
1059
1054
|
className: "mt-4 text-sm text-text-secondary",
|
|
1060
|
-
children:
|
|
1055
|
+
children: _("relationships.detail.empty.noHealthScore", "Not scored yet. A health score appears once Subscriber Bot has enough signal.")
|
|
1061
1056
|
}) : /* @__PURE__ */ U("div", {
|
|
1062
1057
|
className: "mt-4 flex flex-col items-center",
|
|
1063
1058
|
children: [
|
|
1064
|
-
/* @__PURE__ */ H(
|
|
1059
|
+
/* @__PURE__ */ H(l, {
|
|
1065
1060
|
value: $.healthScore,
|
|
1066
1061
|
max: 100,
|
|
1067
1062
|
size: 160,
|
|
1068
|
-
label:
|
|
1063
|
+
label: _("relationships.detail.outOf100", "of 100")
|
|
1069
1064
|
}),
|
|
1070
1065
|
/* @__PURE__ */ H("div", {
|
|
1071
1066
|
className: "mt-2 w-full",
|
|
1072
|
-
children: /* @__PURE__ */ H(
|
|
1073
|
-
label:
|
|
1067
|
+
children: /* @__PURE__ */ H(u, {
|
|
1068
|
+
label: _("common.healthScore", "Health score"),
|
|
1074
1069
|
value: $.healthScore,
|
|
1075
1070
|
max: 100,
|
|
1076
1071
|
tone: ce($.healthScore)
|
|
@@ -1079,7 +1074,7 @@ function me() {
|
|
|
1079
1074
|
/* @__PURE__ */ H("p", {
|
|
1080
1075
|
className: "mt-3 text-center text-xs text-text-secondary",
|
|
1081
1076
|
"data-testid": "health-score-basis",
|
|
1082
|
-
children:
|
|
1077
|
+
children: _("relationships.detail.healthScoreBasis", "Computed from usage, payment history, price stability and overlap with your other subscriptions.")
|
|
1083
1078
|
})
|
|
1084
1079
|
]
|
|
1085
1080
|
})]
|
|
@@ -1092,21 +1087,21 @@ function me() {
|
|
|
1092
1087
|
children: [
|
|
1093
1088
|
/* @__PURE__ */ H(P, { className: "h-4 w-4 text-text-secondary" }),
|
|
1094
1089
|
" ",
|
|
1095
|
-
|
|
1090
|
+
_("relationships.detail.sections.renewalTimeline", "Renewal timeline")
|
|
1096
1091
|
]
|
|
1097
1092
|
}),
|
|
1098
1093
|
/* @__PURE__ */ H("p", {
|
|
1099
1094
|
className: "mt-0.5 text-xs text-text-secondary",
|
|
1100
|
-
children:
|
|
1095
|
+
children: _("relationships.detail.sections.renewalTimelineDescription", "Detected renewals and price changes")
|
|
1101
1096
|
}),
|
|
1102
1097
|
be.length === 0 ? /* @__PURE__ */ H("div", {
|
|
1103
1098
|
className: "mt-4",
|
|
1104
|
-
children: /* @__PURE__ */ H(
|
|
1099
|
+
children: /* @__PURE__ */ H(i, {
|
|
1105
1100
|
illustration: "empty-data",
|
|
1106
|
-
title:
|
|
1107
|
-
description:
|
|
1101
|
+
title: _("relationships.detail.empty.noRenewalEventsTitle", "No renewal events"),
|
|
1102
|
+
description: _("relationships.detail.empty.noRenewalEventsDescription", "Renewals and price changes will appear here as they're detected.")
|
|
1108
1103
|
})
|
|
1109
|
-
}) : /* @__PURE__ */ H(
|
|
1104
|
+
}) : /* @__PURE__ */ H(d, {
|
|
1110
1105
|
items: be,
|
|
1111
1106
|
className: "mt-4"
|
|
1112
1107
|
})
|
|
@@ -1129,7 +1124,6 @@ function me() {
|
|
|
1129
1124
|
]
|
|
1130
1125
|
});
|
|
1131
1126
|
}
|
|
1132
|
-
//#endregion
|
|
1133
1127
|
export { me as RelationshipDetailPage };
|
|
1134
1128
|
|
|
1135
1129
|
//# sourceMappingURL=RelationshipDetailPage.js.map
|