@burdenoff/microfe-billing 2026.1113.2 → 2026.1113.3
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/BillingRoot.js +83 -77
- package/dist/billing/BillingRoot.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js +78 -78
- package/dist/billing/modules/addons/pages/AddonCreatePage.js +70 -70
- package/dist/billing/modules/addons/pages/AddonDetailPage.js +72 -72
- package/dist/billing/modules/addons/pages/AddonEditPage.js +79 -79
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +224 -224
- package/dist/billing/modules/addons/pages/AddonsListPage.js +186 -186
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +168 -168
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js +88 -88
- package/dist/billing/modules/billing/hooks/index.js +5 -5
- package/dist/billing/modules/billing/hooks/useInvoices.js +39 -20
- package/dist/billing/modules/billing/hooks/useInvoices.js.map +1 -1
- package/dist/billing/modules/billing/index.js +14 -14
- package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js +92 -92
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +160 -160
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoicesListPage.js +100 -100
- package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.js +105 -105
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +37 -37
- package/dist/billing/modules/billing/pages/RefundIssueLogsPage.js +41 -41
- package/dist/billing/modules/billing/pages/RefundsPage.js +334 -334
- package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/TransactionsPage.js +174 -174
- package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/UserRefundsPage.js +24 -24
- package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
- package/dist/billing/modules/checkout/components/OrderSummary.js +71 -71
- package/dist/billing/modules/checkout/pages/CheckoutPage.js +646 -625
- package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
- package/dist/billing/modules/checkout/utils/checkoutOptions.d.ts +23 -0
- package/dist/billing/modules/checkout/utils/checkoutOptions.js +8 -0
- package/dist/billing/modules/checkout/utils/checkoutOptions.js.map +1 -0
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js +112 -112
- package/dist/billing/modules/coupons/pages/CouponsListPage.js +118 -118
- package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js +119 -119
- package/dist/billing/modules/coupons/pages/EditCouponPage.js +82 -82
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js +30 -30
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +77 -77
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +144 -144
- package/dist/billing/modules/credits/pages/CreditsPage.js +67 -67
- package/dist/billing/modules/dashboard/pages/OverviewPage.js +594 -442
- package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
- package/dist/billing/modules/dashboard/utils/overviewSummary.d.ts +46 -0
- package/dist/billing/modules/dashboard/utils/overviewSummary.js +37 -0
- package/dist/billing/modules/dashboard/utils/overviewSummary.js.map +1 -0
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js +199 -199
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js +64 -64
- package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js +122 -122
- package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/EarningsPage.js +102 -102
- package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +178 -178
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutsPage.js +107 -107
- package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +54 -54
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +94 -94
- package/dist/billing/modules/plans/pages/PlanCreatePage.js +73 -73
- package/dist/billing/modules/plans/pages/PlanDetailPage.js +96 -96
- package/dist/billing/modules/plans/pages/PlanEditPage.js +16 -16
- package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js +100 -100
- package/dist/billing/modules/plans/pages/PlansListPage.js +88 -88
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +60 -60
- package/dist/billing/modules/promotions/pages/PromotionsListPage.js +37 -37
- package/dist/billing/modules/quota/pages/QuotaAssignFreePage.js +62 -62
- package/dist/billing/modules/quota/pages/QuotaPage.js +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +69 -69
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +76 -76
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +80 -80
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +95 -95
- package/dist/billing/modules/settings/pages/SettingsPage.js +134 -134
- package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +62 -62
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js +36 -36
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +534 -410
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +111 -111
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +166 -160
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.d.ts +30 -0
- package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.js +20 -0
- package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.js.map +1 -0
- package/dist/billing/modules/subscriptions/utils/upgradeAccess.d.ts +10 -0
- package/dist/billing/modules/subscriptions/utils/upgradeAccess.js +7 -0
- package/dist/billing/modules/subscriptions/utils/upgradeAccess.js.map +1 -0
- package/dist/billing/modules/usage/pages/UsagePage.js +722 -591
- package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
- package/dist/billing/modules/usage/utils/usageHealth.d.ts +63 -0
- package/dist/billing/modules/usage/utils/usageHealth.js +43 -0
- package/dist/billing/modules/usage/utils/usageHealth.js.map +1 -0
- package/dist/billing/shared/components/EmptyState.js +3 -3
- package/dist/billing/shared/components/MoneyActionDialog.js +12 -12
- package/dist/billing/shared/ui/MetricCard.js +13 -13
- package/dist/billing/shared/utils/format.js +16 -4
- package/dist/billing/shared/utils/format.js.map +1 -1
- package/dist/billing/shared/utils/index.js +8 -8
- package/dist/generated/global-operations.js +294 -286
- package/dist/generated/global-operations.js.map +1 -1
- package/package.json +2 -2
|
@@ -8,17 +8,17 @@ import { useBillingNavigate as s } from "../../../hooks/useBillingNavigate.js";
|
|
|
8
8
|
import { isServerError as c } from "../../../shared/utils/error.js";
|
|
9
9
|
import "../hooks/index.js";
|
|
10
10
|
import { nativeImpact as l, nativeNotify as u, nativeOpenUrl as d } from "../../../../utils/nativeBridge.js";
|
|
11
|
-
import "../../../shared/components/index.js";
|
|
12
|
-
import "../../../shared/utils/index.js";
|
|
13
11
|
import { useInvoiceMutations as f } from "../hooks/useInvoices.js";
|
|
14
12
|
import { useTransactions as p } from "../hooks/useTransactions.js";
|
|
13
|
+
import "../../../shared/components/index.js";
|
|
14
|
+
import "../../../shared/utils/index.js";
|
|
15
15
|
import { getStatusBadgeClasses as m, getTransactionStatusColor as h } from "../../../shared/utils/status.js";
|
|
16
16
|
import { useEffect as g, useRef as _, useState as v } from "react";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
17
|
+
import { Dialog as y, DialogContent as b, DialogFooter as x, DialogHeader as S, DialogTitle as C, EmphasisPanel as w, IllustratedEmptyState as T, PagePurpose as E, ResponsiveTable as D } from "@burdenoff/fe-libs/ui";
|
|
18
|
+
import { ArrowLeft as O, Calendar as k, CheckCircle as A, ChevronLeft as j, ChevronRight as M, CreditCard as N, Eye as P, FileText as F, Mail as I, MoreHorizontal as L, Wallet as R, XCircle as z } from "lucide-react";
|
|
19
|
+
import { useParams as B } from "react-router";
|
|
20
|
+
import { Fragment as V, jsx as H, jsxs as U } from "react/jsx-runtime";
|
|
21
|
+
import { useI18n as ee } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
22
22
|
// src/billing/modules/billing/pages/TransactionsPage.tsx
|
|
23
23
|
var W = {
|
|
24
24
|
payment: "Payment",
|
|
@@ -31,272 +31,272 @@ var W = {
|
|
|
31
31
|
o.current && !o.current.contains(e.target) && a(!1);
|
|
32
32
|
};
|
|
33
33
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
34
|
-
}, []), /* @__PURE__ */
|
|
34
|
+
}, []), /* @__PURE__ */ U("div", {
|
|
35
35
|
className: "relative overflow-visible",
|
|
36
36
|
ref: o,
|
|
37
|
-
children: [/* @__PURE__ */
|
|
37
|
+
children: [/* @__PURE__ */ H("button", {
|
|
38
38
|
type: "button",
|
|
39
39
|
onClick: () => a(!i),
|
|
40
40
|
className: "p-1.5 rounded-md hover:bg-bg-sunken/50 transition-colors",
|
|
41
41
|
"aria-label": "Transaction actions",
|
|
42
|
-
children: /* @__PURE__ */
|
|
43
|
-
}), i && /* @__PURE__ */
|
|
42
|
+
children: /* @__PURE__ */ H(L, { className: "size-4 text-text-secondary" })
|
|
43
|
+
}), i && /* @__PURE__ */ U("div", {
|
|
44
44
|
className: "absolute right-0 top-full mt-1 z-50 min-w-[160px] bg-popover border border-border-subtle rounded-md shadow-lg py-1",
|
|
45
|
-
children: [/* @__PURE__ */
|
|
45
|
+
children: [/* @__PURE__ */ U("button", {
|
|
46
46
|
type: "button",
|
|
47
47
|
onClick: () => {
|
|
48
48
|
t(), a(!1);
|
|
49
49
|
},
|
|
50
50
|
className: "w-full flex items-center gap-2 px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken/50 transition-colors whitespace-nowrap",
|
|
51
|
-
children: [/* @__PURE__ */
|
|
52
|
-
}), e.type === "payment" && r && /* @__PURE__ */
|
|
51
|
+
children: [/* @__PURE__ */ H(P, { className: "size-4" }), "View Details"]
|
|
52
|
+
}), e.type === "payment" && r && /* @__PURE__ */ U("button", {
|
|
53
53
|
type: "button",
|
|
54
54
|
onClick: () => {
|
|
55
55
|
n(), a(!1);
|
|
56
56
|
},
|
|
57
57
|
className: "w-full flex items-center gap-2 px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken/50 transition-colors whitespace-nowrap",
|
|
58
|
-
children: [/* @__PURE__ */
|
|
58
|
+
children: [/* @__PURE__ */ H(F, { className: "size-4" }), "View Invoice"]
|
|
59
59
|
})]
|
|
60
60
|
})]
|
|
61
61
|
});
|
|
62
62
|
}, ne = ({ transaction: e, onClose: t, onViewInvoice: n, onRetryInvoice: r, isRetryingInvoice: i, retryInvoiceError: s, invoiceUrl: c, invoiceProvider: u }) => {
|
|
63
63
|
if (!e) return null;
|
|
64
|
-
let f = e.metadata, p = f?.subtotal, g = f?.taxAmount, _ = f?.taxRate, v = f?.taxType,
|
|
65
|
-
return /* @__PURE__ */
|
|
64
|
+
let f = e.metadata, p = f?.subtotal, g = f?.taxAmount, _ = f?.taxRate, v = f?.taxType, w = f?.total, T = f?.invoiceNumber, E = f?.invoiceStatus, D = f?.invoiceCreationError, O = !T && e.type === "payment" && e.status === "success", k = e.type === "refund", A = f?.refundRecordId, j = f?.originalTransactionId, M = f?.creditNoteId, N = f?.creditNoteNumber, P = f?.creditNotePdfUrl, I = f?.reason, L = f?.purchaseType, R = f?.purchaseDetail, z = w && g !== void 0 && g > 0;
|
|
65
|
+
return /* @__PURE__ */ H(y, {
|
|
66
66
|
open: !!e,
|
|
67
67
|
onOpenChange: (e) => !e && t(),
|
|
68
|
-
children: /* @__PURE__ */
|
|
68
|
+
children: /* @__PURE__ */ U(b, {
|
|
69
69
|
className: "max-w-md max-h-[90vh] overflow-auto p-0",
|
|
70
70
|
children: [
|
|
71
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ H(S, {
|
|
72
72
|
className: "p-4 border-b border-border-subtle",
|
|
73
|
-
children: /* @__PURE__ */
|
|
73
|
+
children: /* @__PURE__ */ H(C, {
|
|
74
74
|
className: "text-lg font-semibold",
|
|
75
75
|
children: "Transaction Details"
|
|
76
76
|
})
|
|
77
77
|
}),
|
|
78
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ U("div", {
|
|
79
79
|
className: "p-4 space-y-4",
|
|
80
80
|
children: [
|
|
81
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ U("div", {
|
|
82
82
|
className: "grid grid-cols-2 gap-4",
|
|
83
|
-
children: [/* @__PURE__ */
|
|
83
|
+
children: [/* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
|
|
84
84
|
className: "text-xs text-text-secondary mb-1",
|
|
85
85
|
children: "Transaction ID"
|
|
86
|
-
}), /* @__PURE__ */
|
|
86
|
+
}), /* @__PURE__ */ H("p", {
|
|
87
87
|
className: "text-sm font-mono break-all",
|
|
88
88
|
children: e.id
|
|
89
|
-
})] }), /* @__PURE__ */
|
|
89
|
+
})] }), /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
|
|
90
90
|
className: "text-xs text-text-secondary mb-1",
|
|
91
91
|
children: "Type"
|
|
92
|
-
}), /* @__PURE__ */
|
|
92
|
+
}), /* @__PURE__ */ H("p", {
|
|
93
93
|
className: "text-sm capitalize",
|
|
94
94
|
children: G(e.type)
|
|
95
95
|
})] })]
|
|
96
96
|
}),
|
|
97
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ H("div", {
|
|
98
98
|
className: "space-y-2",
|
|
99
|
-
children:
|
|
100
|
-
/* @__PURE__ */
|
|
99
|
+
children: z ? /* @__PURE__ */ U(V, { children: [
|
|
100
|
+
/* @__PURE__ */ U("div", {
|
|
101
101
|
className: "flex justify-between text-sm",
|
|
102
|
-
children: [/* @__PURE__ */
|
|
102
|
+
children: [/* @__PURE__ */ H("span", {
|
|
103
103
|
className: "text-text-secondary",
|
|
104
104
|
children: "Subtotal"
|
|
105
|
-
}), /* @__PURE__ */
|
|
105
|
+
}), /* @__PURE__ */ H("span", { children: a(p || e.amount, e.currency) })]
|
|
106
106
|
}),
|
|
107
|
-
g > 0 && /* @__PURE__ */
|
|
107
|
+
g > 0 && /* @__PURE__ */ U("div", {
|
|
108
108
|
className: "flex justify-between text-sm",
|
|
109
|
-
children: [/* @__PURE__ */
|
|
109
|
+
children: [/* @__PURE__ */ U("span", {
|
|
110
110
|
className: "text-text-secondary",
|
|
111
111
|
children: [
|
|
112
112
|
v || "Tax",
|
|
113
113
|
" ",
|
|
114
114
|
_ ? `(${(_ * 100).toFixed(0)}%)` : ""
|
|
115
115
|
]
|
|
116
|
-
}), /* @__PURE__ */
|
|
116
|
+
}), /* @__PURE__ */ H("span", { children: a(g, e.currency) })]
|
|
117
117
|
}),
|
|
118
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ U("div", {
|
|
119
119
|
className: "flex justify-between text-sm font-semibold border-t border-border-subtle pt-2",
|
|
120
|
-
children: [/* @__PURE__ */
|
|
120
|
+
children: [/* @__PURE__ */ H("span", { children: "Total" }), /* @__PURE__ */ U("span", {
|
|
121
121
|
className: e.type === "refund" ? "text-status-error-text" : "",
|
|
122
|
-
children: [e.type === "refund" ? "-" : "", a(
|
|
122
|
+
children: [e.type === "refund" ? "-" : "", a(w, e.currency)]
|
|
123
123
|
})]
|
|
124
124
|
})
|
|
125
|
-
] }) : /* @__PURE__ */
|
|
125
|
+
] }) : /* @__PURE__ */ U("div", {
|
|
126
126
|
className: "grid grid-cols-2 gap-4",
|
|
127
|
-
children: [/* @__PURE__ */
|
|
127
|
+
children: [/* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
|
|
128
128
|
className: "text-xs text-text-secondary mb-1",
|
|
129
129
|
children: "Amount"
|
|
130
|
-
}), /* @__PURE__ */
|
|
130
|
+
}), /* @__PURE__ */ U("p", {
|
|
131
131
|
className: `text-sm font-medium ${e.type === "refund" ? "text-status-error-text" : ""}`,
|
|
132
|
-
children: [e.type === "refund" ? "-" : "", a(
|
|
133
|
-
})] }), /* @__PURE__ */
|
|
132
|
+
children: [e.type === "refund" ? "-" : "", a(w || e.amount, e.currency)]
|
|
133
|
+
})] }), /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
|
|
134
134
|
className: "text-xs text-text-secondary mb-1",
|
|
135
135
|
children: "Status"
|
|
136
|
-
}), /* @__PURE__ */
|
|
136
|
+
}), /* @__PURE__ */ H("span", {
|
|
137
137
|
className: `px-2 py-0.5 text-xs font-medium rounded ${m(h(e.status))}`,
|
|
138
138
|
children: e.status
|
|
139
139
|
})] })]
|
|
140
140
|
})
|
|
141
141
|
}),
|
|
142
|
-
|
|
142
|
+
z && /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
|
|
143
143
|
className: "text-xs text-text-secondary mb-1",
|
|
144
144
|
children: "Status"
|
|
145
|
-
}), /* @__PURE__ */
|
|
145
|
+
}), /* @__PURE__ */ H("span", {
|
|
146
146
|
className: `px-2 py-0.5 text-xs font-medium rounded ${m(h(e.status))}`,
|
|
147
147
|
children: e.status
|
|
148
148
|
})] }),
|
|
149
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
|
|
150
150
|
className: "text-xs text-text-secondary mb-1",
|
|
151
151
|
children: "Date & Time"
|
|
152
|
-
}), /* @__PURE__ */
|
|
152
|
+
}), /* @__PURE__ */ H("p", {
|
|
153
153
|
className: "text-sm",
|
|
154
154
|
children: o(e.createdAt)
|
|
155
155
|
})] }),
|
|
156
|
-
e.description && /* @__PURE__ */
|
|
156
|
+
e.description && /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
|
|
157
157
|
className: "text-xs text-text-secondary mb-1",
|
|
158
158
|
children: "Description"
|
|
159
|
-
}), /* @__PURE__ */
|
|
159
|
+
}), /* @__PURE__ */ H("p", {
|
|
160
160
|
className: "text-sm",
|
|
161
161
|
children: e.description
|
|
162
162
|
})] }),
|
|
163
|
-
|
|
163
|
+
T && /* @__PURE__ */ U("div", {
|
|
164
164
|
className: "p-3 bg-bg-sunken/50 rounded-lg space-y-2",
|
|
165
165
|
children: [
|
|
166
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ U("div", {
|
|
167
167
|
className: "flex items-center justify-between",
|
|
168
|
-
children: [/* @__PURE__ */
|
|
168
|
+
children: [/* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
|
|
169
169
|
className: "text-xs text-text-secondary mb-1",
|
|
170
170
|
children: "Invoice"
|
|
171
|
-
}), /* @__PURE__ */
|
|
171
|
+
}), /* @__PURE__ */ H("p", {
|
|
172
172
|
className: "text-sm font-mono",
|
|
173
|
-
children:
|
|
174
|
-
})] }),
|
|
175
|
-
className: `px-2 py-0.5 text-xs font-medium rounded ${
|
|
176
|
-
children:
|
|
173
|
+
children: T
|
|
174
|
+
})] }), E && /* @__PURE__ */ H("span", {
|
|
175
|
+
className: `px-2 py-0.5 text-xs font-medium rounded ${E === "PAID" ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-warning-bg-subtle text-status-warning-text"}`,
|
|
176
|
+
children: E
|
|
177
177
|
})]
|
|
178
178
|
}),
|
|
179
|
-
u && /* @__PURE__ */
|
|
179
|
+
u && /* @__PURE__ */ U("p", {
|
|
180
180
|
className: "text-xs text-text-secondary",
|
|
181
181
|
children: ["Provider: ", u]
|
|
182
182
|
}),
|
|
183
|
-
c && n && /* @__PURE__ */
|
|
183
|
+
c && n && /* @__PURE__ */ U("button", {
|
|
184
184
|
type: "button",
|
|
185
185
|
onClick: () => n(e),
|
|
186
186
|
className: "flex items-center gap-2 text-sm text-primary hover:underline",
|
|
187
|
-
children: [/* @__PURE__ */
|
|
187
|
+
children: [/* @__PURE__ */ H(F, { className: "size-4" }), "View Invoice"]
|
|
188
188
|
})
|
|
189
189
|
]
|
|
190
190
|
}),
|
|
191
|
-
!
|
|
191
|
+
!T && c && n && /* @__PURE__ */ H("div", {
|
|
192
192
|
className: "p-3 bg-bg-sunken/50 rounded-lg",
|
|
193
|
-
children: /* @__PURE__ */
|
|
193
|
+
children: /* @__PURE__ */ U("button", {
|
|
194
194
|
type: "button",
|
|
195
195
|
onClick: () => n(e),
|
|
196
196
|
className: "flex items-center gap-2 text-sm text-primary hover:underline",
|
|
197
197
|
children: [
|
|
198
|
-
/* @__PURE__ */
|
|
198
|
+
/* @__PURE__ */ H(F, { className: "size-4" }),
|
|
199
199
|
"View Invoice ",
|
|
200
200
|
u && `(${u})`
|
|
201
201
|
]
|
|
202
202
|
})
|
|
203
203
|
}),
|
|
204
|
-
|
|
204
|
+
O && !c && r && /* @__PURE__ */ U("div", {
|
|
205
205
|
className: "p-3 bg-status-warning-bg-subtle border border-status-warning-border rounded-lg space-y-2",
|
|
206
206
|
children: [
|
|
207
|
-
/* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ H("p", {
|
|
208
208
|
className: "text-sm text-status-warning-text",
|
|
209
|
-
children:
|
|
209
|
+
children: D ? "Invoice generation failed for this payment." : "This payment doesn't have an invoice yet."
|
|
210
210
|
}),
|
|
211
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ U("button", {
|
|
212
212
|
type: "button",
|
|
213
213
|
onClick: () => r(e),
|
|
214
214
|
disabled: i,
|
|
215
215
|
className: "flex items-center gap-2 text-sm font-medium text-primary hover:underline disabled:cursor-not-allowed disabled:opacity-50",
|
|
216
|
-
children: [/* @__PURE__ */
|
|
216
|
+
children: [/* @__PURE__ */ H(F, { className: "size-4" }), i ? "Generating…" : "Generate Invoice"]
|
|
217
217
|
}),
|
|
218
|
-
s && /* @__PURE__ */
|
|
218
|
+
s && /* @__PURE__ */ H("p", {
|
|
219
219
|
className: "text-sm text-status-error-text",
|
|
220
220
|
children: s
|
|
221
221
|
})
|
|
222
222
|
]
|
|
223
223
|
}),
|
|
224
|
-
|
|
224
|
+
k && (M || I || L) && /* @__PURE__ */ U("div", {
|
|
225
225
|
className: "p-3 bg-status-error-bg-subtle/20 border border-border-subtle rounded-lg space-y-3",
|
|
226
226
|
children: [
|
|
227
|
-
/* @__PURE__ */
|
|
227
|
+
/* @__PURE__ */ U("div", {
|
|
228
228
|
className: "flex items-center gap-2",
|
|
229
|
-
children: [/* @__PURE__ */
|
|
229
|
+
children: [/* @__PURE__ */ H("div", { className: "size-1.5 rounded-full bg-status-error-bg" }), /* @__PURE__ */ H("p", {
|
|
230
230
|
className: "text-sm font-semibold text-status-error-text",
|
|
231
231
|
children: "Refund Information"
|
|
232
232
|
})]
|
|
233
233
|
}),
|
|
234
|
-
|
|
234
|
+
N && /* @__PURE__ */ U("div", {
|
|
235
235
|
className: "space-y-2",
|
|
236
|
-
children: [/* @__PURE__ */
|
|
236
|
+
children: [/* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
|
|
237
237
|
className: "text-xs text-status-error-text mb-1",
|
|
238
238
|
children: "Credit Note"
|
|
239
|
-
}), /* @__PURE__ */
|
|
239
|
+
}), /* @__PURE__ */ H("p", {
|
|
240
240
|
className: "text-sm font-mono text-status-error-text",
|
|
241
|
-
children:
|
|
242
|
-
})] }),
|
|
241
|
+
children: N
|
|
242
|
+
})] }), P && /* @__PURE__ */ U("button", {
|
|
243
243
|
type: "button",
|
|
244
244
|
onClick: () => {
|
|
245
|
-
l("light"), d(
|
|
245
|
+
l("light"), d(P);
|
|
246
246
|
},
|
|
247
247
|
className: "flex items-center gap-2 text-sm text-status-error-text hover:underline",
|
|
248
|
-
children: [/* @__PURE__ */
|
|
248
|
+
children: [/* @__PURE__ */ H(F, { className: "size-4" }), "Download Credit Note PDF"]
|
|
249
249
|
})]
|
|
250
250
|
}),
|
|
251
|
-
|
|
251
|
+
L && /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
|
|
252
252
|
className: "text-xs text-status-error-text mb-1",
|
|
253
253
|
children: "Purchase Type"
|
|
254
|
-
}), /* @__PURE__ */
|
|
254
|
+
}), /* @__PURE__ */ U("p", {
|
|
255
255
|
className: "text-sm text-status-error-text",
|
|
256
|
-
children: [
|
|
256
|
+
children: [L, R && ` - ${R}`]
|
|
257
257
|
})] }),
|
|
258
|
-
|
|
258
|
+
I && /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
|
|
259
259
|
className: "text-xs text-status-error-text mb-1",
|
|
260
260
|
children: "Reason"
|
|
261
|
-
}), /* @__PURE__ */
|
|
261
|
+
}), /* @__PURE__ */ H("p", {
|
|
262
262
|
className: "text-sm text-status-error-text",
|
|
263
|
-
children:
|
|
263
|
+
children: I
|
|
264
264
|
})] }),
|
|
265
|
-
|
|
265
|
+
j && /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
|
|
266
266
|
className: "text-xs text-status-error-text mb-1",
|
|
267
267
|
children: "Original Transaction"
|
|
268
|
-
}), /* @__PURE__ */
|
|
268
|
+
}), /* @__PURE__ */ H("p", {
|
|
269
269
|
className: "text-sm font-mono text-status-error-text break-all",
|
|
270
|
-
children:
|
|
270
|
+
children: j
|
|
271
271
|
})] }),
|
|
272
|
-
|
|
272
|
+
A && /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
|
|
273
273
|
className: "text-xs text-status-error-text mb-1",
|
|
274
274
|
children: "Refund Record ID"
|
|
275
|
-
}), /* @__PURE__ */
|
|
275
|
+
}), /* @__PURE__ */ H("p", {
|
|
276
276
|
className: "text-sm font-mono text-status-error-text break-all",
|
|
277
|
-
children:
|
|
277
|
+
children: A
|
|
278
278
|
})] })
|
|
279
279
|
]
|
|
280
280
|
}),
|
|
281
|
-
e.stripePaymentId && /* @__PURE__ */
|
|
281
|
+
e.stripePaymentId && /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
|
|
282
282
|
className: "text-xs text-text-secondary mb-1",
|
|
283
283
|
children: "Stripe Payment ID"
|
|
284
|
-
}), /* @__PURE__ */
|
|
284
|
+
}), /* @__PURE__ */ H("p", {
|
|
285
285
|
className: "text-sm font-mono break-all",
|
|
286
286
|
children: e.stripePaymentId
|
|
287
287
|
})] }),
|
|
288
|
-
e.razorpayPaymentId && /* @__PURE__ */
|
|
288
|
+
e.razorpayPaymentId && /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
|
|
289
289
|
className: "text-xs text-text-secondary mb-1",
|
|
290
290
|
children: "Razorpay Payment ID"
|
|
291
|
-
}), /* @__PURE__ */
|
|
291
|
+
}), /* @__PURE__ */ H("p", {
|
|
292
292
|
className: "text-sm font-mono break-all",
|
|
293
293
|
children: e.razorpayPaymentId
|
|
294
294
|
})] })
|
|
295
295
|
]
|
|
296
296
|
}),
|
|
297
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ H(x, {
|
|
298
298
|
className: "p-4 border-t border-border-subtle",
|
|
299
|
-
children: /* @__PURE__ */
|
|
299
|
+
children: /* @__PURE__ */ H("button", {
|
|
300
300
|
type: "button",
|
|
301
301
|
onClick: t,
|
|
302
302
|
className: "w-full py-2 px-4 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg/90 transition-colors",
|
|
@@ -307,14 +307,14 @@ var W = {
|
|
|
307
307
|
})
|
|
308
308
|
});
|
|
309
309
|
}, K = () => {
|
|
310
|
-
let { t: g } =
|
|
310
|
+
let { t: g } = ee(), _ = (e, t) => {
|
|
311
311
|
let n = g(e);
|
|
312
312
|
return n === e ? t : n;
|
|
313
|
-
}, { billingAccountId:
|
|
314
|
-
if (
|
|
313
|
+
}, { billingAccountId: y } = B(), b = i(), x = s(), { billingAccount: S, transactions: C, pagination: P, isLoading: L, error: V, refetch: K, goToNextPage: re, goToPreviousPage: ie } = p(y), [q, ae] = v("all"), [oe, J] = v(null), Y = C.find((e) => e.id === oe) ?? null, { retryInvoiceGeneration: se, isRetrying: ce } = f(), [le, X] = v(null), ue = async (e) => {
|
|
314
|
+
if (y) {
|
|
315
315
|
X(null);
|
|
316
316
|
try {
|
|
317
|
-
await se(e.id,
|
|
317
|
+
await se(e.id, y), u("success");
|
|
318
318
|
} catch (e) {
|
|
319
319
|
X(e instanceof Error ? e.message : "Failed to generate invoice"), u("error");
|
|
320
320
|
}
|
|
@@ -329,16 +329,16 @@ var W = {
|
|
|
329
329
|
let t = Z(e);
|
|
330
330
|
t && (l("light"), d(t));
|
|
331
331
|
};
|
|
332
|
-
if (!
|
|
333
|
-
if (!
|
|
332
|
+
if (!b.canViewPayments) return /* @__PURE__ */ H(e, { message: _("billing.transactions.noPermission", "You don't have permission to view transaction history.") });
|
|
333
|
+
if (!y) return /* @__PURE__ */ H("div", {
|
|
334
334
|
className: "p-6",
|
|
335
|
-
children: /* @__PURE__ */
|
|
336
|
-
icon: /* @__PURE__ */
|
|
335
|
+
children: /* @__PURE__ */ H(n, {
|
|
336
|
+
icon: /* @__PURE__ */ H("svg", {
|
|
337
337
|
className: "size-6 text-text-secondary",
|
|
338
338
|
fill: "none",
|
|
339
339
|
viewBox: "0 0 24 24",
|
|
340
340
|
stroke: "currentColor",
|
|
341
|
-
children: /* @__PURE__ */
|
|
341
|
+
children: /* @__PURE__ */ H("path", {
|
|
342
342
|
strokeLinecap: "round",
|
|
343
343
|
strokeLinejoin: "round",
|
|
344
344
|
strokeWidth: 2,
|
|
@@ -349,19 +349,19 @@ var W = {
|
|
|
349
349
|
description: _("billing.transactions.noAccountSelectedDesc", "Please select a billing account from the overview page to view transactions.")
|
|
350
350
|
})
|
|
351
351
|
});
|
|
352
|
-
if (
|
|
352
|
+
if (V && c(V)) return /* @__PURE__ */ H("div", {
|
|
353
353
|
className: "p-6",
|
|
354
|
-
children: /* @__PURE__ */
|
|
354
|
+
children: /* @__PURE__ */ H(r, {
|
|
355
355
|
title: _("billing.transactions.serverUnavailable", "Server Unavailable"),
|
|
356
356
|
message: _("billing.transactions.serverUnavailableMessage", "Unable to load transactions. The server might be down or experiencing issues."),
|
|
357
357
|
onRetry: () => K(),
|
|
358
358
|
showRetry: !0
|
|
359
359
|
})
|
|
360
360
|
});
|
|
361
|
-
let $ = q === "all" ?
|
|
362
|
-
return
|
|
361
|
+
let $ = q === "all" ? C : C.filter((e) => e.type === q);
|
|
362
|
+
return L ? /* @__PURE__ */ U("div", {
|
|
363
363
|
className: "space-y-6 p-6",
|
|
364
|
-
children: [/* @__PURE__ */
|
|
364
|
+
children: [/* @__PURE__ */ H("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ H("div", {
|
|
365
365
|
className: "space-y-2",
|
|
366
366
|
children: [
|
|
367
367
|
1,
|
|
@@ -369,100 +369,100 @@ var W = {
|
|
|
369
369
|
3,
|
|
370
370
|
4,
|
|
371
371
|
5
|
|
372
|
-
].map((e) => /* @__PURE__ */
|
|
372
|
+
].map((e) => /* @__PURE__ */ H("div", { className: "h-16 bg-bg-sunken animate-pulse rounded" }, e))
|
|
373
373
|
})]
|
|
374
|
-
}) : /* @__PURE__ */
|
|
374
|
+
}) : /* @__PURE__ */ U("div", {
|
|
375
375
|
className: "space-y-6 p-6",
|
|
376
376
|
children: [
|
|
377
|
-
/* @__PURE__ */
|
|
377
|
+
/* @__PURE__ */ U("button", {
|
|
378
378
|
type: "button",
|
|
379
|
-
onClick: () =>
|
|
379
|
+
onClick: () => x("/overview"),
|
|
380
380
|
className: "inline-flex items-center gap-2 text-sm text-text-secondary hover:text-text-primary transition-colors",
|
|
381
|
-
children: [/* @__PURE__ */
|
|
381
|
+
children: [/* @__PURE__ */ H(O, { className: "size-4" }), "Back to Overview"]
|
|
382
382
|
}),
|
|
383
|
-
/* @__PURE__ */
|
|
383
|
+
/* @__PURE__ */ H(t, {
|
|
384
384
|
title: _("billing.transactions.title", "Transaction History"),
|
|
385
|
-
description:
|
|
385
|
+
description: S ? `Transactions for ${S.name}` : "View all your billing transactions"
|
|
386
386
|
}),
|
|
387
|
-
/* @__PURE__ */
|
|
388
|
-
|
|
387
|
+
/* @__PURE__ */ H(E, { children: _("billing.transactions.purpose", "A complete, time-ordered ledger of money movements on this billing account — payments, refunds and adjustments. Use it to reconcile what you were charged, open the linked invoice or credit note, and see tax breakdowns for each transaction.") }),
|
|
388
|
+
S && /* @__PURE__ */ H(w, {
|
|
389
389
|
className: "p-4",
|
|
390
|
-
children: /* @__PURE__ */
|
|
390
|
+
children: /* @__PURE__ */ U("div", {
|
|
391
391
|
className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-4",
|
|
392
392
|
children: [
|
|
393
|
-
/* @__PURE__ */
|
|
393
|
+
/* @__PURE__ */ U("div", {
|
|
394
394
|
className: "flex items-start gap-2",
|
|
395
|
-
children: [/* @__PURE__ */ N
|
|
396
|
-
/* @__PURE__ */
|
|
395
|
+
children: [/* @__PURE__ */ H(N, { className: "size-4 text-text-secondary mt-0.5" }), /* @__PURE__ */ U("div", { children: [
|
|
396
|
+
/* @__PURE__ */ H("p", {
|
|
397
397
|
className: "text-xs text-text-secondary mb-0.5",
|
|
398
398
|
children: "Account"
|
|
399
399
|
}),
|
|
400
|
-
/* @__PURE__ */
|
|
400
|
+
/* @__PURE__ */ H("p", {
|
|
401
401
|
className: "text-sm font-medium",
|
|
402
|
-
children:
|
|
402
|
+
children: S.name
|
|
403
403
|
}),
|
|
404
|
-
|
|
404
|
+
S.isActive ? /* @__PURE__ */ U("span", {
|
|
405
405
|
className: "inline-flex items-center gap-1 mt-1 px-1.5 py-0.5 text-xs font-medium rounded bg-status-success-bg-subtle text-status-success-text",
|
|
406
|
-
children: [/* @__PURE__ */
|
|
407
|
-
}) : /* @__PURE__ */
|
|
406
|
+
children: [/* @__PURE__ */ H(A, { className: "size-3" }), "Active"]
|
|
407
|
+
}) : /* @__PURE__ */ U("span", {
|
|
408
408
|
className: "inline-flex items-center gap-1 mt-1 px-1.5 py-0.5 text-xs font-medium rounded bg-status-error-bg-subtle text-status-error-text",
|
|
409
|
-
children: [/* @__PURE__ */
|
|
409
|
+
children: [/* @__PURE__ */ H(z, { className: "size-3" }), "Inactive"]
|
|
410
410
|
})
|
|
411
411
|
] })]
|
|
412
412
|
}),
|
|
413
|
-
/* @__PURE__ */
|
|
413
|
+
/* @__PURE__ */ U("div", {
|
|
414
414
|
className: "flex items-start gap-2",
|
|
415
|
-
children: [/* @__PURE__ */
|
|
415
|
+
children: [/* @__PURE__ */ H(I, { className: "size-4 text-text-secondary mt-0.5" }), /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
|
|
416
416
|
className: "text-xs text-text-secondary mb-0.5",
|
|
417
417
|
children: "Email"
|
|
418
|
-
}), /* @__PURE__ */
|
|
418
|
+
}), /* @__PURE__ */ H("p", {
|
|
419
419
|
className: "text-sm font-medium break-all",
|
|
420
|
-
children:
|
|
420
|
+
children: S.billingEmail || S.email
|
|
421
421
|
})] })]
|
|
422
422
|
}),
|
|
423
|
-
/* @__PURE__ */
|
|
423
|
+
/* @__PURE__ */ U("div", {
|
|
424
424
|
className: "flex items-start gap-2",
|
|
425
|
-
children: [/* @__PURE__ */
|
|
425
|
+
children: [/* @__PURE__ */ H(R, { className: "size-4 text-text-secondary mt-0.5" }), /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
|
|
426
426
|
className: "text-xs text-text-secondary mb-0.5",
|
|
427
427
|
children: "Credits Balance"
|
|
428
|
-
}), /* @__PURE__ */
|
|
428
|
+
}), /* @__PURE__ */ U("p", {
|
|
429
429
|
className: "text-sm font-semibold text-text-primary",
|
|
430
|
-
children: [(
|
|
430
|
+
children: [(S.creditAmount || 0).toLocaleString(), " Credits"]
|
|
431
431
|
})] })]
|
|
432
432
|
}),
|
|
433
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ U("div", {
|
|
434
434
|
className: "flex items-start gap-2",
|
|
435
|
-
children: [/* @__PURE__ */
|
|
435
|
+
children: [/* @__PURE__ */ H(F, { className: "size-4 text-text-secondary mt-0.5" }), /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
|
|
436
436
|
className: "text-xs text-text-secondary mb-0.5",
|
|
437
437
|
children: "Tax ID"
|
|
438
|
-
}), /* @__PURE__ */
|
|
438
|
+
}), /* @__PURE__ */ H("p", {
|
|
439
439
|
className: "text-sm font-medium",
|
|
440
|
-
children:
|
|
440
|
+
children: S.taxId || "-"
|
|
441
441
|
})] })]
|
|
442
442
|
}),
|
|
443
|
-
/* @__PURE__ */
|
|
443
|
+
/* @__PURE__ */ U("div", {
|
|
444
444
|
className: "flex items-start gap-2",
|
|
445
|
-
children: [/* @__PURE__ */
|
|
445
|
+
children: [/* @__PURE__ */ H(k, { className: "size-4 text-text-secondary mt-0.5" }), /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
|
|
446
446
|
className: "text-xs text-text-secondary mb-0.5",
|
|
447
447
|
children: "Member Since"
|
|
448
|
-
}), /* @__PURE__ */
|
|
448
|
+
}), /* @__PURE__ */ H("p", {
|
|
449
449
|
className: "text-sm font-medium",
|
|
450
|
-
children:
|
|
450
|
+
children: S.createdAt ? o(S.createdAt) : "-"
|
|
451
451
|
})] })]
|
|
452
452
|
})
|
|
453
453
|
]
|
|
454
454
|
})
|
|
455
455
|
}),
|
|
456
|
-
/* @__PURE__ */
|
|
456
|
+
/* @__PURE__ */ H("div", {
|
|
457
457
|
className: "flex items-center gap-4",
|
|
458
|
-
children: /* @__PURE__ */
|
|
458
|
+
children: /* @__PURE__ */ H("div", {
|
|
459
459
|
className: "inline-flex rounded-lg border border-border-subtle p-1 bg-bg-sunken/50",
|
|
460
460
|
children: [
|
|
461
461
|
"all",
|
|
462
462
|
"payment",
|
|
463
463
|
"refund",
|
|
464
464
|
"adjustment"
|
|
465
|
-
].map((e) => /* @__PURE__ */
|
|
465
|
+
].map((e) => /* @__PURE__ */ H("button", {
|
|
466
466
|
type: "button",
|
|
467
467
|
onClick: () => ae(e),
|
|
468
468
|
className: `px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${q === e ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-secondary hover:text-text-primary"}`,
|
|
@@ -470,20 +470,20 @@ var W = {
|
|
|
470
470
|
}, e))
|
|
471
471
|
})
|
|
472
472
|
}),
|
|
473
|
-
$.length === 0 ? /* @__PURE__ */
|
|
473
|
+
$.length === 0 ? /* @__PURE__ */ H(T, {
|
|
474
474
|
illustration: q === "all" ? "empty-data" : "empty-search",
|
|
475
475
|
title: _("billing.transactions.noTransactionsFound", "No transactions found"),
|
|
476
476
|
description: q === "all" ? _("billing.transactions.noTransactionsYet", "Your transaction history will appear here.") : _("billing.transactions.noTransactionsFiltered", "No transactions match your filter.")
|
|
477
|
-
}) : /* @__PURE__ */
|
|
477
|
+
}) : /* @__PURE__ */ H("div", {
|
|
478
478
|
className: "border border-border-subtle rounded-lg overflow-visible",
|
|
479
|
-
children: /* @__PURE__ */
|
|
479
|
+
children: /* @__PURE__ */ H(D, {
|
|
480
480
|
columns: [
|
|
481
481
|
{
|
|
482
482
|
key: "date",
|
|
483
483
|
header: "Date",
|
|
484
484
|
priority: "primary",
|
|
485
485
|
cellClassName: "whitespace-nowrap",
|
|
486
|
-
cell: (e) => /* @__PURE__ */
|
|
486
|
+
cell: (e) => /* @__PURE__ */ H("span", {
|
|
487
487
|
className: "text-sm text-text-primary",
|
|
488
488
|
children: o(e.createdAt)
|
|
489
489
|
})
|
|
@@ -492,7 +492,7 @@ var W = {
|
|
|
492
492
|
key: "type",
|
|
493
493
|
header: "Type",
|
|
494
494
|
cellClassName: "whitespace-nowrap",
|
|
495
|
-
cell: (e) => /* @__PURE__ */
|
|
495
|
+
cell: (e) => /* @__PURE__ */ H("span", {
|
|
496
496
|
className: "text-sm text-text-primary capitalize",
|
|
497
497
|
children: G(e.type)
|
|
498
498
|
})
|
|
@@ -500,7 +500,7 @@ var W = {
|
|
|
500
500
|
{
|
|
501
501
|
key: "description",
|
|
502
502
|
header: "Description",
|
|
503
|
-
cell: (e) => /* @__PURE__ */
|
|
503
|
+
cell: (e) => /* @__PURE__ */ H("span", {
|
|
504
504
|
className: "text-sm text-text-secondary",
|
|
505
505
|
children: e.description ?? "-"
|
|
506
506
|
})
|
|
@@ -510,7 +510,7 @@ var W = {
|
|
|
510
510
|
header: "Amount",
|
|
511
511
|
headerClassName: "text-right",
|
|
512
512
|
cellClassName: "text-right whitespace-nowrap",
|
|
513
|
-
cell: (e) => /* @__PURE__ */
|
|
513
|
+
cell: (e) => /* @__PURE__ */ U("span", {
|
|
514
514
|
className: `text-sm font-medium tabular-nums ${e.type === "refund" ? "text-status-error-text" : "text-text-primary"}`,
|
|
515
515
|
children: [e.type === "refund" ? "-" : "", a(de(e), e.currency)]
|
|
516
516
|
})
|
|
@@ -520,7 +520,7 @@ var W = {
|
|
|
520
520
|
header: "Status",
|
|
521
521
|
headerClassName: "text-center",
|
|
522
522
|
cellClassName: "text-center whitespace-nowrap",
|
|
523
|
-
cell: (e) => /* @__PURE__ */
|
|
523
|
+
cell: (e) => /* @__PURE__ */ H("span", {
|
|
524
524
|
className: `px-1.5 py-0.5 text-xs font-medium rounded ${m(h(e.status))}`,
|
|
525
525
|
children: e.status
|
|
526
526
|
})
|
|
@@ -528,7 +528,7 @@ var W = {
|
|
|
528
528
|
],
|
|
529
529
|
data: $,
|
|
530
530
|
rowKey: (e) => e.id,
|
|
531
|
-
rowActions: (e) => /* @__PURE__ */
|
|
531
|
+
rowActions: (e) => /* @__PURE__ */ H(te, {
|
|
532
532
|
transaction: e,
|
|
533
533
|
onViewDetails: () => J(e.id),
|
|
534
534
|
onViewInvoice: () => Q(e),
|
|
@@ -536,51 +536,51 @@ var W = {
|
|
|
536
536
|
})
|
|
537
537
|
})
|
|
538
538
|
}),
|
|
539
|
-
|
|
539
|
+
P.totalCount > 0 && /* @__PURE__ */ U("div", {
|
|
540
540
|
className: "flex items-center justify-between border-t border-border-subtle pt-4",
|
|
541
|
-
children: [/* @__PURE__ */
|
|
541
|
+
children: [/* @__PURE__ */ U("p", {
|
|
542
542
|
className: "text-sm text-text-secondary",
|
|
543
543
|
children: [
|
|
544
544
|
"Showing ",
|
|
545
|
-
|
|
545
|
+
P.page * P.pageSize + 1,
|
|
546
546
|
" to",
|
|
547
547
|
" ",
|
|
548
|
-
Math.min((
|
|
548
|
+
Math.min((P.page + 1) * P.pageSize, P.totalCount),
|
|
549
549
|
" of",
|
|
550
550
|
" ",
|
|
551
|
-
|
|
551
|
+
P.totalCount,
|
|
552
552
|
" transactions"
|
|
553
553
|
]
|
|
554
|
-
}), /* @__PURE__ */
|
|
554
|
+
}), /* @__PURE__ */ U("div", {
|
|
555
555
|
className: "flex items-center gap-2",
|
|
556
556
|
children: [
|
|
557
|
-
/* @__PURE__ */
|
|
557
|
+
/* @__PURE__ */ U("button", {
|
|
558
558
|
type: "button",
|
|
559
559
|
onClick: ie,
|
|
560
|
-
disabled: !
|
|
560
|
+
disabled: !P.hasPrevious,
|
|
561
561
|
className: "inline-flex items-center gap-1 px-3 py-1.5 text-sm font-medium rounded-md border border-border-subtle bg-bg-surface hover:bg-bg-sunken/50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
|
|
562
|
-
children: [/* @__PURE__ */
|
|
562
|
+
children: [/* @__PURE__ */ H(j, { className: "size-4" }), "Previous"]
|
|
563
563
|
}),
|
|
564
|
-
/* @__PURE__ */
|
|
564
|
+
/* @__PURE__ */ U("span", {
|
|
565
565
|
className: "text-sm text-text-secondary px-2",
|
|
566
566
|
children: [
|
|
567
567
|
"Page ",
|
|
568
|
-
|
|
568
|
+
P.page + 1,
|
|
569
569
|
" of ",
|
|
570
|
-
Math.ceil(
|
|
570
|
+
Math.ceil(P.totalCount / P.pageSize)
|
|
571
571
|
]
|
|
572
572
|
}),
|
|
573
|
-
/* @__PURE__ */
|
|
573
|
+
/* @__PURE__ */ U("button", {
|
|
574
574
|
type: "button",
|
|
575
575
|
onClick: re,
|
|
576
|
-
disabled: !
|
|
576
|
+
disabled: !P.hasMore,
|
|
577
577
|
className: "inline-flex items-center gap-1 px-3 py-1.5 text-sm font-medium rounded-md border border-border-subtle bg-bg-surface hover:bg-bg-sunken/50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
|
|
578
|
-
children: ["Next", /* @__PURE__ */
|
|
578
|
+
children: ["Next", /* @__PURE__ */ H(M, { className: "size-4" })]
|
|
579
579
|
})
|
|
580
580
|
]
|
|
581
581
|
})]
|
|
582
582
|
}),
|
|
583
|
-
/* @__PURE__ */
|
|
583
|
+
/* @__PURE__ */ H(ne, {
|
|
584
584
|
transaction: Y,
|
|
585
585
|
onClose: () => {
|
|
586
586
|
J(null), X(null);
|