@burdenoff/microfe-billing 2026.623.3 → 2026.624.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/billing/BillingUserRoutes.js +3 -3
- package/dist/billing/BillingUserRoutes.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js +34 -34
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +94 -94
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js.map +1 -1
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +162 -187
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +146 -153
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +10 -10
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/TransactionsPage.js +62 -62
- package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js +164 -179
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js +8 -8
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/EarningsPage.js +243 -305
- package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +73 -78
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutsPage.js +173 -179
- package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +4 -4
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js.map +1 -1
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +4 -4
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.js.map +1 -1
- package/dist/billing/modules/settings/pages/SettingsPage.js +181 -173
- package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +111 -99
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js +68 -83
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js.map +1 -1
- package/dist/billing/shared/components/AccessDenied.js +4 -4
- package/dist/billing/shared/components/AccessDenied.js.map +1 -1
- package/dist/billing/shared/components/ActorIdentity.js +8 -8
- package/dist/billing/shared/components/ActorIdentity.js.map +1 -1
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js +11 -11
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js.map +1 -1
- package/dist/billing/shared/ui/MetricCard.js +1 -1
- package/dist/billing/shared/ui/MetricCard.js.map +1 -1
- package/package.json +1 -1
|
@@ -8,15 +8,46 @@ import { useBillingEventEmitter as a } from "../../../hooks/useBillingEventEmitt
|
|
|
8
8
|
import { formatCurrency as o, formatDateTime as s } from "../../../shared/utils/format.js";
|
|
9
9
|
import { isServerError as c } from "../../../shared/utils/error.js";
|
|
10
10
|
import "../../../shared/utils/index.js";
|
|
11
|
-
import { useBillingPermissions as
|
|
12
|
-
import { useGetDefaultBillingAccountSettingsQuery as
|
|
13
|
-
import { addPayoutAccount as
|
|
14
|
-
import { useEffect as
|
|
15
|
-
import { Landmark as
|
|
16
|
-
import { Fragment as
|
|
11
|
+
import { useBillingPermissions as ee } from "../../../hooks/useBillingPermissions.js";
|
|
12
|
+
import { useGetDefaultBillingAccountSettingsQuery as l } from "../../../../generated/global-operations.js";
|
|
13
|
+
import { addPayoutAccount as u, archivePayoutAccount as te, fetchPayoutAccounts as ne, fetchPayoutRequests as re, requestPayout as d, setDefaultPayoutAccount as f, updatePayoutAccount as p } from "../api.js";
|
|
14
|
+
import { useEffect as m, useMemo as ie, useState as h } from "react";
|
|
15
|
+
import { Landmark as g, RefreshCw as _, Send as v } from "lucide-react";
|
|
16
|
+
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
17
|
+
import { AlertDialog as S, AlertDialogAction as C, AlertDialogCancel as w, AlertDialogContent as T, AlertDialogDescription as ae, AlertDialogFooter as oe, AlertDialogHeader as se, AlertDialogTitle as E, ResponsiveTable as D } from "@burdenoff/fe-libs/ui";
|
|
17
18
|
//#region src/billing/modules/earnings/pages/PayoutsPage.tsx
|
|
18
|
-
var
|
|
19
|
-
|
|
19
|
+
var O = [
|
|
20
|
+
{
|
|
21
|
+
key: "amount",
|
|
22
|
+
header: "Amount",
|
|
23
|
+
priority: "primary",
|
|
24
|
+
cell: (e) => /* @__PURE__ */ b("span", {
|
|
25
|
+
className: "tabular-nums",
|
|
26
|
+
children: o(e.requestedAmount, e.currency)
|
|
27
|
+
})
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
key: "provider",
|
|
31
|
+
header: "Provider",
|
|
32
|
+
cell: (e) => e.provider
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
key: "status",
|
|
36
|
+
header: "Status",
|
|
37
|
+
cell: (e) => e.status
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
key: "account",
|
|
41
|
+
header: "Account",
|
|
42
|
+
cell: (e) => e.payoutAccount?.label || "-"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
key: "created",
|
|
46
|
+
header: "Created",
|
|
47
|
+
cell: (e) => s(e.createdAt)
|
|
48
|
+
}
|
|
49
|
+
], k = () => {
|
|
50
|
+
let o = ee(), { emit: s } = a(), { apiGatewayUrl: k, authToken: A, orgId: j } = e(), { data: M } = l({}), N = M?.getDefaultBillingAccount?.id, [P, F] = h([]), [I, L] = h([]), [R, z] = h(!0), [B, V] = h(null), [H, U] = h({
|
|
20
51
|
label: "",
|
|
21
52
|
type: "BANK_ACCOUNT",
|
|
22
53
|
providerPreference: "AUTO",
|
|
@@ -28,7 +59,7 @@ var D = () => {
|
|
|
28
59
|
routingNumber: "",
|
|
29
60
|
ifsc: "",
|
|
30
61
|
upiId: ""
|
|
31
|
-
}), [W, G] =
|
|
62
|
+
}), [W, G] = h(""), [K, q] = h(""), [J, Y] = h(null), [X, Z] = h(null), Q = ie(() => ({
|
|
32
63
|
apiGatewayUrl: k,
|
|
33
64
|
authToken: A,
|
|
34
65
|
orgId: j
|
|
@@ -36,11 +67,11 @@ var D = () => {
|
|
|
36
67
|
k,
|
|
37
68
|
A,
|
|
38
69
|
j
|
|
39
|
-
]),
|
|
70
|
+
]), $ = async () => {
|
|
40
71
|
if (N) {
|
|
41
72
|
z(!0), V(null);
|
|
42
73
|
try {
|
|
43
|
-
let [e, t] = await Promise.all([
|
|
74
|
+
let [e, t] = await Promise.all([ne(N, Q), re(N, Q)]);
|
|
44
75
|
F(e), L(t), !K && e[0]?.id && q(e[0].id);
|
|
45
76
|
} catch (e) {
|
|
46
77
|
V(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load payout data"));
|
|
@@ -49,26 +80,26 @@ var D = () => {
|
|
|
49
80
|
}
|
|
50
81
|
}
|
|
51
82
|
};
|
|
52
|
-
if (
|
|
53
|
-
|
|
54
|
-
}, [N,
|
|
55
|
-
if (B && c(B)) return /* @__PURE__ */
|
|
83
|
+
if (m(() => {
|
|
84
|
+
$();
|
|
85
|
+
}, [N, Q]), !o.canManagePaymentMethods) return /* @__PURE__ */ b(t, { message: "You don't have permission to manage payout accounts." });
|
|
86
|
+
if (B && c(B)) return /* @__PURE__ */ b(i, {
|
|
56
87
|
title: "Payout data unavailable",
|
|
57
88
|
message: B.message,
|
|
58
|
-
onRetry: () => void
|
|
89
|
+
onRetry: () => void $(),
|
|
59
90
|
showRetry: !0
|
|
60
91
|
});
|
|
61
|
-
let
|
|
92
|
+
let ce = async () => {
|
|
62
93
|
if (!N) return;
|
|
63
94
|
let e = {
|
|
64
95
|
billingAccountId: N,
|
|
65
96
|
...H
|
|
66
97
|
};
|
|
67
|
-
J ? (await
|
|
98
|
+
J ? (await p(J, e, Q), s("billing.payout_account.updated", {
|
|
68
99
|
route: "/billing/payouts",
|
|
69
100
|
entityId: J,
|
|
70
101
|
source: "payouts"
|
|
71
|
-
})) : (await
|
|
102
|
+
})) : (await u(e, Q), s("billing.payout_account.added", {
|
|
72
103
|
route: "/billing/payouts",
|
|
73
104
|
entityId: N,
|
|
74
105
|
source: "payouts"
|
|
@@ -84,16 +115,16 @@ var D = () => {
|
|
|
84
115
|
routingNumber: "",
|
|
85
116
|
ifsc: "",
|
|
86
117
|
upiId: ""
|
|
87
|
-
}), Y(null), await
|
|
88
|
-
},
|
|
89
|
-
await
|
|
90
|
-
},
|
|
91
|
-
|
|
118
|
+
}), Y(null), await $();
|
|
119
|
+
}, le = async (e) => {
|
|
120
|
+
await f(e, Q), await $();
|
|
121
|
+
}, ue = async (e) => {
|
|
122
|
+
await te(e, Q), s("billing.payout_account.archived", {
|
|
92
123
|
route: "/billing/payouts",
|
|
93
124
|
entityId: e,
|
|
94
125
|
source: "payouts"
|
|
95
|
-
}), await
|
|
96
|
-
},
|
|
126
|
+
}), await $();
|
|
127
|
+
}, de = (e) => {
|
|
97
128
|
Y(e.id), U((t) => ({
|
|
98
129
|
...t,
|
|
99
130
|
label: e.label,
|
|
@@ -108,151 +139,151 @@ var D = () => {
|
|
|
108
139
|
ifsc: "",
|
|
109
140
|
upiId: ""
|
|
110
141
|
}));
|
|
111
|
-
},
|
|
112
|
-
!N || !K || !W || (await
|
|
142
|
+
}, fe = async () => {
|
|
143
|
+
!N || !K || !W || (await d({
|
|
113
144
|
billingAccountId: N,
|
|
114
145
|
payoutAccountId: K,
|
|
115
146
|
amount: Number(W),
|
|
116
147
|
currency: P.find((e) => e.id === K)?.currency || "USD"
|
|
117
|
-
},
|
|
148
|
+
}, Q), s("billing.payout.requested", {
|
|
118
149
|
route: "/billing/payouts",
|
|
119
150
|
entityId: K,
|
|
120
151
|
source: "payouts",
|
|
121
152
|
amount: Number(W),
|
|
122
153
|
currency: P.find((e) => e.id === K)?.currency || "USD"
|
|
123
|
-
}), G(""), await
|
|
154
|
+
}), G(""), await $());
|
|
124
155
|
};
|
|
125
|
-
return /* @__PURE__ */
|
|
156
|
+
return /* @__PURE__ */ x("div", {
|
|
126
157
|
className: "space-y-6 p-6",
|
|
127
158
|
children: [
|
|
128
|
-
/* @__PURE__ */
|
|
159
|
+
/* @__PURE__ */ b(n, {
|
|
129
160
|
title: "Payouts",
|
|
130
161
|
description: "Register payout accounts, request withdrawals, and track disbursement status."
|
|
131
162
|
}),
|
|
132
|
-
B && !c(B) ? /* @__PURE__ */
|
|
133
|
-
className: "rounded-lg border border-border bg-
|
|
163
|
+
B && !c(B) ? /* @__PURE__ */ b("div", {
|
|
164
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 text-sm text-status-error-text",
|
|
134
165
|
children: B.message
|
|
135
166
|
}) : null,
|
|
136
|
-
/* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ x("div", {
|
|
137
168
|
className: "grid gap-6 xl:grid-cols-[1.05fr,1.95fr]",
|
|
138
|
-
children: [/* @__PURE__ */
|
|
139
|
-
className: "rounded-lg border border-border bg-
|
|
169
|
+
children: [/* @__PURE__ */ x("section", {
|
|
170
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
|
|
140
171
|
children: [
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
className: "mb-4 text-lg font-semibold text-
|
|
172
|
+
/* @__PURE__ */ b("h2", {
|
|
173
|
+
className: "mb-4 text-lg font-semibold text-text-primary",
|
|
143
174
|
children: J ? "Edit payout account" : "Add payout account"
|
|
144
175
|
}),
|
|
145
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ x("div", {
|
|
146
177
|
className: "space-y-3",
|
|
147
178
|
children: [
|
|
148
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ b("input", {
|
|
149
180
|
value: H.label,
|
|
150
181
|
onChange: (e) => U((t) => ({
|
|
151
182
|
...t,
|
|
152
183
|
label: e.target.value
|
|
153
184
|
})),
|
|
154
185
|
placeholder: "Label",
|
|
155
|
-
className: "w-full rounded-md border border-border bg-
|
|
186
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
156
187
|
}),
|
|
157
|
-
/* @__PURE__ */
|
|
188
|
+
/* @__PURE__ */ x("div", {
|
|
158
189
|
className: "grid gap-3 md:grid-cols-2",
|
|
159
|
-
children: [/* @__PURE__ */
|
|
190
|
+
children: [/* @__PURE__ */ x("select", {
|
|
160
191
|
value: H.type,
|
|
161
192
|
onChange: (e) => U((t) => ({
|
|
162
193
|
...t,
|
|
163
194
|
type: e.target.value
|
|
164
195
|
})),
|
|
165
|
-
className: "rounded-md border border-border bg-
|
|
196
|
+
className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
|
|
166
197
|
children: [
|
|
167
|
-
/* @__PURE__ */
|
|
198
|
+
/* @__PURE__ */ b("option", {
|
|
168
199
|
value: "BANK_ACCOUNT",
|
|
169
200
|
children: "Bank account"
|
|
170
201
|
}),
|
|
171
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ b("option", {
|
|
172
203
|
value: "UPI",
|
|
173
204
|
children: "UPI"
|
|
174
205
|
}),
|
|
175
|
-
/* @__PURE__ */
|
|
206
|
+
/* @__PURE__ */ b("option", {
|
|
176
207
|
value: "WALLET",
|
|
177
208
|
children: "Wallet"
|
|
178
209
|
})
|
|
179
210
|
]
|
|
180
|
-
}), /* @__PURE__ */
|
|
211
|
+
}), /* @__PURE__ */ x("select", {
|
|
181
212
|
value: H.providerPreference,
|
|
182
213
|
onChange: (e) => U((t) => ({
|
|
183
214
|
...t,
|
|
184
215
|
providerPreference: e.target.value
|
|
185
216
|
})),
|
|
186
|
-
className: "rounded-md border border-border bg-
|
|
217
|
+
className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
|
|
187
218
|
children: [
|
|
188
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ b("option", {
|
|
189
220
|
value: "AUTO",
|
|
190
221
|
children: "Auto"
|
|
191
222
|
}),
|
|
192
|
-
/* @__PURE__ */
|
|
223
|
+
/* @__PURE__ */ b("option", {
|
|
193
224
|
value: "STRIPE",
|
|
194
225
|
children: "Stripe"
|
|
195
226
|
}),
|
|
196
|
-
/* @__PURE__ */
|
|
227
|
+
/* @__PURE__ */ b("option", {
|
|
197
228
|
value: "RAZORPAY",
|
|
198
229
|
children: "Razorpay"
|
|
199
230
|
}),
|
|
200
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ b("option", {
|
|
201
232
|
value: "MANUAL",
|
|
202
233
|
children: "Manual"
|
|
203
234
|
})
|
|
204
235
|
]
|
|
205
236
|
})]
|
|
206
237
|
}),
|
|
207
|
-
/* @__PURE__ */
|
|
238
|
+
/* @__PURE__ */ x("div", {
|
|
208
239
|
className: "grid gap-3 md:grid-cols-2",
|
|
209
|
-
children: [/* @__PURE__ */
|
|
240
|
+
children: [/* @__PURE__ */ b("input", {
|
|
210
241
|
value: H.country,
|
|
211
242
|
onChange: (e) => U((t) => ({
|
|
212
243
|
...t,
|
|
213
244
|
country: e.target.value.toUpperCase()
|
|
214
245
|
})),
|
|
215
246
|
placeholder: "Country",
|
|
216
|
-
className: "rounded-md border border-border bg-
|
|
217
|
-
}), /* @__PURE__ */
|
|
247
|
+
className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
248
|
+
}), /* @__PURE__ */ b("input", {
|
|
218
249
|
value: H.currency,
|
|
219
250
|
onChange: (e) => U((t) => ({
|
|
220
251
|
...t,
|
|
221
252
|
currency: e.target.value.toUpperCase()
|
|
222
253
|
})),
|
|
223
254
|
placeholder: "Currency",
|
|
224
|
-
className: "rounded-md border border-border bg-
|
|
255
|
+
className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
225
256
|
})]
|
|
226
257
|
}),
|
|
227
|
-
/* @__PURE__ */
|
|
258
|
+
/* @__PURE__ */ b("input", {
|
|
228
259
|
value: H.accountHolderName,
|
|
229
260
|
onChange: (e) => U((t) => ({
|
|
230
261
|
...t,
|
|
231
262
|
accountHolderName: e.target.value
|
|
232
263
|
})),
|
|
233
264
|
placeholder: "Account holder name",
|
|
234
|
-
className: "w-full rounded-md border border-border bg-
|
|
265
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
235
266
|
}),
|
|
236
|
-
H.type === "BANK_ACCOUNT" ? /* @__PURE__ */
|
|
237
|
-
/* @__PURE__ */
|
|
267
|
+
H.type === "BANK_ACCOUNT" ? /* @__PURE__ */ x(y, { children: [
|
|
268
|
+
/* @__PURE__ */ b("input", {
|
|
238
269
|
value: H.bankName,
|
|
239
270
|
onChange: (e) => U((t) => ({
|
|
240
271
|
...t,
|
|
241
272
|
bankName: e.target.value
|
|
242
273
|
})),
|
|
243
274
|
placeholder: "Bank name",
|
|
244
|
-
className: "w-full rounded-md border border-border bg-
|
|
275
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
245
276
|
}),
|
|
246
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ b("input", {
|
|
247
278
|
value: H.accountNumber,
|
|
248
279
|
onChange: (e) => U((t) => ({
|
|
249
280
|
...t,
|
|
250
281
|
accountNumber: e.target.value
|
|
251
282
|
})),
|
|
252
283
|
placeholder: "Account number",
|
|
253
|
-
className: "w-full rounded-md border border-border bg-
|
|
284
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
254
285
|
}),
|
|
255
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ b("input", {
|
|
256
287
|
value: H.country === "IN" ? H.ifsc : H.routingNumber,
|
|
257
288
|
onChange: (e) => U((t) => t.country === "IN" ? {
|
|
258
289
|
...t,
|
|
@@ -262,26 +293,26 @@ var D = () => {
|
|
|
262
293
|
routingNumber: e.target.value
|
|
263
294
|
}),
|
|
264
295
|
placeholder: H.country === "IN" ? "IFSC" : "Routing number",
|
|
265
|
-
className: "w-full rounded-md border border-border bg-
|
|
296
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
266
297
|
})
|
|
267
|
-
] }) : H.type === "UPI" ? /* @__PURE__ */
|
|
298
|
+
] }) : H.type === "UPI" ? /* @__PURE__ */ b("input", {
|
|
268
299
|
value: H.upiId,
|
|
269
300
|
onChange: (e) => U((t) => ({
|
|
270
301
|
...t,
|
|
271
302
|
upiId: e.target.value
|
|
272
303
|
})),
|
|
273
304
|
placeholder: "UPI ID",
|
|
274
|
-
className: "w-full rounded-md border border-border bg-
|
|
305
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
275
306
|
}) : null
|
|
276
307
|
]
|
|
277
308
|
}),
|
|
278
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ x("button", {
|
|
279
310
|
type: "button",
|
|
280
|
-
onClick: () => void
|
|
281
|
-
className: "mt-4 inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-
|
|
282
|
-
children: [/* @__PURE__ */
|
|
311
|
+
onClick: () => void ce(),
|
|
312
|
+
className: "mt-4 inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text",
|
|
313
|
+
children: [/* @__PURE__ */ b(g, { className: "size-4" }), J ? "Update payout account" : "Save payout account"]
|
|
283
314
|
}),
|
|
284
|
-
J ? /* @__PURE__ */
|
|
315
|
+
J ? /* @__PURE__ */ b("button", {
|
|
285
316
|
type: "button",
|
|
286
317
|
onClick: () => {
|
|
287
318
|
Y(null), U({
|
|
@@ -298,39 +329,39 @@ var D = () => {
|
|
|
298
329
|
upiId: ""
|
|
299
330
|
});
|
|
300
331
|
},
|
|
301
|
-
className: "mt-4 ml-3 inline-flex items-center gap-2 rounded-md border border-border px-4 py-2 text-sm font-medium text-
|
|
332
|
+
className: "mt-4 ml-3 inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary",
|
|
302
333
|
children: "Cancel edit"
|
|
303
334
|
}) : null
|
|
304
335
|
]
|
|
305
|
-
}), /* @__PURE__ */
|
|
336
|
+
}), /* @__PURE__ */ x("section", {
|
|
306
337
|
className: "space-y-4",
|
|
307
|
-
children: [/* @__PURE__ */
|
|
308
|
-
className: "rounded-lg border border-border bg-
|
|
338
|
+
children: [/* @__PURE__ */ x("div", {
|
|
339
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
|
|
309
340
|
children: [
|
|
310
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ x("div", {
|
|
311
342
|
className: "mb-4 flex items-center justify-between",
|
|
312
|
-
children: [/* @__PURE__ */
|
|
313
|
-
className: "text-lg font-semibold text-
|
|
343
|
+
children: [/* @__PURE__ */ b("h2", {
|
|
344
|
+
className: "text-lg font-semibold text-text-primary",
|
|
314
345
|
children: "Request payout"
|
|
315
|
-
}), /* @__PURE__ */
|
|
346
|
+
}), /* @__PURE__ */ x("button", {
|
|
316
347
|
type: "button",
|
|
317
|
-
onClick: () => void
|
|
318
|
-
className: "inline-flex items-center gap-2 rounded-md border border-border px-3 py-2 text-sm font-medium text-
|
|
319
|
-
children: [/* @__PURE__ */
|
|
348
|
+
onClick: () => void $(),
|
|
349
|
+
className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary",
|
|
350
|
+
children: [/* @__PURE__ */ b(_, { className: "size-4" }), "Refresh"]
|
|
320
351
|
})]
|
|
321
352
|
}),
|
|
322
|
-
P.length === 0 && !R ? /* @__PURE__ */
|
|
323
|
-
icon: /* @__PURE__ */
|
|
353
|
+
P.length === 0 && !R ? /* @__PURE__ */ b(r, {
|
|
354
|
+
icon: /* @__PURE__ */ b(g, { className: "size-8" }),
|
|
324
355
|
title: "No payout accounts yet",
|
|
325
356
|
description: "Add a payout account before requesting a withdrawal."
|
|
326
|
-
}) : /* @__PURE__ */
|
|
357
|
+
}) : /* @__PURE__ */ x("div", {
|
|
327
358
|
className: "space-y-3",
|
|
328
359
|
children: [
|
|
329
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ b("select", {
|
|
330
361
|
value: K,
|
|
331
362
|
onChange: (e) => q(e.target.value),
|
|
332
|
-
className: "w-full rounded-md border border-border bg-
|
|
333
|
-
children: P.map((e) => /* @__PURE__ */
|
|
363
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
|
|
364
|
+
children: P.map((e) => /* @__PURE__ */ x("option", {
|
|
334
365
|
value: e.id,
|
|
335
366
|
children: [
|
|
336
367
|
e.label,
|
|
@@ -341,36 +372,36 @@ var D = () => {
|
|
|
341
372
|
]
|
|
342
373
|
}, e.id))
|
|
343
374
|
}),
|
|
344
|
-
/* @__PURE__ */
|
|
375
|
+
/* @__PURE__ */ b("input", {
|
|
345
376
|
value: W,
|
|
346
377
|
onChange: (e) => G(e.target.value),
|
|
347
378
|
placeholder: "Amount",
|
|
348
|
-
className: "w-full rounded-md border border-border bg-
|
|
379
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
349
380
|
}),
|
|
350
|
-
/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ x("button", {
|
|
351
382
|
type: "button",
|
|
352
|
-
onClick: () => void
|
|
353
|
-
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-
|
|
354
|
-
children: [/* @__PURE__ */
|
|
383
|
+
onClick: () => void fe(),
|
|
384
|
+
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text",
|
|
385
|
+
children: [/* @__PURE__ */ b(v, { className: "size-4" }), "Request payout"]
|
|
355
386
|
})
|
|
356
387
|
]
|
|
357
388
|
}),
|
|
358
|
-
P.length > 0 ? /* @__PURE__ */
|
|
359
|
-
className: "mt-4 space-y-3 rounded-md border border-border bg-
|
|
360
|
-
children: [/* @__PURE__ */
|
|
361
|
-
className: "text-sm font-semibold text-
|
|
389
|
+
P.length > 0 ? /* @__PURE__ */ x("div", {
|
|
390
|
+
className: "mt-4 space-y-3 rounded-md border border-border-subtle bg-bg-surface/60 p-3",
|
|
391
|
+
children: [/* @__PURE__ */ b("h3", {
|
|
392
|
+
className: "text-sm font-semibold text-text-primary",
|
|
362
393
|
children: "Saved payout accounts"
|
|
363
|
-
}), P.map((e) => /* @__PURE__ */
|
|
364
|
-
className: "flex flex-wrap items-center justify-between gap-3 rounded-md border border-border/70 bg-
|
|
365
|
-
children: [/* @__PURE__ */
|
|
366
|
-
className: "font-medium text-
|
|
394
|
+
}), P.map((e) => /* @__PURE__ */ x("div", {
|
|
395
|
+
className: "flex flex-wrap items-center justify-between gap-3 rounded-md border border-border-subtle/70 bg-bg-surface px-3 py-2 text-sm",
|
|
396
|
+
children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("p", {
|
|
397
|
+
className: "font-medium text-text-primary",
|
|
367
398
|
children: [
|
|
368
399
|
e.label,
|
|
369
400
|
" ",
|
|
370
401
|
e.isDefault ? "• Default" : ""
|
|
371
402
|
]
|
|
372
|
-
}), /* @__PURE__ */
|
|
373
|
-
className: "text-
|
|
403
|
+
}), /* @__PURE__ */ x("p", {
|
|
404
|
+
className: "text-text-secondary",
|
|
374
405
|
children: [
|
|
375
406
|
e.providerPreference,
|
|
376
407
|
" · ",
|
|
@@ -378,25 +409,25 @@ var D = () => {
|
|
|
378
409
|
" · ",
|
|
379
410
|
e.status
|
|
380
411
|
]
|
|
381
|
-
})] }), /* @__PURE__ */
|
|
412
|
+
})] }), /* @__PURE__ */ x("div", {
|
|
382
413
|
className: "flex flex-wrap gap-2",
|
|
383
414
|
children: [
|
|
384
|
-
/* @__PURE__ */
|
|
415
|
+
/* @__PURE__ */ b("button", {
|
|
385
416
|
type: "button",
|
|
386
|
-
onClick: () =>
|
|
387
|
-
className: "rounded-md border border-border px-3 py-1.5 text-xs font-medium text-
|
|
417
|
+
onClick: () => de(e),
|
|
418
|
+
className: "rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary",
|
|
388
419
|
children: "Edit"
|
|
389
420
|
}),
|
|
390
|
-
e.isDefault ? null : /* @__PURE__ */
|
|
421
|
+
e.isDefault ? null : /* @__PURE__ */ b("button", {
|
|
391
422
|
type: "button",
|
|
392
|
-
onClick: () => void
|
|
393
|
-
className: "rounded-md border border-border px-3 py-1.5 text-xs font-medium text-
|
|
423
|
+
onClick: () => void le(e.id),
|
|
424
|
+
className: "rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary",
|
|
394
425
|
children: "Make default"
|
|
395
426
|
}),
|
|
396
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ b("button", {
|
|
397
428
|
type: "button",
|
|
398
|
-
onClick: () =>
|
|
399
|
-
className: "rounded-md border border-border px-3 py-1.5 text-xs font-medium text-
|
|
429
|
+
onClick: () => Z(e.id),
|
|
430
|
+
className: "rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-status-error-text",
|
|
400
431
|
children: "Archive"
|
|
401
432
|
})
|
|
402
433
|
]
|
|
@@ -404,77 +435,40 @@ var D = () => {
|
|
|
404
435
|
}, e.id))]
|
|
405
436
|
}) : null
|
|
406
437
|
]
|
|
407
|
-
}), /* @__PURE__ */
|
|
408
|
-
className: "rounded-lg border border-border bg-
|
|
409
|
-
children: [/* @__PURE__ */
|
|
410
|
-
className: "mb-4 text-lg font-semibold text-
|
|
438
|
+
}), /* @__PURE__ */ x("div", {
|
|
439
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
|
|
440
|
+
children: [/* @__PURE__ */ b("h2", {
|
|
441
|
+
className: "mb-4 text-lg font-semibold text-text-primary",
|
|
411
442
|
children: "Payout requests"
|
|
412
|
-
}), I.length === 0 && !R ? /* @__PURE__ */
|
|
413
|
-
icon: /* @__PURE__ */
|
|
443
|
+
}), I.length === 0 && !R ? /* @__PURE__ */ b(r, {
|
|
444
|
+
icon: /* @__PURE__ */ b(v, { className: "size-8" }),
|
|
414
445
|
title: "No payout requests yet",
|
|
415
446
|
description: "Your payout requests and processing updates will appear here."
|
|
416
|
-
}) : /* @__PURE__ */
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
children: [/* @__PURE__ */ T("thead", { children: /* @__PURE__ */ E("tr", {
|
|
421
|
-
className: "border-b border-border text-left text-muted-foreground",
|
|
422
|
-
children: [
|
|
423
|
-
/* @__PURE__ */ T("th", {
|
|
424
|
-
className: "px-3 py-2",
|
|
425
|
-
children: "Amount"
|
|
426
|
-
}),
|
|
427
|
-
/* @__PURE__ */ T("th", {
|
|
428
|
-
className: "px-3 py-2",
|
|
429
|
-
children: "Provider"
|
|
430
|
-
}),
|
|
431
|
-
/* @__PURE__ */ T("th", {
|
|
432
|
-
className: "px-3 py-2",
|
|
433
|
-
children: "Status"
|
|
434
|
-
}),
|
|
435
|
-
/* @__PURE__ */ T("th", {
|
|
436
|
-
className: "px-3 py-2",
|
|
437
|
-
children: "Account"
|
|
438
|
-
}),
|
|
439
|
-
/* @__PURE__ */ T("th", {
|
|
440
|
-
className: "px-3 py-2",
|
|
441
|
-
children: "Created"
|
|
442
|
-
})
|
|
443
|
-
]
|
|
444
|
-
}) }), /* @__PURE__ */ T("tbody", { children: I.map((e) => /* @__PURE__ */ E("tr", {
|
|
445
|
-
className: "border-b border-border/70 text-foreground",
|
|
446
|
-
children: [
|
|
447
|
-
/* @__PURE__ */ T("td", {
|
|
448
|
-
className: "px-3 py-2 font-medium",
|
|
449
|
-
children: o(e.requestedAmount, e.currency)
|
|
450
|
-
}),
|
|
451
|
-
/* @__PURE__ */ T("td", {
|
|
452
|
-
className: "px-3 py-2",
|
|
453
|
-
children: e.provider
|
|
454
|
-
}),
|
|
455
|
-
/* @__PURE__ */ T("td", {
|
|
456
|
-
className: "px-3 py-2",
|
|
457
|
-
children: e.status
|
|
458
|
-
}),
|
|
459
|
-
/* @__PURE__ */ T("td", {
|
|
460
|
-
className: "px-3 py-2",
|
|
461
|
-
children: e.payoutAccount?.label || "-"
|
|
462
|
-
}),
|
|
463
|
-
/* @__PURE__ */ T("td", {
|
|
464
|
-
className: "px-3 py-2",
|
|
465
|
-
children: s(e.createdAt)
|
|
466
|
-
})
|
|
467
|
-
]
|
|
468
|
-
}, e.id)) })]
|
|
469
|
-
})
|
|
447
|
+
}) : /* @__PURE__ */ b(D, {
|
|
448
|
+
data: I,
|
|
449
|
+
rowKey: (e) => e.id,
|
|
450
|
+
columns: O
|
|
470
451
|
})]
|
|
471
452
|
})]
|
|
472
453
|
})]
|
|
454
|
+
}),
|
|
455
|
+
/* @__PURE__ */ b(S, {
|
|
456
|
+
open: X !== null,
|
|
457
|
+
onOpenChange: (e) => {
|
|
458
|
+
e || Z(null);
|
|
459
|
+
},
|
|
460
|
+
children: /* @__PURE__ */ x(T, { children: [/* @__PURE__ */ x(se, { children: [/* @__PURE__ */ b(E, { children: "Archive payout account?" }), /* @__PURE__ */ b(ae, { children: "Archive this payout account? You can add a new one at any time." })] }), /* @__PURE__ */ x(oe, { children: [/* @__PURE__ */ b(w, { children: "Cancel" }), /* @__PURE__ */ b(C, {
|
|
461
|
+
onClick: () => {
|
|
462
|
+
let e = X;
|
|
463
|
+
Z(null), e && ue(e);
|
|
464
|
+
},
|
|
465
|
+
children: "Archive"
|
|
466
|
+
})] })] })
|
|
473
467
|
})
|
|
474
468
|
]
|
|
475
469
|
});
|
|
476
470
|
};
|
|
477
471
|
//#endregion
|
|
478
|
-
export {
|
|
472
|
+
export { k as PayoutsPage };
|
|
479
473
|
|
|
480
474
|
//# sourceMappingURL=PayoutsPage.js.map
|