@burdenoff/microfe-billing 2026.625.4 → 2026.625.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import { useBilling as e } from "../../../providers/BillingProvider.js";
|
|
2
2
|
import { AccessDenied as t } from "../../../shared/components/AccessDenied.js";
|
|
3
3
|
import { PageHeader as n } from "../../../shared/components/PageHeader.js";
|
|
4
|
-
import {
|
|
5
|
-
import { ServerError as i } from "../../../shared/components/ServerError.js";
|
|
4
|
+
import { ServerError as r } from "../../../shared/components/ServerError.js";
|
|
6
5
|
import "../../../shared/components/index.js";
|
|
7
|
-
import { useBillingEventEmitter as
|
|
8
|
-
import { formatCurrency as
|
|
9
|
-
import { isServerError as
|
|
6
|
+
import { useBillingEventEmitter as i } from "../../../hooks/useBillingEventEmitter.js";
|
|
7
|
+
import { formatCurrency as a, formatDateTime as o } from "../../../shared/utils/format.js";
|
|
8
|
+
import { isServerError as s } from "../../../shared/utils/error.js";
|
|
10
9
|
import "../../../shared/utils/index.js";
|
|
11
|
-
import { useBillingPermissions as
|
|
12
|
-
import { approvePayoutRequest as
|
|
13
|
-
import { useEffect as
|
|
14
|
-
import { AlertTriangle as
|
|
15
|
-
import { Fragment as
|
|
16
|
-
import {
|
|
10
|
+
import { useBillingPermissions as c } from "../../../hooks/useBillingPermissions.js";
|
|
11
|
+
import { approvePayoutRequest as l, fetchAdminPayoutRequests as u, fetchAdminPayoutSummary as d, markPayoutPaid as f, rejectPayoutRequest as p } from "../api.js";
|
|
12
|
+
import { useEffect as m, useMemo as h, useState as g } from "react";
|
|
13
|
+
import { AlertTriangle as _, Banknote as v, CheckCircle2 as y, ChevronDown as b, ChevronUp as x, Clock as S, CreditCard as C, ReceiptText as w, RefreshCw as T, XCircle as E } from "lucide-react";
|
|
14
|
+
import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
15
|
+
import { IllustratedEmptyState as A, PagePurpose as j, ResponsiveDialog as M, ResponsiveDialogContent as N, ResponsiveDialogDescription as P, ResponsiveDialogFooter as F, ResponsiveDialogHeader as I, ResponsiveDialogTitle as L } from "@burdenoff/fe-libs/ui";
|
|
17
16
|
//#region src/billing/modules/earnings/pages/PayoutAdminPage.tsx
|
|
18
|
-
var
|
|
17
|
+
var R = {
|
|
19
18
|
REQUESTED: "Requested",
|
|
20
19
|
APPROVED: "Approved",
|
|
21
20
|
REJECTED: "Rejected",
|
|
@@ -23,7 +22,7 @@ var L = {
|
|
|
23
22
|
PAID: "Paid",
|
|
24
23
|
FAILED: "Failed",
|
|
25
24
|
CANCELED: "Canceled"
|
|
26
|
-
},
|
|
25
|
+
}, z = {
|
|
27
26
|
REQUESTED: "bg-status-warning-bg-subtle text-status-warning-text",
|
|
28
27
|
APPROVED: "bg-status-info-bg-subtle text-status-info-text",
|
|
29
28
|
REJECTED: "bg-status-error-bg-subtle text-status-error-text",
|
|
@@ -32,24 +31,24 @@ var L = {
|
|
|
32
31
|
FAILED: "bg-status-error-bg-subtle text-status-error-text",
|
|
33
32
|
CANCELED: "bg-bg-sunken text-text-muted"
|
|
34
33
|
};
|
|
35
|
-
function
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
-
className: `inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium ${
|
|
38
|
-
children:
|
|
34
|
+
function B({ status: e }) {
|
|
35
|
+
return /* @__PURE__ */ O("span", {
|
|
36
|
+
className: `inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium ${z[e] ?? "bg-bg-sunken text-text-muted"}`,
|
|
37
|
+
children: R[e] ?? e
|
|
39
38
|
});
|
|
40
39
|
}
|
|
41
|
-
function
|
|
42
|
-
let [t, n] =
|
|
43
|
-
return /* @__PURE__ */
|
|
40
|
+
function V({ account: e }) {
|
|
41
|
+
let [t, n] = g(!1), r = e.accountDetails;
|
|
42
|
+
return /* @__PURE__ */ k("div", {
|
|
44
43
|
className: "rounded-md border border-border-subtle bg-bg-sunken/40 p-3 text-sm",
|
|
45
|
-
children: [/* @__PURE__ */
|
|
44
|
+
children: [/* @__PURE__ */ k("div", {
|
|
46
45
|
className: "flex items-center justify-between",
|
|
47
|
-
children: [/* @__PURE__ */
|
|
46
|
+
children: [/* @__PURE__ */ k("div", {
|
|
48
47
|
className: "flex items-center gap-2 text-text-primary font-medium",
|
|
49
48
|
children: [
|
|
50
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ O(C, { className: "size-4 text-text-muted" }),
|
|
51
50
|
e.displayName ?? e.label,
|
|
52
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ k("span", {
|
|
53
52
|
className: "text-xs text-text-muted font-normal",
|
|
54
53
|
children: [
|
|
55
54
|
"(",
|
|
@@ -63,81 +62,81 @@ function B({ account: e }) {
|
|
|
63
62
|
]
|
|
64
63
|
})
|
|
65
64
|
]
|
|
66
|
-
}), r && /* @__PURE__ */
|
|
65
|
+
}), r && /* @__PURE__ */ O("button", {
|
|
67
66
|
type: "button",
|
|
68
67
|
onClick: () => n((e) => !e),
|
|
69
68
|
className: "text-text-muted hover:text-text-primary",
|
|
70
|
-
children:
|
|
69
|
+
children: O(t ? x : b, { className: "size-4" })
|
|
71
70
|
})]
|
|
72
|
-
}), t && r && /* @__PURE__ */
|
|
71
|
+
}), t && r && /* @__PURE__ */ k("div", {
|
|
73
72
|
className: "mt-2 grid gap-1 text-xs",
|
|
74
73
|
children: [
|
|
75
|
-
r.accountHolderName && /* @__PURE__ */
|
|
74
|
+
r.accountHolderName && /* @__PURE__ */ k("div", {
|
|
76
75
|
className: "flex gap-2",
|
|
77
|
-
children: [/* @__PURE__ */
|
|
76
|
+
children: [/* @__PURE__ */ O("span", {
|
|
78
77
|
className: "text-text-muted w-32 shrink-0",
|
|
79
78
|
children: "Account holder"
|
|
80
|
-
}), /* @__PURE__ */
|
|
79
|
+
}), /* @__PURE__ */ O("span", {
|
|
81
80
|
className: "text-text-primary",
|
|
82
81
|
children: r.accountHolderName
|
|
83
82
|
})]
|
|
84
83
|
}),
|
|
85
|
-
r.bankName && /* @__PURE__ */
|
|
84
|
+
r.bankName && /* @__PURE__ */ k("div", {
|
|
86
85
|
className: "flex gap-2",
|
|
87
|
-
children: [/* @__PURE__ */
|
|
86
|
+
children: [/* @__PURE__ */ O("span", {
|
|
88
87
|
className: "text-text-muted w-32 shrink-0",
|
|
89
88
|
children: "Bank"
|
|
90
|
-
}), /* @__PURE__ */
|
|
89
|
+
}), /* @__PURE__ */ O("span", {
|
|
91
90
|
className: "text-text-primary",
|
|
92
91
|
children: r.bankName
|
|
93
92
|
})]
|
|
94
93
|
}),
|
|
95
|
-
e.accountLast4 && /* @__PURE__ */
|
|
94
|
+
e.accountLast4 && /* @__PURE__ */ k("div", {
|
|
96
95
|
className: "flex gap-2",
|
|
97
|
-
children: [/* @__PURE__ */
|
|
96
|
+
children: [/* @__PURE__ */ O("span", {
|
|
98
97
|
className: "text-text-muted w-32 shrink-0",
|
|
99
98
|
children: "Account (last 4)"
|
|
100
|
-
}), /* @__PURE__ */
|
|
99
|
+
}), /* @__PURE__ */ k("span", {
|
|
101
100
|
className: "text-text-primary font-mono",
|
|
102
101
|
children: ["••••", e.accountLast4]
|
|
103
102
|
})]
|
|
104
103
|
}),
|
|
105
|
-
r.ifsc && /* @__PURE__ */
|
|
104
|
+
r.ifsc && /* @__PURE__ */ k("div", {
|
|
106
105
|
className: "flex gap-2",
|
|
107
|
-
children: [/* @__PURE__ */
|
|
106
|
+
children: [/* @__PURE__ */ O("span", {
|
|
108
107
|
className: "text-text-muted w-32 shrink-0",
|
|
109
108
|
children: "IFSC"
|
|
110
|
-
}), /* @__PURE__ */
|
|
109
|
+
}), /* @__PURE__ */ O("span", {
|
|
111
110
|
className: "text-text-primary font-mono",
|
|
112
111
|
children: r.ifsc
|
|
113
112
|
})]
|
|
114
113
|
}),
|
|
115
|
-
r.routingNumberLast4 && /* @__PURE__ */
|
|
114
|
+
r.routingNumberLast4 && /* @__PURE__ */ k("div", {
|
|
116
115
|
className: "flex gap-2",
|
|
117
|
-
children: [/* @__PURE__ */
|
|
116
|
+
children: [/* @__PURE__ */ O("span", {
|
|
118
117
|
className: "text-text-muted w-32 shrink-0",
|
|
119
118
|
children: "Routing (last 4)"
|
|
120
|
-
}), /* @__PURE__ */
|
|
119
|
+
}), /* @__PURE__ */ k("span", {
|
|
121
120
|
className: "text-text-primary font-mono",
|
|
122
121
|
children: ["••••", r.routingNumberLast4]
|
|
123
122
|
})]
|
|
124
123
|
}),
|
|
125
|
-
r.upiIdMasked && /* @__PURE__ */
|
|
124
|
+
r.upiIdMasked && /* @__PURE__ */ k("div", {
|
|
126
125
|
className: "flex gap-2",
|
|
127
|
-
children: [/* @__PURE__ */
|
|
126
|
+
children: [/* @__PURE__ */ O("span", {
|
|
128
127
|
className: "text-text-muted w-32 shrink-0",
|
|
129
128
|
children: "UPI ID"
|
|
130
|
-
}), /* @__PURE__ */
|
|
129
|
+
}), /* @__PURE__ */ O("span", {
|
|
131
130
|
className: "text-text-primary font-mono",
|
|
132
131
|
children: r.upiIdMasked
|
|
133
132
|
})]
|
|
134
133
|
}),
|
|
135
|
-
r.swift && /* @__PURE__ */
|
|
134
|
+
r.swift && /* @__PURE__ */ k("div", {
|
|
136
135
|
className: "flex gap-2",
|
|
137
|
-
children: [/* @__PURE__ */
|
|
136
|
+
children: [/* @__PURE__ */ O("span", {
|
|
138
137
|
className: "text-text-muted w-32 shrink-0",
|
|
139
138
|
children: "SWIFT"
|
|
140
|
-
}), /* @__PURE__ */
|
|
139
|
+
}), /* @__PURE__ */ O("span", {
|
|
141
140
|
className: "text-text-primary font-mono",
|
|
142
141
|
children: r.swift
|
|
143
142
|
})]
|
|
@@ -146,162 +145,162 @@ function B({ account: e }) {
|
|
|
146
145
|
})]
|
|
147
146
|
});
|
|
148
147
|
}
|
|
149
|
-
function
|
|
150
|
-
let i = e.status === "REQUESTED" || e.status === "REJECTED",
|
|
151
|
-
return /* @__PURE__ */
|
|
148
|
+
function H({ request: e, onApprove: t, onReject: n, onMarkPaid: r }) {
|
|
149
|
+
let i = e.status === "REQUESTED" || e.status === "REJECTED", s = e.status === "REQUESTED" || e.status === "APPROVED", c = e.status === "APPROVED" || e.status === "PROCESSING";
|
|
150
|
+
return /* @__PURE__ */ k("div", {
|
|
152
151
|
className: "rounded-card border border-border-seam bg-bg-surface p-5 space-y-4 shadow-[var(--shadow-elevation-1)] transition-all duration-200 hover:shadow-[var(--shadow-elevation-2)]",
|
|
153
152
|
children: [
|
|
154
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ k("div", {
|
|
155
154
|
className: "flex flex-wrap items-start justify-between gap-3",
|
|
156
|
-
children: [/* @__PURE__ */
|
|
155
|
+
children: [/* @__PURE__ */ k("div", {
|
|
157
156
|
className: "space-y-1",
|
|
158
|
-
children: [/* @__PURE__ */
|
|
157
|
+
children: [/* @__PURE__ */ k("div", {
|
|
159
158
|
className: "flex items-center gap-2",
|
|
160
|
-
children: [/* @__PURE__ */
|
|
159
|
+
children: [/* @__PURE__ */ O("span", {
|
|
161
160
|
className: "text-xl font-semibold text-text-primary",
|
|
162
|
-
children:
|
|
163
|
-
}), /* @__PURE__ */
|
|
164
|
-
}), /* @__PURE__ */
|
|
161
|
+
children: a(e.requestedAmount, e.currency)
|
|
162
|
+
}), /* @__PURE__ */ O(B, { status: e.status })]
|
|
163
|
+
}), /* @__PURE__ */ k("div", {
|
|
165
164
|
className: "text-xs text-text-muted space-x-2",
|
|
166
165
|
children: [
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
-
e.requesterUserId && /* @__PURE__ */
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ k("span", { children: ["Requested ", o(e.createdAt)] }),
|
|
167
|
+
e.requesterUserId && /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("span", { children: "·" }), /* @__PURE__ */ k("span", { children: ["by ", e.requesterUserId] })] }),
|
|
168
|
+
/* @__PURE__ */ O("span", { children: "·" }),
|
|
169
|
+
/* @__PURE__ */ k("span", {
|
|
171
170
|
className: "font-mono text-xs",
|
|
172
171
|
children: [e.id.slice(0, 8), "…"]
|
|
173
172
|
})
|
|
174
173
|
]
|
|
175
174
|
})]
|
|
176
|
-
}), /* @__PURE__ */
|
|
175
|
+
}), /* @__PURE__ */ k("div", {
|
|
177
176
|
className: "flex flex-wrap gap-2",
|
|
178
177
|
children: [
|
|
179
|
-
i && /* @__PURE__ */
|
|
178
|
+
i && /* @__PURE__ */ k("button", {
|
|
180
179
|
type: "button",
|
|
181
180
|
onClick: () => t(e),
|
|
182
181
|
className: "inline-flex items-center gap-1.5 rounded-button bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text",
|
|
183
|
-
children: [/* @__PURE__ */
|
|
182
|
+
children: [/* @__PURE__ */ O(y, { className: "size-3.5" }), "Approve"]
|
|
184
183
|
}),
|
|
185
|
-
c && /* @__PURE__ */
|
|
184
|
+
c && /* @__PURE__ */ k("button", {
|
|
186
185
|
type: "button",
|
|
187
186
|
onClick: () => r(e),
|
|
188
187
|
className: "inline-flex items-center gap-1.5 rounded-button bg-status-success-bg-subtle border border-status-success-border px-3 py-1.5 text-xs font-medium text-status-success-text transition-colors hover:bg-status-success-bg-subtle/70",
|
|
189
|
-
children: [/* @__PURE__ */
|
|
188
|
+
children: [/* @__PURE__ */ O(v, { className: "size-3.5" }), "Mark as Paid"]
|
|
190
189
|
}),
|
|
191
|
-
|
|
190
|
+
s && /* @__PURE__ */ k("button", {
|
|
192
191
|
type: "button",
|
|
193
192
|
onClick: () => n(e),
|
|
194
193
|
className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-status-error-text",
|
|
195
|
-
children: [/* @__PURE__ */
|
|
194
|
+
children: [/* @__PURE__ */ O(E, { className: "size-3.5" }), "Reject"]
|
|
196
195
|
})
|
|
197
196
|
]
|
|
198
197
|
})]
|
|
199
198
|
}),
|
|
200
|
-
e.payoutAccount && /* @__PURE__ */
|
|
201
|
-
e.userNotes && /* @__PURE__ */
|
|
199
|
+
e.payoutAccount && /* @__PURE__ */ O(V, { account: e.payoutAccount }),
|
|
200
|
+
e.userNotes && /* @__PURE__ */ k("div", {
|
|
202
201
|
className: "rounded-md bg-bg-sunken/40 border border-border-subtle px-3 py-2 text-sm",
|
|
203
|
-
children: [/* @__PURE__ */
|
|
202
|
+
children: [/* @__PURE__ */ O("span", {
|
|
204
203
|
className: "text-xs font-medium text-text-muted uppercase tracking-wide",
|
|
205
204
|
children: "User note"
|
|
206
|
-
}), /* @__PURE__ */
|
|
205
|
+
}), /* @__PURE__ */ O("p", {
|
|
207
206
|
className: "mt-1 text-text-primary",
|
|
208
207
|
children: e.userNotes
|
|
209
208
|
})]
|
|
210
209
|
}),
|
|
211
|
-
(e.internalNotes ?? e.failureReason ?? e.externalReference) && /* @__PURE__ */
|
|
210
|
+
(e.internalNotes ?? e.failureReason ?? e.externalReference) && /* @__PURE__ */ k("div", {
|
|
212
211
|
className: "grid gap-1 text-xs text-text-muted",
|
|
213
212
|
children: [
|
|
214
|
-
e.externalReference && /* @__PURE__ */
|
|
213
|
+
e.externalReference && /* @__PURE__ */ k("div", {
|
|
215
214
|
className: "flex gap-2",
|
|
216
|
-
children: [/* @__PURE__ */
|
|
215
|
+
children: [/* @__PURE__ */ O(w, { className: "size-3.5 mt-px shrink-0" }), /* @__PURE__ */ k("span", { children: [
|
|
217
216
|
"Ref:",
|
|
218
217
|
" ",
|
|
219
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ O("span", {
|
|
220
219
|
className: "font-mono text-text-primary",
|
|
221
220
|
children: e.externalReference
|
|
222
221
|
})
|
|
223
222
|
] })]
|
|
224
223
|
}),
|
|
225
|
-
e.internalNotes && /* @__PURE__ */
|
|
224
|
+
e.internalNotes && /* @__PURE__ */ k("div", {
|
|
226
225
|
className: "flex gap-2",
|
|
227
|
-
children: [/* @__PURE__ */
|
|
226
|
+
children: [/* @__PURE__ */ O("span", {
|
|
228
227
|
className: "shrink-0",
|
|
229
228
|
children: "Internal note:"
|
|
230
|
-
}), /* @__PURE__ */
|
|
229
|
+
}), /* @__PURE__ */ O("span", {
|
|
231
230
|
className: "text-text-primary",
|
|
232
231
|
children: e.internalNotes
|
|
233
232
|
})]
|
|
234
233
|
}),
|
|
235
|
-
e.failureReason && /* @__PURE__ */
|
|
234
|
+
e.failureReason && /* @__PURE__ */ k("div", {
|
|
236
235
|
className: "flex gap-2 text-status-error-text",
|
|
237
|
-
children: [/* @__PURE__ */
|
|
236
|
+
children: [/* @__PURE__ */ O(_, { className: "size-3.5 mt-px shrink-0" }), /* @__PURE__ */ O("span", { children: e.failureReason })]
|
|
238
237
|
})
|
|
239
238
|
]
|
|
240
239
|
}),
|
|
241
|
-
(e.paidAt ?? e.processedAt) && /* @__PURE__ */
|
|
240
|
+
(e.paidAt ?? e.processedAt) && /* @__PURE__ */ k("div", {
|
|
242
241
|
className: "flex flex-wrap gap-4 text-xs text-text-muted",
|
|
243
|
-
children: [e.processedAt && /* @__PURE__ */
|
|
242
|
+
children: [e.processedAt && /* @__PURE__ */ k("span", {
|
|
244
243
|
className: "flex items-center gap-1",
|
|
245
244
|
children: [
|
|
246
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ O(S, { className: "size-3" }),
|
|
247
246
|
"Processed ",
|
|
248
|
-
|
|
247
|
+
o(e.processedAt)
|
|
249
248
|
]
|
|
250
|
-
}), e.paidAt && /* @__PURE__ */
|
|
249
|
+
}), e.paidAt && /* @__PURE__ */ k("span", {
|
|
251
250
|
className: "flex items-center gap-1",
|
|
252
251
|
children: [
|
|
253
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ O(y, { className: "size-3" }),
|
|
254
253
|
"Paid ",
|
|
255
|
-
|
|
254
|
+
o(e.paidAt)
|
|
256
255
|
]
|
|
257
256
|
})]
|
|
258
257
|
})
|
|
259
258
|
]
|
|
260
259
|
});
|
|
261
260
|
}
|
|
262
|
-
function
|
|
263
|
-
return /* @__PURE__ */
|
|
261
|
+
function U({ summary: e }) {
|
|
262
|
+
return /* @__PURE__ */ k("div", {
|
|
264
263
|
className: "grid gap-3 sm:grid-cols-3",
|
|
265
264
|
children: [
|
|
266
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ k("div", {
|
|
267
266
|
className: "rounded-card border border-border-seam bg-bg-surface p-4 shadow-[var(--shadow-elevation-1)]",
|
|
268
267
|
children: [
|
|
269
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ O("div", {
|
|
270
269
|
className: "text-xs text-text-muted uppercase tracking-wide",
|
|
271
270
|
children: "Pending payout"
|
|
272
271
|
}),
|
|
273
|
-
/* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ O("div", {
|
|
274
273
|
className: "mt-1 text-lg font-semibold text-text-primary",
|
|
275
|
-
children:
|
|
274
|
+
children: a(e.totalRequestedAmount, "USD")
|
|
276
275
|
}),
|
|
277
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ k("div", {
|
|
278
277
|
className: "text-xs text-text-muted mt-0.5",
|
|
279
278
|
children: [e.pendingCount, " requests"]
|
|
280
279
|
})
|
|
281
280
|
]
|
|
282
281
|
}),
|
|
283
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ k("div", {
|
|
284
283
|
className: "rounded-card border border-border-seam bg-bg-surface p-4 shadow-[var(--shadow-elevation-1)]",
|
|
285
|
-
children: [/* @__PURE__ */
|
|
284
|
+
children: [/* @__PURE__ */ O("div", {
|
|
286
285
|
className: "text-xs text-text-muted uppercase tracking-wide",
|
|
287
286
|
children: "Processing"
|
|
288
|
-
}), /* @__PURE__ */
|
|
287
|
+
}), /* @__PURE__ */ O("div", {
|
|
289
288
|
className: "mt-1 text-lg font-semibold text-text-primary",
|
|
290
|
-
children:
|
|
289
|
+
children: a(e.totalProcessingAmount, "USD")
|
|
291
290
|
})]
|
|
292
291
|
}),
|
|
293
|
-
/* @__PURE__ */
|
|
292
|
+
/* @__PURE__ */ k("div", {
|
|
294
293
|
className: "rounded-card border border-border-seam bg-bg-surface p-4 shadow-[var(--shadow-elevation-1)]",
|
|
295
294
|
children: [
|
|
296
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ O("div", {
|
|
297
296
|
className: "text-xs text-text-muted uppercase tracking-wide",
|
|
298
297
|
children: "Total paid"
|
|
299
298
|
}),
|
|
300
|
-
/* @__PURE__ */
|
|
299
|
+
/* @__PURE__ */ O("div", {
|
|
301
300
|
className: "mt-1 text-lg font-semibold text-text-primary",
|
|
302
|
-
children:
|
|
301
|
+
children: a(e.totalPaidAmount, "USD")
|
|
303
302
|
}),
|
|
304
|
-
e.failedCount > 0 && /* @__PURE__ */
|
|
303
|
+
e.failedCount > 0 && /* @__PURE__ */ k("div", {
|
|
305
304
|
className: "text-xs text-status-error-text mt-0.5",
|
|
306
305
|
children: [e.failedCount, " failed"]
|
|
307
306
|
})
|
|
@@ -310,53 +309,53 @@ function H({ summary: e }) {
|
|
|
310
309
|
]
|
|
311
310
|
});
|
|
312
311
|
}
|
|
313
|
-
function
|
|
314
|
-
let [r, i] =
|
|
315
|
-
e.type === "reject" && !
|
|
312
|
+
function W({ dialog: e, onClose: t, onConfirm: n }) {
|
|
313
|
+
let [r, i] = g(""), [o, s] = g(""), [c, l] = g(""), [u, d] = g(!1), f = async () => {
|
|
314
|
+
e.type === "reject" && !o.trim() || (d(!0), await n({
|
|
316
315
|
notes: r.trim() || void 0,
|
|
317
|
-
reason:
|
|
316
|
+
reason: o.trim() || void 0,
|
|
318
317
|
externalReference: c.trim() || void 0
|
|
319
318
|
}), d(!1));
|
|
320
319
|
};
|
|
321
|
-
return /* @__PURE__ */
|
|
320
|
+
return /* @__PURE__ */ O(M, {
|
|
322
321
|
open: !0,
|
|
323
322
|
onOpenChange: (e) => {
|
|
324
323
|
!e && !u && t();
|
|
325
324
|
},
|
|
326
|
-
children: /* @__PURE__ */
|
|
325
|
+
children: /* @__PURE__ */ k(N, {
|
|
327
326
|
className: "sm:max-w-md",
|
|
328
327
|
children: [
|
|
329
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ k(I, { children: [/* @__PURE__ */ O(L, { children: {
|
|
330
329
|
approve: "Approve withdrawal request",
|
|
331
330
|
reject: "Reject withdrawal request",
|
|
332
331
|
mark_paid: "Mark as paid"
|
|
333
|
-
}[e.type] }), /* @__PURE__ */
|
|
334
|
-
|
|
332
|
+
}[e.type] }), /* @__PURE__ */ k(P, { children: [
|
|
333
|
+
a(e.amount, e.currency),
|
|
335
334
|
" · ",
|
|
336
335
|
e.accountLabel
|
|
337
336
|
] })] }),
|
|
338
|
-
e.type === "mark_paid" && /* @__PURE__ */
|
|
337
|
+
e.type === "mark_paid" && /* @__PURE__ */ k("div", {
|
|
339
338
|
className: "space-y-3",
|
|
340
|
-
children: [/* @__PURE__ */
|
|
341
|
-
/* @__PURE__ */
|
|
339
|
+
children: [/* @__PURE__ */ k("div", { children: [
|
|
340
|
+
/* @__PURE__ */ O("label", {
|
|
342
341
|
className: "text-xs font-medium text-text-primary block mb-1",
|
|
343
342
|
children: "Transaction reference / UTR number"
|
|
344
343
|
}),
|
|
345
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ O("input", {
|
|
346
345
|
type: "text",
|
|
347
346
|
value: c,
|
|
348
347
|
onChange: (e) => l(e.target.value),
|
|
349
348
|
placeholder: "e.g. UTR123456789012, TXN_abc123",
|
|
350
349
|
className: "w-full rounded-input border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
351
350
|
}),
|
|
352
|
-
/* @__PURE__ */
|
|
351
|
+
/* @__PURE__ */ O("p", {
|
|
353
352
|
className: "text-xs text-text-muted mt-1",
|
|
354
353
|
children: "Enter the bank reference number so the user can verify the transfer."
|
|
355
354
|
})
|
|
356
|
-
] }), /* @__PURE__ */
|
|
355
|
+
] }), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
|
|
357
356
|
className: "text-xs font-medium text-text-primary block mb-1",
|
|
358
357
|
children: "Internal notes (optional)"
|
|
359
|
-
}), /* @__PURE__ */
|
|
358
|
+
}), /* @__PURE__ */ O("textarea", {
|
|
360
359
|
value: r,
|
|
361
360
|
onChange: (e) => i(e.target.value),
|
|
362
361
|
rows: 2,
|
|
@@ -364,39 +363,39 @@ function U({ dialog: e, onClose: t, onConfirm: n }) {
|
|
|
364
363
|
className: "w-full rounded-input border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] resize-none"
|
|
365
364
|
})] })]
|
|
366
365
|
}),
|
|
367
|
-
e.type === "approve" && /* @__PURE__ */
|
|
366
|
+
e.type === "approve" && /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
|
|
368
367
|
className: "text-xs font-medium text-text-primary block mb-1",
|
|
369
368
|
children: "Internal notes (optional)"
|
|
370
|
-
}), /* @__PURE__ */
|
|
369
|
+
}), /* @__PURE__ */ O("textarea", {
|
|
371
370
|
value: r,
|
|
372
371
|
onChange: (e) => i(e.target.value),
|
|
373
372
|
rows: 3,
|
|
374
373
|
placeholder: "e.g. Verified bank details, approved for transfer…",
|
|
375
374
|
className: "w-full rounded-input border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] resize-none"
|
|
376
375
|
})] }),
|
|
377
|
-
e.type === "reject" && /* @__PURE__ */
|
|
376
|
+
e.type === "reject" && /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ k("label", {
|
|
378
377
|
className: "text-xs font-medium text-text-primary block mb-1",
|
|
379
|
-
children: ["Reason for rejection ", /* @__PURE__ */
|
|
378
|
+
children: ["Reason for rejection ", /* @__PURE__ */ O("span", {
|
|
380
379
|
className: "text-status-error-text",
|
|
381
380
|
children: "*"
|
|
382
381
|
})]
|
|
383
|
-
}), /* @__PURE__ */
|
|
384
|
-
value:
|
|
382
|
+
}), /* @__PURE__ */ O("textarea", {
|
|
383
|
+
value: o,
|
|
385
384
|
onChange: (e) => s(e.target.value),
|
|
386
385
|
rows: 3,
|
|
387
386
|
placeholder: "e.g. Invalid bank details provided, please re-submit with correct IFSC…",
|
|
388
387
|
className: "w-full rounded-input border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] resize-none"
|
|
389
388
|
})] }),
|
|
390
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ k(F, { children: [/* @__PURE__ */ O("button", {
|
|
391
390
|
type: "button",
|
|
392
391
|
onClick: t,
|
|
393
392
|
disabled: u,
|
|
394
393
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary disabled:opacity-50",
|
|
395
394
|
children: "Cancel"
|
|
396
|
-
}), /* @__PURE__ */
|
|
395
|
+
}), /* @__PURE__ */ O("button", {
|
|
397
396
|
type: "button",
|
|
398
397
|
onClick: () => void f(),
|
|
399
|
-
disabled: u || e.type === "reject" && !
|
|
398
|
+
disabled: u || e.type === "reject" && !o.trim(),
|
|
400
399
|
className: `rounded-md px-4 py-2 text-sm font-medium disabled:opacity-50 ${e.type === "reject" ? "bg-action-danger-bg text-action-danger-text" : "bg-action-primary-bg text-action-primary-text"}`,
|
|
401
400
|
children: u ? "Saving…" : e.type === "approve" ? "Approve" : e.type === "reject" ? "Reject" : "Confirm Payment"
|
|
402
401
|
})] })
|
|
@@ -404,36 +403,36 @@ function U({ dialog: e, onClose: t, onConfirm: n }) {
|
|
|
404
403
|
})
|
|
405
404
|
});
|
|
406
405
|
}
|
|
407
|
-
var
|
|
408
|
-
let
|
|
409
|
-
apiGatewayUrl:
|
|
410
|
-
authToken:
|
|
411
|
-
orgId:
|
|
406
|
+
var G = () => {
|
|
407
|
+
let a = c(), { emit: o } = i(), { apiGatewayUrl: _, authToken: v, orgId: y } = e(), [b, x] = g(null), [S, C] = g([]), [w, E] = g(!0), [D, M] = g(null), [N, P] = g("pending"), [F, I] = g(null), L = h(() => ({
|
|
408
|
+
apiGatewayUrl: _,
|
|
409
|
+
authToken: v,
|
|
410
|
+
orgId: y
|
|
412
411
|
}), [
|
|
412
|
+
_,
|
|
413
413
|
v,
|
|
414
|
-
y
|
|
415
|
-
x
|
|
414
|
+
y
|
|
416
415
|
]), R = async () => {
|
|
417
|
-
|
|
416
|
+
E(!0), M(null);
|
|
418
417
|
try {
|
|
419
|
-
let [e, t] = await Promise.all([
|
|
420
|
-
|
|
418
|
+
let [e, t] = await Promise.all([d(L), u(L)]);
|
|
419
|
+
x(e), C(t);
|
|
421
420
|
} catch (e) {
|
|
422
421
|
M(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load payout queue"));
|
|
423
422
|
} finally {
|
|
424
|
-
|
|
423
|
+
E(!1);
|
|
425
424
|
}
|
|
426
425
|
};
|
|
427
|
-
if (
|
|
426
|
+
if (m(() => {
|
|
428
427
|
R();
|
|
429
|
-
}, [L]), !
|
|
430
|
-
if (
|
|
428
|
+
}, [L]), !a.isBillingAdmin) return /* @__PURE__ */ O(t, { message: "You don't have permission to manage payouts." });
|
|
429
|
+
if (D && s(D)) return /* @__PURE__ */ O(r, {
|
|
431
430
|
title: "Payout queue unavailable",
|
|
432
|
-
message:
|
|
431
|
+
message: D.message,
|
|
433
432
|
onRetry: () => void R(),
|
|
434
433
|
showRetry: !0
|
|
435
434
|
});
|
|
436
|
-
let z =
|
|
435
|
+
let z = S.filter((e) => e.status === "REQUESTED"), B = S.filter((e) => e.status === "APPROVED" || e.status === "PROCESSING"), V = S.filter((e) => [
|
|
437
436
|
"PAID",
|
|
438
437
|
"REJECTED",
|
|
439
438
|
"FAILED",
|
|
@@ -452,9 +451,9 @@ var W = () => {
|
|
|
452
451
|
{
|
|
453
452
|
id: "history",
|
|
454
453
|
label: "History",
|
|
455
|
-
count:
|
|
454
|
+
count: V.length
|
|
456
455
|
}
|
|
457
|
-
], K = N === "pending" ? z : N === "approved" ? B :
|
|
456
|
+
], K = N === "pending" ? z : N === "approved" ? B : V, q = (e, t) => {
|
|
458
457
|
I({
|
|
459
458
|
type: e,
|
|
460
459
|
requestId: t.id,
|
|
@@ -463,87 +462,88 @@ var W = () => {
|
|
|
463
462
|
accountLabel: t.payoutAccount?.displayName ?? t.payoutAccount?.label ?? "Unknown account"
|
|
464
463
|
});
|
|
465
464
|
};
|
|
466
|
-
return /* @__PURE__ */
|
|
465
|
+
return /* @__PURE__ */ k("div", {
|
|
467
466
|
className: "space-y-6 p-6",
|
|
468
467
|
children: [
|
|
469
|
-
/* @__PURE__ */
|
|
468
|
+
/* @__PURE__ */ O(n, {
|
|
470
469
|
title: "Payout queue",
|
|
471
470
|
description: "Review withdrawal requests, verify bank details, and mark payments as paid once transferred.",
|
|
472
|
-
actions: /* @__PURE__ */
|
|
471
|
+
actions: /* @__PURE__ */ k("button", {
|
|
473
472
|
type: "button",
|
|
474
473
|
onClick: () => void R(),
|
|
475
474
|
className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary",
|
|
476
|
-
children: [/* @__PURE__ */
|
|
475
|
+
children: [/* @__PURE__ */ O(T, { className: `size-4 ${w ? "animate-spin" : ""}` }), "Refresh"]
|
|
477
476
|
})
|
|
478
477
|
}),
|
|
479
|
-
|
|
480
|
-
|
|
478
|
+
/* @__PURE__ */ O(j, { children: "The operations queue for paying out users. Review incoming withdrawal requests, verify the payee's bank or UPI details, approve or reject them, then mark each one paid with its transaction reference once you have transferred the money." }),
|
|
479
|
+
b && !w && /* @__PURE__ */ O(U, { summary: b }),
|
|
480
|
+
w && /* @__PURE__ */ O("div", {
|
|
481
481
|
className: "grid gap-3 sm:grid-cols-3",
|
|
482
482
|
children: [
|
|
483
483
|
1,
|
|
484
484
|
2,
|
|
485
485
|
3
|
|
486
|
-
].map((e) => /* @__PURE__ */
|
|
486
|
+
].map((e) => /* @__PURE__ */ O("div", { className: "h-20 animate-pulse rounded-lg border border-border-subtle bg-bg-surface" }, e))
|
|
487
487
|
}),
|
|
488
|
-
|
|
488
|
+
D && !s(D) && /* @__PURE__ */ O("div", {
|
|
489
489
|
className: "rounded-lg border border-status-error-border bg-status-error-bg-subtle p-4 text-sm text-status-error-text",
|
|
490
|
-
children:
|
|
490
|
+
children: D.message
|
|
491
491
|
}),
|
|
492
|
-
/* @__PURE__ */
|
|
492
|
+
/* @__PURE__ */ O("div", {
|
|
493
493
|
className: "border-b border-border-subtle",
|
|
494
|
-
children: /* @__PURE__ */
|
|
494
|
+
children: /* @__PURE__ */ O("div", {
|
|
495
495
|
className: "flex gap-0",
|
|
496
|
-
children: G.map((e) => /* @__PURE__ */
|
|
496
|
+
children: G.map((e) => /* @__PURE__ */ k("button", {
|
|
497
497
|
type: "button",
|
|
498
498
|
onClick: () => P(e.id),
|
|
499
499
|
className: `flex items-center gap-2 border-b-2 px-4 py-2.5 text-sm font-medium transition-colors ${N === e.id ? "border-action-primary-bg text-text-primary" : "border-transparent text-text-muted hover:text-text-primary"}`,
|
|
500
|
-
children: [e.label, e.count > 0 && /* @__PURE__ */
|
|
500
|
+
children: [e.label, e.count > 0 && /* @__PURE__ */ O("span", {
|
|
501
501
|
className: `rounded-full px-1.5 py-0.5 text-xs ${N === e.id ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-muted"}`,
|
|
502
502
|
children: e.count
|
|
503
503
|
})]
|
|
504
504
|
}, e.id))
|
|
505
505
|
})
|
|
506
506
|
}),
|
|
507
|
-
N === "approved" && B.length > 0 && /* @__PURE__ */
|
|
507
|
+
N === "approved" && B.length > 0 && /* @__PURE__ */ k("div", {
|
|
508
508
|
className: "rounded-card border border-status-info-border bg-status-info-bg-subtle px-4 py-3 text-sm text-status-info-text",
|
|
509
509
|
children: [
|
|
510
|
-
/* @__PURE__ */
|
|
510
|
+
/* @__PURE__ */ O("strong", { children: "How to pay:" }),
|
|
511
511
|
" Click the account row to expand bank/UPI details → transfer the exact amount via your bank → click ",
|
|
512
|
-
/* @__PURE__ */
|
|
512
|
+
/* @__PURE__ */ O("strong", { children: "Mark as Paid" }),
|
|
513
513
|
" and enter the UTR / transaction reference number."
|
|
514
514
|
]
|
|
515
515
|
}),
|
|
516
|
-
|
|
516
|
+
w ? /* @__PURE__ */ O("div", {
|
|
517
517
|
className: "space-y-4",
|
|
518
|
-
children: [1, 2].map((e) => /* @__PURE__ */
|
|
519
|
-
}) : K.length === 0 ? /* @__PURE__ */
|
|
520
|
-
|
|
518
|
+
children: [1, 2].map((e) => /* @__PURE__ */ O("div", { className: "h-40 animate-pulse rounded-lg border border-border-subtle bg-bg-surface" }, e))
|
|
519
|
+
}) : K.length === 0 ? /* @__PURE__ */ O(A, {
|
|
520
|
+
illustration: "empty-data",
|
|
521
521
|
title: N === "pending" ? "No pending requests" : N === "approved" ? "No approved requests awaiting payment" : "No history yet",
|
|
522
522
|
description: N === "pending" ? "New withdrawal requests will appear here." : N === "approved" ? "Approve pending requests first, then send payment and mark as paid." : "Completed and rejected requests will appear here."
|
|
523
|
-
}) : /* @__PURE__ */
|
|
523
|
+
}) : /* @__PURE__ */ O("div", {
|
|
524
524
|
className: "space-y-4",
|
|
525
|
-
children: K.map((e) => /* @__PURE__ */
|
|
525
|
+
children: K.map((e) => /* @__PURE__ */ O(H, {
|
|
526
526
|
request: e,
|
|
527
527
|
onApprove: (e) => q("approve", e),
|
|
528
528
|
onReject: (e) => q("reject", e),
|
|
529
529
|
onMarkPaid: (e) => q("mark_paid", e)
|
|
530
530
|
}, e.id))
|
|
531
531
|
}),
|
|
532
|
-
F && /* @__PURE__ */
|
|
532
|
+
F && /* @__PURE__ */ O(W, {
|
|
533
533
|
dialog: F,
|
|
534
534
|
onClose: () => I(null),
|
|
535
535
|
onConfirm: async (e) => {
|
|
536
536
|
if (F) try {
|
|
537
|
-
F.type === "approve" ? (await
|
|
537
|
+
F.type === "approve" ? (await l(F.requestId, e.notes ?? null, L), o("billing.payout.approved", {
|
|
538
538
|
route: "/billing/payouts",
|
|
539
539
|
entityId: F.requestId,
|
|
540
540
|
source: "payout-admin"
|
|
541
|
-
})) : F.type === "reject" ? (await
|
|
541
|
+
})) : F.type === "reject" ? (await p(F.requestId, e.reason ?? "", L), o("billing.payout.rejected", {
|
|
542
542
|
route: "/billing/payouts",
|
|
543
543
|
entityId: F.requestId,
|
|
544
544
|
source: "payout-admin",
|
|
545
545
|
reason: e.reason
|
|
546
|
-
})) : F.type === "mark_paid" && (await
|
|
546
|
+
})) : F.type === "mark_paid" && (await f(F.requestId, e.externalReference ?? null, e.notes ?? null, L), o("billing.payout.processed", {
|
|
547
547
|
route: "/billing/payouts",
|
|
548
548
|
entityId: F.requestId,
|
|
549
549
|
source: "payout-admin"
|
|
@@ -557,6 +557,6 @@ var W = () => {
|
|
|
557
557
|
});
|
|
558
558
|
};
|
|
559
559
|
//#endregion
|
|
560
|
-
export {
|
|
560
|
+
export { G as PayoutAdminPage };
|
|
561
561
|
|
|
562
562
|
//# sourceMappingURL=PayoutAdminPage.js.map
|