@burdenoff/microfe-subscriberbot 2026.1103.2 → 2026.1105.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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/DashboardPage.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/PageLayout.d.ts +6 -0
- package/dist/subscriberbot/components/PageLayout.d.ts.map +1 -1
- package/dist/subscriberbot/components/PageLayout.js +2 -1
- package/dist/subscriberbot/components/PageLayout.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 +2 -0
- package/dist/subscriberbot/components/StateViews.d.ts.map +1 -1
- package/dist/subscriberbot/components/StateViews.js +46 -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 +143 -135
- 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.d.ts +3 -0
- package/dist/subscriberbot/components/mobile/MobileScreen.d.ts.map +1 -1
- package/dist/subscriberbot/components/mobile/MobileScreen.js +5 -3
- 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 +115 -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 +272 -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 +112 -91
- 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,9 +1,10 @@
|
|
|
1
1
|
import { useSubscriberBot as e } from "../../context/SubscriberBotContext.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { useTr as t } from "../../hooks/useTr.js";
|
|
3
|
+
import { useFormatters as n } from "../../hooks/useFormatters.js";
|
|
4
|
+
import { PageLayout as r } from "../../components/PageLayout.js";
|
|
5
5
|
import { ErrorView as i } from "../../components/StateViews.js";
|
|
6
6
|
import { useCreateRelationship as a, usePlans as o, useProviders as s } from "../../hooks/useSubscriberBotApi.js";
|
|
7
|
+
import { useFormError as ee } from "../../hooks/useFormError.js";
|
|
7
8
|
import { useState as c } from "react";
|
|
8
9
|
import { ArrowLeft as l, Building2 as u, StickyNote as d, Tag as f, Wallet as p } from "lucide-react";
|
|
9
10
|
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
@@ -37,10 +38,11 @@ var v = [
|
|
|
37
38
|
ENROLLMENT: "relationships.kinds.enrollment",
|
|
38
39
|
TRIAL: "relationships.kinds.trial"
|
|
39
40
|
}, x = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", S = "mb-1.5 block text-xs font-medium text-text-secondary";
|
|
40
|
-
function C({ icon: e, title: t, description: n, children: r }) {
|
|
41
|
+
function C({ icon: e, title: t, description: n, children: r, dataTour: i }) {
|
|
41
42
|
return /* @__PURE__ */ h(g, {
|
|
42
43
|
treatment: "metric",
|
|
43
44
|
className: "p-5 sm:p-6",
|
|
45
|
+
"data-tour": i,
|
|
44
46
|
children: [/* @__PURE__ */ h("div", {
|
|
45
47
|
className: "flex items-start gap-3",
|
|
46
48
|
children: [/* @__PURE__ */ m("span", {
|
|
@@ -63,66 +65,72 @@ function C({ icon: e, title: t, description: n, children: r }) {
|
|
|
63
65
|
});
|
|
64
66
|
}
|
|
65
67
|
function w() {
|
|
66
|
-
let g =
|
|
68
|
+
let { formatEnumLabel: g } = n(), w = t(), { navigateTo: T } = e(), E = a(), D = s({ pagination: {
|
|
67
69
|
limit: 100,
|
|
68
70
|
offset: 0
|
|
69
|
-
} }), [
|
|
70
|
-
return
|
|
71
|
-
|
|
71
|
+
} }), [O, k] = c(""), [A, j] = c("SUBSCRIPTION"), [M, N] = c(""), [P, F] = c(""), [I, L] = c(""), [R, z] = c("USD"), [B, V] = c("MONTHLY"), [H, U] = c(""), [W, G] = c(!0), [K, q] = c(""), [J, Y] = c(""), [X, Z, Q, te] = ee(), ne = o(M || void 0), re = D.data?.items ?? [], $ = ne.data ?? [];
|
|
72
|
+
return D.isError ? /* @__PURE__ */ m(r, {
|
|
73
|
+
dataTour: "subscriberbot-relationship-new",
|
|
74
|
+
title: w("relationships.new.title", "Add relationship"),
|
|
72
75
|
children: /* @__PURE__ */ m(i, {
|
|
73
|
-
message:
|
|
74
|
-
onRetry: () => void
|
|
76
|
+
message: w("relationships.new.providerError", "Could not load the provider registry."),
|
|
77
|
+
onRetry: () => void D.refetch()
|
|
75
78
|
})
|
|
76
|
-
}) : /* @__PURE__ */ h(
|
|
77
|
-
|
|
78
|
-
|
|
79
|
+
}) : /* @__PURE__ */ h(r, {
|
|
80
|
+
dataTour: "subscriberbot-relationship-new",
|
|
81
|
+
title: w("relationships.new.title", "Add relationship"),
|
|
82
|
+
description: w("relationships.new.description", "Track a new recurring digital relationship"),
|
|
79
83
|
actions: /* @__PURE__ */ h("button", {
|
|
80
84
|
type: "button",
|
|
81
|
-
onClick: () =>
|
|
85
|
+
onClick: () => T("/relationships"),
|
|
82
86
|
className: "inline-flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
83
87
|
children: [
|
|
84
|
-
/* @__PURE__ */ m(l, { className: "h-4 w-4" }),
|
|
88
|
+
/* @__PURE__ */ m(l, { className: "rtl:rotate-180 h-4 w-4" }),
|
|
85
89
|
" ",
|
|
86
|
-
|
|
90
|
+
w("relationships.new.back", "Back")
|
|
87
91
|
]
|
|
88
92
|
}),
|
|
89
93
|
children: [/* @__PURE__ */ m(_, {
|
|
90
94
|
className: "mb-6",
|
|
91
|
-
children:
|
|
95
|
+
children: w("relationships.new.purpose", "Manually add a subscription, membership, license or contract. Link it to a provider and plan from the registry, set the price and renewal date, and Subscriber Bot will track its lifecycle from here.")
|
|
92
96
|
}), /* @__PURE__ */ h("form", {
|
|
93
97
|
onSubmit: (e) => {
|
|
94
|
-
if (e.preventDefault(),
|
|
95
|
-
|
|
98
|
+
if (e.preventDefault(), Z(null), !O.trim()) {
|
|
99
|
+
Z(w("relationships.new.basics.labelRequired", "A label is required."), "rel-label");
|
|
96
100
|
return;
|
|
97
101
|
}
|
|
98
102
|
let t = {
|
|
99
|
-
label:
|
|
100
|
-
kind:
|
|
101
|
-
interval:
|
|
102
|
-
autoRenew:
|
|
103
|
-
currency:
|
|
104
|
-
...
|
|
105
|
-
...
|
|
106
|
-
...
|
|
107
|
-
...
|
|
108
|
-
...
|
|
109
|
-
...
|
|
103
|
+
label: O.trim(),
|
|
104
|
+
kind: A,
|
|
105
|
+
interval: B,
|
|
106
|
+
autoRenew: W,
|
|
107
|
+
currency: R.trim() || "USD",
|
|
108
|
+
...M ? { providerId: M } : {},
|
|
109
|
+
...P ? { planId: P } : {},
|
|
110
|
+
...I ? { amount: Number(I) } : {},
|
|
111
|
+
...H ? { renewsAt: new Date(H).toISOString() } : {},
|
|
112
|
+
...K.trim() ? { notes: K.trim() } : {},
|
|
113
|
+
...J.trim() ? { department: J.trim() } : {}
|
|
110
114
|
};
|
|
111
|
-
|
|
112
|
-
onSuccess: (e) =>
|
|
113
|
-
onError: (e) =>
|
|
115
|
+
E.mutate(t, {
|
|
116
|
+
onSuccess: (e) => T(`/relationships/${e.id}`),
|
|
117
|
+
onError: (e) => Z(e instanceof Error ? e.message : w("relationships.new.error", "Could not create relationship."))
|
|
114
118
|
});
|
|
115
119
|
},
|
|
116
120
|
className: "max-w-3xl space-y-5",
|
|
117
121
|
children: [
|
|
118
|
-
|
|
122
|
+
X && /* @__PURE__ */ m("div", {
|
|
123
|
+
id: te,
|
|
124
|
+
tabIndex: -1,
|
|
125
|
+
role: "alert",
|
|
119
126
|
className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
|
|
120
|
-
children:
|
|
127
|
+
children: X
|
|
121
128
|
}),
|
|
122
129
|
/* @__PURE__ */ m(C, {
|
|
123
130
|
icon: /* @__PURE__ */ m(f, { className: "h-4 w-4" }),
|
|
124
|
-
|
|
125
|
-
|
|
131
|
+
dataTour: "subscriberbot-relationship-new-basics",
|
|
132
|
+
title: w("relationships.new.basics.title", "Basics"),
|
|
133
|
+
description: w("relationships.new.basics.description", "Name this relationship and choose what kind it is."),
|
|
126
134
|
children: /* @__PURE__ */ h("div", {
|
|
127
135
|
className: "space-y-4",
|
|
128
136
|
children: [
|
|
@@ -130,7 +138,7 @@ function w() {
|
|
|
130
138
|
htmlFor: "rel-label",
|
|
131
139
|
className: S,
|
|
132
140
|
children: [
|
|
133
|
-
|
|
141
|
+
w("relationships.new.basics.labelLabel", "Label"),
|
|
134
142
|
" ",
|
|
135
143
|
/* @__PURE__ */ m("span", {
|
|
136
144
|
className: "text-status-error-text",
|
|
@@ -138,11 +146,12 @@ function w() {
|
|
|
138
146
|
})
|
|
139
147
|
]
|
|
140
148
|
}), /* @__PURE__ */ m("input", {
|
|
149
|
+
...Q("rel-label"),
|
|
141
150
|
id: "rel-label",
|
|
142
151
|
type: "text",
|
|
143
|
-
value:
|
|
144
|
-
onChange: (e) =>
|
|
145
|
-
placeholder:
|
|
152
|
+
value: O,
|
|
153
|
+
onChange: (e) => k(e.target.value),
|
|
154
|
+
placeholder: w("relationships.new.basics.labelPlaceholder", "e.g. Netflix Premium, AWS Production"),
|
|
146
155
|
className: x,
|
|
147
156
|
required: !0
|
|
148
157
|
})] }),
|
|
@@ -151,15 +160,16 @@ function w() {
|
|
|
151
160
|
children: [/* @__PURE__ */ m("label", {
|
|
152
161
|
htmlFor: "rel-kind",
|
|
153
162
|
className: S,
|
|
154
|
-
children:
|
|
163
|
+
children: w("relationships.new.basics.kindLabel", "Kind")
|
|
155
164
|
}), /* @__PURE__ */ m("select", {
|
|
165
|
+
...Q("rel-kind"),
|
|
156
166
|
id: "rel-kind",
|
|
157
|
-
value:
|
|
158
|
-
onChange: (e) =>
|
|
167
|
+
value: A,
|
|
168
|
+
onChange: (e) => j(e.target.value),
|
|
159
169
|
className: x,
|
|
160
170
|
children: v.map((e) => /* @__PURE__ */ m("option", {
|
|
161
171
|
value: e,
|
|
162
|
-
children:
|
|
172
|
+
children: w(b[e], g(e))
|
|
163
173
|
}, e))
|
|
164
174
|
})]
|
|
165
175
|
}),
|
|
@@ -168,14 +178,15 @@ function w() {
|
|
|
168
178
|
children: [/* @__PURE__ */ m("label", {
|
|
169
179
|
htmlFor: "rel-department",
|
|
170
180
|
className: S,
|
|
171
|
-
children:
|
|
181
|
+
children: w("relationships.new.basics.departmentLabel", "Department or team")
|
|
172
182
|
}), /* @__PURE__ */ m("input", {
|
|
183
|
+
...Q("rel-department"),
|
|
173
184
|
id: "rel-department",
|
|
174
185
|
type: "text",
|
|
175
186
|
maxLength: 120,
|
|
176
|
-
value:
|
|
177
|
-
onChange: (e) =>
|
|
178
|
-
placeholder:
|
|
187
|
+
value: J,
|
|
188
|
+
onChange: (e) => Y(e.target.value),
|
|
189
|
+
placeholder: w("relationships.new.basics.departmentPlaceholder", "e.g. Engineering, Marketing"),
|
|
179
190
|
className: x
|
|
180
191
|
})]
|
|
181
192
|
})
|
|
@@ -184,41 +195,44 @@ function w() {
|
|
|
184
195
|
}),
|
|
185
196
|
/* @__PURE__ */ m(C, {
|
|
186
197
|
icon: /* @__PURE__ */ m(u, { className: "h-4 w-4" }),
|
|
187
|
-
|
|
188
|
-
|
|
198
|
+
dataTour: "subscriberbot-relationship-new-provider-plan",
|
|
199
|
+
title: w("relationships.new.providerPlan.title", "Provider & plan"),
|
|
200
|
+
description: w("relationships.new.providerPlan.description", "Link this relationship to a provider and plan from the registry (optional)."),
|
|
189
201
|
children: /* @__PURE__ */ h("div", {
|
|
190
202
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
191
203
|
children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
192
204
|
htmlFor: "rel-provider",
|
|
193
205
|
className: S,
|
|
194
|
-
children:
|
|
206
|
+
children: w("relationships.new.providerPlan.providerLabel", "Provider")
|
|
195
207
|
}), /* @__PURE__ */ h("select", {
|
|
208
|
+
...Q("rel-provider"),
|
|
196
209
|
id: "rel-provider",
|
|
197
|
-
value:
|
|
210
|
+
value: M,
|
|
198
211
|
onChange: (e) => {
|
|
199
|
-
|
|
212
|
+
N(e.target.value), F("");
|
|
200
213
|
},
|
|
201
214
|
className: x,
|
|
202
215
|
children: [/* @__PURE__ */ m("option", {
|
|
203
216
|
value: "",
|
|
204
|
-
children:
|
|
205
|
-
}),
|
|
217
|
+
children: w("relationships.new.providerPlan.providerNone", "— None —")
|
|
218
|
+
}), re.map((e) => /* @__PURE__ */ m("option", {
|
|
206
219
|
value: e.id,
|
|
207
220
|
children: e.name
|
|
208
221
|
}, e.id))]
|
|
209
222
|
})] }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
210
223
|
htmlFor: "rel-plan",
|
|
211
224
|
className: S,
|
|
212
|
-
children:
|
|
225
|
+
children: w("relationships.new.providerPlan.planLabel", "Plan")
|
|
213
226
|
}), /* @__PURE__ */ h("select", {
|
|
227
|
+
...Q("rel-plan"),
|
|
214
228
|
id: "rel-plan",
|
|
215
|
-
value:
|
|
216
|
-
onChange: (e) =>
|
|
229
|
+
value: P,
|
|
230
|
+
onChange: (e) => F(e.target.value),
|
|
217
231
|
className: x,
|
|
218
|
-
disabled: !
|
|
232
|
+
disabled: !M || $.length === 0,
|
|
219
233
|
children: [/* @__PURE__ */ m("option", {
|
|
220
234
|
value: "",
|
|
221
|
-
children:
|
|
235
|
+
children: M ? $.length === 0 ? w("relationships.new.providerPlan.noPlans", "No plans available") : w("relationships.new.providerPlan.planNone", "— None —") : w("relationships.new.providerPlan.selectProviderFirst", "Select a provider first")
|
|
222
236
|
}), $.map((e) => /* @__PURE__ */ m("option", {
|
|
223
237
|
value: e.id,
|
|
224
238
|
children: e.name
|
|
@@ -228,8 +242,9 @@ function w() {
|
|
|
228
242
|
}),
|
|
229
243
|
/* @__PURE__ */ m(C, {
|
|
230
244
|
icon: /* @__PURE__ */ m(p, { className: "h-4 w-4" }),
|
|
231
|
-
|
|
232
|
-
|
|
245
|
+
dataTour: "subscriberbot-relationship-new-pricing",
|
|
246
|
+
title: w("relationships.new.pricing.title", "Pricing & billing"),
|
|
247
|
+
description: w("relationships.new.pricing.description", "Set the price, cadence and next renewal so Subscriber Bot can track it."),
|
|
233
248
|
children: /* @__PURE__ */ h("div", {
|
|
234
249
|
className: "space-y-4",
|
|
235
250
|
children: [/* @__PURE__ */ h("div", {
|
|
@@ -238,42 +253,45 @@ function w() {
|
|
|
238
253
|
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
239
254
|
htmlFor: "rel-amount",
|
|
240
255
|
className: S,
|
|
241
|
-
children:
|
|
256
|
+
children: w("relationships.new.pricing.amountLabel", "Amount")
|
|
242
257
|
}), /* @__PURE__ */ m("input", {
|
|
258
|
+
...Q("rel-amount"),
|
|
243
259
|
id: "rel-amount",
|
|
244
260
|
type: "number",
|
|
245
261
|
min: "0",
|
|
246
262
|
step: "0.01",
|
|
247
|
-
value:
|
|
248
|
-
onChange: (e) =>
|
|
249
|
-
placeholder:
|
|
263
|
+
value: I,
|
|
264
|
+
onChange: (e) => L(e.target.value),
|
|
265
|
+
placeholder: w("relationships.new.pricing.amountPlaceholder", "0.00"),
|
|
250
266
|
className: x
|
|
251
267
|
})] }),
|
|
252
268
|
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
253
269
|
htmlFor: "rel-currency",
|
|
254
270
|
className: S,
|
|
255
|
-
children:
|
|
271
|
+
children: w("relationships.new.pricing.currencyLabel", "Currency")
|
|
256
272
|
}), /* @__PURE__ */ m("input", {
|
|
273
|
+
...Q("rel-currency"),
|
|
257
274
|
id: "rel-currency",
|
|
258
275
|
type: "text",
|
|
259
|
-
value:
|
|
260
|
-
onChange: (e) =>
|
|
261
|
-
placeholder:
|
|
276
|
+
value: R,
|
|
277
|
+
onChange: (e) => z(e.target.value.toUpperCase()),
|
|
278
|
+
placeholder: w("relationships.new.pricing.currencyPlaceholder", "USD"),
|
|
262
279
|
maxLength: 3,
|
|
263
280
|
className: x
|
|
264
281
|
})] }),
|
|
265
282
|
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
266
283
|
htmlFor: "rel-interval",
|
|
267
284
|
className: S,
|
|
268
|
-
children:
|
|
285
|
+
children: w("relationships.new.pricing.intervalLabel", "Billing interval")
|
|
269
286
|
}), /* @__PURE__ */ m("select", {
|
|
287
|
+
...Q("rel-interval"),
|
|
270
288
|
id: "rel-interval",
|
|
271
|
-
value:
|
|
272
|
-
onChange: (e) =>
|
|
289
|
+
value: B,
|
|
290
|
+
onChange: (e) => V(e.target.value),
|
|
273
291
|
className: x,
|
|
274
292
|
children: y.map((e) => /* @__PURE__ */ m("option", {
|
|
275
293
|
value: e,
|
|
276
|
-
children:
|
|
294
|
+
children: g(e)
|
|
277
295
|
}, e))
|
|
278
296
|
})] })
|
|
279
297
|
]
|
|
@@ -282,23 +300,24 @@ function w() {
|
|
|
282
300
|
children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
283
301
|
htmlFor: "rel-renews",
|
|
284
302
|
className: S,
|
|
285
|
-
children:
|
|
303
|
+
children: w("relationships.new.pricing.renewsOnLabel", "Renews on")
|
|
286
304
|
}), /* @__PURE__ */ m("input", {
|
|
305
|
+
...Q("rel-renews"),
|
|
287
306
|
id: "rel-renews",
|
|
288
307
|
type: "date",
|
|
289
|
-
value:
|
|
290
|
-
onChange: (e) =>
|
|
308
|
+
value: H,
|
|
309
|
+
onChange: (e) => U(e.target.value),
|
|
291
310
|
className: x
|
|
292
311
|
})] }), /* @__PURE__ */ h("label", {
|
|
293
312
|
className: "flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 sm:mt-6",
|
|
294
313
|
children: [/* @__PURE__ */ m("input", {
|
|
295
314
|
type: "checkbox",
|
|
296
|
-
checked:
|
|
297
|
-
onChange: (e) =>
|
|
315
|
+
checked: W,
|
|
316
|
+
onChange: (e) => G(e.target.checked),
|
|
298
317
|
className: "size-4 rounded border-border-subtle"
|
|
299
318
|
}), /* @__PURE__ */ m("span", {
|
|
300
319
|
className: "text-sm text-text-primary",
|
|
301
|
-
children:
|
|
320
|
+
children: w("relationships.new.pricing.autoRenews", "Auto-renews")
|
|
302
321
|
})]
|
|
303
322
|
})]
|
|
304
323
|
})]
|
|
@@ -306,30 +325,32 @@ function w() {
|
|
|
306
325
|
}),
|
|
307
326
|
/* @__PURE__ */ m(C, {
|
|
308
327
|
icon: /* @__PURE__ */ m(d, { className: "h-4 w-4" }),
|
|
309
|
-
title:
|
|
310
|
-
description:
|
|
328
|
+
title: w("relationships.new.notes.title", "Notes"),
|
|
329
|
+
description: w("relationships.new.notes.description", "Anything worth remembering about this relationship."),
|
|
311
330
|
children: /* @__PURE__ */ m("textarea", {
|
|
331
|
+
...Q("rel-notes"),
|
|
312
332
|
id: "rel-notes",
|
|
313
|
-
"aria-label":
|
|
314
|
-
value:
|
|
315
|
-
onChange: (e) =>
|
|
333
|
+
"aria-label": w("relationships.new.notes.title", "Notes"),
|
|
334
|
+
value: K,
|
|
335
|
+
onChange: (e) => q(e.target.value),
|
|
316
336
|
rows: 3,
|
|
317
|
-
placeholder:
|
|
337
|
+
placeholder: w("relationships.new.notes.placeholder", "Anything worth remembering about this relationship…"),
|
|
318
338
|
className: x
|
|
319
339
|
})
|
|
320
340
|
}),
|
|
321
341
|
/* @__PURE__ */ h("div", {
|
|
322
342
|
className: "flex flex-col gap-3 sm:flex-row",
|
|
343
|
+
"data-tour": "subscriberbot-relationship-new-actions",
|
|
323
344
|
children: [/* @__PURE__ */ m("button", {
|
|
324
345
|
type: "submit",
|
|
325
|
-
disabled:
|
|
346
|
+
disabled: E.isPending,
|
|
326
347
|
className: "rounded-lg bg-action-primary-bg px-5 py-2.5 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50",
|
|
327
|
-
children:
|
|
348
|
+
children: E.isPending ? w("relationships.new.creating", "Creating…") : w("relationships.new.submit", "Create relationship")
|
|
328
349
|
}), /* @__PURE__ */ m("button", {
|
|
329
350
|
type: "button",
|
|
330
|
-
onClick: () =>
|
|
351
|
+
onClick: () => T("/relationships"),
|
|
331
352
|
className: "rounded-lg border border-border-subtle px-5 py-2.5 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
332
|
-
children:
|
|
353
|
+
children: w("relationships.new.cancel", "Cancel")
|
|
333
354
|
})]
|
|
334
355
|
})
|
|
335
356
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RelationshipNewPage.js","names":[],"sources":["../../../../src/subscriberbot/pages/relationships/RelationshipNewPage.tsx"],"sourcesContent":["/**\n * Create relationship\n * @module subscriberbot/pages/relationships\n *\n * Manual-add form for a recurring relationship AI can't auto-detect.\n * Writes `subCreateRelationship`. Provider + plan are optional pickers\n * sourced from the real registry (`subListProviders` / `subListPlans`).\n */\n\nimport { useState, type ReactNode } from 'react';\nimport { ArrowLeft, Tag, Building2, Wallet, StickyNote } from 'lucide-react';\nimport { GlassCard, PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../../components/PageLayout';\nimport { ErrorView } from '../../components/StateViews';\nimport { useSubscriberBot } from '../../context/SubscriberBotContext';\nimport { useCreateRelationship, useProviders, usePlans } from '../../hooks/useSubscriberBotApi';\nimport { useTr } from '../../hooks/useTr';\nimport { formatEnumLabel } from '../../utils/formatters';\nimport type {\n SubBillingInterval,\n SubCreateRelationshipInput,\n SubRelationshipKind,\n} from '../../types';\n\nconst KINDS: SubRelationshipKind[] = [\n 'SUBSCRIPTION',\n 'MEMBERSHIP',\n 'LICENSE',\n 'CONTRACT',\n 'NEWSLETTER',\n 'RECURRING_PAYMENT',\n 'ENROLLMENT',\n 'TRIAL',\n];\n\nconst INTERVALS: SubBillingInterval[] = [\n 'MONTHLY',\n 'YEARLY',\n 'QUARTERLY',\n 'WEEKLY',\n 'DAILY',\n 'USAGE_BASED',\n 'LIFETIME',\n 'FREE',\n];\n\nconst KIND_KEY: Record<SubRelationshipKind, string> = {\n SUBSCRIPTION: 'relationships.kinds.subscription',\n MEMBERSHIP: 'relationships.kinds.membership',\n LICENSE: 'relationships.kinds.license',\n CONTRACT: 'relationships.kinds.contract',\n NEWSLETTER: 'relationships.kinds.newsletter',\n RECURRING_PAYMENT: 'relationships.kinds.recurringPayment',\n ENROLLMENT: 'relationships.kinds.enrollment',\n TRIAL: 'relationships.kinds.trial',\n};\n\nconst inputCls =\n 'w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]';\nconst labelCls = 'mb-1.5 block text-xs font-medium text-text-secondary';\n\n/** Grouped form section on a glass surface. */\nfunction FormSection({\n icon,\n title,\n description,\n children,\n}: {\n icon: ReactNode;\n title: string;\n description: string;\n children: ReactNode;\n}) {\n return (\n <GlassCard treatment=\"metric\" className=\"p-5 sm:p-6\">\n <div className=\"flex items-start gap-3\">\n <span className=\"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-bg-sunken text-text-secondary\">\n {icon}\n </span>\n <div className=\"min-w-0\">\n <h2 className=\"text-sm font-semibold text-text-primary\">{title}</h2>\n <p className=\"mt-0.5 text-xs text-text-secondary\">{description}</p>\n </div>\n </div>\n <div className=\"mt-4\">{children}</div>\n </GlassCard>\n );\n}\n\nexport function RelationshipNewPage() {\n const tr = useTr();\n const { navigateTo } = useSubscriberBot();\n const create = useCreateRelationship();\n const providersQ = useProviders({ pagination: { limit: 100, offset: 0 } });\n\n const [label, setLabel] = useState('');\n const [kind, setKind] = useState<SubRelationshipKind>('SUBSCRIPTION');\n const [providerId, setProviderId] = useState('');\n const [planId, setPlanId] = useState('');\n const [amount, setAmount] = useState('');\n const [currency, setCurrency] = useState('USD');\n const [interval, setInterval] = useState<SubBillingInterval>('MONTHLY');\n const [renewsAt, setRenewsAt] = useState('');\n const [autoRenew, setAutoRenew] = useState(true);\n const [notes, setNotes] = useState('');\n const [department, setDepartment] = useState('');\n const [formError, setFormError] = useState<string | null>(null);\n\n const plansQ = usePlans(providerId || undefined);\n const providers = providersQ.data?.items ?? [];\n const plans = plansQ.data ?? [];\n\n const handleSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n setFormError(null);\n if (!label.trim()) {\n setFormError(tr('relationships.new.basics.labelRequired', 'A label is required.'));\n return;\n }\n const input: SubCreateRelationshipInput = {\n label: label.trim(),\n kind,\n interval,\n autoRenew,\n currency: currency.trim() || 'USD',\n ...(providerId ? { providerId } : {}),\n ...(planId ? { planId } : {}),\n ...(amount ? { amount: Number(amount) } : {}),\n ...(renewsAt ? { renewsAt: new Date(renewsAt).toISOString() } : {}),\n ...(notes.trim() ? { notes: notes.trim() } : {}),\n ...(department.trim() ? { department: department.trim() } : {}),\n };\n create.mutate(input, {\n onSuccess: (rel) => navigateTo(`/relationships/${rel.id}`),\n onError: (err) =>\n setFormError(\n err instanceof Error\n ? err.message\n : tr('relationships.new.error', 'Could not create relationship.')\n ),\n });\n };\n\n if (providersQ.isError) {\n return (\n <PageLayout title={tr('relationships.new.title', 'Add relationship')}>\n <ErrorView\n message={tr('relationships.new.providerError', 'Could not load the provider registry.')}\n onRetry={() => void providersQ.refetch()}\n />\n </PageLayout>\n );\n }\n\n return (\n <PageLayout\n title={tr('relationships.new.title', 'Add relationship')}\n description={tr(\n 'relationships.new.description',\n 'Track a new recurring digital relationship'\n )}\n actions={\n <button\n type=\"button\"\n onClick={() => navigateTo('/relationships')}\n className=\"inline-flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken\"\n >\n <ArrowLeft className=\"h-4 w-4\" /> {tr('relationships.new.back', 'Back')}\n </button>\n }\n >\n <PagePurpose className=\"mb-6\">\n {tr(\n 'relationships.new.purpose',\n 'Manually add a subscription, membership, license or contract. Link it to a provider and plan from the registry, set the price and renewal date, and Subscriber Bot will track its lifecycle from here.'\n )}\n </PagePurpose>\n\n <form onSubmit={handleSubmit} className=\"max-w-3xl space-y-5\">\n {formError && (\n <div className=\"rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text\">\n {formError}\n </div>\n )}\n\n {/* Basics */}\n <FormSection\n icon={<Tag className=\"h-4 w-4\" />}\n title={tr('relationships.new.basics.title', 'Basics')}\n description={tr(\n 'relationships.new.basics.description',\n 'Name this relationship and choose what kind it is.'\n )}\n >\n <div className=\"space-y-4\">\n <div>\n <label htmlFor=\"rel-label\" className={labelCls}>\n {tr('relationships.new.basics.labelLabel', 'Label')}{' '}\n <span className=\"text-status-error-text\">*</span>\n </label>\n <input\n id=\"rel-label\"\n type=\"text\"\n value={label}\n onChange={(e) => setLabel(e.target.value)}\n placeholder={tr(\n 'relationships.new.basics.labelPlaceholder',\n 'e.g. Netflix Premium, AWS Production'\n )}\n className={inputCls}\n required\n />\n </div>\n <div className=\"max-w-xs\">\n <label htmlFor=\"rel-kind\" className={labelCls}>\n {tr('relationships.new.basics.kindLabel', 'Kind')}\n </label>\n <select\n id=\"rel-kind\"\n value={kind}\n onChange={(e) => setKind(e.target.value as SubRelationshipKind)}\n className={inputCls}\n >\n {KINDS.map((k) => (\n <option key={k} value={k}>\n {tr(KIND_KEY[k], formatEnumLabel(k))}\n </option>\n ))}\n </select>\n </div>\n <div className=\"max-w-xs\">\n <label htmlFor=\"rel-department\" className={labelCls}>\n {tr('relationships.new.basics.departmentLabel', 'Department or team')}\n </label>\n <input\n id=\"rel-department\"\n type=\"text\"\n maxLength={120}\n value={department}\n onChange={(e) => setDepartment(e.target.value)}\n placeholder={tr(\n 'relationships.new.basics.departmentPlaceholder',\n 'e.g. Engineering, Marketing'\n )}\n className={inputCls}\n />\n </div>\n </div>\n </FormSection>\n\n {/* Provider & plan */}\n <FormSection\n icon={<Building2 className=\"h-4 w-4\" />}\n title={tr('relationships.new.providerPlan.title', 'Provider & plan')}\n description={tr(\n 'relationships.new.providerPlan.description',\n 'Link this relationship to a provider and plan from the registry (optional).'\n )}\n >\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <div>\n <label htmlFor=\"rel-provider\" className={labelCls}>\n {tr('relationships.new.providerPlan.providerLabel', 'Provider')}\n </label>\n <select\n id=\"rel-provider\"\n value={providerId}\n onChange={(e) => {\n setProviderId(e.target.value);\n setPlanId('');\n }}\n className={inputCls}\n >\n <option value=\"\">\n {tr('relationships.new.providerPlan.providerNone', '— None —')}\n </option>\n {providers.map((p) => (\n <option key={p.id} value={p.id}>\n {p.name}\n </option>\n ))}\n </select>\n </div>\n <div>\n <label htmlFor=\"rel-plan\" className={labelCls}>\n {tr('relationships.new.providerPlan.planLabel', 'Plan')}\n </label>\n <select\n id=\"rel-plan\"\n value={planId}\n onChange={(e) => setPlanId(e.target.value)}\n className={inputCls}\n disabled={!providerId || plans.length === 0}\n >\n <option value=\"\">\n {providerId\n ? plans.length === 0\n ? tr('relationships.new.providerPlan.noPlans', 'No plans available')\n : tr('relationships.new.providerPlan.planNone', '— None —')\n : tr(\n 'relationships.new.providerPlan.selectProviderFirst',\n 'Select a provider first'\n )}\n </option>\n {plans.map((pl) => (\n <option key={pl.id} value={pl.id}>\n {pl.name}\n </option>\n ))}\n </select>\n </div>\n </div>\n </FormSection>\n\n {/* Pricing & billing */}\n <FormSection\n icon={<Wallet className=\"h-4 w-4\" />}\n title={tr('relationships.new.pricing.title', 'Pricing & billing')}\n description={tr(\n 'relationships.new.pricing.description',\n 'Set the price, cadence and next renewal so Subscriber Bot can track it.'\n )}\n >\n <div className=\"space-y-4\">\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-3\">\n <div>\n <label htmlFor=\"rel-amount\" className={labelCls}>\n {tr('relationships.new.pricing.amountLabel', 'Amount')}\n </label>\n <input\n id=\"rel-amount\"\n type=\"number\"\n min=\"0\"\n step=\"0.01\"\n value={amount}\n onChange={(e) => setAmount(e.target.value)}\n placeholder={tr('relationships.new.pricing.amountPlaceholder', '0.00')}\n className={inputCls}\n />\n </div>\n <div>\n <label htmlFor=\"rel-currency\" className={labelCls}>\n {tr('relationships.new.pricing.currencyLabel', 'Currency')}\n </label>\n <input\n id=\"rel-currency\"\n type=\"text\"\n value={currency}\n onChange={(e) => setCurrency(e.target.value.toUpperCase())}\n placeholder={tr('relationships.new.pricing.currencyPlaceholder', 'USD')}\n maxLength={3}\n className={inputCls}\n />\n </div>\n <div>\n <label htmlFor=\"rel-interval\" className={labelCls}>\n {tr('relationships.new.pricing.intervalLabel', 'Billing interval')}\n </label>\n <select\n id=\"rel-interval\"\n value={interval}\n onChange={(e) => setInterval(e.target.value as SubBillingInterval)}\n className={inputCls}\n >\n {INTERVALS.map((i) => (\n <option key={i} value={i}>\n {formatEnumLabel(i)}\n </option>\n ))}\n </select>\n </div>\n </div>\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <div>\n <label htmlFor=\"rel-renews\" className={labelCls}>\n {tr('relationships.new.pricing.renewsOnLabel', 'Renews on')}\n </label>\n <input\n id=\"rel-renews\"\n type=\"date\"\n value={renewsAt}\n onChange={(e) => setRenewsAt(e.target.value)}\n className={inputCls}\n />\n </div>\n <label className=\"flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 sm:mt-6\">\n <input\n type=\"checkbox\"\n checked={autoRenew}\n onChange={(e) => setAutoRenew(e.target.checked)}\n className=\"size-4 rounded border-border-subtle\"\n />\n <span className=\"text-sm text-text-primary\">\n {tr('relationships.new.pricing.autoRenews', 'Auto-renews')}\n </span>\n </label>\n </div>\n </div>\n </FormSection>\n\n {/* Notes */}\n <FormSection\n icon={<StickyNote className=\"h-4 w-4\" />}\n title={tr('relationships.new.notes.title', 'Notes')}\n description={tr(\n 'relationships.new.notes.description',\n 'Anything worth remembering about this relationship.'\n )}\n >\n <textarea\n id=\"rel-notes\"\n aria-label={tr('relationships.new.notes.title', 'Notes')}\n value={notes}\n onChange={(e) => setNotes(e.target.value)}\n rows={3}\n placeholder={tr(\n 'relationships.new.notes.placeholder',\n 'Anything worth remembering about this relationship…'\n )}\n className={inputCls}\n />\n </FormSection>\n\n <div className=\"flex flex-col gap-3 sm:flex-row\">\n <button\n type=\"submit\"\n disabled={create.isPending}\n className=\"rounded-lg bg-action-primary-bg px-5 py-2.5 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50\"\n >\n {create.isPending\n ? tr('relationships.new.creating', 'Creating…')\n : tr('relationships.new.submit', 'Create relationship')}\n </button>\n <button\n type=\"button\"\n onClick={() => navigateTo('/relationships')}\n className=\"rounded-lg border border-border-subtle px-5 py-2.5 text-sm font-medium text-text-primary hover:bg-bg-sunken\"\n >\n {tr('relationships.new.cancel', 'Cancel')}\n </button>\n </div>\n </form>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;AAwB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AA,CAAA;OACF;UACL,kBAAC,OAAD;OAAK,WAAU;iBAAf,CACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,SAAD;QAAO,SAAQ;QAAa,WAAW;kBACpC,EAAG,2CAA2C,WAAW;OACrD,CAAA,GACP,kBAAC,SAAD;QACE,IAAG;QACH,MAAK;QACL,OAAO;QACP,WAAW,MAAM,EAAY,EAAE,OAAO,KAAK;QAC3C,WAAW;OACZ,CAAA,CACE,EAAA,CAAA,GACL,kBAAC,SAAD;QAAO,WAAU;kBAAjB,CACE,kBAAC,SAAD;SACE,MAAK;SACL,SAAS;SACT,WAAW,MAAM,EAAa,EAAE,OAAO,OAAO;SAC9C,WAAU;QACX,CAAA,GACD,kBAAC,QAAD;SAAM,WAAU;mBACb,EAAG,wCAAwC,aAAa;QACrD,CAAA,CACD;SACJ;QACF;;IACM,CAAA;IAGb,kBAAC,GAAD;KACE,MAAM,kBAAC,GAAD,EAAY,WAAU,UAAW,CAAA;KACvC,OAAO,EAAG,iCAAiC,OAAO;KAClD,aAAa,EACX,uCACA,qDACF;eAEA,kBAAC,YAAD;MACE,IAAG;MACH,cAAY,EAAG,iCAAiC,OAAO;MACvD,OAAO;MACP,WAAW,MAAM,EAAS,EAAE,OAAO,KAAK;MACxC,MAAM;MACN,aAAa,EACX,uCACA,qDACF;MACA,WAAW;KACZ,CAAA;IACU,CAAA;IAEb,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,UAAD;MACE,MAAK;MACL,UAAU,EAAO;MACjB,WAAU;gBAET,EAAO,YACJ,EAAG,8BAA8B,WAAW,IAC5C,EAAG,4BAA4B,qBAAqB;KAClD,CAAA,GACR,kBAAC,UAAD;MACE,MAAK;MACL,eAAe,EAAW,gBAAgB;MAC1C,WAAU;gBAET,EAAG,4BAA4B,QAAQ;KAClC,CAAA,CACL;;GACD;IACI;;AAEhB"}
|
|
1
|
+
{"version":3,"file":"RelationshipNewPage.js","names":[],"sources":["../../../../src/subscriberbot/pages/relationships/RelationshipNewPage.tsx"],"sourcesContent":["import { useFormatters } from '../../hooks/useFormatters';\nimport { useFormError } from '../../hooks/useFormError';\n/**\n * Create relationship\n * @module subscriberbot/pages/relationships\n *\n * Manual-add form for a recurring relationship AI can't auto-detect.\n * Writes `subCreateRelationship`. Provider + plan are optional pickers\n * sourced from the real registry (`subListProviders` / `subListPlans`).\n */\n\nimport { useState, type ReactNode } from 'react';\nimport { ArrowLeft, Tag, Building2, Wallet, StickyNote } from 'lucide-react';\nimport { GlassCard, PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../../components/PageLayout';\nimport { ErrorView } from '../../components/StateViews';\nimport { useSubscriberBot } from '../../context/SubscriberBotContext';\nimport { useCreateRelationship, useProviders, usePlans } from '../../hooks/useSubscriberBotApi';\nimport { useTr } from '../../hooks/useTr';\n\nimport type {\n SubBillingInterval,\n SubCreateRelationshipInput,\n SubRelationshipKind,\n} from '../../types';\n\nconst KINDS: SubRelationshipKind[] = [\n 'SUBSCRIPTION',\n 'MEMBERSHIP',\n 'LICENSE',\n 'CONTRACT',\n 'NEWSLETTER',\n 'RECURRING_PAYMENT',\n 'ENROLLMENT',\n 'TRIAL',\n];\n\nconst INTERVALS: SubBillingInterval[] = [\n 'MONTHLY',\n 'YEARLY',\n 'QUARTERLY',\n 'WEEKLY',\n 'DAILY',\n 'USAGE_BASED',\n 'LIFETIME',\n 'FREE',\n];\n\nconst KIND_KEY: Record<SubRelationshipKind, string> = {\n SUBSCRIPTION: 'relationships.kinds.subscription',\n MEMBERSHIP: 'relationships.kinds.membership',\n LICENSE: 'relationships.kinds.license',\n CONTRACT: 'relationships.kinds.contract',\n NEWSLETTER: 'relationships.kinds.newsletter',\n RECURRING_PAYMENT: 'relationships.kinds.recurringPayment',\n ENROLLMENT: 'relationships.kinds.enrollment',\n TRIAL: 'relationships.kinds.trial',\n};\n\nconst inputCls =\n 'w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]';\nconst labelCls = 'mb-1.5 block text-xs font-medium text-text-secondary';\n\n/** Grouped form section on a glass surface. */\nfunction FormSection({\n icon,\n title,\n description,\n children,\n dataTour,\n}: {\n icon: ReactNode;\n title: string;\n description: string;\n children: ReactNode;\n /** Stable product-tour anchor rendered as `data-tour` (BOFF-3358). */\n dataTour?: string;\n}) {\n return (\n <GlassCard treatment=\"metric\" className=\"p-5 sm:p-6\" data-tour={dataTour}>\n <div className=\"flex items-start gap-3\">\n <span className=\"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-bg-sunken text-text-secondary\">\n {icon}\n </span>\n <div className=\"min-w-0\">\n <h2 className=\"text-sm font-semibold text-text-primary\">{title}</h2>\n <p className=\"mt-0.5 text-xs text-text-secondary\">{description}</p>\n </div>\n </div>\n <div className=\"mt-4\">{children}</div>\n </GlassCard>\n );\n}\n\nexport function RelationshipNewPage() {\n const { formatEnumLabel } = useFormatters();\n\n const tr = useTr();\n const { navigateTo } = useSubscriberBot();\n const create = useCreateRelationship();\n const providersQ = useProviders({ pagination: { limit: 100, offset: 0 } });\n\n const [label, setLabel] = useState('');\n const [kind, setKind] = useState<SubRelationshipKind>('SUBSCRIPTION');\n const [providerId, setProviderId] = useState('');\n const [planId, setPlanId] = useState('');\n const [amount, setAmount] = useState('');\n const [currency, setCurrency] = useState('USD');\n const [interval, setInterval] = useState<SubBillingInterval>('MONTHLY');\n const [renewsAt, setRenewsAt] = useState('');\n const [autoRenew, setAutoRenew] = useState(true);\n const [notes, setNotes] = useState('');\n const [department, setDepartment] = useState('');\n const [formError, setFormError, fieldErrorProps, formErrorId] = useFormError();\n\n const plansQ = usePlans(providerId || undefined);\n const providers = providersQ.data?.items ?? [];\n const plans = plansQ.data ?? [];\n\n const handleSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n setFormError(null);\n if (!label.trim()) {\n setFormError(\n tr('relationships.new.basics.labelRequired', 'A label is required.'),\n 'rel-label'\n );\n return;\n }\n const input: SubCreateRelationshipInput = {\n label: label.trim(),\n kind,\n interval,\n autoRenew,\n currency: currency.trim() || 'USD',\n ...(providerId ? { providerId } : {}),\n ...(planId ? { planId } : {}),\n ...(amount ? { amount: Number(amount) } : {}),\n ...(renewsAt ? { renewsAt: new Date(renewsAt).toISOString() } : {}),\n ...(notes.trim() ? { notes: notes.trim() } : {}),\n ...(department.trim() ? { department: department.trim() } : {}),\n };\n create.mutate(input, {\n onSuccess: (rel) => navigateTo(`/relationships/${rel.id}`),\n onError: (err) =>\n setFormError(\n err instanceof Error\n ? err.message\n : tr('relationships.new.error', 'Could not create relationship.')\n ),\n });\n };\n\n if (providersQ.isError) {\n return (\n <PageLayout\n dataTour=\"subscriberbot-relationship-new\"\n title={tr('relationships.new.title', 'Add relationship')}\n >\n <ErrorView\n message={tr('relationships.new.providerError', 'Could not load the provider registry.')}\n onRetry={() => void providersQ.refetch()}\n />\n </PageLayout>\n );\n }\n\n return (\n <PageLayout\n dataTour=\"subscriberbot-relationship-new\"\n title={tr('relationships.new.title', 'Add relationship')}\n description={tr(\n 'relationships.new.description',\n 'Track a new recurring digital relationship'\n )}\n actions={\n <button\n type=\"button\"\n onClick={() => navigateTo('/relationships')}\n className=\"inline-flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken\"\n >\n <ArrowLeft className=\"rtl:rotate-180 h-4 w-4\" /> {tr('relationships.new.back', 'Back')}\n </button>\n }\n >\n <PagePurpose className=\"mb-6\">\n {tr(\n 'relationships.new.purpose',\n 'Manually add a subscription, membership, license or contract. Link it to a provider and plan from the registry, set the price and renewal date, and Subscriber Bot will track its lifecycle from here.'\n )}\n </PagePurpose>\n\n <form onSubmit={handleSubmit} className=\"max-w-3xl space-y-5\">\n {formError && (\n <div\n id={formErrorId}\n tabIndex={-1}\n role=\"alert\"\n className=\"rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text\"\n >\n {formError}\n </div>\n )}\n\n {/* Basics */}\n <FormSection\n icon={<Tag className=\"h-4 w-4\" />}\n dataTour=\"subscriberbot-relationship-new-basics\"\n title={tr('relationships.new.basics.title', 'Basics')}\n description={tr(\n 'relationships.new.basics.description',\n 'Name this relationship and choose what kind it is.'\n )}\n >\n <div className=\"space-y-4\">\n <div>\n <label htmlFor=\"rel-label\" className={labelCls}>\n {tr('relationships.new.basics.labelLabel', 'Label')}{' '}\n <span className=\"text-status-error-text\">*</span>\n </label>\n <input\n {...fieldErrorProps('rel-label')}\n id=\"rel-label\"\n type=\"text\"\n value={label}\n onChange={(e) => setLabel(e.target.value)}\n placeholder={tr(\n 'relationships.new.basics.labelPlaceholder',\n 'e.g. Netflix Premium, AWS Production'\n )}\n className={inputCls}\n required\n />\n </div>\n <div className=\"max-w-xs\">\n <label htmlFor=\"rel-kind\" className={labelCls}>\n {tr('relationships.new.basics.kindLabel', 'Kind')}\n </label>\n <select\n {...fieldErrorProps('rel-kind')}\n id=\"rel-kind\"\n value={kind}\n onChange={(e) => setKind(e.target.value as SubRelationshipKind)}\n className={inputCls}\n >\n {KINDS.map((k) => (\n <option key={k} value={k}>\n {tr(KIND_KEY[k], formatEnumLabel(k))}\n </option>\n ))}\n </select>\n </div>\n <div className=\"max-w-xs\">\n <label htmlFor=\"rel-department\" className={labelCls}>\n {tr('relationships.new.basics.departmentLabel', 'Department or team')}\n </label>\n <input\n {...fieldErrorProps('rel-department')}\n id=\"rel-department\"\n type=\"text\"\n maxLength={120}\n value={department}\n onChange={(e) => setDepartment(e.target.value)}\n placeholder={tr(\n 'relationships.new.basics.departmentPlaceholder',\n 'e.g. Engineering, Marketing'\n )}\n className={inputCls}\n />\n </div>\n </div>\n </FormSection>\n\n {/* Provider & plan */}\n <FormSection\n icon={<Building2 className=\"h-4 w-4\" />}\n dataTour=\"subscriberbot-relationship-new-provider-plan\"\n title={tr('relationships.new.providerPlan.title', 'Provider & plan')}\n description={tr(\n 'relationships.new.providerPlan.description',\n 'Link this relationship to a provider and plan from the registry (optional).'\n )}\n >\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <div>\n <label htmlFor=\"rel-provider\" className={labelCls}>\n {tr('relationships.new.providerPlan.providerLabel', 'Provider')}\n </label>\n <select\n {...fieldErrorProps('rel-provider')}\n id=\"rel-provider\"\n value={providerId}\n onChange={(e) => {\n setProviderId(e.target.value);\n setPlanId('');\n }}\n className={inputCls}\n >\n <option value=\"\">\n {tr('relationships.new.providerPlan.providerNone', '— None —')}\n </option>\n {providers.map((p) => (\n <option key={p.id} value={p.id}>\n {p.name}\n </option>\n ))}\n </select>\n </div>\n <div>\n <label htmlFor=\"rel-plan\" className={labelCls}>\n {tr('relationships.new.providerPlan.planLabel', 'Plan')}\n </label>\n <select\n {...fieldErrorProps('rel-plan')}\n id=\"rel-plan\"\n value={planId}\n onChange={(e) => setPlanId(e.target.value)}\n className={inputCls}\n disabled={!providerId || plans.length === 0}\n >\n <option value=\"\">\n {providerId\n ? plans.length === 0\n ? tr('relationships.new.providerPlan.noPlans', 'No plans available')\n : tr('relationships.new.providerPlan.planNone', '— None —')\n : tr(\n 'relationships.new.providerPlan.selectProviderFirst',\n 'Select a provider first'\n )}\n </option>\n {plans.map((pl) => (\n <option key={pl.id} value={pl.id}>\n {pl.name}\n </option>\n ))}\n </select>\n </div>\n </div>\n </FormSection>\n\n {/* Pricing & billing */}\n <FormSection\n icon={<Wallet className=\"h-4 w-4\" />}\n dataTour=\"subscriberbot-relationship-new-pricing\"\n title={tr('relationships.new.pricing.title', 'Pricing & billing')}\n description={tr(\n 'relationships.new.pricing.description',\n 'Set the price, cadence and next renewal so Subscriber Bot can track it.'\n )}\n >\n <div className=\"space-y-4\">\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-3\">\n <div>\n <label htmlFor=\"rel-amount\" className={labelCls}>\n {tr('relationships.new.pricing.amountLabel', 'Amount')}\n </label>\n <input\n {...fieldErrorProps('rel-amount')}\n id=\"rel-amount\"\n type=\"number\"\n min=\"0\"\n step=\"0.01\"\n value={amount}\n onChange={(e) => setAmount(e.target.value)}\n placeholder={tr('relationships.new.pricing.amountPlaceholder', '0.00')}\n className={inputCls}\n />\n </div>\n <div>\n <label htmlFor=\"rel-currency\" className={labelCls}>\n {tr('relationships.new.pricing.currencyLabel', 'Currency')}\n </label>\n <input\n {...fieldErrorProps('rel-currency')}\n id=\"rel-currency\"\n type=\"text\"\n value={currency}\n onChange={(e) => setCurrency(e.target.value.toUpperCase())}\n placeholder={tr('relationships.new.pricing.currencyPlaceholder', 'USD')}\n maxLength={3}\n className={inputCls}\n />\n </div>\n <div>\n <label htmlFor=\"rel-interval\" className={labelCls}>\n {tr('relationships.new.pricing.intervalLabel', 'Billing interval')}\n </label>\n <select\n {...fieldErrorProps('rel-interval')}\n id=\"rel-interval\"\n value={interval}\n onChange={(e) => setInterval(e.target.value as SubBillingInterval)}\n className={inputCls}\n >\n {INTERVALS.map((i) => (\n <option key={i} value={i}>\n {formatEnumLabel(i)}\n </option>\n ))}\n </select>\n </div>\n </div>\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <div>\n <label htmlFor=\"rel-renews\" className={labelCls}>\n {tr('relationships.new.pricing.renewsOnLabel', 'Renews on')}\n </label>\n <input\n {...fieldErrorProps('rel-renews')}\n id=\"rel-renews\"\n type=\"date\"\n value={renewsAt}\n onChange={(e) => setRenewsAt(e.target.value)}\n className={inputCls}\n />\n </div>\n <label className=\"flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 sm:mt-6\">\n <input\n type=\"checkbox\"\n checked={autoRenew}\n onChange={(e) => setAutoRenew(e.target.checked)}\n className=\"size-4 rounded border-border-subtle\"\n />\n <span className=\"text-sm text-text-primary\">\n {tr('relationships.new.pricing.autoRenews', 'Auto-renews')}\n </span>\n </label>\n </div>\n </div>\n </FormSection>\n\n {/* Notes */}\n <FormSection\n icon={<StickyNote className=\"h-4 w-4\" />}\n title={tr('relationships.new.notes.title', 'Notes')}\n description={tr(\n 'relationships.new.notes.description',\n 'Anything worth remembering about this relationship.'\n )}\n >\n <textarea\n {...fieldErrorProps('rel-notes')}\n id=\"rel-notes\"\n aria-label={tr('relationships.new.notes.title', 'Notes')}\n value={notes}\n onChange={(e) => setNotes(e.target.value)}\n rows={3}\n placeholder={tr(\n 'relationships.new.notes.placeholder',\n 'Anything worth remembering about this relationship…'\n )}\n className={inputCls}\n />\n </FormSection>\n\n <div\n className=\"flex flex-col gap-3 sm:flex-row\"\n data-tour=\"subscriberbot-relationship-new-actions\"\n >\n <button\n type=\"submit\"\n disabled={create.isPending}\n className=\"rounded-lg bg-action-primary-bg px-5 py-2.5 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50\"\n >\n {create.isPending\n ? tr('relationships.new.creating', 'Creating…')\n : tr('relationships.new.submit', 'Create relationship')}\n </button>\n <button\n type=\"button\"\n onClick={() => navigateTo('/relationships')}\n className=\"rounded-lg border border-border-subtle px-5 py-2.5 text-sm font-medium text-text-primary hover:bg-bg-sunken\"\n >\n {tr('relationships.new.cancel', 'Cancel')}\n </button>\n </div>\n </form>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;AA0BA,IAAM,IAA+B;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,GAEM,IAAkC;CACtC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,GAEM,IAAgD;CACpD,cAAc;CACd,YAAY;CACZ,SAAS;CACT,UAAU;CACV,YAAY;CACZ,mBAAmB;CACnB,YAAY;CACZ,OAAO;AACT,GAEM,IACJ,0MACI,IAAW;AAGjB,SAAS,EAAY,EACnB,SACA,UACA,gBACA,aACA,eAQC;CACD,OACE,kBAAC,GAAD;EAAW,WAAU;EAAS,WAAU;EAAa,aAAW;YAAhE,CACE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,QAAD;IAAM,WAAU;cACb;GACG,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
-
*
|
|
5
|
-
* The core CRUDL list — every recurring relationship (subscription /
|
|
6
|
-
* membership / license / contract) in one paginated, filterable view.
|
|
7
|
-
* Data comes from `subListRelationships` (a SubRelationshipConnection).
|
|
8
|
-
*/
|
|
9
1
|
export declare function RelationshipsListPage(): import("react").JSX.Element;
|
|
10
2
|
//# sourceMappingURL=RelationshipsListPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RelationshipsListPage.d.ts","sourceRoot":"","sources":["../../../../src/subscriberbot/pages/relationships/RelationshipsListPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RelationshipsListPage.d.ts","sourceRoot":"","sources":["../../../../src/subscriberbot/pages/relationships/RelationshipsListPage.tsx"],"names":[],"mappings":"AAoFA,wBAAgB,qBAAqB,gCAkSpC"}
|