@burdenoff/microfe-billing 2026.625.4 → 2026.626.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/billing/modules/addons/pages/AddonBrowseDetailPage.js +192 -187
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonCreatePage.js +322 -317
- package/dist/billing/modules/addons/pages/AddonCreatePage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonDetailPage.js +190 -185
- package/dist/billing/modules/addons/pages/AddonDetailPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonEditPage.js +297 -292
- package/dist/billing/modules/addons/pages/AddonEditPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +60 -75
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonsListPage.js +86 -101
- package/dist/billing/modules/addons/pages/AddonsListPage.js.map +1 -1
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +124 -121
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js +103 -111
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +196 -160
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoicesListPage.js +58 -73
- package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +65 -75
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/RefundsPage.js +399 -399
- package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/TransactionsPage.js +49 -48
- package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/UserRefundsPage.js +144 -151
- package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
- package/dist/billing/modules/checkout/pages/CheckoutPage.js +430 -425
- package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js +121 -93
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CouponsListPage.js +154 -152
- package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js +467 -462
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/EditCouponPage.js +294 -286
- package/dist/billing/modules/coupons/pages/EditCouponPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js +123 -117
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +43 -42
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +192 -207
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditsPage.js +40 -56
- package/dist/billing/modules/credits/pages/CreditsPage.js.map +1 -1
- package/dist/billing/modules/dashboard/pages/OverviewPage.js +128 -121
- package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js +165 -180
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/EarningsPage.js +103 -100
- package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +175 -175
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutsPage.js +96 -96
- package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +42 -40
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +45 -38
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanCreatePage.js +339 -334
- package/dist/billing/modules/plans/pages/PlanCreatePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanDetailPage.js +80 -74
- package/dist/billing/modules/plans/pages/PlanDetailPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanEditPage.js +342 -337
- package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js +38 -53
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansListPage.js +60 -75
- package/dist/billing/modules/plans/pages/PlansListPage.js.map +1 -1
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +242 -237
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.js.map +1 -1
- package/dist/billing/modules/promotions/pages/PromotionsListPage.js +29 -39
- package/dist/billing/modules/promotions/pages/PromotionsListPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaPage.js +1 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +299 -294
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +191 -186
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +308 -303
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +57 -78
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js.map +1 -1
- package/dist/billing/modules/settings/pages/SettingsPage.js +79 -78
- package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +15 -13
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +338 -299
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +82 -103
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +59 -54
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -1
- package/dist/billing/modules/usage/pages/UsagePage.js +172 -215
- package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
- package/package.json +2 -2
|
@@ -11,48 +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 {
|
|
14
|
+
import { EmphasisPanel as y, NextSteps as b, PagePurpose as x, ResponsiveTable as S } from "@burdenoff/fe-libs/ui";
|
|
15
15
|
//#region src/billing/modules/billing/pages/InvoiceDetailPage.tsx
|
|
16
|
-
var
|
|
17
|
-
let { t:
|
|
18
|
-
let n =
|
|
16
|
+
var C = () => {
|
|
17
|
+
let { t: C } = v(), w = (e, t) => {
|
|
18
|
+
let n = C(e);
|
|
19
19
|
return n === e ? t : n;
|
|
20
|
-
}, { invoiceId:
|
|
21
|
-
orgId:
|
|
20
|
+
}, { invoiceId: T } = h(), E = u(), { orgId: D } = e(), O = c(), { selectedAccountId: k } = t({
|
|
21
|
+
orgId: D,
|
|
22
22
|
syncFromUrl: !0,
|
|
23
23
|
urlParamName: "billingAccountId"
|
|
24
|
-
}), { data:
|
|
25
|
-
if (
|
|
26
|
-
if (!
|
|
27
|
-
|
|
24
|
+
}), { data: A } = l({ fetchPolicy: "cache-first" }), j = k ?? A?.getDefaultBillingAccount?.id ?? void 0, { invoice: M, isLoading: N, error: P, refetch: F } = f(T, j), { payInvoice: I, voidInvoice: L, isPaying: R, isVoiding: z } = p(), B = A?.getDefaultBillingAccount?.defaultPaymentMethod, [V, H] = m(null), U = async () => {
|
|
25
|
+
if (M) {
|
|
26
|
+
if (!B) {
|
|
27
|
+
H("Add and set a default payment method before paying this invoice.");
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
|
-
if (!
|
|
31
|
-
|
|
30
|
+
if (!j) {
|
|
31
|
+
H("No billing account context");
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
H(null);
|
|
35
35
|
try {
|
|
36
|
-
await
|
|
36
|
+
await I(M.id, B, j), await F();
|
|
37
37
|
} catch (e) {
|
|
38
|
-
|
|
38
|
+
H(e instanceof Error ? e.message : "Failed to pay invoice");
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
},
|
|
42
|
-
if (
|
|
43
|
-
if (!
|
|
44
|
-
|
|
41
|
+
}, W = async () => {
|
|
42
|
+
if (M) {
|
|
43
|
+
if (!j) {
|
|
44
|
+
H("No billing account context");
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
H(null);
|
|
48
48
|
try {
|
|
49
|
-
await
|
|
49
|
+
await L(M.id, j), await F();
|
|
50
50
|
} catch (e) {
|
|
51
|
-
|
|
51
|
+
H(e instanceof Error ? e.message : "Failed to void invoice");
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
|
-
if (!
|
|
55
|
+
if (!O.canViewInvoices) return /* @__PURE__ */ g("div", {
|
|
56
56
|
className: "flex items-center justify-center h-full min-h-[400px]",
|
|
57
57
|
children: /* @__PURE__ */ _("div", {
|
|
58
58
|
className: "text-center space-y-2",
|
|
@@ -74,16 +74,16 @@ var b = () => {
|
|
|
74
74
|
}),
|
|
75
75
|
/* @__PURE__ */ g("h2", {
|
|
76
76
|
className: "text-lg font-semibold text-text-primary",
|
|
77
|
-
children:
|
|
77
|
+
children: w("billing.accessDenied.title", "Access Denied")
|
|
78
78
|
}),
|
|
79
79
|
/* @__PURE__ */ g("p", {
|
|
80
80
|
className: "text-sm text-text-secondary max-w-sm",
|
|
81
|
-
children:
|
|
81
|
+
children: w("billing.invoices.noViewPermission", "You don't have permission to view invoices.")
|
|
82
82
|
})
|
|
83
83
|
]
|
|
84
84
|
})
|
|
85
85
|
});
|
|
86
|
-
if (
|
|
86
|
+
if (N) return /* @__PURE__ */ _("div", {
|
|
87
87
|
className: "space-y-6 px-6 lg:px-8 py-6",
|
|
88
88
|
children: [/* @__PURE__ */ _("div", {
|
|
89
89
|
className: "flex items-center gap-4",
|
|
@@ -135,7 +135,7 @@ var b = () => {
|
|
|
135
135
|
})]
|
|
136
136
|
})]
|
|
137
137
|
});
|
|
138
|
-
if (
|
|
138
|
+
if (P || !M) return /* @__PURE__ */ g("div", {
|
|
139
139
|
className: "flex items-center justify-center h-full min-h-[400px]",
|
|
140
140
|
children: /* @__PURE__ */ _("div", {
|
|
141
141
|
className: "text-center space-y-4",
|
|
@@ -157,22 +157,22 @@ var b = () => {
|
|
|
157
157
|
}),
|
|
158
158
|
/* @__PURE__ */ g("h2", {
|
|
159
159
|
className: "text-lg font-semibold text-text-primary",
|
|
160
|
-
children:
|
|
160
|
+
children: w("billing.invoices.invoiceNotFound", "Invoice not found")
|
|
161
161
|
}),
|
|
162
162
|
/* @__PURE__ */ g("p", {
|
|
163
163
|
className: "text-sm text-text-secondary",
|
|
164
|
-
children:
|
|
164
|
+
children: P?.message || w("billing.invoices.invoiceNotFoundMessage", "The invoice you are looking for does not exist.")
|
|
165
165
|
}),
|
|
166
166
|
/* @__PURE__ */ _("div", {
|
|
167
167
|
className: "flex items-center justify-center gap-3",
|
|
168
168
|
children: [/* @__PURE__ */ g("button", {
|
|
169
169
|
type: "button",
|
|
170
|
-
onClick: () =>
|
|
170
|
+
onClick: () => F(),
|
|
171
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",
|
|
172
172
|
children: "Try Again"
|
|
173
173
|
}), /* @__PURE__ */ g("button", {
|
|
174
174
|
type: "button",
|
|
175
|
-
onClick: () =>
|
|
175
|
+
onClick: () => E(d("/invoices", j)),
|
|
176
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",
|
|
177
177
|
children: "Back to Invoices"
|
|
178
178
|
})]
|
|
@@ -180,7 +180,69 @@ var b = () => {
|
|
|
180
180
|
]
|
|
181
181
|
})
|
|
182
182
|
});
|
|
183
|
-
let
|
|
183
|
+
let G = o(M.status), K = M.status === "OPEN", q = M.status === "DRAFT", J = M.items || [], Y = M.total - M.amountPaid, X = [
|
|
184
|
+
{
|
|
185
|
+
key: "description",
|
|
186
|
+
header: "Description",
|
|
187
|
+
priority: "primary",
|
|
188
|
+
cell: (e) => e.description
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
key: "quantity",
|
|
192
|
+
header: "Qty",
|
|
193
|
+
headerClassName: "text-right",
|
|
194
|
+
cellClassName: "text-right",
|
|
195
|
+
cell: (e) => /* @__PURE__ */ g("span", {
|
|
196
|
+
className: "tabular-nums",
|
|
197
|
+
children: e.quantity
|
|
198
|
+
})
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
key: "unitPrice",
|
|
202
|
+
header: "Unit Price",
|
|
203
|
+
headerClassName: "text-right",
|
|
204
|
+
cellClassName: "text-right",
|
|
205
|
+
cell: (e) => /* @__PURE__ */ g("span", {
|
|
206
|
+
className: "tabular-nums",
|
|
207
|
+
children: n(e.unitPrice, M.currency)
|
|
208
|
+
})
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
key: "amount",
|
|
212
|
+
header: "Amount",
|
|
213
|
+
headerClassName: "text-right",
|
|
214
|
+
cellClassName: "text-right font-medium",
|
|
215
|
+
cell: (e) => /* @__PURE__ */ g("span", {
|
|
216
|
+
className: "tabular-nums",
|
|
217
|
+
children: n(e.amount, M.currency)
|
|
218
|
+
})
|
|
219
|
+
}
|
|
220
|
+
], Z = [
|
|
221
|
+
...K && O.canPayInvoice ? [{
|
|
222
|
+
id: "pay",
|
|
223
|
+
label: "Pay this invoice",
|
|
224
|
+
description: B ? "Settle the outstanding amount with your default payment method." : "Add a default payment method first, then pay.",
|
|
225
|
+
onClick: U
|
|
226
|
+
}] : [],
|
|
227
|
+
...M.pdfUrl ? [{
|
|
228
|
+
id: "download",
|
|
229
|
+
label: "Download the PDF",
|
|
230
|
+
description: "Save a copy of this invoice for your records.",
|
|
231
|
+
href: M.pdfUrl
|
|
232
|
+
}] : [],
|
|
233
|
+
...M.subscription ? [{
|
|
234
|
+
id: "view-subscription",
|
|
235
|
+
label: "View the related subscription",
|
|
236
|
+
description: "See the plan and quotas this invoice billed for.",
|
|
237
|
+
onClick: () => E(d(`/subscriptions/${M.subscription.id}`, j))
|
|
238
|
+
}] : [],
|
|
239
|
+
{
|
|
240
|
+
id: "request-refund",
|
|
241
|
+
label: "Have an issue? Request a refund",
|
|
242
|
+
description: "Raise a refund request for a charge on this account.",
|
|
243
|
+
onClick: () => E(d("/refunds", j))
|
|
244
|
+
}
|
|
245
|
+
];
|
|
184
246
|
return /* @__PURE__ */ _("div", {
|
|
185
247
|
className: "space-y-6 px-6 lg:px-8 py-6",
|
|
186
248
|
children: [
|
|
@@ -190,7 +252,7 @@ var b = () => {
|
|
|
190
252
|
className: "flex items-start gap-4",
|
|
191
253
|
children: [/* @__PURE__ */ g("button", {
|
|
192
254
|
type: "button",
|
|
193
|
-
onClick: () =>
|
|
255
|
+
onClick: () => E(d("/invoices", j)),
|
|
194
256
|
className: "p-2 -ml-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-button transition-colors",
|
|
195
257
|
children: /* @__PURE__ */ g("svg", {
|
|
196
258
|
className: "size-5",
|
|
@@ -204,62 +266,69 @@ var b = () => {
|
|
|
204
266
|
d: "M15 19l-7-7 7-7"
|
|
205
267
|
})
|
|
206
268
|
})
|
|
207
|
-
}), /* @__PURE__ */ _("div", { children: [
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
"
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
269
|
+
}), /* @__PURE__ */ _("div", { children: [
|
|
270
|
+
/* @__PURE__ */ _("div", {
|
|
271
|
+
className: "flex items-center gap-3",
|
|
272
|
+
children: [/* @__PURE__ */ _("h1", {
|
|
273
|
+
className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary",
|
|
274
|
+
children: ["Invoice ", i(M.invoiceNumber)]
|
|
275
|
+
}), /* @__PURE__ */ g("span", {
|
|
276
|
+
className: `px-2 py-1 text-xs font-medium rounded ${s(G)}`,
|
|
277
|
+
children: a(M.status)
|
|
278
|
+
})]
|
|
279
|
+
}),
|
|
280
|
+
/* @__PURE__ */ _("p", {
|
|
281
|
+
className: "text-sm text-text-secondary mt-1",
|
|
282
|
+
children: [
|
|
283
|
+
"Created ",
|
|
284
|
+
r(M.createdAt, "short"),
|
|
285
|
+
M.dueDate && ` · Due ${r(M.dueDate, "short")}`
|
|
286
|
+
]
|
|
287
|
+
}),
|
|
288
|
+
/* @__PURE__ */ g(x, {
|
|
289
|
+
className: "mt-3",
|
|
290
|
+
children: w("billing.invoices.detailPurpose", "The full breakdown of a single invoice — its line items, taxes, what has been paid and what is still due. Use it to download the PDF, pay an outstanding balance, jump to the subscription it covers, or raise a refund.")
|
|
291
|
+
})
|
|
292
|
+
] })]
|
|
224
293
|
}), /* @__PURE__ */ _("div", {
|
|
225
294
|
className: "flex items-center gap-2 flex-wrap",
|
|
226
295
|
children: [
|
|
227
|
-
|
|
228
|
-
href:
|
|
296
|
+
M.pdfUrl && /* @__PURE__ */ g("a", {
|
|
297
|
+
href: M.pdfUrl,
|
|
229
298
|
target: "_blank",
|
|
230
299
|
rel: "noopener noreferrer",
|
|
231
300
|
className: "px-4 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
|
|
232
301
|
children: "Download PDF"
|
|
233
302
|
}),
|
|
234
|
-
|
|
235
|
-
href:
|
|
303
|
+
M.invoiceUrl && /* @__PURE__ */ g("a", {
|
|
304
|
+
href: M.invoiceUrl,
|
|
236
305
|
target: "_blank",
|
|
237
306
|
rel: "noopener noreferrer",
|
|
238
307
|
className: "px-4 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
|
|
239
308
|
children: "View on Portal"
|
|
240
309
|
}),
|
|
241
|
-
|
|
310
|
+
K && O.canPayInvoice && /* @__PURE__ */ g("button", {
|
|
242
311
|
type: "button",
|
|
243
|
-
onClick:
|
|
244
|
-
disabled:
|
|
312
|
+
onClick: U,
|
|
313
|
+
disabled: R || !B,
|
|
245
314
|
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",
|
|
246
|
-
children:
|
|
315
|
+
children: B ? R ? "Processing..." : "Pay Invoice" : "Default Payment Method Required"
|
|
247
316
|
}),
|
|
248
|
-
(
|
|
317
|
+
(K || q) && O.canVoidInvoice && /* @__PURE__ */ g("button", {
|
|
249
318
|
type: "button",
|
|
250
|
-
onClick:
|
|
251
|
-
disabled:
|
|
319
|
+
onClick: W,
|
|
320
|
+
disabled: z,
|
|
252
321
|
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",
|
|
253
|
-
children:
|
|
322
|
+
children: z ? w("billing.invoices.voiding", "Voiding...") : w("billing.invoices.voidInvoice", "Void Invoice")
|
|
254
323
|
})
|
|
255
324
|
]
|
|
256
325
|
})]
|
|
257
326
|
}),
|
|
258
|
-
|
|
327
|
+
V && /* @__PURE__ */ g("div", {
|
|
259
328
|
className: "p-3 bg-status-error-bg-subtle border border-status-error-border rounded-button",
|
|
260
329
|
children: /* @__PURE__ */ g("p", {
|
|
261
330
|
className: "text-sm text-status-error-text",
|
|
262
|
-
children:
|
|
331
|
+
children: V
|
|
263
332
|
})
|
|
264
333
|
}),
|
|
265
334
|
/* @__PURE__ */ _("div", {
|
|
@@ -267,68 +336,31 @@ var b = () => {
|
|
|
267
336
|
children: [/* @__PURE__ */ _("div", {
|
|
268
337
|
className: "lg:col-span-2 space-y-6",
|
|
269
338
|
children: [
|
|
270
|
-
/* @__PURE__ */ _(
|
|
271
|
-
className: "
|
|
339
|
+
/* @__PURE__ */ _(y, {
|
|
340
|
+
className: "overflow-hidden p-0",
|
|
272
341
|
children: [
|
|
273
342
|
/* @__PURE__ */ g("div", {
|
|
274
|
-
className: "p-6 border-b border-border-subtle
|
|
343
|
+
className: "p-6 border-b border-border-subtle",
|
|
275
344
|
children: /* @__PURE__ */ _("h2", {
|
|
276
345
|
className: "text-lg font-semibold text-text-primary",
|
|
277
346
|
children: [
|
|
278
|
-
|
|
347
|
+
w("billing.invoices.lineItems", "Line Items"),
|
|
279
348
|
" (",
|
|
280
|
-
|
|
349
|
+
J.length,
|
|
281
350
|
")"
|
|
282
351
|
]
|
|
283
352
|
})
|
|
284
353
|
}),
|
|
285
|
-
|
|
354
|
+
J.length === 0 ? /* @__PURE__ */ g("div", {
|
|
286
355
|
className: "p-6",
|
|
287
356
|
children: /* @__PURE__ */ g("p", {
|
|
288
357
|
className: "text-sm text-text-secondary",
|
|
289
|
-
children:
|
|
358
|
+
children: w("billing.invoices.noLineItems", "No line items on this invoice.")
|
|
290
359
|
})
|
|
291
|
-
}) : /* @__PURE__ */ g(
|
|
292
|
-
data:
|
|
360
|
+
}) : /* @__PURE__ */ g(S, {
|
|
361
|
+
data: J,
|
|
293
362
|
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
|
-
]
|
|
363
|
+
columns: X
|
|
332
364
|
}),
|
|
333
365
|
/* @__PURE__ */ g("div", {
|
|
334
366
|
className: "border-t border-border-subtle p-4",
|
|
@@ -339,50 +371,50 @@ var b = () => {
|
|
|
339
371
|
className: "flex items-center justify-between text-sm",
|
|
340
372
|
children: [/* @__PURE__ */ g("span", {
|
|
341
373
|
className: "text-text-secondary",
|
|
342
|
-
children:
|
|
374
|
+
children: w("billing.invoices.subtotal", "Subtotal")
|
|
343
375
|
}), /* @__PURE__ */ g("span", {
|
|
344
376
|
className: "text-text-primary",
|
|
345
|
-
children: n(
|
|
377
|
+
children: n(M.subtotal, M.currency)
|
|
346
378
|
})]
|
|
347
379
|
}),
|
|
348
380
|
/* @__PURE__ */ _("div", {
|
|
349
381
|
className: "flex items-center justify-between text-sm",
|
|
350
382
|
children: [/* @__PURE__ */ g("span", {
|
|
351
383
|
className: "text-text-secondary",
|
|
352
|
-
children:
|
|
384
|
+
children: w("billing.invoices.tax", "Tax")
|
|
353
385
|
}), /* @__PURE__ */ g("span", {
|
|
354
386
|
className: "text-text-primary",
|
|
355
|
-
children: n(
|
|
387
|
+
children: n(M.tax, M.currency)
|
|
356
388
|
})]
|
|
357
389
|
}),
|
|
358
390
|
/* @__PURE__ */ _("div", {
|
|
359
391
|
className: "flex items-center justify-between text-sm font-semibold border-t border-border-subtle pt-2",
|
|
360
392
|
children: [/* @__PURE__ */ g("span", {
|
|
361
393
|
className: "text-text-primary",
|
|
362
|
-
children:
|
|
394
|
+
children: w("billing.invoices.total", "Total")
|
|
363
395
|
}), /* @__PURE__ */ g("span", {
|
|
364
396
|
className: "text-text-primary",
|
|
365
|
-
children: n(
|
|
397
|
+
children: n(M.total, M.currency)
|
|
366
398
|
})]
|
|
367
399
|
}),
|
|
368
|
-
|
|
400
|
+
M.amountPaid > 0 && /* @__PURE__ */ _("div", {
|
|
369
401
|
className: "flex items-center justify-between text-sm",
|
|
370
402
|
children: [/* @__PURE__ */ g("span", {
|
|
371
403
|
className: "text-text-secondary",
|
|
372
|
-
children:
|
|
404
|
+
children: w("billing.invoices.amountPaid", "Amount Paid")
|
|
373
405
|
}), /* @__PURE__ */ _("span", {
|
|
374
406
|
className: "text-status-success-text",
|
|
375
|
-
children: ["-", n(
|
|
407
|
+
children: ["-", n(M.amountPaid, M.currency)]
|
|
376
408
|
})]
|
|
377
409
|
}),
|
|
378
|
-
|
|
410
|
+
Y > 0 && /* @__PURE__ */ _("div", {
|
|
379
411
|
className: "flex items-center justify-between text-sm font-semibold border-t border-border-subtle pt-2",
|
|
380
412
|
children: [/* @__PURE__ */ g("span", {
|
|
381
413
|
className: "text-text-primary",
|
|
382
|
-
children:
|
|
414
|
+
children: w("billing.invoices.amountDue", "Amount Due")
|
|
383
415
|
}), /* @__PURE__ */ g("span", {
|
|
384
416
|
className: "text-status-warning-text",
|
|
385
|
-
children: n(
|
|
417
|
+
children: n(Y, M.currency)
|
|
386
418
|
})]
|
|
387
419
|
})
|
|
388
420
|
]
|
|
@@ -390,13 +422,13 @@ var b = () => {
|
|
|
390
422
|
})
|
|
391
423
|
]
|
|
392
424
|
}),
|
|
393
|
-
|
|
425
|
+
M.subscription && /* @__PURE__ */ _("div", {
|
|
394
426
|
className: "border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden",
|
|
395
427
|
children: [/* @__PURE__ */ g("div", {
|
|
396
428
|
className: "p-6 border-b border-border-subtle bg-bg-sunken",
|
|
397
429
|
children: /* @__PURE__ */ g("h2", {
|
|
398
430
|
className: "text-lg font-semibold text-text-primary",
|
|
399
|
-
children:
|
|
431
|
+
children: w("billing.invoices.subscription", "Subscription")
|
|
400
432
|
})
|
|
401
433
|
}), /* @__PURE__ */ g("div", {
|
|
402
434
|
className: "p-6 space-y-4",
|
|
@@ -404,7 +436,7 @@ var b = () => {
|
|
|
404
436
|
className: "flex items-center justify-between",
|
|
405
437
|
children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
406
438
|
className: "font-medium text-text-primary",
|
|
407
|
-
children:
|
|
439
|
+
children: M.subscription.plan?.name || "Unknown Plan"
|
|
408
440
|
}), /* @__PURE__ */ _("p", {
|
|
409
441
|
className: "text-sm text-text-secondary mt-0.5",
|
|
410
442
|
children: [
|
|
@@ -412,25 +444,25 @@ var b = () => {
|
|
|
412
444
|
" ",
|
|
413
445
|
/* @__PURE__ */ g("span", {
|
|
414
446
|
className: "font-mono text-xs",
|
|
415
|
-
children:
|
|
447
|
+
children: M.subscription.id
|
|
416
448
|
})
|
|
417
449
|
]
|
|
418
450
|
})] }), /* @__PURE__ */ g("button", {
|
|
419
451
|
type: "button",
|
|
420
|
-
onClick: () =>
|
|
452
|
+
onClick: () => E(d(`/subscriptions/${M.subscription.id}`, j)),
|
|
421
453
|
className: "px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-bg-sunken rounded-button transition-colors",
|
|
422
454
|
children: "View"
|
|
423
455
|
})]
|
|
424
456
|
})
|
|
425
457
|
})]
|
|
426
458
|
}),
|
|
427
|
-
|
|
459
|
+
M.payment && /* @__PURE__ */ _("div", {
|
|
428
460
|
className: "border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden",
|
|
429
461
|
children: [/* @__PURE__ */ g("div", {
|
|
430
462
|
className: "p-6 border-b border-border-subtle bg-bg-sunken",
|
|
431
463
|
children: /* @__PURE__ */ g("h2", {
|
|
432
464
|
className: "text-lg font-semibold text-text-primary",
|
|
433
|
-
children:
|
|
465
|
+
children: w("billing.invoices.payment", "Payment")
|
|
434
466
|
})
|
|
435
467
|
}), /* @__PURE__ */ g("div", {
|
|
436
468
|
className: "p-6",
|
|
@@ -442,42 +474,42 @@ var b = () => {
|
|
|
442
474
|
children: "Payment ID"
|
|
443
475
|
}), /* @__PURE__ */ g("p", {
|
|
444
476
|
className: "font-mono text-sm text-text-primary mt-0.5 break-all",
|
|
445
|
-
children:
|
|
477
|
+
children: M.payment.id
|
|
446
478
|
})] }),
|
|
447
479
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
448
480
|
className: "text-sm text-text-secondary",
|
|
449
481
|
children: "Amount"
|
|
450
482
|
}), /* @__PURE__ */ g("p", {
|
|
451
483
|
className: "text-sm text-text-primary mt-0.5",
|
|
452
|
-
children: n(
|
|
484
|
+
children: n(M.payment.amount, M.payment.currency)
|
|
453
485
|
})] }),
|
|
454
486
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
455
487
|
className: "text-sm text-text-secondary",
|
|
456
488
|
children: "Status"
|
|
457
489
|
}), /* @__PURE__ */ g("p", {
|
|
458
490
|
className: "text-sm text-text-primary mt-0.5 capitalize",
|
|
459
|
-
children:
|
|
491
|
+
children: M.payment.status.toLowerCase()
|
|
460
492
|
})] }),
|
|
461
493
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
462
494
|
className: "text-sm text-text-secondary",
|
|
463
495
|
children: "Method"
|
|
464
496
|
}), /* @__PURE__ */ g("p", {
|
|
465
497
|
className: "text-sm text-text-primary mt-0.5 capitalize",
|
|
466
|
-
children:
|
|
498
|
+
children: M.payment.method.toLowerCase().replace(/_/g, " ")
|
|
467
499
|
})] }),
|
|
468
|
-
|
|
500
|
+
M.payment.provider && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
469
501
|
className: "text-sm text-text-secondary",
|
|
470
502
|
children: "Provider"
|
|
471
503
|
}), /* @__PURE__ */ g("p", {
|
|
472
504
|
className: "text-sm text-text-primary mt-0.5 capitalize",
|
|
473
|
-
children:
|
|
505
|
+
children: M.payment.provider
|
|
474
506
|
})] }),
|
|
475
|
-
|
|
507
|
+
M.payment.paidAt && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
476
508
|
className: "text-sm text-text-secondary",
|
|
477
509
|
children: "Paid At"
|
|
478
510
|
}), /* @__PURE__ */ g("p", {
|
|
479
511
|
className: "text-sm text-text-primary mt-0.5",
|
|
480
|
-
children: r(
|
|
512
|
+
children: r(M.payment.paidAt, "short")
|
|
481
513
|
})] })
|
|
482
514
|
]
|
|
483
515
|
})
|
|
@@ -487,13 +519,17 @@ var b = () => {
|
|
|
487
519
|
}), /* @__PURE__ */ _("div", {
|
|
488
520
|
className: "space-y-6",
|
|
489
521
|
children: [
|
|
522
|
+
/* @__PURE__ */ g(b, {
|
|
523
|
+
storageKey: "billing-invoice-detail",
|
|
524
|
+
steps: Z
|
|
525
|
+
}),
|
|
490
526
|
/* @__PURE__ */ _("div", {
|
|
491
527
|
className: "border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden",
|
|
492
528
|
children: [/* @__PURE__ */ g("div", {
|
|
493
529
|
className: "p-6 border-b border-border-subtle bg-bg-sunken",
|
|
494
530
|
children: /* @__PURE__ */ g("h2", {
|
|
495
531
|
className: "text-lg font-semibold text-text-primary",
|
|
496
|
-
children:
|
|
532
|
+
children: w("billing.invoices.details", "Details")
|
|
497
533
|
})
|
|
498
534
|
}), /* @__PURE__ */ _("div", {
|
|
499
535
|
className: "p-6 space-y-4",
|
|
@@ -503,56 +539,56 @@ var b = () => {
|
|
|
503
539
|
children: "Invoice ID"
|
|
504
540
|
}), /* @__PURE__ */ g("p", {
|
|
505
541
|
className: "font-mono text-sm text-text-primary mt-0.5 break-all",
|
|
506
|
-
children:
|
|
542
|
+
children: M.id
|
|
507
543
|
})] }),
|
|
508
544
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
509
545
|
className: "text-sm text-text-secondary",
|
|
510
546
|
children: "Invoice Number"
|
|
511
547
|
}), /* @__PURE__ */ g("p", {
|
|
512
548
|
className: "text-sm text-text-primary mt-0.5",
|
|
513
|
-
children: i(
|
|
549
|
+
children: i(M.invoiceNumber)
|
|
514
550
|
})] }),
|
|
515
|
-
|
|
551
|
+
M.itemDescription && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
516
552
|
className: "text-sm text-text-secondary",
|
|
517
553
|
children: "Description"
|
|
518
554
|
}), /* @__PURE__ */ g("p", {
|
|
519
555
|
className: "text-sm text-text-primary mt-0.5",
|
|
520
|
-
children:
|
|
556
|
+
children: M.itemDescription
|
|
521
557
|
})] }),
|
|
522
558
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
523
559
|
className: "text-sm text-text-secondary",
|
|
524
560
|
children: "Status"
|
|
525
561
|
}), /* @__PURE__ */ g("span", {
|
|
526
|
-
className: `inline-flex mt-0.5 px-2 py-1 text-xs font-medium rounded ${s(
|
|
527
|
-
children: a(
|
|
562
|
+
className: `inline-flex mt-0.5 px-2 py-1 text-xs font-medium rounded ${s(G)}`,
|
|
563
|
+
children: a(M.status)
|
|
528
564
|
})] }),
|
|
529
565
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
530
566
|
className: "text-sm text-text-secondary",
|
|
531
567
|
children: "Currency"
|
|
532
568
|
}), /* @__PURE__ */ g("p", {
|
|
533
569
|
className: "text-sm text-text-primary mt-0.5",
|
|
534
|
-
children:
|
|
570
|
+
children: M.currency
|
|
535
571
|
})] }),
|
|
536
572
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
537
573
|
className: "text-sm text-text-secondary",
|
|
538
574
|
children: "Total"
|
|
539
575
|
}), /* @__PURE__ */ g("p", {
|
|
540
576
|
className: "text-sm font-semibold text-text-primary mt-0.5",
|
|
541
|
-
children: n(
|
|
577
|
+
children: n(M.total, M.currency)
|
|
542
578
|
})] }),
|
|
543
579
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
544
580
|
className: "text-sm text-text-secondary",
|
|
545
581
|
children: "Amount Paid"
|
|
546
582
|
}), /* @__PURE__ */ g("p", {
|
|
547
583
|
className: "text-sm text-status-success-text mt-0.5",
|
|
548
|
-
children: n(
|
|
584
|
+
children: n(M.amountPaid, M.currency)
|
|
549
585
|
})] }),
|
|
550
|
-
|
|
586
|
+
Y > 0 && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
551
587
|
className: "text-sm text-text-secondary",
|
|
552
588
|
children: "Amount Due"
|
|
553
589
|
}), /* @__PURE__ */ g("p", {
|
|
554
590
|
className: "text-sm font-semibold text-status-warning-text mt-0.5",
|
|
555
|
-
children: n(
|
|
591
|
+
children: n(Y, M.currency)
|
|
556
592
|
})] })
|
|
557
593
|
]
|
|
558
594
|
})]
|
|
@@ -563,7 +599,7 @@ var b = () => {
|
|
|
563
599
|
className: "p-6 border-b border-border-subtle bg-bg-sunken",
|
|
564
600
|
children: /* @__PURE__ */ g("h2", {
|
|
565
601
|
className: "text-lg font-semibold text-text-primary",
|
|
566
|
-
children:
|
|
602
|
+
children: w("billing.invoices.dates", "Dates")
|
|
567
603
|
})
|
|
568
604
|
}), /* @__PURE__ */ _("div", {
|
|
569
605
|
className: "p-6 space-y-4",
|
|
@@ -573,28 +609,28 @@ var b = () => {
|
|
|
573
609
|
children: "Created"
|
|
574
610
|
}), /* @__PURE__ */ g("p", {
|
|
575
611
|
className: "text-sm text-text-primary mt-0.5",
|
|
576
|
-
children: r(
|
|
612
|
+
children: r(M.createdAt)
|
|
577
613
|
})] }),
|
|
578
|
-
|
|
614
|
+
M.dueDate && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
579
615
|
className: "text-sm text-text-secondary",
|
|
580
616
|
children: "Due Date"
|
|
581
617
|
}), /* @__PURE__ */ g("p", {
|
|
582
618
|
className: "text-sm text-text-primary mt-0.5",
|
|
583
|
-
children: r(
|
|
619
|
+
children: r(M.dueDate)
|
|
584
620
|
})] }),
|
|
585
|
-
|
|
621
|
+
M.paidAt && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
586
622
|
className: "text-sm text-text-secondary",
|
|
587
623
|
children: "Paid At"
|
|
588
624
|
}), /* @__PURE__ */ g("p", {
|
|
589
625
|
className: "text-sm text-text-primary mt-0.5",
|
|
590
|
-
children: r(
|
|
626
|
+
children: r(M.paidAt)
|
|
591
627
|
})] }),
|
|
592
628
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
593
629
|
className: "text-sm text-text-secondary",
|
|
594
630
|
children: "Last Updated"
|
|
595
631
|
}), /* @__PURE__ */ g("p", {
|
|
596
632
|
className: "text-sm text-text-primary mt-0.5",
|
|
597
|
-
children: r(
|
|
633
|
+
children: r(M.updatedAt)
|
|
598
634
|
})] })
|
|
599
635
|
]
|
|
600
636
|
})]
|
|
@@ -605,7 +641,7 @@ var b = () => {
|
|
|
605
641
|
className: "p-6 border-b border-border-subtle bg-bg-sunken",
|
|
606
642
|
children: /* @__PURE__ */ g("h2", {
|
|
607
643
|
className: "text-lg font-semibold text-text-primary",
|
|
608
|
-
children:
|
|
644
|
+
children: w("billing.invoices.organization", "Organization")
|
|
609
645
|
})
|
|
610
646
|
}), /* @__PURE__ */ g("div", {
|
|
611
647
|
className: "p-6 space-y-4",
|
|
@@ -614,7 +650,7 @@ var b = () => {
|
|
|
614
650
|
children: "Organization ID"
|
|
615
651
|
}), /* @__PURE__ */ g("p", {
|
|
616
652
|
className: "font-mono text-sm text-text-primary mt-0.5 break-all",
|
|
617
|
-
children:
|
|
653
|
+
children: M.orgId
|
|
618
654
|
})] })
|
|
619
655
|
})]
|
|
620
656
|
})
|
|
@@ -625,6 +661,6 @@ var b = () => {
|
|
|
625
661
|
});
|
|
626
662
|
};
|
|
627
663
|
//#endregion
|
|
628
|
-
export {
|
|
664
|
+
export { C as InvoiceDetailPage };
|
|
629
665
|
|
|
630
666
|
//# sourceMappingURL=InvoiceDetailPage.js.map
|