@burdenoff/microfe-billing 2026.1113.2 → 2026.1113.4
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 +187 -164
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -1
- 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/components/PayoutDestinationList.d.ts +15 -0
- package/dist/billing/modules/earnings/components/PayoutDestinationList.js +66 -0
- package/dist/billing/modules/earnings/components/PayoutDestinationList.js.map +1 -0
- package/dist/billing/modules/earnings/components/PayoutErrorNotice.d.ts +7 -0
- package/dist/billing/modules/earnings/components/PayoutErrorNotice.js +19 -0
- package/dist/billing/modules/earnings/components/PayoutErrorNotice.js.map +1 -0
- 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 +123 -110
- 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 +215 -157
- package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
- package/dist/billing/modules/earnings/utils/payoutDestination.d.ts +20 -0
- package/dist/billing/modules/earnings/utils/payoutDestination.js +27 -0
- package/dist/billing/modules/earnings/utils/payoutDestination.js.map +1 -0
- package/dist/billing/modules/earnings/utils/plainPayoutError.d.ts +10 -0
- package/dist/billing/modules/earnings/utils/plainPayoutError.js +50 -0
- package/dist/billing/modules/earnings/utils/plainPayoutError.js.map +1 -0
- 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
|
@@ -9,12 +9,12 @@ import { isServerError as c } from "../../../shared/utils/error.js";
|
|
|
9
9
|
import "../../../shared/components/index.js";
|
|
10
10
|
import "../../../shared/utils/index.js";
|
|
11
11
|
import { approvePayoutRequest as l, fetchAdminPayoutRequests as u, fetchAdminPayoutSummary as d, markPayoutPaid as f, rejectPayoutRequest as ee } from "../api.js";
|
|
12
|
-
import { useCallback as te, useEffect as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
12
|
+
import { useCallback as te, useEffect as p, useMemo as m, useState as h } from "react";
|
|
13
|
+
import { IllustratedEmptyState as ne, PagePurpose as re, ResponsiveDialog as g, ResponsiveDialogContent as _, ResponsiveDialogDescription as v, ResponsiveDialogFooter as y, ResponsiveDialogHeader as b, ResponsiveDialogTitle as x } from "@burdenoff/fe-libs/ui";
|
|
14
|
+
import { AlertTriangle as S, Banknote as C, CheckCircle2 as w, ChevronDown as T, ChevronUp as E, Clock as D, Coins as O, CreditCard as k, ReceiptText as A, RefreshCw as ie, XCircle as j } from "lucide-react";
|
|
15
|
+
import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
16
16
|
// src/billing/modules/earnings/pages/PayoutAdminPage.tsx
|
|
17
|
-
var
|
|
17
|
+
var F = 50, I = [{
|
|
18
18
|
id: "CASH_PAYOUT",
|
|
19
19
|
label: "Cash Payouts",
|
|
20
20
|
description: "Real money leaves the platform — verify bank/UPI details, then mark as paid."
|
|
@@ -22,7 +22,7 @@ var P = 50, F = [{
|
|
|
22
22
|
id: "CREDIT_CONVERSION",
|
|
23
23
|
label: "Revenue Share Credits",
|
|
24
24
|
description: "A developer requesting their revenue share as earned credits. Approving converts the amount straight into credits on their billing account — no bank transfer, nothing further to do."
|
|
25
|
-
}],
|
|
25
|
+
}], L = {
|
|
26
26
|
REQUESTED: "Requested",
|
|
27
27
|
APPROVED: "Approved",
|
|
28
28
|
REJECTED: "Rejected",
|
|
@@ -30,7 +30,7 @@ var P = 50, F = [{
|
|
|
30
30
|
PAID: "Paid",
|
|
31
31
|
FAILED: "Failed",
|
|
32
32
|
CANCELED: "Canceled"
|
|
33
|
-
},
|
|
33
|
+
}, R = {
|
|
34
34
|
REQUESTED: "bg-status-warning-bg-subtle text-status-warning-text",
|
|
35
35
|
APPROVED: "bg-status-info-bg-subtle text-status-info-text",
|
|
36
36
|
REJECTED: "bg-status-error-bg-subtle text-status-error-text",
|
|
@@ -39,24 +39,24 @@ var P = 50, F = [{
|
|
|
39
39
|
FAILED: "bg-status-error-bg-subtle text-status-error-text",
|
|
40
40
|
CANCELED: "bg-bg-sunken text-text-muted"
|
|
41
41
|
};
|
|
42
|
-
function
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
-
className: `inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium ${
|
|
45
|
-
children:
|
|
42
|
+
function z({ status: e }) {
|
|
43
|
+
return /* @__PURE__ */ N("span", {
|
|
44
|
+
className: `inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium ${R[e] ?? "bg-bg-sunken text-text-muted"}`,
|
|
45
|
+
children: L[e] ?? e
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
let [t, n] =
|
|
50
|
-
return /* @__PURE__ */
|
|
48
|
+
function B({ account: e }) {
|
|
49
|
+
let [t, n] = h(!1), r = e.accountDetails;
|
|
50
|
+
return /* @__PURE__ */ P("div", {
|
|
51
51
|
className: "rounded-md border border-border-subtle bg-bg-sunken/40 p-3 text-sm",
|
|
52
|
-
children: [/* @__PURE__ */
|
|
52
|
+
children: [/* @__PURE__ */ P("div", {
|
|
53
53
|
className: "flex items-center justify-between",
|
|
54
|
-
children: [/* @__PURE__ */
|
|
54
|
+
children: [/* @__PURE__ */ P("div", {
|
|
55
55
|
className: "flex items-center gap-2 text-text-primary font-medium",
|
|
56
56
|
children: [
|
|
57
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ N(k, { className: "size-4 text-text-muted" }),
|
|
58
58
|
e.displayName ?? e.label,
|
|
59
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ P("span", {
|
|
60
60
|
className: "text-xs text-text-muted font-normal",
|
|
61
61
|
children: [
|
|
62
62
|
"(",
|
|
@@ -70,81 +70,81 @@ function z({ account: e }) {
|
|
|
70
70
|
]
|
|
71
71
|
})
|
|
72
72
|
]
|
|
73
|
-
}), r && /* @__PURE__ */
|
|
73
|
+
}), r && /* @__PURE__ */ N("button", {
|
|
74
74
|
type: "button",
|
|
75
75
|
onClick: () => n((e) => !e),
|
|
76
76
|
className: "text-text-muted hover:text-text-primary",
|
|
77
|
-
children:
|
|
77
|
+
children: N(t ? E : T, { className: "size-4" })
|
|
78
78
|
})]
|
|
79
|
-
}), t && r && /* @__PURE__ */
|
|
79
|
+
}), t && r && /* @__PURE__ */ P("div", {
|
|
80
80
|
className: "mt-2 grid gap-1 text-xs",
|
|
81
81
|
children: [
|
|
82
|
-
r.accountHolderName && /* @__PURE__ */
|
|
82
|
+
r.accountHolderName && /* @__PURE__ */ P("div", {
|
|
83
83
|
className: "flex gap-2",
|
|
84
|
-
children: [/* @__PURE__ */
|
|
84
|
+
children: [/* @__PURE__ */ N("span", {
|
|
85
85
|
className: "text-text-muted w-32 shrink-0",
|
|
86
86
|
children: "Account holder"
|
|
87
|
-
}), /* @__PURE__ */
|
|
87
|
+
}), /* @__PURE__ */ N("span", {
|
|
88
88
|
className: "text-text-primary",
|
|
89
89
|
children: r.accountHolderName
|
|
90
90
|
})]
|
|
91
91
|
}),
|
|
92
|
-
r.bankName && /* @__PURE__ */
|
|
92
|
+
r.bankName && /* @__PURE__ */ P("div", {
|
|
93
93
|
className: "flex gap-2",
|
|
94
|
-
children: [/* @__PURE__ */
|
|
94
|
+
children: [/* @__PURE__ */ N("span", {
|
|
95
95
|
className: "text-text-muted w-32 shrink-0",
|
|
96
96
|
children: "Bank"
|
|
97
|
-
}), /* @__PURE__ */
|
|
97
|
+
}), /* @__PURE__ */ N("span", {
|
|
98
98
|
className: "text-text-primary",
|
|
99
99
|
children: r.bankName
|
|
100
100
|
})]
|
|
101
101
|
}),
|
|
102
|
-
e.accountLast4 && /* @__PURE__ */
|
|
102
|
+
e.accountLast4 && /* @__PURE__ */ P("div", {
|
|
103
103
|
className: "flex gap-2",
|
|
104
|
-
children: [/* @__PURE__ */
|
|
104
|
+
children: [/* @__PURE__ */ N("span", {
|
|
105
105
|
className: "text-text-muted w-32 shrink-0",
|
|
106
106
|
children: "Account (last 4)"
|
|
107
|
-
}), /* @__PURE__ */
|
|
107
|
+
}), /* @__PURE__ */ P("span", {
|
|
108
108
|
className: "text-text-primary font-mono",
|
|
109
109
|
children: ["••••", e.accountLast4]
|
|
110
110
|
})]
|
|
111
111
|
}),
|
|
112
|
-
r.ifsc && /* @__PURE__ */
|
|
112
|
+
r.ifsc && /* @__PURE__ */ P("div", {
|
|
113
113
|
className: "flex gap-2",
|
|
114
|
-
children: [/* @__PURE__ */
|
|
114
|
+
children: [/* @__PURE__ */ N("span", {
|
|
115
115
|
className: "text-text-muted w-32 shrink-0",
|
|
116
116
|
children: "IFSC"
|
|
117
|
-
}), /* @__PURE__ */
|
|
117
|
+
}), /* @__PURE__ */ N("span", {
|
|
118
118
|
className: "text-text-primary font-mono",
|
|
119
119
|
children: r.ifsc
|
|
120
120
|
})]
|
|
121
121
|
}),
|
|
122
|
-
r.routingNumberLast4 && /* @__PURE__ */
|
|
122
|
+
r.routingNumberLast4 && /* @__PURE__ */ P("div", {
|
|
123
123
|
className: "flex gap-2",
|
|
124
|
-
children: [/* @__PURE__ */
|
|
124
|
+
children: [/* @__PURE__ */ N("span", {
|
|
125
125
|
className: "text-text-muted w-32 shrink-0",
|
|
126
126
|
children: "Routing (last 4)"
|
|
127
|
-
}), /* @__PURE__ */
|
|
127
|
+
}), /* @__PURE__ */ P("span", {
|
|
128
128
|
className: "text-text-primary font-mono",
|
|
129
129
|
children: ["••••", r.routingNumberLast4]
|
|
130
130
|
})]
|
|
131
131
|
}),
|
|
132
|
-
r.upiIdMasked && /* @__PURE__ */
|
|
132
|
+
r.upiIdMasked && /* @__PURE__ */ P("div", {
|
|
133
133
|
className: "flex gap-2",
|
|
134
|
-
children: [/* @__PURE__ */
|
|
134
|
+
children: [/* @__PURE__ */ N("span", {
|
|
135
135
|
className: "text-text-muted w-32 shrink-0",
|
|
136
136
|
children: "UPI ID"
|
|
137
|
-
}), /* @__PURE__ */
|
|
137
|
+
}), /* @__PURE__ */ N("span", {
|
|
138
138
|
className: "text-text-primary font-mono",
|
|
139
139
|
children: r.upiIdMasked
|
|
140
140
|
})]
|
|
141
141
|
}),
|
|
142
|
-
r.swift && /* @__PURE__ */
|
|
142
|
+
r.swift && /* @__PURE__ */ P("div", {
|
|
143
143
|
className: "flex gap-2",
|
|
144
|
-
children: [/* @__PURE__ */
|
|
144
|
+
children: [/* @__PURE__ */ N("span", {
|
|
145
145
|
className: "text-text-muted w-32 shrink-0",
|
|
146
146
|
children: "SWIFT"
|
|
147
|
-
}), /* @__PURE__ */
|
|
147
|
+
}), /* @__PURE__ */ N("span", {
|
|
148
148
|
className: "text-text-primary font-mono",
|
|
149
149
|
children: r.swift
|
|
150
150
|
})]
|
|
@@ -153,114 +153,114 @@ function z({ account: e }) {
|
|
|
153
153
|
})]
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function V({ request: e, onApprove: t, onReject: n, onMarkPaid: r }) {
|
|
157
157
|
let i = e.status === "REQUESTED" || e.status === "REJECTED", a = e.status === "REQUESTED" || e.status === "APPROVED", c = e.requestKind === "CASH_PAYOUT" && (e.status === "APPROVED" || e.status === "PROCESSING");
|
|
158
|
-
return /* @__PURE__ */
|
|
158
|
+
return /* @__PURE__ */ P("div", {
|
|
159
159
|
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)]",
|
|
160
160
|
children: [
|
|
161
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ P("div", {
|
|
162
162
|
className: "flex flex-wrap items-start justify-between gap-3",
|
|
163
|
-
children: [/* @__PURE__ */
|
|
163
|
+
children: [/* @__PURE__ */ P("div", {
|
|
164
164
|
className: "space-y-1",
|
|
165
|
-
children: [/* @__PURE__ */
|
|
165
|
+
children: [/* @__PURE__ */ P("div", {
|
|
166
166
|
className: "flex items-center gap-2",
|
|
167
|
-
children: [/* @__PURE__ */
|
|
167
|
+
children: [/* @__PURE__ */ N("span", {
|
|
168
168
|
className: "text-xl font-semibold text-text-primary",
|
|
169
169
|
children: o(e.requestedAmount, e.currency)
|
|
170
|
-
}), /* @__PURE__ */
|
|
171
|
-
}), /* @__PURE__ */
|
|
170
|
+
}), /* @__PURE__ */ N(z, { status: e.status })]
|
|
171
|
+
}), /* @__PURE__ */ P("div", {
|
|
172
172
|
className: "text-xs text-text-muted space-x-2",
|
|
173
173
|
children: [
|
|
174
|
-
/* @__PURE__ */
|
|
175
|
-
e.requesterUserId && /* @__PURE__ */
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
-
/* @__PURE__ */
|
|
174
|
+
/* @__PURE__ */ P("span", { children: ["Requested ", s(e.createdAt)] }),
|
|
175
|
+
e.requesterUserId && /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("span", { children: "·" }), /* @__PURE__ */ P("span", { children: ["by ", e.requesterUserId] })] }),
|
|
176
|
+
/* @__PURE__ */ N("span", { children: "·" }),
|
|
177
|
+
/* @__PURE__ */ P("span", {
|
|
178
178
|
className: "font-mono text-xs",
|
|
179
179
|
children: [e.id.slice(0, 8), "…"]
|
|
180
180
|
})
|
|
181
181
|
]
|
|
182
182
|
})]
|
|
183
|
-
}), /* @__PURE__ */
|
|
183
|
+
}), /* @__PURE__ */ P("div", {
|
|
184
184
|
className: "flex flex-wrap gap-2",
|
|
185
185
|
children: [
|
|
186
|
-
i && /* @__PURE__ */
|
|
186
|
+
i && /* @__PURE__ */ P("button", {
|
|
187
187
|
type: "button",
|
|
188
188
|
onClick: () => t(e),
|
|
189
189
|
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",
|
|
190
|
-
children: [/* @__PURE__ */
|
|
190
|
+
children: [/* @__PURE__ */ N(w, { className: "size-3.5" }), "Approve"]
|
|
191
191
|
}),
|
|
192
|
-
c && /* @__PURE__ */
|
|
192
|
+
c && /* @__PURE__ */ P("button", {
|
|
193
193
|
type: "button",
|
|
194
194
|
onClick: () => r(e),
|
|
195
195
|
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",
|
|
196
|
-
children: [/* @__PURE__ */
|
|
196
|
+
children: [/* @__PURE__ */ N(C, { className: "size-3.5" }), "Mark as Paid"]
|
|
197
197
|
}),
|
|
198
|
-
a && /* @__PURE__ */
|
|
198
|
+
a && /* @__PURE__ */ P("button", {
|
|
199
199
|
type: "button",
|
|
200
200
|
onClick: () => n(e),
|
|
201
201
|
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",
|
|
202
|
-
children: [/* @__PURE__ */
|
|
202
|
+
children: [/* @__PURE__ */ N(j, { className: "size-3.5" }), "Reject"]
|
|
203
203
|
})
|
|
204
204
|
]
|
|
205
205
|
})]
|
|
206
206
|
}),
|
|
207
|
-
e.requestKind === "CREDIT_CONVERSION" ? /* @__PURE__ */
|
|
207
|
+
e.requestKind === "CREDIT_CONVERSION" ? /* @__PURE__ */ P("div", {
|
|
208
208
|
className: "flex items-center gap-2 rounded-md border border-border-subtle bg-bg-sunken/40 p-3 text-sm text-text-muted",
|
|
209
|
-
children: [/* @__PURE__ */
|
|
210
|
-
}) : e.payoutAccount && /* @__PURE__ */
|
|
211
|
-
e.userNotes && /* @__PURE__ */
|
|
209
|
+
children: [/* @__PURE__ */ N(O, { className: "size-4 shrink-0" }), "Approving converts this straight into earned credits — no bank transfer needed."]
|
|
210
|
+
}) : e.payoutAccount && /* @__PURE__ */ N(B, { account: e.payoutAccount }),
|
|
211
|
+
e.userNotes && /* @__PURE__ */ P("div", {
|
|
212
212
|
className: "rounded-md bg-bg-sunken/40 border border-border-subtle px-3 py-2 text-sm",
|
|
213
|
-
children: [/* @__PURE__ */
|
|
213
|
+
children: [/* @__PURE__ */ N("span", {
|
|
214
214
|
className: "text-xs font-medium text-text-muted uppercase tracking-wide",
|
|
215
215
|
children: "User note"
|
|
216
|
-
}), /* @__PURE__ */
|
|
216
|
+
}), /* @__PURE__ */ N("p", {
|
|
217
217
|
className: "mt-1 text-text-primary",
|
|
218
218
|
children: e.userNotes
|
|
219
219
|
})]
|
|
220
220
|
}),
|
|
221
|
-
(e.internalNotes ?? e.failureReason ?? e.externalReference) && /* @__PURE__ */
|
|
221
|
+
(e.internalNotes ?? e.failureReason ?? e.externalReference) && /* @__PURE__ */ P("div", {
|
|
222
222
|
className: "grid gap-1 text-xs text-text-muted",
|
|
223
223
|
children: [
|
|
224
|
-
e.externalReference && /* @__PURE__ */
|
|
224
|
+
e.externalReference && /* @__PURE__ */ P("div", {
|
|
225
225
|
className: "flex gap-2",
|
|
226
|
-
children: [/* @__PURE__ */
|
|
226
|
+
children: [/* @__PURE__ */ N(A, { className: "size-3.5 mt-px shrink-0" }), /* @__PURE__ */ P("span", { children: [
|
|
227
227
|
"Ref:",
|
|
228
228
|
" ",
|
|
229
|
-
/* @__PURE__ */
|
|
229
|
+
/* @__PURE__ */ N("span", {
|
|
230
230
|
className: "font-mono text-text-primary",
|
|
231
231
|
children: e.externalReference
|
|
232
232
|
})
|
|
233
233
|
] })]
|
|
234
234
|
}),
|
|
235
|
-
e.internalNotes && /* @__PURE__ */
|
|
235
|
+
e.internalNotes && /* @__PURE__ */ P("div", {
|
|
236
236
|
className: "flex gap-2",
|
|
237
|
-
children: [/* @__PURE__ */
|
|
237
|
+
children: [/* @__PURE__ */ N("span", {
|
|
238
238
|
className: "shrink-0",
|
|
239
239
|
children: "Internal note:"
|
|
240
|
-
}), /* @__PURE__ */
|
|
240
|
+
}), /* @__PURE__ */ N("span", {
|
|
241
241
|
className: "text-text-primary",
|
|
242
242
|
children: e.internalNotes
|
|
243
243
|
})]
|
|
244
244
|
}),
|
|
245
|
-
e.failureReason && /* @__PURE__ */
|
|
245
|
+
e.failureReason && /* @__PURE__ */ P("div", {
|
|
246
246
|
className: "flex gap-2 text-status-error-text",
|
|
247
|
-
children: [/* @__PURE__ */
|
|
247
|
+
children: [/* @__PURE__ */ N(S, { className: "size-3.5 mt-px shrink-0" }), /* @__PURE__ */ N("span", { children: e.failureReason })]
|
|
248
248
|
})
|
|
249
249
|
]
|
|
250
250
|
}),
|
|
251
|
-
(e.paidAt ?? e.processedAt) && /* @__PURE__ */
|
|
251
|
+
(e.paidAt ?? e.processedAt) && /* @__PURE__ */ P("div", {
|
|
252
252
|
className: "flex flex-wrap gap-4 text-xs text-text-muted",
|
|
253
|
-
children: [e.processedAt && /* @__PURE__ */
|
|
253
|
+
children: [e.processedAt && /* @__PURE__ */ P("span", {
|
|
254
254
|
className: "flex items-center gap-1",
|
|
255
255
|
children: [
|
|
256
|
-
/* @__PURE__ */
|
|
256
|
+
/* @__PURE__ */ N(D, { className: "size-3" }),
|
|
257
257
|
"Processed ",
|
|
258
258
|
s(e.processedAt)
|
|
259
259
|
]
|
|
260
|
-
}), e.paidAt && /* @__PURE__ */
|
|
260
|
+
}), e.paidAt && /* @__PURE__ */ P("span", {
|
|
261
261
|
className: "flex items-center gap-1",
|
|
262
262
|
children: [
|
|
263
|
-
/* @__PURE__ */
|
|
263
|
+
/* @__PURE__ */ N(w, { className: "size-3" }),
|
|
264
264
|
"Paid ",
|
|
265
265
|
s(e.paidAt)
|
|
266
266
|
]
|
|
@@ -269,49 +269,49 @@ function B({ request: e, onApprove: t, onReject: n, onMarkPaid: r }) {
|
|
|
269
269
|
]
|
|
270
270
|
});
|
|
271
271
|
}
|
|
272
|
-
function
|
|
273
|
-
return /* @__PURE__ */
|
|
272
|
+
function ae({ summary: e }) {
|
|
273
|
+
return /* @__PURE__ */ P("div", {
|
|
274
274
|
className: "grid gap-3 sm:grid-cols-3",
|
|
275
275
|
children: [
|
|
276
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ P("div", {
|
|
277
277
|
className: "rounded-card border border-border-seam bg-bg-surface p-4 shadow-[var(--shadow-elevation-1)]",
|
|
278
278
|
children: [
|
|
279
|
-
/* @__PURE__ */
|
|
279
|
+
/* @__PURE__ */ N("div", {
|
|
280
280
|
className: "text-xs text-text-muted uppercase tracking-wide",
|
|
281
281
|
children: "Pending payout"
|
|
282
282
|
}),
|
|
283
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ N("div", {
|
|
284
284
|
className: "mt-1 text-lg font-semibold text-text-primary",
|
|
285
285
|
children: o(e.totalRequestedAmount, "USD")
|
|
286
286
|
}),
|
|
287
|
-
/* @__PURE__ */
|
|
287
|
+
/* @__PURE__ */ P("div", {
|
|
288
288
|
className: "text-xs text-text-muted mt-0.5",
|
|
289
289
|
children: [e.pendingCount, " requests"]
|
|
290
290
|
})
|
|
291
291
|
]
|
|
292
292
|
}),
|
|
293
|
-
/* @__PURE__ */
|
|
293
|
+
/* @__PURE__ */ P("div", {
|
|
294
294
|
className: "rounded-card border border-border-seam bg-bg-surface p-4 shadow-[var(--shadow-elevation-1)]",
|
|
295
|
-
children: [/* @__PURE__ */
|
|
295
|
+
children: [/* @__PURE__ */ N("div", {
|
|
296
296
|
className: "text-xs text-text-muted uppercase tracking-wide",
|
|
297
297
|
children: "Processing"
|
|
298
|
-
}), /* @__PURE__ */
|
|
298
|
+
}), /* @__PURE__ */ N("div", {
|
|
299
299
|
className: "mt-1 text-lg font-semibold text-text-primary",
|
|
300
300
|
children: o(e.totalProcessingAmount, "USD")
|
|
301
301
|
})]
|
|
302
302
|
}),
|
|
303
|
-
/* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ P("div", {
|
|
304
304
|
className: "rounded-card border border-border-seam bg-bg-surface p-4 shadow-[var(--shadow-elevation-1)]",
|
|
305
305
|
children: [
|
|
306
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ N("div", {
|
|
307
307
|
className: "text-xs text-text-muted uppercase tracking-wide",
|
|
308
308
|
children: "Total paid"
|
|
309
309
|
}),
|
|
310
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ N("div", {
|
|
311
311
|
className: "mt-1 text-lg font-semibold text-text-primary",
|
|
312
312
|
children: o(e.totalPaidAmount, "USD")
|
|
313
313
|
}),
|
|
314
|
-
e.failedCount > 0 && /* @__PURE__ */
|
|
314
|
+
e.failedCount > 0 && /* @__PURE__ */ P("div", {
|
|
315
315
|
className: "text-xs text-status-error-text mt-0.5",
|
|
316
316
|
children: [e.failedCount, " failed"]
|
|
317
317
|
})
|
|
@@ -321,52 +321,52 @@ function V({ summary: e }) {
|
|
|
321
321
|
});
|
|
322
322
|
}
|
|
323
323
|
function oe({ dialog: e, onClose: t, onConfirm: n }) {
|
|
324
|
-
let [r, i] =
|
|
324
|
+
let [r, i] = h(""), [a, s] = h(""), [c, l] = h(""), [u, d] = h(!1), f = async () => {
|
|
325
325
|
(e.type !== "reject" || a.trim()) && (d(!0), await n({
|
|
326
326
|
notes: r.trim() || void 0,
|
|
327
327
|
reason: a.trim() || void 0,
|
|
328
328
|
externalReference: c.trim() || void 0
|
|
329
329
|
}), d(!1));
|
|
330
330
|
};
|
|
331
|
-
return /* @__PURE__ */
|
|
331
|
+
return /* @__PURE__ */ N(g, {
|
|
332
332
|
open: !0,
|
|
333
333
|
onOpenChange: (e) => {
|
|
334
334
|
!e && !u && t();
|
|
335
335
|
},
|
|
336
|
-
children: /* @__PURE__ */
|
|
336
|
+
children: /* @__PURE__ */ P(_, {
|
|
337
337
|
className: "sm:max-w-md",
|
|
338
338
|
children: [
|
|
339
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ P(b, { children: [/* @__PURE__ */ N(x, { children: {
|
|
340
340
|
approve: "Approve withdrawal request",
|
|
341
341
|
reject: "Reject withdrawal request",
|
|
342
342
|
mark_paid: "Mark as paid"
|
|
343
|
-
}[e.type] }), /* @__PURE__ */
|
|
343
|
+
}[e.type] }), /* @__PURE__ */ P(v, { children: [
|
|
344
344
|
o(e.amount, e.currency),
|
|
345
345
|
" · ",
|
|
346
346
|
e.accountLabel
|
|
347
347
|
] })] }),
|
|
348
|
-
e.type === "mark_paid" && /* @__PURE__ */
|
|
348
|
+
e.type === "mark_paid" && /* @__PURE__ */ P("div", {
|
|
349
349
|
className: "space-y-3",
|
|
350
|
-
children: [/* @__PURE__ */
|
|
351
|
-
/* @__PURE__ */
|
|
350
|
+
children: [/* @__PURE__ */ P("div", { children: [
|
|
351
|
+
/* @__PURE__ */ N("label", {
|
|
352
352
|
className: "text-xs font-medium text-text-primary block mb-1",
|
|
353
353
|
children: "Transaction reference / UTR number"
|
|
354
354
|
}),
|
|
355
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ N("input", {
|
|
356
356
|
type: "text",
|
|
357
357
|
value: c,
|
|
358
358
|
onChange: (e) => l(e.target.value),
|
|
359
359
|
placeholder: "e.g. UTR123456789012, TXN_abc123",
|
|
360
360
|
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)]"
|
|
361
361
|
}),
|
|
362
|
-
/* @__PURE__ */
|
|
362
|
+
/* @__PURE__ */ N("p", {
|
|
363
363
|
className: "text-xs text-text-muted mt-1",
|
|
364
364
|
children: "Enter the bank reference number so the user can verify the transfer."
|
|
365
365
|
})
|
|
366
|
-
] }), /* @__PURE__ */
|
|
366
|
+
] }), /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
|
|
367
367
|
className: "text-xs font-medium text-text-primary block mb-1",
|
|
368
368
|
children: "Internal notes (optional)"
|
|
369
|
-
}), /* @__PURE__ */
|
|
369
|
+
}), /* @__PURE__ */ N("textarea", {
|
|
370
370
|
value: r,
|
|
371
371
|
onChange: (e) => i(e.target.value),
|
|
372
372
|
rows: 2,
|
|
@@ -374,36 +374,36 @@ function oe({ dialog: e, onClose: t, onConfirm: n }) {
|
|
|
374
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"
|
|
375
375
|
})] })]
|
|
376
376
|
}),
|
|
377
|
-
e.type === "approve" && /* @__PURE__ */
|
|
377
|
+
e.type === "approve" && /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
|
|
378
378
|
className: "text-xs font-medium text-text-primary block mb-1",
|
|
379
379
|
children: "Internal notes (optional)"
|
|
380
|
-
}), /* @__PURE__ */
|
|
380
|
+
}), /* @__PURE__ */ N("textarea", {
|
|
381
381
|
value: r,
|
|
382
382
|
onChange: (e) => i(e.target.value),
|
|
383
383
|
rows: 3,
|
|
384
384
|
placeholder: "e.g. Verified bank details, approved for transfer…",
|
|
385
385
|
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"
|
|
386
386
|
})] }),
|
|
387
|
-
e.type === "reject" && /* @__PURE__ */
|
|
387
|
+
e.type === "reject" && /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ P("label", {
|
|
388
388
|
className: "text-xs font-medium text-text-primary block mb-1",
|
|
389
|
-
children: ["Reason for rejection ", /* @__PURE__ */
|
|
389
|
+
children: ["Reason for rejection ", /* @__PURE__ */ N("span", {
|
|
390
390
|
className: "text-status-error-text",
|
|
391
391
|
children: "*"
|
|
392
392
|
})]
|
|
393
|
-
}), /* @__PURE__ */
|
|
393
|
+
}), /* @__PURE__ */ N("textarea", {
|
|
394
394
|
value: a,
|
|
395
395
|
onChange: (e) => s(e.target.value),
|
|
396
396
|
rows: 3,
|
|
397
397
|
placeholder: "e.g. Invalid bank details provided, please re-submit with correct IFSC…",
|
|
398
398
|
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"
|
|
399
399
|
})] }),
|
|
400
|
-
/* @__PURE__ */
|
|
400
|
+
/* @__PURE__ */ P(y, { children: [/* @__PURE__ */ N("button", {
|
|
401
401
|
type: "button",
|
|
402
402
|
onClick: t,
|
|
403
403
|
disabled: u,
|
|
404
404
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary disabled:opacity-50",
|
|
405
405
|
children: "Cancel"
|
|
406
|
-
}), /* @__PURE__ */
|
|
406
|
+
}), /* @__PURE__ */ N("button", {
|
|
407
407
|
type: "button",
|
|
408
408
|
onClick: () => void f(),
|
|
409
409
|
disabled: u || e.type === "reject" && !a.trim(),
|
|
@@ -415,58 +415,58 @@ function oe({ dialog: e, onClose: t, onConfirm: n }) {
|
|
|
415
415
|
});
|
|
416
416
|
}
|
|
417
417
|
var H = () => {
|
|
418
|
-
let o = e(), { emit: s } = i(), { apiGatewayUrl:
|
|
419
|
-
apiGatewayUrl:
|
|
420
|
-
authToken:
|
|
421
|
-
orgId:
|
|
418
|
+
let o = e(), { emit: s } = i(), { apiGatewayUrl: g, authToken: _, orgId: v } = a(), [y, b] = h(null), [x, S] = h([]), [w, T] = h(0), [E, D] = h(!1), [k, A] = h(!0), [j, M] = h(!1), [L, R] = h(null), [z, B] = h("CASH_PAYOUT"), [H, U] = h("pending"), [W, G] = h(null), K = m(() => ({
|
|
419
|
+
apiGatewayUrl: g,
|
|
420
|
+
authToken: _,
|
|
421
|
+
orgId: v
|
|
422
422
|
}), [
|
|
423
|
-
m,
|
|
424
423
|
g,
|
|
425
|
-
_
|
|
424
|
+
_,
|
|
425
|
+
v
|
|
426
426
|
]), q = te(async () => {
|
|
427
|
-
|
|
427
|
+
A(!0), R(null);
|
|
428
428
|
try {
|
|
429
429
|
let [e, t] = await Promise.all([d(K), u(K, {
|
|
430
|
-
limit:
|
|
430
|
+
limit: F,
|
|
431
431
|
offset: 0
|
|
432
432
|
})]);
|
|
433
|
-
|
|
433
|
+
b(e), S(t.items), T(t.totalCount), D(t.hasMore);
|
|
434
434
|
} catch (e) {
|
|
435
|
-
|
|
435
|
+
R(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load payout queue"));
|
|
436
436
|
} finally {
|
|
437
|
-
|
|
437
|
+
A(!1);
|
|
438
438
|
}
|
|
439
439
|
}, [K]), se = async () => {
|
|
440
|
-
if (!
|
|
441
|
-
|
|
440
|
+
if (!j && E) {
|
|
441
|
+
M(!0), R(null);
|
|
442
442
|
try {
|
|
443
443
|
let e = await u(K, {
|
|
444
|
-
limit:
|
|
444
|
+
limit: F,
|
|
445
445
|
offset: x.length
|
|
446
446
|
});
|
|
447
|
-
S((t) => [...t, ...e.items]),
|
|
447
|
+
S((t) => [...t, ...e.items]), T(e.totalCount), D(e.hasMore);
|
|
448
448
|
} catch (e) {
|
|
449
|
-
|
|
449
|
+
R(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load more payout requests"));
|
|
450
450
|
} finally {
|
|
451
|
-
|
|
451
|
+
M(!1);
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
454
|
};
|
|
455
|
-
if (
|
|
455
|
+
if (p(() => {
|
|
456
456
|
q();
|
|
457
|
-
}, [q]), !o.isBillingAdmin) return /* @__PURE__ */
|
|
458
|
-
if (
|
|
457
|
+
}, [q]), !o.isBillingAdmin) return /* @__PURE__ */ N(t, { message: "You don't have permission to manage payouts." });
|
|
458
|
+
if (L && c(L)) return /* @__PURE__ */ N(r, {
|
|
459
459
|
title: "Payout queue unavailable",
|
|
460
|
-
message:
|
|
460
|
+
message: L.message,
|
|
461
461
|
onRetry: () => void q(),
|
|
462
462
|
showRetry: !0
|
|
463
463
|
});
|
|
464
|
-
let J = x.filter((e) => e.requestKind ===
|
|
464
|
+
let J = x.filter((e) => e.requestKind === z), Y = J.filter((e) => e.status === "REQUESTED"), X = J.filter((e) => e.status === "APPROVED" || e.status === "PROCESSING"), Z = J.filter((e) => [
|
|
465
465
|
"PAID",
|
|
466
466
|
"REJECTED",
|
|
467
467
|
"FAILED",
|
|
468
468
|
"CANCELED"
|
|
469
|
-
].includes(e.status)), ce =
|
|
469
|
+
].includes(e.status)), ce = I.map((e) => ({
|
|
470
470
|
...e,
|
|
471
471
|
count: x.filter((t) => t.requestKind === e.id).length
|
|
472
472
|
})), le = [
|
|
@@ -494,73 +494,73 @@ var H = () => {
|
|
|
494
494
|
accountLabel: t.payoutAccount?.displayName ?? t.payoutAccount?.label ?? "Unknown account"
|
|
495
495
|
});
|
|
496
496
|
};
|
|
497
|
-
return /* @__PURE__ */
|
|
497
|
+
return /* @__PURE__ */ P("div", {
|
|
498
498
|
className: "space-y-6 p-6",
|
|
499
499
|
children: [
|
|
500
|
-
/* @__PURE__ */
|
|
500
|
+
/* @__PURE__ */ N(n, {
|
|
501
501
|
title: "Payout queue",
|
|
502
502
|
description: "Review withdrawal requests, verify payout details, and mark them as paid once funds are transferred.",
|
|
503
|
-
actions: /* @__PURE__ */
|
|
503
|
+
actions: /* @__PURE__ */ P("button", {
|
|
504
504
|
type: "button",
|
|
505
505
|
onClick: () => void q(),
|
|
506
506
|
className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary",
|
|
507
|
-
children: [/* @__PURE__ */
|
|
507
|
+
children: [/* @__PURE__ */ N(ie, { className: `size-4 ${k ? "animate-spin" : ""}` }), "Refresh"]
|
|
508
508
|
})
|
|
509
509
|
}),
|
|
510
|
-
/* @__PURE__ */
|
|
510
|
+
/* @__PURE__ */ P(re, { children: [
|
|
511
511
|
"This queue holds two different kinds of request, split into the tabs below so a revenue-share credit conversion never gets mistaken for a real bank transfer.",
|
|
512
512
|
" ",
|
|
513
|
-
/* @__PURE__ */
|
|
513
|
+
/* @__PURE__ */ N("strong", { children: "Cash Payouts" }),
|
|
514
514
|
" are real money leaving the platform — developers withdrawing purchased or earned credits from billing to their own bank/UPI account.",
|
|
515
515
|
" ",
|
|
516
|
-
/* @__PURE__ */
|
|
516
|
+
/* @__PURE__ */ N("strong", { children: "Revenue Share Credits" }),
|
|
517
517
|
" are a developer requesting their store revenue share — approving one just converts the amount into earned credits on their billing account, no transfer involved."
|
|
518
518
|
] }),
|
|
519
|
-
|
|
520
|
-
!
|
|
519
|
+
y && !k && /* @__PURE__ */ N(ae, { summary: y }),
|
|
520
|
+
!k && w > 0 && /* @__PURE__ */ P("div", {
|
|
521
521
|
className: "text-sm text-text-muted",
|
|
522
522
|
children: [
|
|
523
523
|
"Showing ",
|
|
524
524
|
x.length,
|
|
525
525
|
" of ",
|
|
526
|
-
|
|
526
|
+
w,
|
|
527
527
|
" payout requests."
|
|
528
528
|
]
|
|
529
529
|
}),
|
|
530
|
-
|
|
530
|
+
k && /* @__PURE__ */ N("div", {
|
|
531
531
|
className: "grid gap-3 sm:grid-cols-3",
|
|
532
532
|
children: [
|
|
533
533
|
1,
|
|
534
534
|
2,
|
|
535
535
|
3
|
|
536
|
-
].map((e) => /* @__PURE__ */
|
|
536
|
+
].map((e) => /* @__PURE__ */ N("div", { className: "h-20 animate-pulse rounded-lg border border-border-subtle bg-bg-surface" }, e))
|
|
537
537
|
}),
|
|
538
|
-
|
|
538
|
+
L && !c(L) && /* @__PURE__ */ N("div", {
|
|
539
539
|
className: "rounded-lg border border-status-error-border bg-status-error-bg-subtle p-4 text-sm text-status-error-text",
|
|
540
|
-
children:
|
|
540
|
+
children: L.message
|
|
541
541
|
}),
|
|
542
|
-
/* @__PURE__ */
|
|
542
|
+
/* @__PURE__ */ N("div", {
|
|
543
543
|
className: "grid gap-3 sm:grid-cols-2",
|
|
544
544
|
children: ce.map((e) => {
|
|
545
|
-
let t = e.id === "CASH_PAYOUT" ?
|
|
546
|
-
return /* @__PURE__ */
|
|
545
|
+
let t = e.id === "CASH_PAYOUT" ? C : O, n = z === e.id;
|
|
546
|
+
return /* @__PURE__ */ P("button", {
|
|
547
547
|
type: "button",
|
|
548
548
|
onClick: () => {
|
|
549
|
-
|
|
549
|
+
B(e.id), U("pending");
|
|
550
550
|
},
|
|
551
551
|
className: `flex items-start gap-3 rounded-card border p-4 text-left transition-colors ${n ? "border-action-primary-bg bg-[var(--color-accent-soft)]" : "border-border-subtle bg-bg-surface hover:border-border-strong"}`,
|
|
552
|
-
children: [/* @__PURE__ */
|
|
552
|
+
children: [/* @__PURE__ */ N(t, { className: `size-5 mt-0.5 shrink-0 ${n ? "text-text-link" : "text-text-muted"}` }), /* @__PURE__ */ P("div", {
|
|
553
553
|
className: "min-w-0",
|
|
554
|
-
children: [/* @__PURE__ */
|
|
554
|
+
children: [/* @__PURE__ */ P("div", {
|
|
555
555
|
className: "flex items-center gap-2",
|
|
556
|
-
children: [/* @__PURE__ */
|
|
556
|
+
children: [/* @__PURE__ */ N("span", {
|
|
557
557
|
className: `text-sm font-semibold ${n ? "text-text-link" : "text-text-primary"}`,
|
|
558
558
|
children: e.label
|
|
559
|
-
}), e.count > 0 && /* @__PURE__ */
|
|
559
|
+
}), e.count > 0 && /* @__PURE__ */ N("span", {
|
|
560
560
|
className: `rounded-full px-1.5 py-0.5 text-xs ${n ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-muted"}`,
|
|
561
561
|
children: e.count
|
|
562
562
|
})]
|
|
563
|
-
}), /* @__PURE__ */
|
|
563
|
+
}), /* @__PURE__ */ N("p", {
|
|
564
564
|
className: "text-xs text-text-muted mt-0.5",
|
|
565
565
|
children: e.description
|
|
566
566
|
})]
|
|
@@ -568,56 +568,56 @@ var H = () => {
|
|
|
568
568
|
}, e.id);
|
|
569
569
|
})
|
|
570
570
|
}),
|
|
571
|
-
/* @__PURE__ */
|
|
571
|
+
/* @__PURE__ */ N("div", {
|
|
572
572
|
className: "border-b border-border-subtle",
|
|
573
|
-
children: /* @__PURE__ */
|
|
573
|
+
children: /* @__PURE__ */ N("div", {
|
|
574
574
|
className: "flex gap-0",
|
|
575
|
-
children: le.map((e) => /* @__PURE__ */
|
|
575
|
+
children: le.map((e) => /* @__PURE__ */ P("button", {
|
|
576
576
|
type: "button",
|
|
577
577
|
onClick: () => U(e.id),
|
|
578
578
|
className: `flex items-center gap-2 border-b-2 px-4 py-2.5 text-sm font-medium transition-colors ${H === e.id ? "border-action-primary-bg text-text-primary" : "border-transparent text-text-muted hover:text-text-primary"}`,
|
|
579
|
-
children: [e.label, e.count > 0 && /* @__PURE__ */
|
|
579
|
+
children: [e.label, e.count > 0 && /* @__PURE__ */ N("span", {
|
|
580
580
|
className: `rounded-full px-1.5 py-0.5 text-xs ${H === e.id ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-muted"}`,
|
|
581
581
|
children: e.count
|
|
582
582
|
})]
|
|
583
583
|
}, e.id))
|
|
584
584
|
})
|
|
585
585
|
}),
|
|
586
|
-
|
|
586
|
+
z === "CASH_PAYOUT" && H === "approved" && X.length > 0 && /* @__PURE__ */ P("div", {
|
|
587
587
|
className: "rounded-card border border-status-info-border bg-status-info-bg-subtle px-4 py-3 text-sm text-status-info-text",
|
|
588
588
|
children: [
|
|
589
|
-
/* @__PURE__ */
|
|
589
|
+
/* @__PURE__ */ N("strong", { children: "How to pay:" }),
|
|
590
590
|
" Click the account row to expand bank/UPI details → transfer the exact amount via your bank → click ",
|
|
591
|
-
/* @__PURE__ */
|
|
591
|
+
/* @__PURE__ */ N("strong", { children: "Mark as Paid" }),
|
|
592
592
|
" and enter the UTR / transaction reference number."
|
|
593
593
|
]
|
|
594
594
|
}),
|
|
595
|
-
|
|
595
|
+
k ? /* @__PURE__ */ N("div", {
|
|
596
596
|
className: "space-y-4",
|
|
597
|
-
children: [1, 2].map((e) => /* @__PURE__ */
|
|
598
|
-
}) : Q.length === 0 ? /* @__PURE__ */
|
|
597
|
+
children: [1, 2].map((e) => /* @__PURE__ */ N("div", { className: "h-40 animate-pulse rounded-lg border border-border-subtle bg-bg-surface" }, e))
|
|
598
|
+
}) : Q.length === 0 ? /* @__PURE__ */ N(ne, {
|
|
599
599
|
illustration: "empty-data",
|
|
600
600
|
title: H === "pending" ? "No pending requests" : H === "approved" ? "No approved requests awaiting payment" : "No history yet",
|
|
601
|
-
description: H === "pending" ? "New requests will appear here." : H === "approved" ?
|
|
602
|
-
}) : /* @__PURE__ */
|
|
601
|
+
description: H === "pending" ? "New requests will appear here." : H === "approved" ? z === "CREDIT_CONVERSION" ? "Revenue share requests skip this tab — approving one completes it immediately, there's no separate payment step." : "Approve pending requests first, then send payment and mark as paid." : "Completed and rejected requests will appear here."
|
|
602
|
+
}) : /* @__PURE__ */ P("div", {
|
|
603
603
|
className: "space-y-4",
|
|
604
|
-
children: [Q.map((e) => /* @__PURE__ */
|
|
604
|
+
children: [Q.map((e) => /* @__PURE__ */ N(V, {
|
|
605
605
|
request: e,
|
|
606
606
|
onApprove: (e) => $("approve", e),
|
|
607
607
|
onReject: (e) => $("reject", e),
|
|
608
608
|
onMarkPaid: (e) => $("mark_paid", e)
|
|
609
|
-
}, e.id)),
|
|
609
|
+
}, e.id)), E && /* @__PURE__ */ N("div", {
|
|
610
610
|
className: "flex justify-center pt-2",
|
|
611
|
-
children: /* @__PURE__ */
|
|
611
|
+
children: /* @__PURE__ */ N("button", {
|
|
612
612
|
type: "button",
|
|
613
613
|
onClick: () => void se(),
|
|
614
|
-
disabled:
|
|
614
|
+
disabled: j,
|
|
615
615
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary disabled:opacity-50",
|
|
616
|
-
children:
|
|
616
|
+
children: j ? "Loading…" : "Load more requests"
|
|
617
617
|
})
|
|
618
618
|
})]
|
|
619
619
|
}),
|
|
620
|
-
W && /* @__PURE__ */
|
|
620
|
+
W && /* @__PURE__ */ N(oe, {
|
|
621
621
|
dialog: W,
|
|
622
622
|
onClose: () => G(null),
|
|
623
623
|
onConfirm: async (e) => {
|
|
@@ -637,7 +637,7 @@ var H = () => {
|
|
|
637
637
|
source: "payout-admin"
|
|
638
638
|
})), G(null), await q();
|
|
639
639
|
} catch (e) {
|
|
640
|
-
|
|
640
|
+
R(e instanceof Error ? e : /* @__PURE__ */ Error("Action failed"));
|
|
641
641
|
}
|
|
642
642
|
}
|
|
643
643
|
})
|