@burdenoff/microfe-subscriberbot 2026.1030.4 → 2026.1030.5
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/components/decisions/DecisionCard.d.ts.map +1 -1
- package/dist/subscriberbot/components/decisions/DecisionCard.js +1 -0
- package/dist/subscriberbot/components/decisions/DecisionCard.js.map +1 -1
- package/dist/subscriberbot/components/decisions/decisionModel.d.ts +3 -2
- package/dist/subscriberbot/components/decisions/decisionModel.d.ts.map +1 -1
- package/dist/subscriberbot/components/decisions/decisionModel.js +18 -5
- package/dist/subscriberbot/components/decisions/decisionModel.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +292 -301
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
- package/dist/subscriberbot/types/index.d.ts +1 -2
- package/dist/subscriberbot/types/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -13,12 +13,12 @@ import { DecisionCard as O } from "../../components/decisions/DecisionCard.js";
|
|
|
13
13
|
import { AiDisclaimer as k } from "../../components/decisions/DecisionBanners.js";
|
|
14
14
|
import "../../components/decisions/index.js";
|
|
15
15
|
import { useState as A } from "react";
|
|
16
|
-
import { Activity as j, ArrowLeft as M, Ban as N, CalendarClock as P, CreditCard as F, Download as I, Paperclip as L, Pause as R, Pencil as ee, Play as z, Plus as
|
|
17
|
-
import { useParams as
|
|
18
|
-
import { Fragment as
|
|
19
|
-
import { GlassCard as
|
|
16
|
+
import { Activity as j, ArrowLeft as M, Ban as N, CalendarClock as P, CreditCard as F, Download as I, Paperclip as L, Pause as R, Pencil as ee, Play as z, Plus as te, ShieldCheck as ne, Tag as re, Wallet as ie } from "lucide-react";
|
|
17
|
+
import { useParams as ae } from "react-router";
|
|
18
|
+
import { Fragment as oe, jsx as B, jsxs as V } from "react/jsx-runtime";
|
|
19
|
+
import { GlassCard as H } from "@burdenoff/fe-libs/ui";
|
|
20
20
|
//#region src/subscriberbot/pages/relationships/RelationshipDetailPage.tsx
|
|
21
|
-
var
|
|
21
|
+
var U = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", W = "mb-1 block text-xs font-medium text-text-secondary", G = [
|
|
22
22
|
"MONTHLY",
|
|
23
23
|
"YEARLY",
|
|
24
24
|
"QUARTERLY",
|
|
@@ -27,14 +27,14 @@ var W = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 t
|
|
|
27
27
|
"USAGE_BASED",
|
|
28
28
|
"LIFETIME",
|
|
29
29
|
"FREE"
|
|
30
|
-
],
|
|
30
|
+
], K = [
|
|
31
31
|
"FEATURE_ACCESS",
|
|
32
32
|
"SEAT",
|
|
33
33
|
"USAGE_QUOTA",
|
|
34
34
|
"CONTENT",
|
|
35
35
|
"DISCOUNT",
|
|
36
36
|
"SUPPORT_TIER"
|
|
37
|
-
],
|
|
37
|
+
], q = [
|
|
38
38
|
"RECEIPT",
|
|
39
39
|
"INVOICE",
|
|
40
40
|
"CONTRACT",
|
|
@@ -43,7 +43,7 @@ var W = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 t
|
|
|
43
43
|
"CERTIFICATE",
|
|
44
44
|
"WARRANTY",
|
|
45
45
|
"DOMAIN"
|
|
46
|
-
],
|
|
46
|
+
], J = {
|
|
47
47
|
SUBSCRIPTION: "relationships.kinds.subscription",
|
|
48
48
|
MEMBERSHIP: "relationships.kinds.membership",
|
|
49
49
|
LICENSE: "relationships.kinds.license",
|
|
@@ -52,7 +52,7 @@ var W = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 t
|
|
|
52
52
|
RECURRING_PAYMENT: "relationships.kinds.recurringPayment",
|
|
53
53
|
ENROLLMENT: "relationships.kinds.enrollment",
|
|
54
54
|
TRIAL: "relationships.kinds.trial"
|
|
55
|
-
},
|
|
55
|
+
}, se = [
|
|
56
56
|
{
|
|
57
57
|
status: "ACTIVE",
|
|
58
58
|
labelKey: "relationships.detail.actions.activate",
|
|
@@ -72,22 +72,22 @@ var W = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 t
|
|
|
72
72
|
icon: N
|
|
73
73
|
}
|
|
74
74
|
];
|
|
75
|
-
function
|
|
76
|
-
return /* @__PURE__ */
|
|
75
|
+
function Y({ label: e, value: t }) {
|
|
76
|
+
return /* @__PURE__ */ V("div", {
|
|
77
77
|
className: "flex items-center justify-between gap-3 border-b border-border-subtle/60 py-2.5 last:border-0 last:pb-0",
|
|
78
|
-
children: [/* @__PURE__ */
|
|
78
|
+
children: [/* @__PURE__ */ B("span", {
|
|
79
79
|
className: "shrink-0 text-sm text-text-secondary",
|
|
80
80
|
children: e
|
|
81
|
-
}), /* @__PURE__ */
|
|
81
|
+
}), /* @__PURE__ */ B("span", {
|
|
82
82
|
className: "min-w-0 truncate text-right text-sm font-medium text-text-primary",
|
|
83
83
|
children: t
|
|
84
84
|
})]
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function ce(e) {
|
|
88
88
|
return e == null ? "accent" : e >= 66 ? "positive" : e >= 33 ? "warning" : "negative";
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function X(e) {
|
|
91
91
|
if (!e) return "";
|
|
92
92
|
let t = new Date(e);
|
|
93
93
|
return Number.isNaN(t.getTime()) ? "" : t.toISOString().slice(0, 10);
|
|
@@ -96,18 +96,18 @@ function le({ relationship: e, onClose: t }) {
|
|
|
96
96
|
let n = l(), r = E(), i = C({ pagination: {
|
|
97
97
|
limit: 100,
|
|
98
98
|
offset: 0
|
|
99
|
-
} }), [a, o] = A(e.label), [s, u] = A(e.providerId ?? ""), [d, f] = A(e.planId ?? ""), [p, m] = A(String(e.amount ?? "")), [h, g] = A(e.currency), [_, v] = A(e.interval), [y, b] = A(
|
|
99
|
+
} }), [a, o] = A(e.label), [s, u] = A(e.providerId ?? ""), [d, f] = A(e.planId ?? ""), [p, m] = A(String(e.amount ?? "")), [h, g] = A(e.currency), [_, v] = A(e.interval), [y, b] = A(X(e.renewsAt)), [x, w] = A(e.autoRenew), [T, D] = A(e.notes ?? ""), [O, k] = A(null), j = S(s || void 0), M = (() => {
|
|
100
100
|
let t = i.data?.items ?? [];
|
|
101
101
|
return e.provider && !t.some((t) => t.id === e.provider?.id) ? [e.provider, ...t] : t;
|
|
102
|
-
})(),
|
|
103
|
-
return /* @__PURE__ */
|
|
102
|
+
})(), N = j.data ?? [];
|
|
103
|
+
return /* @__PURE__ */ B(c, {
|
|
104
104
|
title: n("relationships.detail.editModal.title", "Edit relationship"),
|
|
105
105
|
onClose: t,
|
|
106
106
|
maxWidthClassName: "max-w-2xl",
|
|
107
|
-
children: /* @__PURE__ */
|
|
107
|
+
children: /* @__PURE__ */ V("form", {
|
|
108
108
|
onSubmit: (i) => {
|
|
109
|
-
if (i.preventDefault(),
|
|
110
|
-
|
|
109
|
+
if (i.preventDefault(), k(null), !a.trim()) {
|
|
110
|
+
k(n("relationships.detail.editModal.labelRequired", "A label is required."));
|
|
111
111
|
return;
|
|
112
112
|
}
|
|
113
113
|
let o = {
|
|
@@ -115,11 +115,10 @@ function le({ relationship: e, onClose: t }) {
|
|
|
115
115
|
interval: _,
|
|
116
116
|
autoRenew: x,
|
|
117
117
|
currency: h.trim() || "USD",
|
|
118
|
-
notes:
|
|
118
|
+
notes: T.trim(),
|
|
119
119
|
...s ? { providerId: s } : {},
|
|
120
120
|
...d ? { planId: d } : {},
|
|
121
121
|
...p.trim() ? { amount: Number(p) } : {},
|
|
122
|
-
...T.trim() ? { healthScore: Number(T) } : {},
|
|
123
122
|
...y ? { renewsAt: new Date(y).toISOString() } : {}
|
|
124
123
|
};
|
|
125
124
|
r.mutate({
|
|
@@ -127,177 +126,161 @@ function le({ relationship: e, onClose: t }) {
|
|
|
127
126
|
input: o
|
|
128
127
|
}, {
|
|
129
128
|
onSuccess: () => t(),
|
|
130
|
-
onError: (e) =>
|
|
129
|
+
onError: (e) => k(e instanceof Error ? e.message : n("relationships.detail.editModal.error", "Could not update relationship."))
|
|
131
130
|
});
|
|
132
131
|
},
|
|
133
132
|
className: "space-y-4",
|
|
134
133
|
children: [
|
|
135
|
-
|
|
134
|
+
O && /* @__PURE__ */ B("div", {
|
|
136
135
|
className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
|
|
137
|
-
children:
|
|
136
|
+
children: O
|
|
138
137
|
}),
|
|
139
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ V("div", { children: [/* @__PURE__ */ V("label", {
|
|
140
139
|
htmlFor: "edit-label",
|
|
141
|
-
className:
|
|
140
|
+
className: W,
|
|
142
141
|
children: [
|
|
143
142
|
n("relationships.detail.editModal.labelLabel", "Label"),
|
|
144
143
|
" ",
|
|
145
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ B("span", {
|
|
146
145
|
className: "text-status-error-text",
|
|
147
146
|
children: "*"
|
|
148
147
|
})
|
|
149
148
|
]
|
|
150
|
-
}), /* @__PURE__ */
|
|
149
|
+
}), /* @__PURE__ */ B("input", {
|
|
151
150
|
id: "edit-label",
|
|
152
151
|
type: "text",
|
|
153
152
|
value: a,
|
|
154
153
|
onChange: (e) => o(e.target.value),
|
|
155
|
-
className:
|
|
154
|
+
className: U,
|
|
156
155
|
required: !0
|
|
157
156
|
})] }),
|
|
158
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ V("div", {
|
|
159
158
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
160
|
-
children: [/* @__PURE__ */
|
|
159
|
+
children: [/* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("label", {
|
|
161
160
|
htmlFor: "edit-provider",
|
|
162
|
-
className:
|
|
161
|
+
className: W,
|
|
163
162
|
children: n("relationships.detail.editModal.providerLabel", "Provider")
|
|
164
|
-
}), /* @__PURE__ */
|
|
163
|
+
}), /* @__PURE__ */ V("select", {
|
|
165
164
|
id: "edit-provider",
|
|
166
165
|
value: s,
|
|
167
166
|
onChange: (e) => {
|
|
168
167
|
u(e.target.value), f("");
|
|
169
168
|
},
|
|
170
|
-
className:
|
|
171
|
-
children: [/* @__PURE__ */
|
|
169
|
+
className: U,
|
|
170
|
+
children: [/* @__PURE__ */ B("option", {
|
|
172
171
|
value: "",
|
|
173
172
|
children: n("relationships.detail.editModal.providerNone", "— None —")
|
|
174
|
-
}),
|
|
173
|
+
}), M.map((e) => /* @__PURE__ */ B("option", {
|
|
175
174
|
value: e.id,
|
|
176
175
|
children: e.name
|
|
177
176
|
}, e.id))]
|
|
178
|
-
})] }), /* @__PURE__ */
|
|
177
|
+
})] }), /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("label", {
|
|
179
178
|
htmlFor: "edit-plan",
|
|
180
|
-
className:
|
|
179
|
+
className: W,
|
|
181
180
|
children: n("relationships.detail.editModal.planLabel", "Plan")
|
|
182
|
-
}), /* @__PURE__ */
|
|
181
|
+
}), /* @__PURE__ */ V("select", {
|
|
183
182
|
id: "edit-plan",
|
|
184
183
|
value: d,
|
|
185
184
|
onChange: (e) => f(e.target.value),
|
|
186
|
-
className:
|
|
187
|
-
disabled: !s ||
|
|
188
|
-
children: [/* @__PURE__ */
|
|
185
|
+
className: U,
|
|
186
|
+
disabled: !s || N.length === 0,
|
|
187
|
+
children: [/* @__PURE__ */ B("option", {
|
|
189
188
|
value: "",
|
|
190
189
|
children: n("relationships.detail.editModal.planNone", "— None —")
|
|
191
|
-
}),
|
|
190
|
+
}), N.map((e) => /* @__PURE__ */ B("option", {
|
|
192
191
|
value: e.id,
|
|
193
192
|
children: e.name
|
|
194
193
|
}, e.id))]
|
|
195
194
|
})] })]
|
|
196
195
|
}),
|
|
197
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ V("div", {
|
|
198
197
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
|
|
199
198
|
children: [
|
|
200
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("label", {
|
|
201
200
|
htmlFor: "edit-amount",
|
|
202
|
-
className:
|
|
201
|
+
className: W,
|
|
203
202
|
children: n("relationships.detail.editModal.amountLabel", "Amount")
|
|
204
|
-
}), /* @__PURE__ */
|
|
203
|
+
}), /* @__PURE__ */ B("input", {
|
|
205
204
|
id: "edit-amount",
|
|
206
205
|
type: "number",
|
|
207
206
|
min: "0",
|
|
208
207
|
step: "0.01",
|
|
209
208
|
value: p,
|
|
210
209
|
onChange: (e) => m(e.target.value),
|
|
211
|
-
className:
|
|
210
|
+
className: U
|
|
212
211
|
})] }),
|
|
213
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("label", {
|
|
214
213
|
htmlFor: "edit-currency",
|
|
215
|
-
className:
|
|
214
|
+
className: W,
|
|
216
215
|
children: n("relationships.detail.editModal.currencyLabel", "Currency")
|
|
217
|
-
}), /* @__PURE__ */
|
|
216
|
+
}), /* @__PURE__ */ B("input", {
|
|
218
217
|
id: "edit-currency",
|
|
219
218
|
type: "text",
|
|
220
219
|
value: h,
|
|
221
220
|
onChange: (e) => g(e.target.value.toUpperCase()),
|
|
222
221
|
maxLength: 3,
|
|
223
|
-
className:
|
|
222
|
+
className: U
|
|
224
223
|
})] }),
|
|
225
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("label", {
|
|
226
225
|
htmlFor: "edit-interval",
|
|
227
|
-
className:
|
|
226
|
+
className: W,
|
|
228
227
|
children: n("relationships.detail.editModal.intervalLabel", "Billing interval")
|
|
229
|
-
}), /* @__PURE__ */
|
|
228
|
+
}), /* @__PURE__ */ B("select", {
|
|
230
229
|
id: "edit-interval",
|
|
231
230
|
value: _,
|
|
232
231
|
onChange: (e) => v(e.target.value),
|
|
233
|
-
className:
|
|
234
|
-
children:
|
|
232
|
+
className: U,
|
|
233
|
+
children: G.map((e) => /* @__PURE__ */ B("option", {
|
|
235
234
|
value: e,
|
|
236
235
|
children: e.replace(/_/g, " ")
|
|
237
236
|
}, e))
|
|
238
237
|
})] })
|
|
239
238
|
]
|
|
240
239
|
}),
|
|
241
|
-
/* @__PURE__ */
|
|
240
|
+
/* @__PURE__ */ V("div", {
|
|
242
241
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
|
|
243
|
-
children: [
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
max: "100",
|
|
264
|
-
value: T,
|
|
265
|
-
onChange: (e) => D(e.target.value),
|
|
266
|
-
className: W
|
|
267
|
-
})] }),
|
|
268
|
-
/* @__PURE__ */ V("div", {
|
|
269
|
-
className: "flex items-end",
|
|
270
|
-
children: /* @__PURE__ */ H("label", {
|
|
271
|
-
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
272
|
-
children: [/* @__PURE__ */ V("input", {
|
|
273
|
-
type: "checkbox",
|
|
274
|
-
checked: x,
|
|
275
|
-
onChange: (e) => w(e.target.checked),
|
|
276
|
-
className: "size-4 rounded border-border-subtle"
|
|
277
|
-
}), n("relationships.detail.editModal.autoRenews", "Auto-renews")]
|
|
278
|
-
})
|
|
242
|
+
children: [/* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("label", {
|
|
243
|
+
htmlFor: "edit-renews",
|
|
244
|
+
className: W,
|
|
245
|
+
children: n("relationships.detail.editModal.renewsOnLabel", "Renews on")
|
|
246
|
+
}), /* @__PURE__ */ B("input", {
|
|
247
|
+
id: "edit-renews",
|
|
248
|
+
type: "date",
|
|
249
|
+
value: y,
|
|
250
|
+
onChange: (e) => b(e.target.value),
|
|
251
|
+
className: U
|
|
252
|
+
})] }), /* @__PURE__ */ B("div", {
|
|
253
|
+
className: "flex items-end",
|
|
254
|
+
children: /* @__PURE__ */ V("label", {
|
|
255
|
+
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
256
|
+
children: [/* @__PURE__ */ B("input", {
|
|
257
|
+
type: "checkbox",
|
|
258
|
+
checked: x,
|
|
259
|
+
onChange: (e) => w(e.target.checked),
|
|
260
|
+
className: "size-4 rounded border-border-subtle"
|
|
261
|
+
}), n("relationships.detail.editModal.autoRenews", "Auto-renews")]
|
|
279
262
|
})
|
|
280
|
-
]
|
|
263
|
+
})]
|
|
281
264
|
}),
|
|
282
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("label", {
|
|
283
266
|
htmlFor: "edit-notes",
|
|
284
|
-
className:
|
|
267
|
+
className: W,
|
|
285
268
|
children: n("relationships.detail.editModal.notesLabel", "Notes")
|
|
286
|
-
}), /* @__PURE__ */
|
|
269
|
+
}), /* @__PURE__ */ B("textarea", {
|
|
287
270
|
id: "edit-notes",
|
|
288
|
-
value:
|
|
289
|
-
onChange: (e) =>
|
|
271
|
+
value: T,
|
|
272
|
+
onChange: (e) => D(e.target.value),
|
|
290
273
|
rows: 3,
|
|
291
|
-
className:
|
|
274
|
+
className: U
|
|
292
275
|
})] }),
|
|
293
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ V("div", {
|
|
294
277
|
className: "flex justify-end gap-3",
|
|
295
|
-
children: [/* @__PURE__ */
|
|
278
|
+
children: [/* @__PURE__ */ B("button", {
|
|
296
279
|
type: "button",
|
|
297
280
|
onClick: t,
|
|
298
281
|
className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
299
282
|
children: n("relationships.detail.editModal.cancel", "Cancel")
|
|
300
|
-
}), /* @__PURE__ */
|
|
283
|
+
}), /* @__PURE__ */ B("button", {
|
|
301
284
|
type: "submit",
|
|
302
285
|
disabled: r.isPending,
|
|
303
286
|
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50",
|
|
@@ -310,10 +293,10 @@ function le({ relationship: e, onClose: t }) {
|
|
|
310
293
|
}
|
|
311
294
|
function ue({ relationshipId: e, onClose: t }) {
|
|
312
295
|
let n = l(), r = v(), [i, a] = A(""), [o, s] = A("FEATURE_ACCESS"), [u, d] = A(""), [f, p] = A(""), [m, h] = A(""), [g, _] = A(null);
|
|
313
|
-
return /* @__PURE__ */
|
|
296
|
+
return /* @__PURE__ */ B(c, {
|
|
314
297
|
title: n("relationships.detail.addEntitlementModal.title", "Add entitlement"),
|
|
315
298
|
onClose: t,
|
|
316
|
-
children: /* @__PURE__ */
|
|
299
|
+
children: /* @__PURE__ */ V("form", {
|
|
317
300
|
onSubmit: (a) => {
|
|
318
301
|
if (a.preventDefault(), _(null), !i.trim()) {
|
|
319
302
|
_(n("relationships.detail.addEntitlementModal.nameRequired", "An entitlement name is required."));
|
|
@@ -333,93 +316,93 @@ function ue({ relationshipId: e, onClose: t }) {
|
|
|
333
316
|
},
|
|
334
317
|
className: "space-y-4",
|
|
335
318
|
children: [
|
|
336
|
-
g && /* @__PURE__ */
|
|
319
|
+
g && /* @__PURE__ */ B("div", {
|
|
337
320
|
className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
|
|
338
321
|
children: g
|
|
339
322
|
}),
|
|
340
|
-
/* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ V("div", { children: [/* @__PURE__ */ V("label", {
|
|
341
324
|
htmlFor: "ent-name",
|
|
342
|
-
className:
|
|
325
|
+
className: W,
|
|
343
326
|
children: [
|
|
344
327
|
n("relationships.detail.addEntitlementModal.nameLabel", "Name"),
|
|
345
328
|
" ",
|
|
346
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ B("span", {
|
|
347
330
|
className: "text-status-error-text",
|
|
348
331
|
children: "*"
|
|
349
332
|
})
|
|
350
333
|
]
|
|
351
|
-
}), /* @__PURE__ */
|
|
334
|
+
}), /* @__PURE__ */ B("input", {
|
|
352
335
|
id: "ent-name",
|
|
353
336
|
type: "text",
|
|
354
337
|
value: i,
|
|
355
338
|
onChange: (e) => a(e.target.value),
|
|
356
339
|
placeholder: n("relationships.detail.addEntitlementModal.namePlaceholder", "e.g. Seats, API calls, Priority support"),
|
|
357
|
-
className:
|
|
340
|
+
className: U,
|
|
358
341
|
required: !0
|
|
359
342
|
})] }),
|
|
360
|
-
/* @__PURE__ */
|
|
343
|
+
/* @__PURE__ */ V("div", {
|
|
361
344
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
|
|
362
345
|
children: [
|
|
363
|
-
/* @__PURE__ */
|
|
346
|
+
/* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("label", {
|
|
364
347
|
htmlFor: "ent-type",
|
|
365
|
-
className:
|
|
348
|
+
className: W,
|
|
366
349
|
children: n("relationships.detail.addEntitlementModal.typeLabel", "Type")
|
|
367
|
-
}), /* @__PURE__ */
|
|
350
|
+
}), /* @__PURE__ */ B("select", {
|
|
368
351
|
id: "ent-type",
|
|
369
352
|
value: o,
|
|
370
353
|
onChange: (e) => s(e.target.value),
|
|
371
|
-
className:
|
|
372
|
-
children:
|
|
354
|
+
className: U,
|
|
355
|
+
children: K.map((e) => /* @__PURE__ */ B("option", {
|
|
373
356
|
value: e,
|
|
374
357
|
children: e.replace(/_/g, " ")
|
|
375
358
|
}, e))
|
|
376
359
|
})] }),
|
|
377
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("label", {
|
|
378
361
|
htmlFor: "ent-quota",
|
|
379
|
-
className:
|
|
362
|
+
className: W,
|
|
380
363
|
children: n("relationships.detail.addEntitlementModal.quotaLabel", "Quota")
|
|
381
|
-
}), /* @__PURE__ */
|
|
364
|
+
}), /* @__PURE__ */ B("input", {
|
|
382
365
|
id: "ent-quota",
|
|
383
366
|
type: "number",
|
|
384
367
|
min: "0",
|
|
385
368
|
value: u,
|
|
386
369
|
onChange: (e) => d(e.target.value),
|
|
387
370
|
placeholder: n("relationships.detail.addEntitlementModal.quotaPlaceholder", "e.g. 5"),
|
|
388
|
-
className:
|
|
371
|
+
className: U
|
|
389
372
|
})] }),
|
|
390
|
-
/* @__PURE__ */
|
|
373
|
+
/* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("label", {
|
|
391
374
|
htmlFor: "ent-unit",
|
|
392
|
-
className:
|
|
375
|
+
className: W,
|
|
393
376
|
children: n("relationships.detail.addEntitlementModal.unitLabel", "Unit")
|
|
394
|
-
}), /* @__PURE__ */
|
|
377
|
+
}), /* @__PURE__ */ B("input", {
|
|
395
378
|
id: "ent-unit",
|
|
396
379
|
type: "text",
|
|
397
380
|
value: f,
|
|
398
381
|
onChange: (e) => p(e.target.value),
|
|
399
382
|
placeholder: n("relationships.detail.addEntitlementModal.unitPlaceholder", "e.g. seats, GB"),
|
|
400
|
-
className:
|
|
383
|
+
className: U
|
|
401
384
|
})] })
|
|
402
385
|
]
|
|
403
386
|
}),
|
|
404
|
-
/* @__PURE__ */
|
|
387
|
+
/* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("label", {
|
|
405
388
|
htmlFor: "ent-desc",
|
|
406
|
-
className:
|
|
389
|
+
className: W,
|
|
407
390
|
children: n("relationships.detail.addEntitlementModal.descriptionLabel", "Description")
|
|
408
|
-
}), /* @__PURE__ */
|
|
391
|
+
}), /* @__PURE__ */ B("textarea", {
|
|
409
392
|
id: "ent-desc",
|
|
410
393
|
value: m,
|
|
411
394
|
onChange: (e) => h(e.target.value),
|
|
412
395
|
rows: 2,
|
|
413
|
-
className:
|
|
396
|
+
className: U
|
|
414
397
|
})] }),
|
|
415
|
-
/* @__PURE__ */
|
|
398
|
+
/* @__PURE__ */ V("div", {
|
|
416
399
|
className: "flex justify-end gap-3",
|
|
417
|
-
children: [/* @__PURE__ */
|
|
400
|
+
children: [/* @__PURE__ */ B("button", {
|
|
418
401
|
type: "button",
|
|
419
402
|
onClick: t,
|
|
420
403
|
className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
421
404
|
children: n("relationships.detail.addEntitlementModal.cancel", "Cancel")
|
|
422
|
-
}), /* @__PURE__ */
|
|
405
|
+
}), /* @__PURE__ */ B("button", {
|
|
423
406
|
type: "submit",
|
|
424
407
|
disabled: r.isPending,
|
|
425
408
|
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50",
|
|
@@ -432,10 +415,10 @@ function ue({ relationshipId: e, onClose: t }) {
|
|
|
432
415
|
}
|
|
433
416
|
function de({ relationshipId: e, onClose: t }) {
|
|
434
417
|
let n = l(), r = _(), { uploadFile: i, progress: a, isUploading: o } = D(), [s, u] = A(""), [d, f] = A("RECEIPT"), [p, m] = A(null), [h, g] = A(""), [v, y] = A(null), b = o || r.isPending;
|
|
435
|
-
return /* @__PURE__ */
|
|
418
|
+
return /* @__PURE__ */ B(c, {
|
|
436
419
|
title: n("relationships.detail.attachAssetModal.title", "Attach asset"),
|
|
437
420
|
onClose: t,
|
|
438
|
-
children: /* @__PURE__ */
|
|
421
|
+
children: /* @__PURE__ */ V("form", {
|
|
439
422
|
onSubmit: async (a) => {
|
|
440
423
|
if (a.preventDefault(), y(null), !p) {
|
|
441
424
|
y(n("relationships.detail.attachAssetModal.chooseFile", "Choose a file to attach."));
|
|
@@ -456,24 +439,24 @@ function de({ relationshipId: e, onClose: t }) {
|
|
|
456
439
|
},
|
|
457
440
|
className: "space-y-4",
|
|
458
441
|
children: [
|
|
459
|
-
v && /* @__PURE__ */
|
|
442
|
+
v && /* @__PURE__ */ B("div", {
|
|
460
443
|
className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
|
|
461
444
|
children: v
|
|
462
445
|
}),
|
|
463
|
-
/* @__PURE__ */
|
|
464
|
-
/* @__PURE__ */
|
|
446
|
+
/* @__PURE__ */ V("div", { children: [
|
|
447
|
+
/* @__PURE__ */ V("label", {
|
|
465
448
|
htmlFor: "asset-file",
|
|
466
|
-
className:
|
|
449
|
+
className: W,
|
|
467
450
|
children: [
|
|
468
451
|
n("relationships.detail.attachAssetModal.fileLabel", "File"),
|
|
469
452
|
" ",
|
|
470
|
-
/* @__PURE__ */
|
|
453
|
+
/* @__PURE__ */ B("span", {
|
|
471
454
|
className: "text-status-error-text",
|
|
472
455
|
children: "*"
|
|
473
456
|
})
|
|
474
457
|
]
|
|
475
458
|
}),
|
|
476
|
-
/* @__PURE__ */
|
|
459
|
+
/* @__PURE__ */ B("input", {
|
|
477
460
|
id: "asset-file",
|
|
478
461
|
type: "file",
|
|
479
462
|
onChange: (e) => {
|
|
@@ -482,62 +465,62 @@ function de({ relationshipId: e, onClose: t }) {
|
|
|
482
465
|
},
|
|
483
466
|
className: "w-full text-sm text-text-secondary file:mr-3 file:rounded-lg file:border file:border-border-subtle file:bg-bg-surface file:px-3 file:py-1.5 file:text-sm file:font-medium file:text-text-primary hover:file:bg-bg-sunken"
|
|
484
467
|
}),
|
|
485
|
-
/* @__PURE__ */
|
|
468
|
+
/* @__PURE__ */ B("p", {
|
|
486
469
|
className: "mt-1 text-xs text-text-secondary",
|
|
487
470
|
children: n("relationships.detail.attachAssetModal.fileHint", "Stored securely in files — only a reference is kept here.")
|
|
488
471
|
})
|
|
489
472
|
] }),
|
|
490
|
-
/* @__PURE__ */
|
|
473
|
+
/* @__PURE__ */ V("div", {
|
|
491
474
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
492
|
-
children: [/* @__PURE__ */
|
|
475
|
+
children: [/* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("label", {
|
|
493
476
|
htmlFor: "asset-name",
|
|
494
|
-
className:
|
|
477
|
+
className: W,
|
|
495
478
|
children: n("relationships.detail.attachAssetModal.nameLabel", "Name")
|
|
496
|
-
}), /* @__PURE__ */
|
|
479
|
+
}), /* @__PURE__ */ B("input", {
|
|
497
480
|
id: "asset-name",
|
|
498
481
|
type: "text",
|
|
499
482
|
value: s,
|
|
500
483
|
onChange: (e) => u(e.target.value),
|
|
501
484
|
placeholder: n("relationships.detail.attachAssetModal.namePlaceholder", "Defaults to the file name"),
|
|
502
|
-
className:
|
|
503
|
-
})] }), /* @__PURE__ */
|
|
485
|
+
className: U
|
|
486
|
+
})] }), /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("label", {
|
|
504
487
|
htmlFor: "asset-type",
|
|
505
|
-
className:
|
|
488
|
+
className: W,
|
|
506
489
|
children: n("relationships.detail.attachAssetModal.typeLabel", "Type")
|
|
507
|
-
}), /* @__PURE__ */
|
|
490
|
+
}), /* @__PURE__ */ B("select", {
|
|
508
491
|
id: "asset-type",
|
|
509
492
|
value: d,
|
|
510
493
|
onChange: (e) => f(e.target.value),
|
|
511
|
-
className:
|
|
512
|
-
children:
|
|
494
|
+
className: U,
|
|
495
|
+
children: q.map((e) => /* @__PURE__ */ B("option", {
|
|
513
496
|
value: e,
|
|
514
497
|
children: e.replace(/_/g, " ")
|
|
515
498
|
}, e))
|
|
516
499
|
})] })]
|
|
517
500
|
}),
|
|
518
|
-
/* @__PURE__ */
|
|
501
|
+
/* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("label", {
|
|
519
502
|
htmlFor: "asset-expires",
|
|
520
|
-
className:
|
|
503
|
+
className: W,
|
|
521
504
|
children: n("relationships.detail.attachAssetModal.expiresOnLabel", "Expires on")
|
|
522
|
-
}), /* @__PURE__ */
|
|
505
|
+
}), /* @__PURE__ */ B("input", {
|
|
523
506
|
id: "asset-expires",
|
|
524
507
|
type: "date",
|
|
525
508
|
value: h,
|
|
526
509
|
onChange: (e) => g(e.target.value),
|
|
527
|
-
className:
|
|
510
|
+
className: U
|
|
528
511
|
})] }),
|
|
529
|
-
o && /* @__PURE__ */
|
|
512
|
+
o && /* @__PURE__ */ B("p", {
|
|
530
513
|
className: "text-xs text-text-secondary",
|
|
531
514
|
children: n("relationships.detail.attachAssetModal.uploading", "Uploading… {{progress}}%", { progress: a })
|
|
532
515
|
}),
|
|
533
|
-
/* @__PURE__ */
|
|
516
|
+
/* @__PURE__ */ V("div", {
|
|
534
517
|
className: "flex justify-end gap-3",
|
|
535
|
-
children: [/* @__PURE__ */
|
|
518
|
+
children: [/* @__PURE__ */ B("button", {
|
|
536
519
|
type: "button",
|
|
537
520
|
onClick: t,
|
|
538
521
|
className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
539
522
|
children: n("relationships.detail.attachAssetModal.cancel", "Cancel")
|
|
540
|
-
}), /* @__PURE__ */
|
|
523
|
+
}), /* @__PURE__ */ B("button", {
|
|
541
524
|
type: "submit",
|
|
542
525
|
disabled: b,
|
|
543
526
|
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50",
|
|
@@ -550,26 +533,26 @@ function de({ relationshipId: e, onClose: t }) {
|
|
|
550
533
|
}
|
|
551
534
|
function fe({ asset: e }) {
|
|
552
535
|
let t = l(), n = b(), [a, o] = A(!1);
|
|
553
|
-
return /* @__PURE__ */
|
|
536
|
+
return /* @__PURE__ */ V("div", {
|
|
554
537
|
className: "flex items-center justify-between gap-3 p-3",
|
|
555
|
-
children: [/* @__PURE__ */
|
|
538
|
+
children: [/* @__PURE__ */ V("div", {
|
|
556
539
|
className: "flex min-w-0 items-center gap-2",
|
|
557
|
-
children: [/* @__PURE__ */
|
|
540
|
+
children: [/* @__PURE__ */ B(L, { className: "h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ V("div", {
|
|
558
541
|
className: "min-w-0",
|
|
559
|
-
children: [/* @__PURE__ */
|
|
542
|
+
children: [/* @__PURE__ */ B("p", {
|
|
560
543
|
className: "truncate text-sm font-medium text-text-primary",
|
|
561
544
|
children: e.name
|
|
562
|
-
}), /* @__PURE__ */
|
|
545
|
+
}), /* @__PURE__ */ B("p", {
|
|
563
546
|
className: "text-xs text-text-secondary",
|
|
564
547
|
children: i(e.type)
|
|
565
548
|
})]
|
|
566
549
|
})]
|
|
567
|
-
}), /* @__PURE__ */
|
|
550
|
+
}), /* @__PURE__ */ V("div", {
|
|
568
551
|
className: "flex shrink-0 items-center gap-3",
|
|
569
|
-
children: [e.expiresAt && /* @__PURE__ */
|
|
552
|
+
children: [e.expiresAt && /* @__PURE__ */ B("span", {
|
|
570
553
|
className: "text-xs text-text-secondary",
|
|
571
554
|
children: t("relationships.detail.assetRow.expires", "Expires {{date}}", { date: r(e.expiresAt) })
|
|
572
|
-
}), e.file?.id && /* @__PURE__ */
|
|
555
|
+
}), e.file?.id && /* @__PURE__ */ V("button", {
|
|
573
556
|
type: "button",
|
|
574
557
|
onClick: async () => {
|
|
575
558
|
if (e.file?.id) {
|
|
@@ -585,7 +568,7 @@ function fe({ asset: e }) {
|
|
|
585
568
|
disabled: a,
|
|
586
569
|
className: "inline-flex items-center gap-1 rounded-lg border border-border-subtle px-2.5 py-1 text-xs font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-50",
|
|
587
570
|
children: [
|
|
588
|
-
/* @__PURE__ */
|
|
571
|
+
/* @__PURE__ */ B(I, { className: "h-3.5 w-3.5" }),
|
|
589
572
|
" ",
|
|
590
573
|
a ? t("relationships.detail.assetRow.opening", "Opening…") : t("relationships.detail.assetRow.download", "Download")
|
|
591
574
|
]
|
|
@@ -595,28 +578,28 @@ function fe({ asset: e }) {
|
|
|
595
578
|
}
|
|
596
579
|
function pe({ invoice: e }) {
|
|
597
580
|
let t = l(), a = e.number ?? t("relationships.detail.invoiceRow.unnumbered", "Unnumbered invoice");
|
|
598
|
-
return /* @__PURE__ */
|
|
581
|
+
return /* @__PURE__ */ V("div", {
|
|
599
582
|
className: "flex items-center justify-between gap-3 p-3",
|
|
600
|
-
children: [/* @__PURE__ */
|
|
583
|
+
children: [/* @__PURE__ */ V("div", {
|
|
601
584
|
className: "flex min-w-0 items-center gap-2",
|
|
602
|
-
children: [/* @__PURE__ */
|
|
585
|
+
children: [/* @__PURE__ */ B(F, { className: "h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ V("div", {
|
|
603
586
|
className: "min-w-0",
|
|
604
|
-
children: [/* @__PURE__ */
|
|
587
|
+
children: [/* @__PURE__ */ B("p", {
|
|
605
588
|
className: "truncate text-sm font-medium text-text-primary",
|
|
606
589
|
children: a
|
|
607
|
-
}), /* @__PURE__ */
|
|
590
|
+
}), /* @__PURE__ */ V("p", {
|
|
608
591
|
className: "text-xs text-text-secondary",
|
|
609
592
|
children: [i(e.status), e.dueDate ? ` · ${t("relationships.detail.invoiceRow.due", "due {{date}}", { date: r(e.dueDate) })}` : e.issueDate ? ` · ${r(e.issueDate)}` : ""]
|
|
610
593
|
})]
|
|
611
594
|
})]
|
|
612
|
-
}), /* @__PURE__ */
|
|
595
|
+
}), /* @__PURE__ */ B("span", {
|
|
613
596
|
className: "shrink-0 text-sm font-medium tabular-nums text-text-primary",
|
|
614
597
|
children: n(e.total, e.currency)
|
|
615
598
|
})]
|
|
616
599
|
});
|
|
617
600
|
}
|
|
618
601
|
function Z() {
|
|
619
|
-
let c = l(), { id: _ } =
|
|
602
|
+
let c = l(), { id: _ } = ae(), { navigateTo: v } = e(), { data: b, isLoading: S, isError: C, refetch: E } = w(_), D = T(), I = g(), [L, R] = A(null), [z, U] = A(!1), [W, G] = A(!1), [K, q] = A(!1), X = x({
|
|
620
603
|
relationshipId: _,
|
|
621
604
|
pagination: {
|
|
622
605
|
limit: 50,
|
|
@@ -626,24 +609,24 @@ function Z() {
|
|
|
626
609
|
relationshipId: _,
|
|
627
610
|
status: "PROPOSED"
|
|
628
611
|
}, { enabled: !!_ });
|
|
629
|
-
if (S) return /* @__PURE__ */
|
|
612
|
+
if (S) return /* @__PURE__ */ B(t, {
|
|
630
613
|
title: c("relationships.title", "Relationship"),
|
|
631
|
-
children: /* @__PURE__ */
|
|
614
|
+
children: /* @__PURE__ */ B(d, { label: c("relationships.detail.loading", "Loading relationship…") })
|
|
632
615
|
});
|
|
633
|
-
if (C) return /* @__PURE__ */
|
|
616
|
+
if (C) return /* @__PURE__ */ B(t, {
|
|
634
617
|
title: c("relationships.title", "Relationship"),
|
|
635
|
-
children: /* @__PURE__ */
|
|
618
|
+
children: /* @__PURE__ */ B(u, {
|
|
636
619
|
message: c("relationships.detail.error", "Could not load this relationship."),
|
|
637
620
|
onRetry: () => void E()
|
|
638
621
|
})
|
|
639
622
|
});
|
|
640
|
-
if (!b) return /* @__PURE__ */
|
|
623
|
+
if (!b) return /* @__PURE__ */ B(t, {
|
|
641
624
|
title: c("relationships.title", "Relationship"),
|
|
642
|
-
children: /* @__PURE__ */
|
|
625
|
+
children: /* @__PURE__ */ B(s, {
|
|
643
626
|
illustration: "empty-data",
|
|
644
627
|
title: c("relationships.detail.notFoundTitle", "Relationship not found"),
|
|
645
628
|
description: c("relationships.detail.notFoundDescription", "It may have been removed, or you may not have access to it."),
|
|
646
|
-
action: /* @__PURE__ */
|
|
629
|
+
action: /* @__PURE__ */ B("button", {
|
|
647
630
|
type: "button",
|
|
648
631
|
onClick: () => v("/relationships"),
|
|
649
632
|
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
|
|
@@ -666,74 +649,74 @@ function Z() {
|
|
|
666
649
|
meta: e.amount == null ? void 0 : n(e.amount, e.currency ?? Q.currency),
|
|
667
650
|
tone: a ? "warning" : "muted"
|
|
668
651
|
};
|
|
669
|
-
}), _e = Q.autoRenew ? /* @__PURE__ */
|
|
652
|
+
}), _e = Q.autoRenew ? /* @__PURE__ */ B("span", {
|
|
670
653
|
className: "inline-flex items-center rounded-full bg-status-success-bg-subtle px-2 py-0.5 text-xs font-medium text-status-success-text",
|
|
671
654
|
children: c("relationships.detail.autoRenewOn", "On")
|
|
672
|
-
}) : /* @__PURE__ */
|
|
655
|
+
}) : /* @__PURE__ */ B("span", {
|
|
673
656
|
className: "inline-flex items-center rounded-full bg-bg-sunken px-2 py-0.5 text-xs font-medium text-text-secondary",
|
|
674
657
|
children: c("relationships.detail.autoRenewOff", "Off")
|
|
675
|
-
}), ve =
|
|
676
|
-
return /* @__PURE__ */
|
|
658
|
+
}), ve = se.filter((e) => e.status !== Q.status), ye = Q.plan?.features ?? [];
|
|
659
|
+
return /* @__PURE__ */ V(t, {
|
|
677
660
|
title: Q.label,
|
|
678
|
-
description: Q.provider?.name ?? c(
|
|
679
|
-
actions: /* @__PURE__ */
|
|
661
|
+
description: Q.provider?.name ?? c(J[Q.kind], i(Q.kind)),
|
|
662
|
+
actions: /* @__PURE__ */ V("div", {
|
|
680
663
|
className: "flex items-center gap-2",
|
|
681
|
-
children: [/* @__PURE__ */
|
|
664
|
+
children: [/* @__PURE__ */ V("button", {
|
|
682
665
|
type: "button",
|
|
683
|
-
onClick: () =>
|
|
666
|
+
onClick: () => U(!0),
|
|
684
667
|
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",
|
|
685
668
|
children: [
|
|
686
|
-
/* @__PURE__ */
|
|
669
|
+
/* @__PURE__ */ B(ee, { className: "h-4 w-4" }),
|
|
687
670
|
" ",
|
|
688
671
|
c("relationships.detail.edit", "Edit")
|
|
689
672
|
]
|
|
690
|
-
}), /* @__PURE__ */
|
|
673
|
+
}), /* @__PURE__ */ V("button", {
|
|
691
674
|
type: "button",
|
|
692
675
|
onClick: () => v("/relationships"),
|
|
693
676
|
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",
|
|
694
677
|
children: [
|
|
695
|
-
/* @__PURE__ */
|
|
678
|
+
/* @__PURE__ */ B(M, { className: "h-4 w-4" }),
|
|
696
679
|
" ",
|
|
697
680
|
c("relationships.detail.back", "Back")
|
|
698
681
|
]
|
|
699
682
|
})]
|
|
700
683
|
}),
|
|
701
684
|
children: [
|
|
702
|
-
/* @__PURE__ */
|
|
685
|
+
/* @__PURE__ */ B(H, {
|
|
703
686
|
treatment: "glass",
|
|
704
687
|
glow: !0,
|
|
705
688
|
className: "p-5 sm:p-6",
|
|
706
|
-
children: /* @__PURE__ */
|
|
689
|
+
children: /* @__PURE__ */ V("div", {
|
|
707
690
|
className: "flex flex-col gap-5 lg:flex-row lg:items-start lg:justify-between",
|
|
708
|
-
children: [/* @__PURE__ */
|
|
691
|
+
children: [/* @__PURE__ */ V("div", {
|
|
709
692
|
className: "min-w-0",
|
|
710
693
|
children: [
|
|
711
|
-
/* @__PURE__ */
|
|
694
|
+
/* @__PURE__ */ B("p", {
|
|
712
695
|
className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
713
|
-
children: c(
|
|
696
|
+
children: c(J[Q.kind], i(Q.kind))
|
|
714
697
|
}),
|
|
715
|
-
/* @__PURE__ */
|
|
698
|
+
/* @__PURE__ */ V("div", {
|
|
716
699
|
className: "mt-2 flex flex-wrap items-center gap-3",
|
|
717
|
-
children: [/* @__PURE__ */
|
|
700
|
+
children: [/* @__PURE__ */ V("span", {
|
|
718
701
|
className: "text-3xl font-bold tabular-nums text-text-primary",
|
|
719
|
-
children: [n(Q.amount, Q.currency), /* @__PURE__ */
|
|
702
|
+
children: [n(Q.amount, Q.currency), /* @__PURE__ */ B("span", {
|
|
720
703
|
className: "text-base font-normal text-text-secondary",
|
|
721
704
|
children: a(Q.interval)
|
|
722
705
|
})]
|
|
723
|
-
}), /* @__PURE__ */
|
|
706
|
+
}), /* @__PURE__ */ B(o, { status: Q.status })]
|
|
724
707
|
}),
|
|
725
|
-
/* @__PURE__ */
|
|
708
|
+
/* @__PURE__ */ V("div", {
|
|
726
709
|
className: "mt-2 flex flex-wrap items-center gap-x-4 gap-y-1 text-sm text-text-secondary",
|
|
727
710
|
children: [
|
|
728
|
-
/* @__PURE__ */
|
|
711
|
+
/* @__PURE__ */ V("span", {
|
|
729
712
|
className: "inline-flex items-center gap-1.5",
|
|
730
|
-
children: [/* @__PURE__ */
|
|
713
|
+
children: [/* @__PURE__ */ B(P, { className: "h-3.5 w-3.5" }), Q.renewsAt ? c("relationships.detail.renews", "Renews {{date}}", { date: r(Q.renewsAt) }) : c("relationships.detail.noRenewalScheduled", "No renewal scheduled")]
|
|
731
714
|
}),
|
|
732
|
-
/* @__PURE__ */
|
|
715
|
+
/* @__PURE__ */ V("span", {
|
|
733
716
|
className: "inline-flex items-center gap-1.5",
|
|
734
|
-
children: [/* @__PURE__ */
|
|
717
|
+
children: [/* @__PURE__ */ B(ne, { className: "h-3.5 w-3.5" }), i(Q.discoverySource)]
|
|
735
718
|
}),
|
|
736
|
-
/* @__PURE__ */
|
|
719
|
+
/* @__PURE__ */ V("span", {
|
|
737
720
|
className: "inline-flex items-center gap-1.5",
|
|
738
721
|
children: [
|
|
739
722
|
c("relationships.detail.autoRenew", "Auto-renew"),
|
|
@@ -743,36 +726,36 @@ function Z() {
|
|
|
743
726
|
})
|
|
744
727
|
]
|
|
745
728
|
}),
|
|
746
|
-
Q.tags.length > 0 && /* @__PURE__ */
|
|
729
|
+
Q.tags.length > 0 && /* @__PURE__ */ V("div", {
|
|
747
730
|
className: "mt-3 flex flex-wrap items-center gap-2",
|
|
748
|
-
children: [/* @__PURE__ */
|
|
731
|
+
children: [/* @__PURE__ */ B(re, { className: "h-3.5 w-3.5 text-text-secondary" }), Q.tags.map((e) => /* @__PURE__ */ B("span", {
|
|
749
732
|
className: "rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs text-text-secondary",
|
|
750
733
|
children: e
|
|
751
734
|
}, e))]
|
|
752
735
|
})
|
|
753
736
|
]
|
|
754
|
-
}), /* @__PURE__ */
|
|
737
|
+
}), /* @__PURE__ */ V("div", {
|
|
755
738
|
className: "flex shrink-0 flex-wrap gap-2 lg:flex-col lg:items-stretch",
|
|
756
739
|
children: [ve.map((e) => {
|
|
757
740
|
let t = e.icon;
|
|
758
|
-
return /* @__PURE__ */
|
|
741
|
+
return /* @__PURE__ */ V("button", {
|
|
759
742
|
type: "button",
|
|
760
743
|
disabled: $,
|
|
761
744
|
onClick: () => me(e.status),
|
|
762
745
|
className: "inline-flex items-center justify-center gap-1.5 rounded-lg border border-border-subtle bg-bg-surface px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-50",
|
|
763
746
|
children: [
|
|
764
|
-
/* @__PURE__ */
|
|
747
|
+
/* @__PURE__ */ B(t, { className: "h-3.5 w-3.5" }),
|
|
765
748
|
" ",
|
|
766
749
|
c(e.labelKey, e.defaultLabel)
|
|
767
750
|
]
|
|
768
751
|
}, e.status);
|
|
769
|
-
}), Q.status !== "CANCELLED" && /* @__PURE__ */
|
|
752
|
+
}), Q.status !== "CANCELLED" && /* @__PURE__ */ V("button", {
|
|
770
753
|
type: "button",
|
|
771
754
|
disabled: $,
|
|
772
755
|
onClick: he,
|
|
773
756
|
className: "inline-flex items-center justify-center gap-1.5 rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-3 py-1.5 text-xs font-medium text-status-error-text hover:opacity-90 disabled:opacity-50",
|
|
774
757
|
children: [
|
|
775
|
-
/* @__PURE__ */
|
|
758
|
+
/* @__PURE__ */ B(N, { className: "h-3.5 w-3.5" }),
|
|
776
759
|
" ",
|
|
777
760
|
c("relationships.detail.actions.cancel", "Cancel")
|
|
778
761
|
]
|
|
@@ -780,91 +763,91 @@ function Z() {
|
|
|
780
763
|
})]
|
|
781
764
|
})
|
|
782
765
|
}),
|
|
783
|
-
L && /* @__PURE__ */
|
|
766
|
+
L && /* @__PURE__ */ B("div", {
|
|
784
767
|
className: "mt-4 rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
|
|
785
768
|
children: L
|
|
786
769
|
}),
|
|
787
|
-
/* @__PURE__ */
|
|
770
|
+
/* @__PURE__ */ V("div", {
|
|
788
771
|
className: "mt-6 grid grid-cols-1 gap-4 lg:grid-cols-3",
|
|
789
|
-
children: [/* @__PURE__ */
|
|
772
|
+
children: [/* @__PURE__ */ V("div", {
|
|
790
773
|
className: "space-y-4 lg:col-span-2",
|
|
791
774
|
children: [
|
|
792
|
-
/* @__PURE__ */
|
|
775
|
+
/* @__PURE__ */ V("div", {
|
|
793
776
|
className: "grid grid-cols-1 gap-4 md:grid-cols-2",
|
|
794
|
-
children: [/* @__PURE__ */ H
|
|
777
|
+
children: [/* @__PURE__ */ V(H, {
|
|
795
778
|
treatment: "metric",
|
|
796
779
|
className: "p-5",
|
|
797
780
|
children: [
|
|
798
|
-
/* @__PURE__ */
|
|
781
|
+
/* @__PURE__ */ V("div", {
|
|
799
782
|
className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
800
783
|
children: [
|
|
801
|
-
/* @__PURE__ */
|
|
784
|
+
/* @__PURE__ */ B(F, { className: "h-4 w-4 text-text-secondary" }),
|
|
802
785
|
" ",
|
|
803
786
|
c("relationships.detail.sections.planPricing", "Plan & pricing")
|
|
804
787
|
]
|
|
805
788
|
}),
|
|
806
|
-
/* @__PURE__ */
|
|
789
|
+
/* @__PURE__ */ V("div", {
|
|
807
790
|
className: "mt-3",
|
|
808
791
|
children: [
|
|
809
|
-
/* @__PURE__ */
|
|
792
|
+
/* @__PURE__ */ B(Y, {
|
|
810
793
|
label: c("relationships.detail.info.plan", "Plan"),
|
|
811
794
|
value: Q.plan?.name ?? "—"
|
|
812
795
|
}),
|
|
813
|
-
/* @__PURE__ */
|
|
796
|
+
/* @__PURE__ */ B(Y, {
|
|
814
797
|
label: c("relationships.detail.info.price", "Price"),
|
|
815
|
-
value: /* @__PURE__ */
|
|
798
|
+
value: /* @__PURE__ */ V(oe, { children: [n(Q.amount, Q.currency), /* @__PURE__ */ B("span", {
|
|
816
799
|
className: "font-normal text-text-secondary",
|
|
817
800
|
children: a(Q.interval)
|
|
818
801
|
})] })
|
|
819
802
|
}),
|
|
820
|
-
/* @__PURE__ */
|
|
803
|
+
/* @__PURE__ */ B(Y, {
|
|
821
804
|
label: c("relationships.detail.info.billingInterval", "Billing interval"),
|
|
822
805
|
value: i(Q.interval)
|
|
823
806
|
}),
|
|
824
|
-
/* @__PURE__ */
|
|
807
|
+
/* @__PURE__ */ B(Y, {
|
|
825
808
|
label: c("relationships.detail.info.provider", "Provider"),
|
|
826
809
|
value: Q.provider?.name ?? "—"
|
|
827
810
|
})
|
|
828
811
|
]
|
|
829
812
|
}),
|
|
830
|
-
ye.length > 0 && /* @__PURE__ */
|
|
813
|
+
ye.length > 0 && /* @__PURE__ */ B("div", {
|
|
831
814
|
className: "mt-3 flex flex-wrap gap-1.5",
|
|
832
|
-
children: ye.map((e) => /* @__PURE__ */
|
|
815
|
+
children: ye.map((e) => /* @__PURE__ */ B("span", {
|
|
833
816
|
className: "rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs text-text-secondary",
|
|
834
817
|
children: e
|
|
835
818
|
}, e))
|
|
836
819
|
})
|
|
837
820
|
]
|
|
838
|
-
}), /* @__PURE__ */ H
|
|
821
|
+
}), /* @__PURE__ */ V(H, {
|
|
839
822
|
treatment: "metric",
|
|
840
823
|
className: "p-5",
|
|
841
|
-
children: [/* @__PURE__ */
|
|
824
|
+
children: [/* @__PURE__ */ V("div", {
|
|
842
825
|
className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
843
826
|
children: [
|
|
844
|
-
/* @__PURE__ */
|
|
827
|
+
/* @__PURE__ */ B(ie, { className: "h-4 w-4 text-text-secondary" }),
|
|
845
828
|
" ",
|
|
846
829
|
c("relationships.detail.sections.paymentBilling", "Payment & billing")
|
|
847
830
|
]
|
|
848
|
-
}), /* @__PURE__ */
|
|
831
|
+
}), /* @__PURE__ */ V("div", {
|
|
849
832
|
className: "mt-3",
|
|
850
833
|
children: [
|
|
851
|
-
/* @__PURE__ */
|
|
834
|
+
/* @__PURE__ */ B(Y, {
|
|
852
835
|
label: c("relationships.detail.info.currency", "Currency"),
|
|
853
836
|
value: Q.currency
|
|
854
837
|
}),
|
|
855
|
-
/* @__PURE__ */
|
|
838
|
+
/* @__PURE__ */ B(Y, {
|
|
856
839
|
label: c("relationships.detail.info.autoRenew", "Auto-renew"),
|
|
857
840
|
value: _e
|
|
858
841
|
}),
|
|
859
|
-
/* @__PURE__ */
|
|
842
|
+
/* @__PURE__ */ B(Y, {
|
|
860
843
|
label: c("relationships.detail.info.nextRenewal", "Next renewal"),
|
|
861
844
|
value: Q.renewsAt ? r(Q.renewsAt) : "—"
|
|
862
845
|
}),
|
|
863
|
-
/* @__PURE__ */
|
|
846
|
+
/* @__PURE__ */ B(Y, {
|
|
864
847
|
label: c("relationships.detail.info.started", "Started"),
|
|
865
848
|
value: Q.startedAt ? r(Q.startedAt) : "—"
|
|
866
849
|
}),
|
|
867
|
-
Q.trialEndsAt && /* @__PURE__ */
|
|
850
|
+
Q.trialEndsAt && /* @__PURE__ */ B(Y, {
|
|
868
851
|
label: c("relationships.detail.info.trialEnds", "Trial ends"),
|
|
869
852
|
value: r(Q.trialEndsAt)
|
|
870
853
|
})
|
|
@@ -872,67 +855,67 @@ function Z() {
|
|
|
872
855
|
})]
|
|
873
856
|
})]
|
|
874
857
|
}),
|
|
875
|
-
(Z.data?.items.length ?? 0) > 0 && /* @__PURE__ */
|
|
858
|
+
(Z.data?.items.length ?? 0) > 0 && /* @__PURE__ */ V(f, {
|
|
876
859
|
className: "mt-0",
|
|
877
860
|
title: c("relationships.detail.sections.aiRecommendations", "AI recommendations"),
|
|
878
861
|
description: c("relationships.detail.sections.aiRecommendationsDescription", "Open recommendations about this subscription. You can also make any of these changes by hand above."),
|
|
879
|
-
children: [/* @__PURE__ */
|
|
862
|
+
children: [/* @__PURE__ */ B(k, { className: "mb-3" }), /* @__PURE__ */ B("div", {
|
|
880
863
|
className: "grid grid-cols-1 gap-3",
|
|
881
864
|
"data-testid": "relationship-decisions",
|
|
882
|
-
children: Z.data?.items.map((e) => /* @__PURE__ */
|
|
865
|
+
children: Z.data?.items.map((e) => /* @__PURE__ */ B(O, { decision: e }, e.id))
|
|
883
866
|
})]
|
|
884
867
|
}),
|
|
885
|
-
/* @__PURE__ */
|
|
868
|
+
/* @__PURE__ */ B(f, {
|
|
886
869
|
className: "mt-0",
|
|
887
870
|
title: c("relationships.detail.sections.entitlements", "Entitlements"),
|
|
888
871
|
description: c("relationships.detail.sections.entitlementsDescription", "What this relationship grants you"),
|
|
889
|
-
action: /* @__PURE__ */
|
|
872
|
+
action: /* @__PURE__ */ V("button", {
|
|
890
873
|
type: "button",
|
|
891
|
-
onClick: () =>
|
|
874
|
+
onClick: () => G(!0),
|
|
892
875
|
className: "inline-flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
|
|
893
876
|
children: [
|
|
894
|
-
/* @__PURE__ */
|
|
877
|
+
/* @__PURE__ */ B(te, { className: "h-3.5 w-3.5" }),
|
|
895
878
|
" ",
|
|
896
879
|
c("relationships.detail.sections.addEntitlement", "Add entitlement")
|
|
897
880
|
]
|
|
898
881
|
}),
|
|
899
|
-
children: !Q.entitlements || Q.entitlements.length === 0 ? /* @__PURE__ */
|
|
882
|
+
children: !Q.entitlements || Q.entitlements.length === 0 ? /* @__PURE__ */ B(s, {
|
|
900
883
|
illustration: "empty-data",
|
|
901
884
|
title: c("relationships.detail.empty.noEntitlementsTitle", "No entitlements"),
|
|
902
885
|
description: c("relationships.detail.empty.noEntitlementsDescription", "Entitlements (seats, quotas, feature access) will appear here.")
|
|
903
|
-
}) : /* @__PURE__ */
|
|
886
|
+
}) : /* @__PURE__ */ B("div", {
|
|
904
887
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
905
888
|
children: Q.entitlements.map((e) => {
|
|
906
889
|
let t = e.quota != null && e.quota > 0;
|
|
907
|
-
return /* @__PURE__ */ H
|
|
890
|
+
return /* @__PURE__ */ V(H, {
|
|
908
891
|
treatment: "plain",
|
|
909
892
|
className: "p-4",
|
|
910
893
|
children: [
|
|
911
|
-
/* @__PURE__ */
|
|
894
|
+
/* @__PURE__ */ V("div", {
|
|
912
895
|
className: "flex items-start justify-between gap-2",
|
|
913
|
-
children: [/* @__PURE__ */
|
|
896
|
+
children: [/* @__PURE__ */ B("p", {
|
|
914
897
|
className: "min-w-0 truncate text-sm font-medium text-text-primary",
|
|
915
898
|
children: e.name
|
|
916
|
-
}), /* @__PURE__ */
|
|
899
|
+
}), /* @__PURE__ */ B(o, { status: e.isActive ? "ACTIVE" : "DISABLED" })]
|
|
917
900
|
}),
|
|
918
|
-
/* @__PURE__ */
|
|
901
|
+
/* @__PURE__ */ B("p", {
|
|
919
902
|
className: "mt-1 text-xs text-text-secondary",
|
|
920
903
|
children: i(e.type)
|
|
921
904
|
}),
|
|
922
|
-
t && /* @__PURE__ */
|
|
905
|
+
t && /* @__PURE__ */ V("div", {
|
|
923
906
|
className: "mt-3",
|
|
924
|
-
children: [/* @__PURE__ */
|
|
907
|
+
children: [/* @__PURE__ */ V("div", {
|
|
925
908
|
className: "flex items-center justify-between text-xs text-text-secondary",
|
|
926
|
-
children: [/* @__PURE__ */
|
|
909
|
+
children: [/* @__PURE__ */ V("span", { children: [
|
|
927
910
|
e.used,
|
|
928
911
|
" / ",
|
|
929
912
|
e.quota,
|
|
930
913
|
e.unit ? ` ${e.unit}` : ""
|
|
931
|
-
] }), /* @__PURE__ */
|
|
914
|
+
] }), /* @__PURE__ */ V("span", {
|
|
932
915
|
className: "tabular-nums",
|
|
933
916
|
children: [Math.round(e.used / e.quota * 100), "%"]
|
|
934
917
|
})]
|
|
935
|
-
}), /* @__PURE__ */
|
|
918
|
+
}), /* @__PURE__ */ B(m, {
|
|
936
919
|
value: e.used,
|
|
937
920
|
max: e.quota,
|
|
938
921
|
tone: e.used / e.quota >= .9 ? "negative" : e.used / e.quota >= .7 ? "warning" : "accent",
|
|
@@ -944,23 +927,23 @@ function Z() {
|
|
|
944
927
|
})
|
|
945
928
|
})
|
|
946
929
|
}),
|
|
947
|
-
/* @__PURE__ */
|
|
930
|
+
/* @__PURE__ */ B(f, {
|
|
948
931
|
className: "mt-0",
|
|
949
932
|
title: c("relationships.detail.sections.assets", "Assets"),
|
|
950
933
|
description: c("relationships.detail.sections.assetsDescription", "Invoices, contracts, licenses and credentials"),
|
|
951
|
-
action: /* @__PURE__ */
|
|
934
|
+
action: /* @__PURE__ */ V("button", {
|
|
952
935
|
type: "button",
|
|
953
|
-
onClick: () =>
|
|
936
|
+
onClick: () => q(!0),
|
|
954
937
|
className: "inline-flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
|
|
955
938
|
children: [
|
|
956
|
-
/* @__PURE__ */
|
|
939
|
+
/* @__PURE__ */ B(te, { className: "h-3.5 w-3.5" }),
|
|
957
940
|
" ",
|
|
958
941
|
c("relationships.detail.sections.attachAsset", "Attach asset")
|
|
959
942
|
]
|
|
960
943
|
}),
|
|
961
944
|
children: (() => {
|
|
962
|
-
let e = Q.assets ?? [], t =
|
|
963
|
-
return e.length > 0 || t.length > 0 ? /* @__PURE__ */
|
|
945
|
+
let e = Q.assets ?? [], t = X.data?.items ?? [];
|
|
946
|
+
return e.length > 0 || t.length > 0 ? /* @__PURE__ */ B(H, {
|
|
964
947
|
treatment: "plain",
|
|
965
948
|
className: "divide-y divide-border-subtle p-0",
|
|
966
949
|
children: [...e.map((e) => ({
|
|
@@ -971,81 +954,89 @@ function Z() {
|
|
|
971
954
|
kind: "invoice",
|
|
972
955
|
sort: new Date(e.createdAt).getTime() || 0,
|
|
973
956
|
invoice: e
|
|
974
|
-
}))].sort((e, t) => t.sort - e.sort).map((e) => e.kind === "asset" ? /* @__PURE__ */
|
|
975
|
-
}) : /* @__PURE__ */
|
|
957
|
+
}))].sort((e, t) => t.sort - e.sort).map((e) => e.kind === "asset" ? /* @__PURE__ */ B(fe, { asset: e.asset }, `a-${e.asset.id}`) : /* @__PURE__ */ B(pe, { invoice: e.invoice }, `i-${e.invoice.id}`))
|
|
958
|
+
}) : /* @__PURE__ */ B(s, {
|
|
976
959
|
illustration: "empty-data",
|
|
977
960
|
title: c("relationships.detail.empty.noAssetsTitle", "No assets attached"),
|
|
978
961
|
description: c("relationships.detail.empty.noAssetsDescription", "Attach invoices, contracts, licenses or receipts to this relationship.")
|
|
979
962
|
});
|
|
980
963
|
})()
|
|
981
964
|
}),
|
|
982
|
-
Q.notes && /* @__PURE__ */ H
|
|
965
|
+
Q.notes && /* @__PURE__ */ V(H, {
|
|
983
966
|
treatment: "plain",
|
|
984
967
|
className: "p-4",
|
|
985
|
-
children: [/* @__PURE__ */
|
|
968
|
+
children: [/* @__PURE__ */ B("p", {
|
|
986
969
|
className: "text-xs font-medium text-text-secondary",
|
|
987
970
|
children: c("relationships.detail.sections.notes", "Notes")
|
|
988
|
-
}), /* @__PURE__ */
|
|
971
|
+
}), /* @__PURE__ */ B("p", {
|
|
989
972
|
className: "mt-1 whitespace-pre-wrap text-sm text-text-primary",
|
|
990
973
|
children: Q.notes
|
|
991
974
|
})]
|
|
992
975
|
})
|
|
993
976
|
]
|
|
994
|
-
}), /* @__PURE__ */
|
|
977
|
+
}), /* @__PURE__ */ V("div", {
|
|
995
978
|
className: "space-y-4",
|
|
996
|
-
children: [/* @__PURE__ */ H
|
|
979
|
+
children: [/* @__PURE__ */ V(H, {
|
|
997
980
|
treatment: "metric",
|
|
998
981
|
className: "p-5",
|
|
999
|
-
children: [/* @__PURE__ */
|
|
982
|
+
children: [/* @__PURE__ */ V("div", {
|
|
1000
983
|
className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
1001
984
|
children: [
|
|
1002
|
-
/* @__PURE__ */
|
|
985
|
+
/* @__PURE__ */ B(j, { className: "h-4 w-4 text-text-secondary" }),
|
|
1003
986
|
" ",
|
|
1004
987
|
c("relationships.detail.sections.healthScore", "Health score")
|
|
1005
988
|
]
|
|
1006
|
-
}), Q.healthScore == null ? /* @__PURE__ */
|
|
989
|
+
}), Q.healthScore == null ? /* @__PURE__ */ B("p", {
|
|
1007
990
|
className: "mt-4 text-sm text-text-secondary",
|
|
1008
991
|
children: c("relationships.detail.empty.noHealthScore", "Not scored yet. A health score appears once Subscriber Bot has enough signal.")
|
|
1009
|
-
}) : /* @__PURE__ */
|
|
992
|
+
}) : /* @__PURE__ */ V("div", {
|
|
1010
993
|
className: "mt-4 flex flex-col items-center",
|
|
1011
|
-
children: [
|
|
1012
|
-
|
|
1013
|
-
max: 100,
|
|
1014
|
-
size: 160,
|
|
1015
|
-
label: c("relationships.detail.outOf100", "of 100")
|
|
1016
|
-
}), /* @__PURE__ */ V("div", {
|
|
1017
|
-
className: "mt-2 w-full",
|
|
1018
|
-
children: /* @__PURE__ */ V(m, {
|
|
994
|
+
children: [
|
|
995
|
+
/* @__PURE__ */ B(p, {
|
|
1019
996
|
value: Q.healthScore,
|
|
1020
997
|
max: 100,
|
|
1021
|
-
|
|
998
|
+
size: 160,
|
|
999
|
+
label: c("relationships.detail.outOf100", "of 100")
|
|
1000
|
+
}),
|
|
1001
|
+
/* @__PURE__ */ B("div", {
|
|
1002
|
+
className: "mt-2 w-full",
|
|
1003
|
+
children: /* @__PURE__ */ B(m, {
|
|
1004
|
+
value: Q.healthScore,
|
|
1005
|
+
max: 100,
|
|
1006
|
+
tone: ce(Q.healthScore)
|
|
1007
|
+
})
|
|
1008
|
+
}),
|
|
1009
|
+
/* @__PURE__ */ B("p", {
|
|
1010
|
+
className: "mt-3 text-center text-xs text-text-secondary",
|
|
1011
|
+
"data-testid": "health-score-basis",
|
|
1012
|
+
children: c("relationships.detail.healthScoreBasis", "Computed from usage, payment history, price stability and overlap with your other subscriptions.")
|
|
1022
1013
|
})
|
|
1023
|
-
|
|
1014
|
+
]
|
|
1024
1015
|
})]
|
|
1025
|
-
}), /* @__PURE__ */ H
|
|
1016
|
+
}), /* @__PURE__ */ V(H, {
|
|
1026
1017
|
treatment: "metric",
|
|
1027
1018
|
className: "p-5",
|
|
1028
1019
|
children: [
|
|
1029
|
-
/* @__PURE__ */
|
|
1020
|
+
/* @__PURE__ */ V("div", {
|
|
1030
1021
|
className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
1031
1022
|
children: [
|
|
1032
|
-
/* @__PURE__ */
|
|
1023
|
+
/* @__PURE__ */ B(P, { className: "h-4 w-4 text-text-secondary" }),
|
|
1033
1024
|
" ",
|
|
1034
1025
|
c("relationships.detail.sections.renewalTimeline", "Renewal timeline")
|
|
1035
1026
|
]
|
|
1036
1027
|
}),
|
|
1037
|
-
/* @__PURE__ */
|
|
1028
|
+
/* @__PURE__ */ B("p", {
|
|
1038
1029
|
className: "mt-0.5 text-xs text-text-secondary",
|
|
1039
1030
|
children: c("relationships.detail.sections.renewalTimelineDescription", "Detected renewals and price changes")
|
|
1040
1031
|
}),
|
|
1041
|
-
ge.length === 0 ? /* @__PURE__ */
|
|
1032
|
+
ge.length === 0 ? /* @__PURE__ */ B("div", {
|
|
1042
1033
|
className: "mt-4",
|
|
1043
|
-
children: /* @__PURE__ */
|
|
1034
|
+
children: /* @__PURE__ */ B(s, {
|
|
1044
1035
|
illustration: "empty-calendar",
|
|
1045
1036
|
title: c("relationships.detail.empty.noRenewalEventsTitle", "No renewal events"),
|
|
1046
1037
|
description: c("relationships.detail.empty.noRenewalEventsDescription", "Renewals and price changes will appear here as they're detected.")
|
|
1047
1038
|
})
|
|
1048
|
-
}) : /* @__PURE__ */
|
|
1039
|
+
}) : /* @__PURE__ */ B(h, {
|
|
1049
1040
|
items: ge,
|
|
1050
1041
|
className: "mt-4"
|
|
1051
1042
|
})
|
|
@@ -1053,17 +1044,17 @@ function Z() {
|
|
|
1053
1044
|
})]
|
|
1054
1045
|
})]
|
|
1055
1046
|
}),
|
|
1056
|
-
z && /* @__PURE__ */
|
|
1047
|
+
z && /* @__PURE__ */ B(le, {
|
|
1057
1048
|
relationship: Q,
|
|
1058
|
-
onClose: () =>
|
|
1049
|
+
onClose: () => U(!1)
|
|
1059
1050
|
}),
|
|
1060
|
-
|
|
1051
|
+
W && /* @__PURE__ */ B(ue, {
|
|
1061
1052
|
relationshipId: Q.id,
|
|
1062
|
-
onClose: () =>
|
|
1053
|
+
onClose: () => G(!1)
|
|
1063
1054
|
}),
|
|
1064
|
-
|
|
1055
|
+
K && /* @__PURE__ */ B(de, {
|
|
1065
1056
|
relationshipId: Q.id,
|
|
1066
|
-
onClose: () =>
|
|
1057
|
+
onClose: () => q(!1)
|
|
1067
1058
|
})
|
|
1068
1059
|
]
|
|
1069
1060
|
});
|