@burdenoff/microfe-subscriberbot 2026.827.1 → 2026.1014.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/subscriberbot/admin/AdminDashboardPage.d.ts.map +1 -1
- package/dist/subscriberbot/admin/AdminDashboardPage.js +80 -83
- package/dist/subscriberbot/admin/AdminDashboardPage.js.map +1 -1
- package/dist/subscriberbot/hooks/index.d.ts +1 -0
- package/dist/subscriberbot/hooks/index.d.ts.map +1 -1
- package/dist/subscriberbot/hooks/index.js +1 -0
- package/dist/subscriberbot/hooks/useTr.d.ts +17 -0
- package/dist/subscriberbot/hooks/useTr.d.ts.map +1 -0
- package/dist/subscriberbot/hooks/useTr.js +14 -0
- package/dist/subscriberbot/hooks/useTr.js.map +1 -0
- package/dist/subscriberbot/pages/AssetVaultPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/AssetVaultPage.js +111 -109
- package/dist/subscriberbot/pages/AssetVaultPage.js.map +1 -1
- package/dist/subscriberbot/pages/DashboardPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/DashboardPage.js +113 -105
- package/dist/subscriberbot/pages/DashboardPage.js.map +1 -1
- package/dist/subscriberbot/pages/InboxPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/InboxPage.js +404 -369
- 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 +94 -93
- package/dist/subscriberbot/pages/InsightsPage.js.map +1 -1
- package/dist/subscriberbot/pages/InvoicesPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/InvoicesPage.js +360 -366
- package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -1
- package/dist/subscriberbot/pages/WorkflowsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/WorkflowsPage.js +209 -193
- package/dist/subscriberbot/pages/WorkflowsPage.js.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentDetailPage.js +268 -236
- package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentNewPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentNewPage.js +96 -76
- package/dist/subscriberbot/pages/agents/AgentNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentsListPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentsListPage.js +145 -161
- package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +514 -441
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderNewPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderNewPage.js +167 -129
- package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProvidersListPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/providers/ProvidersListPage.js +171 -218
- package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +340 -279
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +185 -166
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +153 -182
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { useSubscriberBot as e } from "../../context/SubscriberBotContext.js";
|
|
2
2
|
import { PageLayout as t } from "../../components/PageLayout.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { formatEnumLabel as n } from "../../utils/formatters.js";
|
|
4
|
+
import { ErrorView as r } from "../../components/StateViews.js";
|
|
5
|
+
import { useCreateRelationship as i, usePlans as a, useProviders as o } from "../../hooks/useSubscriberBotApi.js";
|
|
6
|
+
import { useTr as s } from "../../hooks/useTr.js";
|
|
7
|
+
import { useState as c } from "react";
|
|
8
|
+
import { ArrowLeft as l, Building2 as u, StickyNote as d, Tag as f, Wallet as p } from "lucide-react";
|
|
9
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
10
|
+
import { GlassCard as g, PagePurpose as _ } from "@burdenoff/fe-libs/ui";
|
|
9
11
|
//#region src/subscriberbot/pages/relationships/RelationshipNewPage.tsx
|
|
10
|
-
var
|
|
12
|
+
var v = [
|
|
11
13
|
"SUBSCRIPTION",
|
|
12
14
|
"MEMBERSHIP",
|
|
13
15
|
"LICENSE",
|
|
@@ -16,7 +18,7 @@ var g = [
|
|
|
16
18
|
"RECURRING_PAYMENT",
|
|
17
19
|
"ENROLLMENT",
|
|
18
20
|
"TRIAL"
|
|
19
|
-
],
|
|
21
|
+
], y = [
|
|
20
22
|
"MONTHLY",
|
|
21
23
|
"YEARLY",
|
|
22
24
|
"QUARTERLY",
|
|
@@ -25,272 +27,289 @@ var g = [
|
|
|
25
27
|
"USAGE_BASED",
|
|
26
28
|
"LIFETIME",
|
|
27
29
|
"FREE"
|
|
28
|
-
],
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
], b = {
|
|
31
|
+
SUBSCRIPTION: "relationships.kinds.subscription",
|
|
32
|
+
MEMBERSHIP: "relationships.kinds.membership",
|
|
33
|
+
LICENSE: "relationships.kinds.license",
|
|
34
|
+
CONTRACT: "relationships.kinds.contract",
|
|
35
|
+
NEWSLETTER: "relationships.kinds.newsletter",
|
|
36
|
+
RECURRING_PAYMENT: "relationships.kinds.recurringPayment",
|
|
37
|
+
ENROLLMENT: "relationships.kinds.enrollment",
|
|
38
|
+
TRIAL: "relationships.kinds.trial"
|
|
39
|
+
}, 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
|
+
return /* @__PURE__ */ h(g, {
|
|
31
42
|
treatment: "metric",
|
|
32
43
|
className: "p-5 sm:p-6",
|
|
33
|
-
children: [/* @__PURE__ */
|
|
44
|
+
children: [/* @__PURE__ */ h("div", {
|
|
34
45
|
className: "flex items-start gap-3",
|
|
35
|
-
children: [/* @__PURE__ */
|
|
46
|
+
children: [/* @__PURE__ */ m("span", {
|
|
36
47
|
className: "mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-bg-sunken text-text-secondary",
|
|
37
48
|
children: e
|
|
38
|
-
}), /* @__PURE__ */
|
|
49
|
+
}), /* @__PURE__ */ h("div", {
|
|
39
50
|
className: "min-w-0",
|
|
40
|
-
children: [/* @__PURE__ */
|
|
51
|
+
children: [/* @__PURE__ */ m("h2", {
|
|
41
52
|
className: "text-sm font-semibold text-text-primary",
|
|
42
53
|
children: t
|
|
43
|
-
}), /* @__PURE__ */
|
|
54
|
+
}), /* @__PURE__ */ m("p", {
|
|
44
55
|
className: "mt-0.5 text-xs text-text-secondary",
|
|
45
56
|
children: n
|
|
46
57
|
})]
|
|
47
58
|
})]
|
|
48
|
-
}), /* @__PURE__ */
|
|
59
|
+
}), /* @__PURE__ */ m("div", {
|
|
49
60
|
className: "mt-4",
|
|
50
61
|
children: r
|
|
51
62
|
})]
|
|
52
63
|
});
|
|
53
64
|
}
|
|
54
|
-
function
|
|
55
|
-
let { navigateTo:
|
|
65
|
+
function w() {
|
|
66
|
+
let g = s(), { navigateTo: w } = e(), T = i(), E = o({ pagination: {
|
|
56
67
|
limit: 100,
|
|
57
68
|
offset: 0
|
|
58
|
-
} }), [
|
|
59
|
-
return
|
|
60
|
-
title: "Add relationship",
|
|
61
|
-
children: /* @__PURE__ */
|
|
62
|
-
message: "Could not load the provider registry.",
|
|
63
|
-
onRetry: () => void
|
|
69
|
+
} }), [D, O] = c(""), [k, A] = c("SUBSCRIPTION"), [j, M] = c(""), [N, P] = c(""), [F, I] = c(""), [L, R] = c("USD"), [z, B] = c("MONTHLY"), [V, H] = c(""), [U, W] = c(!0), [G, K] = c(""), [q, J] = c(null), Y = a(j || void 0), X = E.data?.items ?? [], Z = Y.data ?? [];
|
|
70
|
+
return E.isError ? /* @__PURE__ */ m(t, {
|
|
71
|
+
title: g("relationships.new.title", "Add relationship"),
|
|
72
|
+
children: /* @__PURE__ */ m(r, {
|
|
73
|
+
message: g("relationships.new.providerError", "Could not load the provider registry."),
|
|
74
|
+
onRetry: () => void E.refetch()
|
|
64
75
|
})
|
|
65
|
-
}) : /* @__PURE__ */
|
|
66
|
-
title: "Add relationship",
|
|
67
|
-
description: "Track a new recurring digital relationship",
|
|
68
|
-
actions: /* @__PURE__ */
|
|
76
|
+
}) : /* @__PURE__ */ h(t, {
|
|
77
|
+
title: g("relationships.new.title", "Add relationship"),
|
|
78
|
+
description: g("relationships.new.description", "Track a new recurring digital relationship"),
|
|
79
|
+
actions: /* @__PURE__ */ h("button", {
|
|
69
80
|
type: "button",
|
|
70
|
-
onClick: () =>
|
|
81
|
+
onClick: () => w("/relationships"),
|
|
71
82
|
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",
|
|
72
|
-
children: [
|
|
83
|
+
children: [
|
|
84
|
+
/* @__PURE__ */ m(l, { className: "h-4 w-4" }),
|
|
85
|
+
" ",
|
|
86
|
+
g("relationships.new.back", "Back")
|
|
87
|
+
]
|
|
73
88
|
}),
|
|
74
|
-
children: [/* @__PURE__ */
|
|
89
|
+
children: [/* @__PURE__ */ m(_, {
|
|
75
90
|
className: "mb-6",
|
|
76
|
-
children: "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."
|
|
77
|
-
}), /* @__PURE__ */
|
|
91
|
+
children: g("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
|
+
}), /* @__PURE__ */ h("form", {
|
|
78
93
|
onSubmit: (e) => {
|
|
79
|
-
if (e.preventDefault(),
|
|
80
|
-
|
|
94
|
+
if (e.preventDefault(), J(null), !D.trim()) {
|
|
95
|
+
J(g("relationships.new.basics.labelRequired", "A label is required."));
|
|
81
96
|
return;
|
|
82
97
|
}
|
|
83
98
|
let t = {
|
|
84
|
-
label:
|
|
85
|
-
kind:
|
|
86
|
-
interval:
|
|
87
|
-
autoRenew:
|
|
88
|
-
currency:
|
|
89
|
-
...
|
|
90
|
-
...
|
|
91
|
-
...
|
|
92
|
-
...
|
|
93
|
-
...
|
|
99
|
+
label: D.trim(),
|
|
100
|
+
kind: k,
|
|
101
|
+
interval: z,
|
|
102
|
+
autoRenew: U,
|
|
103
|
+
currency: L.trim() || "USD",
|
|
104
|
+
...j ? { providerId: j } : {},
|
|
105
|
+
...N ? { planId: N } : {},
|
|
106
|
+
...F ? { amount: Number(F) } : {},
|
|
107
|
+
...V ? { renewsAt: new Date(V).toISOString() } : {},
|
|
108
|
+
...G.trim() ? { notes: G.trim() } : {}
|
|
94
109
|
};
|
|
95
|
-
|
|
96
|
-
onSuccess: (e) =>
|
|
97
|
-
onError: (e) =>
|
|
110
|
+
T.mutate(t, {
|
|
111
|
+
onSuccess: (e) => w(`/relationships/${e.id}`),
|
|
112
|
+
onError: (e) => J(e instanceof Error ? e.message : g("relationships.new.error", "Could not create relationship."))
|
|
98
113
|
});
|
|
99
114
|
},
|
|
100
115
|
className: "max-w-3xl space-y-5",
|
|
101
116
|
children: [
|
|
102
|
-
|
|
117
|
+
q && /* @__PURE__ */ m("div", {
|
|
103
118
|
className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
|
|
104
|
-
children:
|
|
119
|
+
children: q
|
|
105
120
|
}),
|
|
106
|
-
/* @__PURE__ */
|
|
107
|
-
icon: /* @__PURE__ */ f
|
|
108
|
-
title: "Basics",
|
|
109
|
-
description: "Name this relationship and choose what kind it is.",
|
|
110
|
-
children: /* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ m(C, {
|
|
122
|
+
icon: /* @__PURE__ */ m(f, { className: "h-4 w-4" }),
|
|
123
|
+
title: g("relationships.new.basics.title", "Basics"),
|
|
124
|
+
description: g("relationships.new.basics.description", "Name this relationship and choose what kind it is."),
|
|
125
|
+
children: /* @__PURE__ */ h("div", {
|
|
111
126
|
className: "space-y-4",
|
|
112
|
-
children: [/* @__PURE__ */
|
|
127
|
+
children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("label", {
|
|
113
128
|
htmlFor: "rel-label",
|
|
114
|
-
className:
|
|
115
|
-
children: [
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
129
|
+
className: S,
|
|
130
|
+
children: [
|
|
131
|
+
g("relationships.new.basics.labelLabel", "Label"),
|
|
132
|
+
" ",
|
|
133
|
+
/* @__PURE__ */ m("span", {
|
|
134
|
+
className: "text-status-error-text",
|
|
135
|
+
children: "*"
|
|
136
|
+
})
|
|
137
|
+
]
|
|
138
|
+
}), /* @__PURE__ */ m("input", {
|
|
120
139
|
id: "rel-label",
|
|
121
140
|
type: "text",
|
|
122
|
-
value:
|
|
123
|
-
onChange: (e) =>
|
|
124
|
-
placeholder: "e.g. Netflix Premium, AWS Production",
|
|
125
|
-
className:
|
|
141
|
+
value: D,
|
|
142
|
+
onChange: (e) => O(e.target.value),
|
|
143
|
+
placeholder: g("relationships.new.basics.labelPlaceholder", "e.g. Netflix Premium, AWS Production"),
|
|
144
|
+
className: x,
|
|
126
145
|
required: !0
|
|
127
|
-
})] }), /* @__PURE__ */
|
|
146
|
+
})] }), /* @__PURE__ */ h("div", {
|
|
128
147
|
className: "max-w-xs",
|
|
129
|
-
children: [/* @__PURE__ */
|
|
148
|
+
children: [/* @__PURE__ */ m("label", {
|
|
130
149
|
htmlFor: "rel-kind",
|
|
131
|
-
className:
|
|
132
|
-
children: "Kind"
|
|
133
|
-
}), /* @__PURE__ */
|
|
150
|
+
className: S,
|
|
151
|
+
children: g("relationships.new.basics.kindLabel", "Kind")
|
|
152
|
+
}), /* @__PURE__ */ m("select", {
|
|
134
153
|
id: "rel-kind",
|
|
135
|
-
value:
|
|
136
|
-
onChange: (e) =>
|
|
137
|
-
className:
|
|
138
|
-
children:
|
|
154
|
+
value: k,
|
|
155
|
+
onChange: (e) => A(e.target.value),
|
|
156
|
+
className: x,
|
|
157
|
+
children: v.map((e) => /* @__PURE__ */ m("option", {
|
|
139
158
|
value: e,
|
|
140
|
-
children: e
|
|
159
|
+
children: g(b[e], n(e))
|
|
141
160
|
}, e))
|
|
142
161
|
})]
|
|
143
162
|
})]
|
|
144
163
|
})
|
|
145
164
|
}),
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
icon: /* @__PURE__ */
|
|
148
|
-
title: "Provider & plan",
|
|
149
|
-
description: "Link this relationship to a provider and plan from the registry (optional).",
|
|
150
|
-
children: /* @__PURE__ */
|
|
165
|
+
/* @__PURE__ */ m(C, {
|
|
166
|
+
icon: /* @__PURE__ */ m(u, { className: "h-4 w-4" }),
|
|
167
|
+
title: g("relationships.new.providerPlan.title", "Provider & plan"),
|
|
168
|
+
description: g("relationships.new.providerPlan.description", "Link this relationship to a provider and plan from the registry (optional)."),
|
|
169
|
+
children: /* @__PURE__ */ h("div", {
|
|
151
170
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
152
|
-
children: [/* @__PURE__ */
|
|
171
|
+
children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
153
172
|
htmlFor: "rel-provider",
|
|
154
|
-
className:
|
|
155
|
-
children: "Provider"
|
|
156
|
-
}), /* @__PURE__ */
|
|
173
|
+
className: S,
|
|
174
|
+
children: g("relationships.new.providerPlan.providerLabel", "Provider")
|
|
175
|
+
}), /* @__PURE__ */ h("select", {
|
|
157
176
|
id: "rel-provider",
|
|
158
|
-
value:
|
|
177
|
+
value: j,
|
|
159
178
|
onChange: (e) => {
|
|
160
|
-
|
|
179
|
+
M(e.target.value), P("");
|
|
161
180
|
},
|
|
162
|
-
className:
|
|
163
|
-
children: [/* @__PURE__ */
|
|
181
|
+
className: x,
|
|
182
|
+
children: [/* @__PURE__ */ m("option", {
|
|
164
183
|
value: "",
|
|
165
|
-
children: "— None —"
|
|
166
|
-
}),
|
|
184
|
+
children: g("relationships.new.providerPlan.providerNone", "— None —")
|
|
185
|
+
}), X.map((e) => /* @__PURE__ */ m("option", {
|
|
167
186
|
value: e.id,
|
|
168
187
|
children: e.name
|
|
169
188
|
}, e.id))]
|
|
170
|
-
})] }), /* @__PURE__ */
|
|
189
|
+
})] }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
171
190
|
htmlFor: "rel-plan",
|
|
172
|
-
className:
|
|
173
|
-
children: "Plan"
|
|
174
|
-
}), /* @__PURE__ */
|
|
191
|
+
className: S,
|
|
192
|
+
children: g("relationships.new.providerPlan.planLabel", "Plan")
|
|
193
|
+
}), /* @__PURE__ */ h("select", {
|
|
175
194
|
id: "rel-plan",
|
|
176
|
-
value:
|
|
177
|
-
onChange: (e) =>
|
|
178
|
-
className:
|
|
179
|
-
disabled: !
|
|
180
|
-
children: [/* @__PURE__ */
|
|
195
|
+
value: N,
|
|
196
|
+
onChange: (e) => P(e.target.value),
|
|
197
|
+
className: x,
|
|
198
|
+
disabled: !j || Z.length === 0,
|
|
199
|
+
children: [/* @__PURE__ */ m("option", {
|
|
181
200
|
value: "",
|
|
182
|
-
children:
|
|
183
|
-
}),
|
|
201
|
+
children: j ? Z.length === 0 ? g("relationships.new.providerPlan.noPlans", "No plans available") : g("relationships.new.providerPlan.planNone", "— None —") : g("relationships.new.providerPlan.selectProviderFirst", "Select a provider first")
|
|
202
|
+
}), Z.map((e) => /* @__PURE__ */ m("option", {
|
|
184
203
|
value: e.id,
|
|
185
204
|
children: e.name
|
|
186
205
|
}, e.id))]
|
|
187
206
|
})] })]
|
|
188
207
|
})
|
|
189
208
|
}),
|
|
190
|
-
/* @__PURE__ */
|
|
191
|
-
icon: /* @__PURE__ */
|
|
192
|
-
title: "Pricing & billing",
|
|
193
|
-
description: "Set the price, cadence and next renewal so Subscriber Bot can track it.",
|
|
194
|
-
children: /* @__PURE__ */
|
|
209
|
+
/* @__PURE__ */ m(C, {
|
|
210
|
+
icon: /* @__PURE__ */ m(p, { className: "h-4 w-4" }),
|
|
211
|
+
title: g("relationships.new.pricing.title", "Pricing & billing"),
|
|
212
|
+
description: g("relationships.new.pricing.description", "Set the price, cadence and next renewal so Subscriber Bot can track it."),
|
|
213
|
+
children: /* @__PURE__ */ h("div", {
|
|
195
214
|
className: "space-y-4",
|
|
196
|
-
children: [/* @__PURE__ */
|
|
215
|
+
children: [/* @__PURE__ */ h("div", {
|
|
197
216
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
|
|
198
217
|
children: [
|
|
199
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
200
219
|
htmlFor: "rel-amount",
|
|
201
|
-
className:
|
|
202
|
-
children: "Amount"
|
|
203
|
-
}), /* @__PURE__ */
|
|
220
|
+
className: S,
|
|
221
|
+
children: g("relationships.new.pricing.amountLabel", "Amount")
|
|
222
|
+
}), /* @__PURE__ */ m("input", {
|
|
204
223
|
id: "rel-amount",
|
|
205
224
|
type: "number",
|
|
206
225
|
min: "0",
|
|
207
226
|
step: "0.01",
|
|
208
|
-
value:
|
|
209
|
-
onChange: (e) =>
|
|
210
|
-
placeholder: "0.00",
|
|
211
|
-
className:
|
|
227
|
+
value: F,
|
|
228
|
+
onChange: (e) => I(e.target.value),
|
|
229
|
+
placeholder: g("relationships.new.pricing.amountPlaceholder", "0.00"),
|
|
230
|
+
className: x
|
|
212
231
|
})] }),
|
|
213
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
214
233
|
htmlFor: "rel-currency",
|
|
215
|
-
className:
|
|
216
|
-
children: "Currency"
|
|
217
|
-
}), /* @__PURE__ */
|
|
234
|
+
className: S,
|
|
235
|
+
children: g("relationships.new.pricing.currencyLabel", "Currency")
|
|
236
|
+
}), /* @__PURE__ */ m("input", {
|
|
218
237
|
id: "rel-currency",
|
|
219
238
|
type: "text",
|
|
220
|
-
value:
|
|
221
|
-
onChange: (e) =>
|
|
222
|
-
placeholder: "USD",
|
|
239
|
+
value: L,
|
|
240
|
+
onChange: (e) => R(e.target.value.toUpperCase()),
|
|
241
|
+
placeholder: g("relationships.new.pricing.currencyPlaceholder", "USD"),
|
|
223
242
|
maxLength: 3,
|
|
224
|
-
className:
|
|
243
|
+
className: x
|
|
225
244
|
})] }),
|
|
226
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
227
246
|
htmlFor: "rel-interval",
|
|
228
|
-
className:
|
|
229
|
-
children: "Billing interval"
|
|
230
|
-
}), /* @__PURE__ */
|
|
247
|
+
className: S,
|
|
248
|
+
children: g("relationships.new.pricing.intervalLabel", "Billing interval")
|
|
249
|
+
}), /* @__PURE__ */ m("select", {
|
|
231
250
|
id: "rel-interval",
|
|
232
|
-
value:
|
|
233
|
-
onChange: (e) =>
|
|
234
|
-
className:
|
|
235
|
-
children:
|
|
251
|
+
value: z,
|
|
252
|
+
onChange: (e) => B(e.target.value),
|
|
253
|
+
className: x,
|
|
254
|
+
children: y.map((e) => /* @__PURE__ */ m("option", {
|
|
236
255
|
value: e,
|
|
237
|
-
children: e
|
|
256
|
+
children: n(e)
|
|
238
257
|
}, e))
|
|
239
258
|
})] })
|
|
240
259
|
]
|
|
241
|
-
}), /* @__PURE__ */
|
|
260
|
+
}), /* @__PURE__ */ h("div", {
|
|
242
261
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
243
|
-
children: [/* @__PURE__ */
|
|
262
|
+
children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
244
263
|
htmlFor: "rel-renews",
|
|
245
|
-
className:
|
|
246
|
-
children: "Renews on"
|
|
247
|
-
}), /* @__PURE__ */
|
|
264
|
+
className: S,
|
|
265
|
+
children: g("relationships.new.pricing.renewsOnLabel", "Renews on")
|
|
266
|
+
}), /* @__PURE__ */ m("input", {
|
|
248
267
|
id: "rel-renews",
|
|
249
268
|
type: "date",
|
|
250
|
-
value:
|
|
251
|
-
onChange: (e) =>
|
|
252
|
-
className:
|
|
253
|
-
})] }), /* @__PURE__ */
|
|
269
|
+
value: V,
|
|
270
|
+
onChange: (e) => H(e.target.value),
|
|
271
|
+
className: x
|
|
272
|
+
})] }), /* @__PURE__ */ h("label", {
|
|
254
273
|
className: "flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 sm:mt-6",
|
|
255
|
-
children: [/* @__PURE__ */
|
|
274
|
+
children: [/* @__PURE__ */ m("input", {
|
|
256
275
|
type: "checkbox",
|
|
257
|
-
checked:
|
|
258
|
-
onChange: (e) =>
|
|
276
|
+
checked: U,
|
|
277
|
+
onChange: (e) => W(e.target.checked),
|
|
259
278
|
className: "size-4 rounded border-border-subtle"
|
|
260
|
-
}), /* @__PURE__ */
|
|
279
|
+
}), /* @__PURE__ */ m("span", {
|
|
261
280
|
className: "text-sm text-text-primary",
|
|
262
|
-
children: "Auto-renews"
|
|
281
|
+
children: g("relationships.new.pricing.autoRenews", "Auto-renews")
|
|
263
282
|
})]
|
|
264
283
|
})]
|
|
265
284
|
})]
|
|
266
285
|
})
|
|
267
286
|
}),
|
|
268
|
-
/* @__PURE__ */
|
|
269
|
-
icon: /* @__PURE__ */
|
|
270
|
-
title: "Notes",
|
|
271
|
-
description: "Anything worth remembering about this relationship.",
|
|
272
|
-
children: /* @__PURE__ */
|
|
287
|
+
/* @__PURE__ */ m(C, {
|
|
288
|
+
icon: /* @__PURE__ */ m(d, { className: "h-4 w-4" }),
|
|
289
|
+
title: g("relationships.new.notes.title", "Notes"),
|
|
290
|
+
description: g("relationships.new.notes.description", "Anything worth remembering about this relationship."),
|
|
291
|
+
children: /* @__PURE__ */ m("textarea", {
|
|
273
292
|
id: "rel-notes",
|
|
274
|
-
"aria-label": "Notes",
|
|
275
|
-
value:
|
|
276
|
-
onChange: (e) =>
|
|
293
|
+
"aria-label": g("relationships.new.notes.title", "Notes"),
|
|
294
|
+
value: G,
|
|
295
|
+
onChange: (e) => K(e.target.value),
|
|
277
296
|
rows: 3,
|
|
278
|
-
placeholder: "Anything worth remembering about this relationship…",
|
|
279
|
-
className:
|
|
297
|
+
placeholder: g("relationships.new.notes.placeholder", "Anything worth remembering about this relationship…"),
|
|
298
|
+
className: x
|
|
280
299
|
})
|
|
281
300
|
}),
|
|
282
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ h("div", {
|
|
283
302
|
className: "flex flex-col gap-3 sm:flex-row",
|
|
284
|
-
children: [/* @__PURE__ */
|
|
303
|
+
children: [/* @__PURE__ */ m("button", {
|
|
285
304
|
type: "submit",
|
|
286
|
-
disabled:
|
|
305
|
+
disabled: T.isPending,
|
|
287
306
|
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",
|
|
288
|
-
children:
|
|
289
|
-
}), /* @__PURE__ */
|
|
307
|
+
children: T.isPending ? g("relationships.new.creating", "Creating…") : g("relationships.new.submit", "Create relationship")
|
|
308
|
+
}), /* @__PURE__ */ m("button", {
|
|
290
309
|
type: "button",
|
|
291
|
-
onClick: () =>
|
|
310
|
+
onClick: () => w("/relationships"),
|
|
292
311
|
className: "rounded-lg border border-border-subtle px-5 py-2.5 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
293
|
-
children: "Cancel"
|
|
312
|
+
children: g("relationships.new.cancel", "Cancel")
|
|
294
313
|
})]
|
|
295
314
|
})
|
|
296
315
|
]
|
|
@@ -298,6 +317,6 @@ function x() {
|
|
|
298
317
|
});
|
|
299
318
|
}
|
|
300
319
|
//#endregion
|
|
301
|
-
export {
|
|
320
|
+
export { w as RelationshipNewPage };
|
|
302
321
|
|
|
303
322
|
//# sourceMappingURL=RelationshipNewPage.js.map
|
|
@@ -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 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 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 { 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 [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('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 };\n create.mutate(input, {\n onSuccess: (rel) => navigateTo(`/relationships/${rel.id}`),\n onError: (err) =>\n setFormError(err instanceof Error ? err.message : 'Could not create relationship.'),\n });\n };\n\n if (providersQ.isError) {\n return (\n <PageLayout title=\"Add relationship\">\n <ErrorView\n message=\"Could not load the provider registry.\"\n onRetry={() => void providersQ.refetch()}\n />\n </PageLayout>\n );\n }\n\n return (\n <PageLayout\n title=\"Add relationship\"\n description=\"Track a new recurring digital relationship\"\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\" /> Back\n </button>\n }\n >\n <PagePurpose className=\"mb-6\">\n Manually add a subscription, membership, license or contract. Link it to a provider and plan\n from the registry, set the price and renewal date, and Subscriber Bot will track its\n lifecycle from here.\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=\"Basics\"\n description=\"Name this relationship and choose what kind it is.\"\n >\n <div className=\"space-y-4\">\n <div>\n <label htmlFor=\"rel-label\" className={labelCls}>\n Label <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=\"e.g. Netflix Premium, AWS Production\"\n className={inputCls}\n required\n />\n </div>\n <div className=\"max-w-xs\">\n <label htmlFor=\"rel-kind\" className={labelCls}>\n 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 {k.replace(/_/g, ' ')}\n </option>\n ))}\n </select>\n </div>\n </div>\n </FormSection>\n\n {/* Provider & plan */}\n <FormSection\n icon={<Building2 className=\"h-4 w-4\" />}\n title=\"Provider & plan\"\n description=\"Link this relationship to a provider and plan from the registry (optional).\"\n >\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <div>\n <label htmlFor=\"rel-provider\" className={labelCls}>\n 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=\"\">— None —</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 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 ? 'No plans available'\n : '— None —'\n : 'Select a provider first'}\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=\"Pricing & billing\"\n description=\"Set the price, cadence and next renewal so Subscriber Bot can track it.\"\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 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=\"0.00\"\n className={inputCls}\n />\n </div>\n <div>\n <label htmlFor=\"rel-currency\" className={labelCls}>\n 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=\"USD\"\n maxLength={3}\n className={inputCls}\n />\n </div>\n <div>\n <label htmlFor=\"rel-interval\" className={labelCls}>\n 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 {i.replace(/_/g, ' ')}\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 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\">Auto-renews</span>\n </label>\n </div>\n </div>\n </FormSection>\n\n {/* Notes */}\n <FormSection\n icon={<StickyNote className=\"h-4 w-4\" />}\n title=\"Notes\"\n description=\"Anything worth remembering about this relationship.\"\n >\n <textarea\n id=\"rel-notes\"\n aria-label=\"Notes\"\n value={notes}\n onChange={(e) => setNotes(e.target.value)}\n rows={3}\n placeholder=\"Anything worth remembering about this relationship…\"\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 ? 'Creating…' : '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 Cancel\n </button>\n </div>\n </form>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;AAsBA,IAAM,IAA+B;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EAEK,IAAkC;CACtC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EAEK,IACJ,0MACI,IAAW;AAGjB,SAAS,EAAY,EACnB,SACA,UACA,gBACA,eAMC;AACD,QACE,kBAAC,GAAD;EAAW,WAAU;EAAS,WAAU;YAAxC,CACE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,QAAD;IAAM,WAAU;cACb;IACI,CAAA,EACP,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,MAAD;KAAI,WAAU;eAA2C;KAAW,CAAA,EACpE,kBAAC,KAAD;KAAG,WAAU;eAAsC;KAAgB,CAAA,CAC/D;MACF;MACN,kBAAC,OAAD;GAAK,WAAU;GAAQ;GAAe,CAAA,CAC5B;;;AAIhB,SAAgB,IAAsB;CACpC,IAAM,EAAE,kBAAe,GAAkB,EACnC,IAAS,GAAuB,EAChC,IAAa,EAAa,EAAE,YAAY;EAAE,OAAO;EAAK,QAAQ;EAAG,EAAE,CAAC,EAEpE,CAAC,GAAO,KAAY,EAAS,GAAG,EAChC,CAAC,GAAM,KAAW,EAA8B,eAAe,EAC/D,CAAC,GAAY,KAAiB,EAAS,GAAG,EAC1C,CAAC,GAAQ,KAAa,EAAS,GAAG,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MACN,aAAY;MACZ,WAAW;MACX,CAAA;KACU,CAAA;IAEd,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,UAAD;MACE,MAAK;MACL,UAAU,EAAO;MACjB,WAAU;gBAET,EAAO,YAAY,cAAc;MAC3B,CAAA,EACT,kBAAC,UAAD;MACE,MAAK;MACL,eAAe,EAAW,iBAAiB;MAC3C,WAAU;gBACX;MAEQ,CAAA,CACL;;IACD;KACI"}
|
|
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 [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 };\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>\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":";;;;;;;;;;;AAwBA,IAAM,IAA+B;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EAEK,IAAkC;CACtC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EAEK,IAAgD;CACpD,cAAc;CACd,YAAY;CACZ,SAAS;CACT,UAAU;CACV,YAAY;CACZ,mBAAmB;CACnB,YAAY;CACZ,OAAO;CACR,EAEK,IACJ,0MACI,IAAW;AAGjB,SAAS,EAAY,EACnB,SACA,UACA,gBACA,eAMC;AACD,QACE,kBAAC,GAAD;EAAW,WAAU;EAAS,WAAU;YAAxC,CACE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,QAAD;IAAM,WAAU;cACb;IACI,CAAA,EACP,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,MAAD;KAAI,WAAU;eAA2C;KAAW,CAAA,EACpE,kBAAC,KAAD;KAAG,WAAU;eAAsC;KAAgB,CAAA,CAC/D;MACF;MACN,kBAAC,OAAD;GAAK,WAAU;GAAQ;GAAe,CAAA,CAC5B;;;AAIhB,SAAgB,IAAsB;CACpC,IAAM,IAAK,GAAO,EACZ,EAAE,kBAAe,GAAkB,EACnC,IAAS,GAAuB,EAChC,IAAa,EAAa,EAAE,YAAY;EAAE,OAAO;EAAK,QAAQ;EAAG,EAAE,CAAC,EAEpE,CAAC,GAAO,KAAY,EAAS,GAAG,EAChC,CAAC,GAAM,KAAW,EAA8B,eAAe,EAC/D,CAAC,GAAY,KAAiB,EAAS,GAAG,EAC1C,CAAC,GAAQ,KAAa,EAAS,GAAG,EAClC,CAAC,GAAQ,KAAa,EAAS,GAAG,EAClC,CAAC,GAAU,KAAe,EAAS,MAAM,EACzC,CAAC,GAAU,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EAAY,EAAE,OAAO,MAAM;QAC5C,WAAW;QACX,CAAA,CACE,EAAA,CAAA,EACN,kBAAC,SAAD;QAAO,WAAU;kBAAjB,CACE,kBAAC,SAAD;SACE,MAAK;SACL,SAAS;SACT,WAAW,MAAM,EAAa,EAAE,OAAO,QAAQ;SAC/C,WAAU;SACV,CAAA,EACF,kBAAC,QAAD;SAAM,WAAU;mBACb,EAAG,wCAAwC,cAAc;SACrD,CAAA,CACD;UACJ;SACF;;KACM,CAAA;IAGd,kBAAC,GAAD;KACE,MAAM,kBAAC,GAAD,EAAY,WAAU,WAAY,CAAA;KACxC,OAAO,EAAG,iCAAiC,QAAQ;KACnD,aAAa,EACX,uCACA,sDACD;eAED,kBAAC,YAAD;MACE,IAAG;MACH,cAAY,EAAG,iCAAiC,QAAQ;MACxD,OAAO;MACP,WAAW,MAAM,EAAS,EAAE,OAAO,MAAM;MACzC,MAAM;MACN,aAAa,EACX,uCACA,sDACD;MACD,WAAW;MACX,CAAA;KACU,CAAA;IAEd,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,UAAD;MACE,MAAK;MACL,UAAU,EAAO;MACjB,WAAU;gBAET,EAAO,YACJ,EAAG,8BAA8B,YAAY,GAC7C,EAAG,4BAA4B,sBAAsB;MAClD,CAAA,EACT,kBAAC,UAAD;MACE,MAAK;MACL,eAAe,EAAW,iBAAiB;MAC3C,WAAU;gBAET,EAAG,4BAA4B,SAAS;MAClC,CAAA,CACL;;IACD;KACI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RelationshipsListPage.d.ts","sourceRoot":"","sources":["../../../../src/subscriberbot/pages/relationships/RelationshipsListPage.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"RelationshipsListPage.d.ts","sourceRoot":"","sources":["../../../../src/subscriberbot/pages/relationships/RelationshipsListPage.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA+EH,wBAAgB,qBAAqB,gCA+PpC"}
|