@burdenoff/microfe-billing 2026.623.3 → 2026.624.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/billing/BillingUserRoutes.js +3 -3
- package/dist/billing/BillingUserRoutes.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js +34 -34
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +94 -94
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js.map +1 -1
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +162 -187
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +146 -153
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +10 -10
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/TransactionsPage.js +62 -62
- package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js +164 -179
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js +8 -8
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/EarningsPage.js +243 -305
- package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +73 -78
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutsPage.js +173 -179
- package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +4 -4
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js.map +1 -1
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +4 -4
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.js.map +1 -1
- package/dist/billing/modules/settings/pages/SettingsPage.js +181 -173
- package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +111 -99
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js +68 -83
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js.map +1 -1
- package/dist/billing/shared/components/AccessDenied.js +4 -4
- package/dist/billing/shared/components/AccessDenied.js.map +1 -1
- package/dist/billing/shared/components/ActorIdentity.js +8 -8
- package/dist/billing/shared/components/ActorIdentity.js.map +1 -1
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js +11 -11
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js.map +1 -1
- package/dist/billing/shared/ui/MetricCard.js +1 -1
- package/dist/billing/shared/ui/MetricCard.js.map +1 -1
- package/package.json +1 -1
|
@@ -11,47 +11,48 @@ import { useState as m } from "react";
|
|
|
11
11
|
import { useParams as h } from "react-router-dom";
|
|
12
12
|
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
13
13
|
import { useI18n as v } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
14
|
+
import { ResponsiveTable as y } from "@burdenoff/fe-libs/ui";
|
|
14
15
|
//#region src/billing/modules/billing/pages/InvoiceDetailPage.tsx
|
|
15
|
-
var
|
|
16
|
-
let { t:
|
|
17
|
-
let n =
|
|
16
|
+
var b = () => {
|
|
17
|
+
let { t: b } = v(), x = (e, t) => {
|
|
18
|
+
let n = b(e);
|
|
18
19
|
return n === e ? t : n;
|
|
19
|
-
}, { invoiceId:
|
|
20
|
-
orgId:
|
|
20
|
+
}, { invoiceId: S } = h(), C = u(), { orgId: w } = e(), T = c(), { selectedAccountId: E } = t({
|
|
21
|
+
orgId: w,
|
|
21
22
|
syncFromUrl: !0,
|
|
22
23
|
urlParamName: "billingAccountId"
|
|
23
|
-
}), { data:
|
|
24
|
-
if (
|
|
25
|
-
if (!
|
|
26
|
-
|
|
24
|
+
}), { data: D } = l({ fetchPolicy: "cache-first" }), O = E ?? D?.getDefaultBillingAccount?.id ?? void 0, { invoice: k, isLoading: A, error: j, refetch: M } = f(S, O), { payInvoice: N, voidInvoice: P, isPaying: F, isVoiding: I } = p(), L = D?.getDefaultBillingAccount?.defaultPaymentMethod, [R, z] = m(null), B = async () => {
|
|
25
|
+
if (k) {
|
|
26
|
+
if (!L) {
|
|
27
|
+
z("Add and set a default payment method before paying this invoice.");
|
|
27
28
|
return;
|
|
28
29
|
}
|
|
29
|
-
if (!
|
|
30
|
-
|
|
30
|
+
if (!O) {
|
|
31
|
+
z("No billing account context");
|
|
31
32
|
return;
|
|
32
33
|
}
|
|
33
|
-
|
|
34
|
+
z(null);
|
|
34
35
|
try {
|
|
35
|
-
await
|
|
36
|
+
await N(k.id, L, O), await M();
|
|
36
37
|
} catch (e) {
|
|
37
|
-
|
|
38
|
+
z(e instanceof Error ? e.message : "Failed to pay invoice");
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
|
-
},
|
|
41
|
-
if (
|
|
42
|
-
if (!
|
|
43
|
-
|
|
41
|
+
}, V = async () => {
|
|
42
|
+
if (k) {
|
|
43
|
+
if (!O) {
|
|
44
|
+
z("No billing account context");
|
|
44
45
|
return;
|
|
45
46
|
}
|
|
46
|
-
|
|
47
|
+
z(null);
|
|
47
48
|
try {
|
|
48
|
-
await
|
|
49
|
+
await P(k.id, O), await M();
|
|
49
50
|
} catch (e) {
|
|
50
|
-
|
|
51
|
+
z(e instanceof Error ? e.message : "Failed to void invoice");
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
54
|
};
|
|
54
|
-
if (!
|
|
55
|
+
if (!T.canViewInvoices) return /* @__PURE__ */ g("div", {
|
|
55
56
|
className: "flex items-center justify-center h-full min-h-[400px]",
|
|
56
57
|
children: /* @__PURE__ */ _("div", {
|
|
57
58
|
className: "text-center space-y-2",
|
|
@@ -73,16 +74,16 @@ var y = () => {
|
|
|
73
74
|
}),
|
|
74
75
|
/* @__PURE__ */ g("h2", {
|
|
75
76
|
className: "text-lg font-semibold text-text-primary",
|
|
76
|
-
children:
|
|
77
|
+
children: x("billing.accessDenied.title", "Access Denied")
|
|
77
78
|
}),
|
|
78
79
|
/* @__PURE__ */ g("p", {
|
|
79
80
|
className: "text-sm text-text-secondary max-w-sm",
|
|
80
|
-
children:
|
|
81
|
+
children: x("billing.invoices.noViewPermission", "You don't have permission to view invoices.")
|
|
81
82
|
})
|
|
82
83
|
]
|
|
83
84
|
})
|
|
84
85
|
});
|
|
85
|
-
if (
|
|
86
|
+
if (A) return /* @__PURE__ */ _("div", {
|
|
86
87
|
className: "space-y-6 px-6 lg:px-8 py-6",
|
|
87
88
|
children: [/* @__PURE__ */ _("div", {
|
|
88
89
|
className: "flex items-center gap-4",
|
|
@@ -134,7 +135,7 @@ var y = () => {
|
|
|
134
135
|
})]
|
|
135
136
|
})]
|
|
136
137
|
});
|
|
137
|
-
if (
|
|
138
|
+
if (j || !k) return /* @__PURE__ */ g("div", {
|
|
138
139
|
className: "flex items-center justify-center h-full min-h-[400px]",
|
|
139
140
|
children: /* @__PURE__ */ _("div", {
|
|
140
141
|
className: "text-center space-y-4",
|
|
@@ -156,22 +157,22 @@ var y = () => {
|
|
|
156
157
|
}),
|
|
157
158
|
/* @__PURE__ */ g("h2", {
|
|
158
159
|
className: "text-lg font-semibold text-text-primary",
|
|
159
|
-
children:
|
|
160
|
+
children: x("billing.invoices.invoiceNotFound", "Invoice not found")
|
|
160
161
|
}),
|
|
161
162
|
/* @__PURE__ */ g("p", {
|
|
162
163
|
className: "text-sm text-text-secondary",
|
|
163
|
-
children:
|
|
164
|
+
children: j?.message || x("billing.invoices.invoiceNotFoundMessage", "The invoice you are looking for does not exist.")
|
|
164
165
|
}),
|
|
165
166
|
/* @__PURE__ */ _("div", {
|
|
166
167
|
className: "flex items-center justify-center gap-3",
|
|
167
168
|
children: [/* @__PURE__ */ g("button", {
|
|
168
169
|
type: "button",
|
|
169
|
-
onClick: () =>
|
|
170
|
+
onClick: () => M(),
|
|
170
171
|
className: "px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors",
|
|
171
172
|
children: "Try Again"
|
|
172
173
|
}), /* @__PURE__ */ g("button", {
|
|
173
174
|
type: "button",
|
|
174
|
-
onClick: () =>
|
|
175
|
+
onClick: () => C(d("/invoices", O)),
|
|
175
176
|
className: "px-4 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
|
|
176
177
|
children: "Back to Invoices"
|
|
177
178
|
})]
|
|
@@ -179,7 +180,7 @@ var y = () => {
|
|
|
179
180
|
]
|
|
180
181
|
})
|
|
181
182
|
});
|
|
182
|
-
let
|
|
183
|
+
let H = o(k.status), U = k.status === "OPEN", W = k.status === "DRAFT", G = k.items || [], K = k.total - k.amountPaid;
|
|
183
184
|
return /* @__PURE__ */ _("div", {
|
|
184
185
|
className: "space-y-6 px-6 lg:px-8 py-6",
|
|
185
186
|
children: [
|
|
@@ -189,7 +190,7 @@ var y = () => {
|
|
|
189
190
|
className: "flex items-start gap-4",
|
|
190
191
|
children: [/* @__PURE__ */ g("button", {
|
|
191
192
|
type: "button",
|
|
192
|
-
onClick: () =>
|
|
193
|
+
onClick: () => C(d("/invoices", O)),
|
|
193
194
|
className: "p-2 -ml-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-button transition-colors",
|
|
194
195
|
children: /* @__PURE__ */ g("svg", {
|
|
195
196
|
className: "size-5",
|
|
@@ -207,58 +208,58 @@ var y = () => {
|
|
|
207
208
|
className: "flex items-center gap-3",
|
|
208
209
|
children: [/* @__PURE__ */ _("h1", {
|
|
209
210
|
className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary",
|
|
210
|
-
children: ["Invoice ", i(
|
|
211
|
+
children: ["Invoice ", i(k.invoiceNumber)]
|
|
211
212
|
}), /* @__PURE__ */ g("span", {
|
|
212
|
-
className: `px-2 py-1 text-xs font-medium rounded ${s(
|
|
213
|
-
children: a(
|
|
213
|
+
className: `px-2 py-1 text-xs font-medium rounded ${s(H)}`,
|
|
214
|
+
children: a(k.status)
|
|
214
215
|
})]
|
|
215
216
|
}), /* @__PURE__ */ _("p", {
|
|
216
217
|
className: "text-sm text-text-secondary mt-1",
|
|
217
218
|
children: [
|
|
218
219
|
"Created ",
|
|
219
|
-
r(
|
|
220
|
-
|
|
220
|
+
r(k.createdAt, "short"),
|
|
221
|
+
k.dueDate && ` · Due ${r(k.dueDate, "short")}`
|
|
221
222
|
]
|
|
222
223
|
})] })]
|
|
223
224
|
}), /* @__PURE__ */ _("div", {
|
|
224
225
|
className: "flex items-center gap-2 flex-wrap",
|
|
225
226
|
children: [
|
|
226
|
-
|
|
227
|
-
href:
|
|
227
|
+
k.pdfUrl && /* @__PURE__ */ g("a", {
|
|
228
|
+
href: k.pdfUrl,
|
|
228
229
|
target: "_blank",
|
|
229
230
|
rel: "noopener noreferrer",
|
|
230
231
|
className: "px-4 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
|
|
231
232
|
children: "Download PDF"
|
|
232
233
|
}),
|
|
233
|
-
|
|
234
|
-
href:
|
|
234
|
+
k.invoiceUrl && /* @__PURE__ */ g("a", {
|
|
235
|
+
href: k.invoiceUrl,
|
|
235
236
|
target: "_blank",
|
|
236
237
|
rel: "noopener noreferrer",
|
|
237
238
|
className: "px-4 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
|
|
238
239
|
children: "View on Portal"
|
|
239
240
|
}),
|
|
240
|
-
|
|
241
|
+
U && T.canPayInvoice && /* @__PURE__ */ g("button", {
|
|
241
242
|
type: "button",
|
|
242
|
-
onClick:
|
|
243
|
-
disabled:
|
|
243
|
+
onClick: B,
|
|
244
|
+
disabled: F || !L,
|
|
244
245
|
className: "px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors disabled:opacity-50",
|
|
245
|
-
children:
|
|
246
|
+
children: L ? F ? "Processing..." : "Pay Invoice" : "Default Payment Method Required"
|
|
246
247
|
}),
|
|
247
|
-
(
|
|
248
|
+
(U || W) && T.canVoidInvoice && /* @__PURE__ */ g("button", {
|
|
248
249
|
type: "button",
|
|
249
|
-
onClick:
|
|
250
|
-
disabled:
|
|
250
|
+
onClick: V,
|
|
251
|
+
disabled: I,
|
|
251
252
|
className: "px-4 py-2 text-sm font-medium border border-border-subtle text-status-error-text rounded-button hover:bg-status-error-bg-subtle transition-colors disabled:opacity-50",
|
|
252
|
-
children:
|
|
253
|
+
children: I ? x("billing.invoices.voiding", "Voiding...") : x("billing.invoices.voidInvoice", "Void Invoice")
|
|
253
254
|
})
|
|
254
255
|
]
|
|
255
256
|
})]
|
|
256
257
|
}),
|
|
257
|
-
|
|
258
|
+
R && /* @__PURE__ */ g("div", {
|
|
258
259
|
className: "p-3 bg-status-error-bg-subtle border border-status-error-border rounded-button",
|
|
259
260
|
children: /* @__PURE__ */ g("p", {
|
|
260
261
|
className: "text-sm text-status-error-text",
|
|
261
|
-
children:
|
|
262
|
+
children: R
|
|
262
263
|
})
|
|
263
264
|
}),
|
|
264
265
|
/* @__PURE__ */ _("div", {
|
|
@@ -274,68 +275,60 @@ var y = () => {
|
|
|
274
275
|
children: /* @__PURE__ */ _("h2", {
|
|
275
276
|
className: "text-lg font-semibold text-text-primary",
|
|
276
277
|
children: [
|
|
277
|
-
|
|
278
|
+
x("billing.invoices.lineItems", "Line Items"),
|
|
278
279
|
" (",
|
|
279
|
-
|
|
280
|
+
G.length,
|
|
280
281
|
")"
|
|
281
282
|
]
|
|
282
283
|
})
|
|
283
284
|
}),
|
|
284
|
-
|
|
285
|
+
G.length === 0 ? /* @__PURE__ */ g("div", {
|
|
285
286
|
className: "p-6",
|
|
286
287
|
children: /* @__PURE__ */ g("p", {
|
|
287
288
|
className: "text-sm text-text-secondary",
|
|
288
|
-
children:
|
|
289
|
-
})
|
|
290
|
-
}) : /* @__PURE__ */ g("div", {
|
|
291
|
-
className: "overflow-x-auto",
|
|
292
|
-
children: /* @__PURE__ */ _("table", {
|
|
293
|
-
className: "w-full",
|
|
294
|
-
children: [/* @__PURE__ */ g("thead", {
|
|
295
|
-
className: "bg-bg-sunken",
|
|
296
|
-
children: /* @__PURE__ */ _("tr", { children: [
|
|
297
|
-
/* @__PURE__ */ g("th", {
|
|
298
|
-
className: "text-left px-4 py-3 text-sm font-medium text-text-secondary",
|
|
299
|
-
children: "Description"
|
|
300
|
-
}),
|
|
301
|
-
/* @__PURE__ */ g("th", {
|
|
302
|
-
className: "text-right px-4 py-3 text-sm font-medium text-text-secondary",
|
|
303
|
-
children: "Qty"
|
|
304
|
-
}),
|
|
305
|
-
/* @__PURE__ */ g("th", {
|
|
306
|
-
className: "text-right px-4 py-3 text-sm font-medium text-text-secondary",
|
|
307
|
-
children: "Unit Price"
|
|
308
|
-
}),
|
|
309
|
-
/* @__PURE__ */ g("th", {
|
|
310
|
-
className: "text-right px-4 py-3 text-sm font-medium text-text-secondary",
|
|
311
|
-
children: "Amount"
|
|
312
|
-
})
|
|
313
|
-
] })
|
|
314
|
-
}), /* @__PURE__ */ g("tbody", {
|
|
315
|
-
className: "divide-y divide-border-subtle",
|
|
316
|
-
children: W.map((e) => /* @__PURE__ */ _("tr", {
|
|
317
|
-
className: "hover:bg-bg-sunken transition-colors",
|
|
318
|
-
children: [
|
|
319
|
-
/* @__PURE__ */ g("td", {
|
|
320
|
-
className: "p-4 text-sm text-text-primary",
|
|
321
|
-
children: e.description
|
|
322
|
-
}),
|
|
323
|
-
/* @__PURE__ */ g("td", {
|
|
324
|
-
className: "p-4 text-sm text-text-secondary text-right",
|
|
325
|
-
children: e.quantity
|
|
326
|
-
}),
|
|
327
|
-
/* @__PURE__ */ g("td", {
|
|
328
|
-
className: "p-4 text-sm text-text-secondary text-right",
|
|
329
|
-
children: n(e.unitPrice, O.currency)
|
|
330
|
-
}),
|
|
331
|
-
/* @__PURE__ */ g("td", {
|
|
332
|
-
className: "p-4 text-sm font-medium text-text-primary text-right",
|
|
333
|
-
children: n(e.amount, O.currency)
|
|
334
|
-
})
|
|
335
|
-
]
|
|
336
|
-
}, e.id))
|
|
337
|
-
})]
|
|
289
|
+
children: x("billing.invoices.noLineItems", "No line items on this invoice.")
|
|
338
290
|
})
|
|
291
|
+
}) : /* @__PURE__ */ g(y, {
|
|
292
|
+
data: G,
|
|
293
|
+
rowKey: (e) => e.id,
|
|
294
|
+
columns: [
|
|
295
|
+
{
|
|
296
|
+
key: "description",
|
|
297
|
+
header: "Description",
|
|
298
|
+
priority: "primary",
|
|
299
|
+
cell: (e) => e.description
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
key: "quantity",
|
|
303
|
+
header: "Qty",
|
|
304
|
+
headerClassName: "text-right",
|
|
305
|
+
cellClassName: "text-right",
|
|
306
|
+
cell: (e) => /* @__PURE__ */ g("span", {
|
|
307
|
+
className: "tabular-nums",
|
|
308
|
+
children: e.quantity
|
|
309
|
+
})
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
key: "unitPrice",
|
|
313
|
+
header: "Unit Price",
|
|
314
|
+
headerClassName: "text-right",
|
|
315
|
+
cellClassName: "text-right",
|
|
316
|
+
cell: (e) => /* @__PURE__ */ g("span", {
|
|
317
|
+
className: "tabular-nums",
|
|
318
|
+
children: n(e.unitPrice, k.currency)
|
|
319
|
+
})
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
key: "amount",
|
|
323
|
+
header: "Amount",
|
|
324
|
+
headerClassName: "text-right",
|
|
325
|
+
cellClassName: "text-right font-medium",
|
|
326
|
+
cell: (e) => /* @__PURE__ */ g("span", {
|
|
327
|
+
className: "tabular-nums",
|
|
328
|
+
children: n(e.amount, k.currency)
|
|
329
|
+
})
|
|
330
|
+
}
|
|
331
|
+
]
|
|
339
332
|
}),
|
|
340
333
|
/* @__PURE__ */ g("div", {
|
|
341
334
|
className: "border-t border-border-subtle p-4",
|
|
@@ -346,50 +339,50 @@ var y = () => {
|
|
|
346
339
|
className: "flex items-center justify-between text-sm",
|
|
347
340
|
children: [/* @__PURE__ */ g("span", {
|
|
348
341
|
className: "text-text-secondary",
|
|
349
|
-
children:
|
|
342
|
+
children: x("billing.invoices.subtotal", "Subtotal")
|
|
350
343
|
}), /* @__PURE__ */ g("span", {
|
|
351
344
|
className: "text-text-primary",
|
|
352
|
-
children: n(
|
|
345
|
+
children: n(k.subtotal, k.currency)
|
|
353
346
|
})]
|
|
354
347
|
}),
|
|
355
348
|
/* @__PURE__ */ _("div", {
|
|
356
349
|
className: "flex items-center justify-between text-sm",
|
|
357
350
|
children: [/* @__PURE__ */ g("span", {
|
|
358
351
|
className: "text-text-secondary",
|
|
359
|
-
children:
|
|
352
|
+
children: x("billing.invoices.tax", "Tax")
|
|
360
353
|
}), /* @__PURE__ */ g("span", {
|
|
361
354
|
className: "text-text-primary",
|
|
362
|
-
children: n(
|
|
355
|
+
children: n(k.tax, k.currency)
|
|
363
356
|
})]
|
|
364
357
|
}),
|
|
365
358
|
/* @__PURE__ */ _("div", {
|
|
366
359
|
className: "flex items-center justify-between text-sm font-semibold border-t border-border-subtle pt-2",
|
|
367
360
|
children: [/* @__PURE__ */ g("span", {
|
|
368
361
|
className: "text-text-primary",
|
|
369
|
-
children:
|
|
362
|
+
children: x("billing.invoices.total", "Total")
|
|
370
363
|
}), /* @__PURE__ */ g("span", {
|
|
371
364
|
className: "text-text-primary",
|
|
372
|
-
children: n(
|
|
365
|
+
children: n(k.total, k.currency)
|
|
373
366
|
})]
|
|
374
367
|
}),
|
|
375
|
-
|
|
368
|
+
k.amountPaid > 0 && /* @__PURE__ */ _("div", {
|
|
376
369
|
className: "flex items-center justify-between text-sm",
|
|
377
370
|
children: [/* @__PURE__ */ g("span", {
|
|
378
371
|
className: "text-text-secondary",
|
|
379
|
-
children:
|
|
372
|
+
children: x("billing.invoices.amountPaid", "Amount Paid")
|
|
380
373
|
}), /* @__PURE__ */ _("span", {
|
|
381
374
|
className: "text-status-success-text",
|
|
382
|
-
children: ["-", n(
|
|
375
|
+
children: ["-", n(k.amountPaid, k.currency)]
|
|
383
376
|
})]
|
|
384
377
|
}),
|
|
385
|
-
|
|
378
|
+
K > 0 && /* @__PURE__ */ _("div", {
|
|
386
379
|
className: "flex items-center justify-between text-sm font-semibold border-t border-border-subtle pt-2",
|
|
387
380
|
children: [/* @__PURE__ */ g("span", {
|
|
388
381
|
className: "text-text-primary",
|
|
389
|
-
children:
|
|
382
|
+
children: x("billing.invoices.amountDue", "Amount Due")
|
|
390
383
|
}), /* @__PURE__ */ g("span", {
|
|
391
384
|
className: "text-status-warning-text",
|
|
392
|
-
children: n(
|
|
385
|
+
children: n(K, k.currency)
|
|
393
386
|
})]
|
|
394
387
|
})
|
|
395
388
|
]
|
|
@@ -397,13 +390,13 @@ var y = () => {
|
|
|
397
390
|
})
|
|
398
391
|
]
|
|
399
392
|
}),
|
|
400
|
-
|
|
393
|
+
k.subscription && /* @__PURE__ */ _("div", {
|
|
401
394
|
className: "border border-border-subtle rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden",
|
|
402
395
|
children: [/* @__PURE__ */ g("div", {
|
|
403
396
|
className: "p-6 border-b border-border-subtle bg-bg-sunken",
|
|
404
397
|
children: /* @__PURE__ */ g("h2", {
|
|
405
398
|
className: "text-lg font-semibold text-text-primary",
|
|
406
|
-
children:
|
|
399
|
+
children: x("billing.invoices.subscription", "Subscription")
|
|
407
400
|
})
|
|
408
401
|
}), /* @__PURE__ */ g("div", {
|
|
409
402
|
className: "p-6 space-y-4",
|
|
@@ -411,7 +404,7 @@ var y = () => {
|
|
|
411
404
|
className: "flex items-center justify-between",
|
|
412
405
|
children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
413
406
|
className: "font-medium text-text-primary",
|
|
414
|
-
children:
|
|
407
|
+
children: k.subscription.plan?.name || "Unknown Plan"
|
|
415
408
|
}), /* @__PURE__ */ _("p", {
|
|
416
409
|
className: "text-sm text-text-secondary mt-0.5",
|
|
417
410
|
children: [
|
|
@@ -419,25 +412,25 @@ var y = () => {
|
|
|
419
412
|
" ",
|
|
420
413
|
/* @__PURE__ */ g("span", {
|
|
421
414
|
className: "font-mono text-xs",
|
|
422
|
-
children:
|
|
415
|
+
children: k.subscription.id
|
|
423
416
|
})
|
|
424
417
|
]
|
|
425
418
|
})] }), /* @__PURE__ */ g("button", {
|
|
426
419
|
type: "button",
|
|
427
|
-
onClick: () =>
|
|
420
|
+
onClick: () => C(d(`/subscriptions/${k.subscription.id}`, O)),
|
|
428
421
|
className: "px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-bg-sunken rounded-button transition-colors",
|
|
429
422
|
children: "View"
|
|
430
423
|
})]
|
|
431
424
|
})
|
|
432
425
|
})]
|
|
433
426
|
}),
|
|
434
|
-
|
|
427
|
+
k.payment && /* @__PURE__ */ _("div", {
|
|
435
428
|
className: "border border-border-subtle rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden",
|
|
436
429
|
children: [/* @__PURE__ */ g("div", {
|
|
437
430
|
className: "p-6 border-b border-border-subtle bg-bg-sunken",
|
|
438
431
|
children: /* @__PURE__ */ g("h2", {
|
|
439
432
|
className: "text-lg font-semibold text-text-primary",
|
|
440
|
-
children:
|
|
433
|
+
children: x("billing.invoices.payment", "Payment")
|
|
441
434
|
})
|
|
442
435
|
}), /* @__PURE__ */ g("div", {
|
|
443
436
|
className: "p-6",
|
|
@@ -449,42 +442,42 @@ var y = () => {
|
|
|
449
442
|
children: "Payment ID"
|
|
450
443
|
}), /* @__PURE__ */ g("p", {
|
|
451
444
|
className: "font-mono text-sm text-text-primary mt-0.5 break-all",
|
|
452
|
-
children:
|
|
445
|
+
children: k.payment.id
|
|
453
446
|
})] }),
|
|
454
447
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
455
448
|
className: "text-sm text-text-secondary",
|
|
456
449
|
children: "Amount"
|
|
457
450
|
}), /* @__PURE__ */ g("p", {
|
|
458
451
|
className: "text-sm text-text-primary mt-0.5",
|
|
459
|
-
children: n(
|
|
452
|
+
children: n(k.payment.amount, k.payment.currency)
|
|
460
453
|
})] }),
|
|
461
454
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
462
455
|
className: "text-sm text-text-secondary",
|
|
463
456
|
children: "Status"
|
|
464
457
|
}), /* @__PURE__ */ g("p", {
|
|
465
458
|
className: "text-sm text-text-primary mt-0.5 capitalize",
|
|
466
|
-
children:
|
|
459
|
+
children: k.payment.status.toLowerCase()
|
|
467
460
|
})] }),
|
|
468
461
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
469
462
|
className: "text-sm text-text-secondary",
|
|
470
463
|
children: "Method"
|
|
471
464
|
}), /* @__PURE__ */ g("p", {
|
|
472
465
|
className: "text-sm text-text-primary mt-0.5 capitalize",
|
|
473
|
-
children:
|
|
466
|
+
children: k.payment.method.toLowerCase().replace(/_/g, " ")
|
|
474
467
|
})] }),
|
|
475
|
-
|
|
468
|
+
k.payment.provider && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
476
469
|
className: "text-sm text-text-secondary",
|
|
477
470
|
children: "Provider"
|
|
478
471
|
}), /* @__PURE__ */ g("p", {
|
|
479
472
|
className: "text-sm text-text-primary mt-0.5 capitalize",
|
|
480
|
-
children:
|
|
473
|
+
children: k.payment.provider
|
|
481
474
|
})] }),
|
|
482
|
-
|
|
475
|
+
k.payment.paidAt && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
483
476
|
className: "text-sm text-text-secondary",
|
|
484
477
|
children: "Paid At"
|
|
485
478
|
}), /* @__PURE__ */ g("p", {
|
|
486
479
|
className: "text-sm text-text-primary mt-0.5",
|
|
487
|
-
children: r(
|
|
480
|
+
children: r(k.payment.paidAt, "short")
|
|
488
481
|
})] })
|
|
489
482
|
]
|
|
490
483
|
})
|
|
@@ -500,7 +493,7 @@ var y = () => {
|
|
|
500
493
|
className: "p-6 border-b border-border-subtle bg-bg-sunken",
|
|
501
494
|
children: /* @__PURE__ */ g("h2", {
|
|
502
495
|
className: "text-lg font-semibold text-text-primary",
|
|
503
|
-
children:
|
|
496
|
+
children: x("billing.invoices.details", "Details")
|
|
504
497
|
})
|
|
505
498
|
}), /* @__PURE__ */ _("div", {
|
|
506
499
|
className: "p-6 space-y-4",
|
|
@@ -510,56 +503,56 @@ var y = () => {
|
|
|
510
503
|
children: "Invoice ID"
|
|
511
504
|
}), /* @__PURE__ */ g("p", {
|
|
512
505
|
className: "font-mono text-sm text-text-primary mt-0.5 break-all",
|
|
513
|
-
children:
|
|
506
|
+
children: k.id
|
|
514
507
|
})] }),
|
|
515
508
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
516
509
|
className: "text-sm text-text-secondary",
|
|
517
510
|
children: "Invoice Number"
|
|
518
511
|
}), /* @__PURE__ */ g("p", {
|
|
519
512
|
className: "text-sm text-text-primary mt-0.5",
|
|
520
|
-
children: i(
|
|
513
|
+
children: i(k.invoiceNumber)
|
|
521
514
|
})] }),
|
|
522
|
-
|
|
515
|
+
k.itemDescription && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
523
516
|
className: "text-sm text-text-secondary",
|
|
524
517
|
children: "Description"
|
|
525
518
|
}), /* @__PURE__ */ g("p", {
|
|
526
519
|
className: "text-sm text-text-primary mt-0.5",
|
|
527
|
-
children:
|
|
520
|
+
children: k.itemDescription
|
|
528
521
|
})] }),
|
|
529
522
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
530
523
|
className: "text-sm text-text-secondary",
|
|
531
524
|
children: "Status"
|
|
532
525
|
}), /* @__PURE__ */ g("span", {
|
|
533
|
-
className: `inline-flex mt-0.5 px-2 py-1 text-xs font-medium rounded ${s(
|
|
534
|
-
children: a(
|
|
526
|
+
className: `inline-flex mt-0.5 px-2 py-1 text-xs font-medium rounded ${s(H)}`,
|
|
527
|
+
children: a(k.status)
|
|
535
528
|
})] }),
|
|
536
529
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
537
530
|
className: "text-sm text-text-secondary",
|
|
538
531
|
children: "Currency"
|
|
539
532
|
}), /* @__PURE__ */ g("p", {
|
|
540
533
|
className: "text-sm text-text-primary mt-0.5",
|
|
541
|
-
children:
|
|
534
|
+
children: k.currency
|
|
542
535
|
})] }),
|
|
543
536
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
544
537
|
className: "text-sm text-text-secondary",
|
|
545
538
|
children: "Total"
|
|
546
539
|
}), /* @__PURE__ */ g("p", {
|
|
547
540
|
className: "text-sm font-semibold text-text-primary mt-0.5",
|
|
548
|
-
children: n(
|
|
541
|
+
children: n(k.total, k.currency)
|
|
549
542
|
})] }),
|
|
550
543
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
551
544
|
className: "text-sm text-text-secondary",
|
|
552
545
|
children: "Amount Paid"
|
|
553
546
|
}), /* @__PURE__ */ g("p", {
|
|
554
547
|
className: "text-sm text-status-success-text mt-0.5",
|
|
555
|
-
children: n(
|
|
548
|
+
children: n(k.amountPaid, k.currency)
|
|
556
549
|
})] }),
|
|
557
|
-
|
|
550
|
+
K > 0 && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
558
551
|
className: "text-sm text-text-secondary",
|
|
559
552
|
children: "Amount Due"
|
|
560
553
|
}), /* @__PURE__ */ g("p", {
|
|
561
554
|
className: "text-sm font-semibold text-status-warning-text mt-0.5",
|
|
562
|
-
children: n(
|
|
555
|
+
children: n(K, k.currency)
|
|
563
556
|
})] })
|
|
564
557
|
]
|
|
565
558
|
})]
|
|
@@ -570,7 +563,7 @@ var y = () => {
|
|
|
570
563
|
className: "p-6 border-b border-border-subtle bg-bg-sunken",
|
|
571
564
|
children: /* @__PURE__ */ g("h2", {
|
|
572
565
|
className: "text-lg font-semibold text-text-primary",
|
|
573
|
-
children:
|
|
566
|
+
children: x("billing.invoices.dates", "Dates")
|
|
574
567
|
})
|
|
575
568
|
}), /* @__PURE__ */ _("div", {
|
|
576
569
|
className: "p-6 space-y-4",
|
|
@@ -580,28 +573,28 @@ var y = () => {
|
|
|
580
573
|
children: "Created"
|
|
581
574
|
}), /* @__PURE__ */ g("p", {
|
|
582
575
|
className: "text-sm text-text-primary mt-0.5",
|
|
583
|
-
children: r(
|
|
576
|
+
children: r(k.createdAt)
|
|
584
577
|
})] }),
|
|
585
|
-
|
|
578
|
+
k.dueDate && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
586
579
|
className: "text-sm text-text-secondary",
|
|
587
580
|
children: "Due Date"
|
|
588
581
|
}), /* @__PURE__ */ g("p", {
|
|
589
582
|
className: "text-sm text-text-primary mt-0.5",
|
|
590
|
-
children: r(
|
|
583
|
+
children: r(k.dueDate)
|
|
591
584
|
})] }),
|
|
592
|
-
|
|
585
|
+
k.paidAt && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
593
586
|
className: "text-sm text-text-secondary",
|
|
594
587
|
children: "Paid At"
|
|
595
588
|
}), /* @__PURE__ */ g("p", {
|
|
596
589
|
className: "text-sm text-text-primary mt-0.5",
|
|
597
|
-
children: r(
|
|
590
|
+
children: r(k.paidAt)
|
|
598
591
|
})] }),
|
|
599
592
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
600
593
|
className: "text-sm text-text-secondary",
|
|
601
594
|
children: "Last Updated"
|
|
602
595
|
}), /* @__PURE__ */ g("p", {
|
|
603
596
|
className: "text-sm text-text-primary mt-0.5",
|
|
604
|
-
children: r(
|
|
597
|
+
children: r(k.updatedAt)
|
|
605
598
|
})] })
|
|
606
599
|
]
|
|
607
600
|
})]
|
|
@@ -612,7 +605,7 @@ var y = () => {
|
|
|
612
605
|
className: "p-6 border-b border-border-subtle bg-bg-sunken",
|
|
613
606
|
children: /* @__PURE__ */ g("h2", {
|
|
614
607
|
className: "text-lg font-semibold text-text-primary",
|
|
615
|
-
children:
|
|
608
|
+
children: x("billing.invoices.organization", "Organization")
|
|
616
609
|
})
|
|
617
610
|
}), /* @__PURE__ */ g("div", {
|
|
618
611
|
className: "p-6 space-y-4",
|
|
@@ -621,7 +614,7 @@ var y = () => {
|
|
|
621
614
|
children: "Organization ID"
|
|
622
615
|
}), /* @__PURE__ */ g("p", {
|
|
623
616
|
className: "font-mono text-sm text-text-primary mt-0.5 break-all",
|
|
624
|
-
children:
|
|
617
|
+
children: k.orgId
|
|
625
618
|
})] })
|
|
626
619
|
})]
|
|
627
620
|
})
|
|
@@ -632,6 +625,6 @@ var y = () => {
|
|
|
632
625
|
});
|
|
633
626
|
};
|
|
634
627
|
//#endregion
|
|
635
|
-
export {
|
|
628
|
+
export { b as InvoiceDetailPage };
|
|
636
629
|
|
|
637
630
|
//# sourceMappingURL=InvoiceDetailPage.js.map
|