@burdenoff/microfe-billing 2026.624.3 → 2026.625.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/BillingAdminRoutes.js +1 -1
- package/dist/billing/BillingAdminRoutes.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonCreatePage.js +2 -2
- package/dist/billing/modules/addons/pages/AddonCreatePage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonDetailPage.js +4 -4
- package/dist/billing/modules/addons/pages/AddonDetailPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonEditPage.js +2 -2
- package/dist/billing/modules/addons/pages/AddonEditPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonsListPage.js +1 -1
- package/dist/billing/modules/addons/pages/AddonsListPage.js.map +1 -1
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +98 -99
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js +88 -85
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +6 -6
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoicesListPage.js +2 -2
- package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/RefundsPage.js +360 -370
- package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/UserRefundsPage.js +2 -2
- package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
- package/dist/billing/modules/checkout/components/BillingAccountSelector.js +1 -1
- package/dist/billing/modules/checkout/components/BillingAccountSelector.js.map +1 -1
- package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js +1 -1
- package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js.map +1 -1
- package/dist/billing/modules/checkout/components/SubscriptionSelector.js +1 -1
- package/dist/billing/modules/checkout/components/SubscriptionSelector.js.map +1 -1
- package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js +2 -2
- package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js +102 -104
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CouponsListPage.js +5 -5
- package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js +1 -1
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +1 -1
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditsPage.js +29 -28
- package/dist/billing/modules/credits/pages/CreditsPage.js.map +1 -1
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js +2 -2
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js.map +1 -1
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js +1 -1
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js.map +1 -1
- package/dist/billing/modules/dashboard/components/BillingAccountCard.js +3 -3
- package/dist/billing/modules/dashboard/components/BillingAccountCard.js.map +1 -1
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js +2 -2
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js.map +1 -1
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js +1 -1
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js.map +1 -1
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js +1 -1
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js.map +1 -1
- package/dist/billing/modules/dashboard/pages/OverviewPage.js +139 -142
- package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js +6 -6
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +4 -4
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +1 -1
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +142 -133
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanCreatePage.js +2 -2
- package/dist/billing/modules/plans/pages/PlanCreatePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanDetailPage.js +4 -4
- package/dist/billing/modules/plans/pages/PlanDetailPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanEditPage.js +2 -2
- package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js +4 -4
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansListPage.js +2 -2
- package/dist/billing/modules/plans/pages/PlansListPage.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/promotions/pages/PromotionsListPage.js +2 -2
- package/dist/billing/modules/promotions/pages/PromotionsListPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +2 -2
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +5 -5
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +2 -2
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +259 -265
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +7 -7
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js.map +1 -1
- package/dist/billing/modules/usage/pages/UsagePage.js +13 -13
- package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
- package/dist/billing/shared/ui/Card.js +1 -1
- package/dist/billing/shared/ui/Card.js.map +1 -1
- package/dist/billing/shared/ui/MetricCard.js +28 -21
- package/dist/billing/shared/ui/MetricCard.js.map +1 -1
- package/package.json +2 -2
|
@@ -12,13 +12,13 @@ import { GetTransactionDocument as l } from "../../../../generated/global-operat
|
|
|
12
12
|
import { useRefunds as u } from "../hooks/useRefunds.js";
|
|
13
13
|
import "../hooks/index.js";
|
|
14
14
|
import { useCallback as d, useEffect as f, useMemo as p, useRef as m, useState as h } from "react";
|
|
15
|
-
import { AlertTriangle as g, Ban as _, CheckCircle as v, ChevronLeft as y, ChevronRight as b, Clock as x, Download as S, Eye as C, Filter as w, Loader2 as T, MoreHorizontal as E, Play as D, Plus as ee, RefreshCw as O, RotateCcw as k, Search as A, SkipForward as j, X as M, XCircle as
|
|
16
|
-
import { Fragment as
|
|
17
|
-
import { useI18n as
|
|
18
|
-
import { ResponsiveTable as re } from "@burdenoff/fe-libs/ui";
|
|
19
|
-
import { useApolloClient as
|
|
15
|
+
import { AlertTriangle as g, Ban as _, CheckCircle as v, ChevronLeft as y, ChevronRight as b, Clock as x, Download as S, Eye as C, Filter as w, Loader2 as T, MoreHorizontal as E, Play as D, Plus as ee, RefreshCw as O, RotateCcw as k, Search as A, SkipForward as j, X as M, XCircle as N } from "lucide-react";
|
|
16
|
+
import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
17
|
+
import { useI18n as te } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
18
|
+
import { CTAOverflowMenu as ne, ResponsiveTable as re } from "@burdenoff/fe-libs/ui";
|
|
19
|
+
import { useApolloClient as L } from "@apollo/client/react";
|
|
20
20
|
//#region src/billing/modules/billing/pages/RefundsPage.tsx
|
|
21
|
-
var
|
|
21
|
+
var R = {
|
|
22
22
|
PENDING: {
|
|
23
23
|
label: "Pending",
|
|
24
24
|
color: "yellow",
|
|
@@ -37,19 +37,19 @@ var L = {
|
|
|
37
37
|
FAILED: {
|
|
38
38
|
label: "Failed",
|
|
39
39
|
color: "red",
|
|
40
|
-
icon:
|
|
40
|
+
icon: N
|
|
41
41
|
},
|
|
42
42
|
SKIPPED: {
|
|
43
43
|
label: "Skipped",
|
|
44
44
|
color: "gray",
|
|
45
45
|
icon: _
|
|
46
46
|
}
|
|
47
|
-
},
|
|
47
|
+
}, z = {
|
|
48
48
|
MANUAL: "Manual",
|
|
49
49
|
WEBHOOK_RECOVERY: "Webhook Recovery",
|
|
50
50
|
SUBSCRIPTION_CANCEL: "Subscription Cancel",
|
|
51
51
|
DUPLICATE_PAYMENT: "Duplicate Payment"
|
|
52
|
-
}, ie = ["stripe", "razorpay"],
|
|
52
|
+
}, ie = ["stripe", "razorpay"], B = (e) => {
|
|
53
53
|
let t = {
|
|
54
54
|
yellow: `${r.warning.bg} ${r.warning.text}`,
|
|
55
55
|
blue: `${r.info.bg} ${r.info.text}`,
|
|
@@ -67,62 +67,62 @@ var L = {
|
|
|
67
67
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
68
68
|
}, []);
|
|
69
69
|
let u = e.status === "PENDING", d = e.status === "PENDING", p = e.status === "FAILED";
|
|
70
|
-
return /* @__PURE__ */
|
|
70
|
+
return /* @__PURE__ */ I("div", {
|
|
71
71
|
className: "relative",
|
|
72
72
|
ref: l,
|
|
73
|
-
children: [/* @__PURE__ */
|
|
73
|
+
children: [/* @__PURE__ */ F("button", {
|
|
74
74
|
type: "button",
|
|
75
75
|
onClick: () => c(!s),
|
|
76
76
|
disabled: o,
|
|
77
77
|
className: "p-1.5 rounded-md hover:bg-bg-sunken/50 transition-colors disabled:opacity-50",
|
|
78
78
|
"aria-label": "Refund actions",
|
|
79
|
-
children: o ? /* @__PURE__ */
|
|
80
|
-
}), s && /* @__PURE__ */
|
|
79
|
+
children: o ? /* @__PURE__ */ F(T, { className: "size-4 animate-spin text-text-muted" }) : /* @__PURE__ */ F(E, { className: "size-4 text-text-muted" })
|
|
80
|
+
}), s && /* @__PURE__ */ I("div", {
|
|
81
81
|
className: "absolute right-0 top-full mt-1 z-50 min-w-[160px] bg-bg-elevated border border-border-subtle rounded-input shadow-[var(--shadow-elevation-3)] py-1",
|
|
82
82
|
children: [
|
|
83
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ I("button", {
|
|
84
84
|
type: "button",
|
|
85
85
|
onClick: () => {
|
|
86
86
|
t(), c(!1);
|
|
87
87
|
},
|
|
88
88
|
className: "w-full flex items-center gap-2 px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken/50 transition-colors",
|
|
89
|
-
children: [/* @__PURE__ */
|
|
89
|
+
children: [/* @__PURE__ */ F(C, { className: "size-4" }), "View Details"]
|
|
90
90
|
}),
|
|
91
|
-
u && /* @__PURE__ */
|
|
91
|
+
u && /* @__PURE__ */ I("button", {
|
|
92
92
|
type: "button",
|
|
93
93
|
onClick: () => {
|
|
94
94
|
n(), c(!1);
|
|
95
95
|
},
|
|
96
96
|
className: `w-full flex items-center gap-2 px-3 py-2 text-sm ${r.success.text} hover:bg-bg-sunken/50 transition-colors`,
|
|
97
|
-
children: [/* @__PURE__ */
|
|
97
|
+
children: [/* @__PURE__ */ F(D, { className: "size-4" }), "Process Refund"]
|
|
98
98
|
}),
|
|
99
|
-
d && /* @__PURE__ */
|
|
99
|
+
d && /* @__PURE__ */ I("button", {
|
|
100
100
|
type: "button",
|
|
101
101
|
onClick: () => {
|
|
102
102
|
i(), c(!1);
|
|
103
103
|
},
|
|
104
104
|
className: `w-full flex items-center gap-2 px-3 py-2 text-sm ${r.warning.text} hover:bg-bg-sunken/50 transition-colors`,
|
|
105
|
-
children: [/* @__PURE__ */
|
|
105
|
+
children: [/* @__PURE__ */ F(j, { className: "size-4" }), "Skip Refund"]
|
|
106
106
|
}),
|
|
107
|
-
p && /* @__PURE__ */
|
|
107
|
+
p && /* @__PURE__ */ I("button", {
|
|
108
108
|
type: "button",
|
|
109
109
|
onClick: () => {
|
|
110
110
|
a(), c(!1);
|
|
111
111
|
},
|
|
112
112
|
className: `w-full flex items-center gap-2 px-3 py-2 text-sm ${r.info.text} hover:bg-bg-sunken/50 transition-colors`,
|
|
113
|
-
children: [/* @__PURE__ */
|
|
113
|
+
children: [/* @__PURE__ */ F(k, { className: "size-4" }), "Retry Refund"]
|
|
114
114
|
})
|
|
115
115
|
]
|
|
116
116
|
})]
|
|
117
117
|
});
|
|
118
|
-
},
|
|
118
|
+
}, V = {
|
|
119
119
|
provider: "stripe",
|
|
120
120
|
gatewayPaymentId: "",
|
|
121
121
|
amount: 0,
|
|
122
122
|
currency: "USD"
|
|
123
123
|
}, oe = ({ isOpen: e, onClose: t, onSubmit: n, isSubmitting: r }) => {
|
|
124
|
-
let i =
|
|
125
|
-
s(""), u(null), p(null), y(
|
|
124
|
+
let i = L(), [o, s] = h(""), [c, u] = h(null), [f, p] = h(null), [m, g] = h(!1), [_, y] = h(V), b = () => {
|
|
125
|
+
s(""), u(null), p(null), y(V);
|
|
126
126
|
}, x = () => {
|
|
127
127
|
b(), t();
|
|
128
128
|
}, S = d(async (e) => {
|
|
@@ -136,7 +136,7 @@ var L = {
|
|
|
136
136
|
fetchPolicy: "network-only"
|
|
137
137
|
}), n = e?.getTransaction ?? null;
|
|
138
138
|
if (!n) {
|
|
139
|
-
p("Transaction not found. Check the ID and try again."), y(
|
|
139
|
+
p("Transaction not found. Check the ID and try again."), y(V);
|
|
140
140
|
return;
|
|
141
141
|
}
|
|
142
142
|
let r = n.metadata, a = typeof r?.total == "number" ? r.total : n.amount;
|
|
@@ -165,7 +165,7 @@ var L = {
|
|
|
165
165
|
notes: ""
|
|
166
166
|
});
|
|
167
167
|
} catch {
|
|
168
|
-
p("Failed to look up transaction. Ensure the ID is correct."), y(
|
|
168
|
+
p("Failed to look up transaction. Ensure the ID is correct."), y(V);
|
|
169
169
|
} finally {
|
|
170
170
|
g(!1);
|
|
171
171
|
}
|
|
@@ -175,36 +175,36 @@ var L = {
|
|
|
175
175
|
};
|
|
176
176
|
if (!e) return null;
|
|
177
177
|
let w = c?.totalAmount ?? void 0, E = w !== void 0 && _.amount > w + .01;
|
|
178
|
-
return /* @__PURE__ */
|
|
178
|
+
return /* @__PURE__ */ I("div", {
|
|
179
179
|
className: "fixed inset-0 z-50 flex items-center justify-center",
|
|
180
|
-
children: [/* @__PURE__ */
|
|
180
|
+
children: [/* @__PURE__ */ F("div", {
|
|
181
181
|
className: "absolute inset-0 bg-overlay-scrim",
|
|
182
182
|
onClick: x
|
|
183
|
-
}), /* @__PURE__ */
|
|
184
|
-
className: "relative bg-bg-elevated border border-border-
|
|
185
|
-
children: [/* @__PURE__ */
|
|
183
|
+
}), /* @__PURE__ */ I("div", {
|
|
184
|
+
className: "relative bg-bg-elevated border border-border-seam rounded-card shadow-[var(--shadow-elevation-4)] max-w-lg w-full mx-4 max-h-[90vh] overflow-auto",
|
|
185
|
+
children: [/* @__PURE__ */ I("div", {
|
|
186
186
|
className: "flex items-center justify-between p-4 border-b border-border-subtle",
|
|
187
|
-
children: [/* @__PURE__ */
|
|
187
|
+
children: [/* @__PURE__ */ F("h2", {
|
|
188
188
|
className: "text-lg font-semibold",
|
|
189
189
|
children: "Create Manual Refund"
|
|
190
|
-
}), /* @__PURE__ */
|
|
190
|
+
}), /* @__PURE__ */ F("button", {
|
|
191
191
|
type: "button",
|
|
192
192
|
onClick: x,
|
|
193
193
|
className: "p-1 rounded-md hover:bg-bg-sunken/50 transition-colors",
|
|
194
|
-
children: /* @__PURE__ */
|
|
194
|
+
children: /* @__PURE__ */ F(M, { className: "size-5" })
|
|
195
195
|
})]
|
|
196
|
-
}), /* @__PURE__ */
|
|
196
|
+
}), /* @__PURE__ */ I("form", {
|
|
197
197
|
onSubmit: C,
|
|
198
198
|
className: "p-4 space-y-4",
|
|
199
199
|
children: [
|
|
200
|
-
/* @__PURE__ */
|
|
201
|
-
/* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ I("div", { children: [
|
|
201
|
+
/* @__PURE__ */ F("label", {
|
|
202
202
|
className: "block text-sm font-medium mb-1",
|
|
203
203
|
children: "Transaction ID *"
|
|
204
204
|
}),
|
|
205
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ I("div", {
|
|
206
206
|
className: "flex gap-2",
|
|
207
|
-
children: [/* @__PURE__ */
|
|
207
|
+
children: [/* @__PURE__ */ F("input", {
|
|
208
208
|
type: "text",
|
|
209
209
|
value: o,
|
|
210
210
|
onChange: (e) => {
|
|
@@ -214,106 +214,106 @@ var L = {
|
|
|
214
214
|
className: "flex-1 px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
215
215
|
placeholder: "Paste transaction UUID...",
|
|
216
216
|
required: !0
|
|
217
|
-
}), /* @__PURE__ */
|
|
217
|
+
}), /* @__PURE__ */ F("button", {
|
|
218
218
|
type: "button",
|
|
219
219
|
onClick: () => S(o),
|
|
220
220
|
disabled: !o.trim() || m,
|
|
221
221
|
className: "px-3 py-2 border border-border-subtle rounded-md hover:bg-bg-sunken/50 transition-colors disabled:opacity-50 flex items-center gap-1 text-sm",
|
|
222
|
-
children: m ? /* @__PURE__ */
|
|
222
|
+
children: m ? /* @__PURE__ */ F(T, { className: "size-4 animate-spin" }) : /* @__PURE__ */ F(A, { className: "size-4" })
|
|
223
223
|
})]
|
|
224
224
|
}),
|
|
225
|
-
f && /* @__PURE__ */
|
|
225
|
+
f && /* @__PURE__ */ F("p", {
|
|
226
226
|
className: "text-xs text-status-error-text mt-1",
|
|
227
227
|
children: f
|
|
228
228
|
}),
|
|
229
|
-
m && /* @__PURE__ */
|
|
229
|
+
m && /* @__PURE__ */ F("p", {
|
|
230
230
|
className: "text-xs text-text-muted mt-1",
|
|
231
231
|
children: "Looking up transaction…"
|
|
232
232
|
})
|
|
233
233
|
] }),
|
|
234
|
-
c && /* @__PURE__ */
|
|
235
|
-
/* @__PURE__ */
|
|
234
|
+
c && /* @__PURE__ */ I(P, { children: [
|
|
235
|
+
/* @__PURE__ */ I("div", {
|
|
236
236
|
className: "p-3 bg-status-success-bg-subtle border border-border-subtle rounded-md text-sm space-y-1",
|
|
237
|
-
children: [/* @__PURE__ */
|
|
237
|
+
children: [/* @__PURE__ */ I("div", {
|
|
238
238
|
className: "flex items-center gap-2 text-status-success-text font-medium",
|
|
239
|
-
children: [/* @__PURE__ */
|
|
240
|
-
}), /* @__PURE__ */
|
|
239
|
+
children: [/* @__PURE__ */ F(v, { className: "size-4" }), "Transaction found"]
|
|
240
|
+
}), /* @__PURE__ */ I("div", {
|
|
241
241
|
className: "text-text-muted grid grid-cols-2 gap-x-4 gap-y-0.5 mt-1",
|
|
242
242
|
children: [
|
|
243
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ I("span", { children: [
|
|
244
244
|
"Account:",
|
|
245
245
|
" ",
|
|
246
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ I("span", {
|
|
247
247
|
className: "text-text-primary font-mono text-xs",
|
|
248
248
|
children: [c.billingAccountId.slice(0, 16), "…"]
|
|
249
249
|
})
|
|
250
250
|
] }),
|
|
251
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ I("span", { children: [
|
|
252
252
|
"Paid:",
|
|
253
253
|
" ",
|
|
254
|
-
/* @__PURE__ */
|
|
254
|
+
/* @__PURE__ */ F("span", {
|
|
255
255
|
className: "text-text-primary",
|
|
256
256
|
children: a(c.totalAmount, c.currency)
|
|
257
257
|
})
|
|
258
258
|
] }),
|
|
259
|
-
/* @__PURE__ */
|
|
259
|
+
/* @__PURE__ */ I("span", { children: [
|
|
260
260
|
"Provider:",
|
|
261
261
|
" ",
|
|
262
|
-
/* @__PURE__ */
|
|
262
|
+
/* @__PURE__ */ F("span", {
|
|
263
263
|
className: "text-text-primary capitalize",
|
|
264
264
|
children: _.provider
|
|
265
265
|
})
|
|
266
266
|
] }),
|
|
267
|
-
/* @__PURE__ */
|
|
267
|
+
/* @__PURE__ */ I("span", { children: ["Currency: ", /* @__PURE__ */ F("span", {
|
|
268
268
|
className: "text-text-primary",
|
|
269
269
|
children: c.currency
|
|
270
270
|
})] })
|
|
271
271
|
]
|
|
272
272
|
})]
|
|
273
273
|
}),
|
|
274
|
-
/* @__PURE__ */
|
|
274
|
+
/* @__PURE__ */ I("div", {
|
|
275
275
|
className: "grid grid-cols-2 gap-3",
|
|
276
|
-
children: [/* @__PURE__ */
|
|
276
|
+
children: [/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
|
|
277
277
|
className: "block text-xs font-medium text-text-muted mb-1",
|
|
278
278
|
children: "Provider"
|
|
279
|
-
}), /* @__PURE__ */
|
|
279
|
+
}), /* @__PURE__ */ F("div", {
|
|
280
280
|
className: "px-3 py-2 border border-border-subtle rounded-md bg-bg-sunken/30 text-sm capitalize",
|
|
281
281
|
children: _.provider
|
|
282
|
-
})] }), /* @__PURE__ */
|
|
282
|
+
})] }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
|
|
283
283
|
className: "block text-xs font-medium text-text-muted mb-1",
|
|
284
284
|
children: "Currency"
|
|
285
|
-
}), /* @__PURE__ */
|
|
285
|
+
}), /* @__PURE__ */ F("div", {
|
|
286
286
|
className: "px-3 py-2 border border-border-subtle rounded-md bg-bg-sunken/30 text-sm",
|
|
287
287
|
children: _.currency
|
|
288
288
|
})] })]
|
|
289
289
|
}),
|
|
290
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
|
|
291
291
|
className: "block text-xs font-medium text-text-muted mb-1",
|
|
292
292
|
children: "Gateway Payment ID"
|
|
293
|
-
}), /* @__PURE__ */
|
|
293
|
+
}), /* @__PURE__ */ F("div", {
|
|
294
294
|
className: "px-3 py-2 border border-border-subtle rounded-md bg-bg-sunken/30 text-sm font-mono truncate",
|
|
295
295
|
children: _.gatewayPaymentId
|
|
296
296
|
})] }),
|
|
297
|
-
_.purchaseType && /* @__PURE__ */
|
|
297
|
+
_.purchaseType && /* @__PURE__ */ I("div", {
|
|
298
298
|
className: "grid grid-cols-2 gap-3",
|
|
299
|
-
children: [/* @__PURE__ */
|
|
299
|
+
children: [/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
|
|
300
300
|
className: "block text-xs font-medium text-text-muted mb-1",
|
|
301
301
|
children: "Purchase Type"
|
|
302
|
-
}), /* @__PURE__ */
|
|
302
|
+
}), /* @__PURE__ */ F("div", {
|
|
303
303
|
className: "px-3 py-2 border border-border-subtle rounded-md bg-bg-sunken/30 text-sm",
|
|
304
304
|
children: _.purchaseType
|
|
305
|
-
})] }), /* @__PURE__ */
|
|
305
|
+
})] }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
|
|
306
306
|
className: "block text-xs font-medium text-text-muted mb-1",
|
|
307
307
|
children: "Purchase Detail"
|
|
308
|
-
}), /* @__PURE__ */
|
|
308
|
+
}), /* @__PURE__ */ F("div", {
|
|
309
309
|
className: "px-3 py-2 border border-border-subtle rounded-md bg-bg-sunken/30 text-sm truncate",
|
|
310
310
|
children: _.purchaseDetail || "—"
|
|
311
311
|
})] })]
|
|
312
312
|
}),
|
|
313
|
-
/* @__PURE__ */
|
|
314
|
-
/* @__PURE__ */
|
|
313
|
+
/* @__PURE__ */ I("div", { children: [
|
|
314
|
+
/* @__PURE__ */ I("label", {
|
|
315
315
|
className: "block text-sm font-medium mb-1",
|
|
316
|
-
children: ["Refund Amount *", /* @__PURE__ */
|
|
316
|
+
children: ["Refund Amount *", /* @__PURE__ */ I("span", {
|
|
317
317
|
className: "text-xs text-text-muted ml-1",
|
|
318
318
|
children: [
|
|
319
319
|
"(max ",
|
|
@@ -322,7 +322,7 @@ var L = {
|
|
|
322
322
|
]
|
|
323
323
|
})]
|
|
324
324
|
}),
|
|
325
|
-
/* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ F("input", {
|
|
326
326
|
type: "number",
|
|
327
327
|
step: "0.01",
|
|
328
328
|
min: "0.01",
|
|
@@ -335,7 +335,7 @@ var L = {
|
|
|
335
335
|
className: `w-full px-3 py-2 border rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] ${E ? "border-status-error-text" : "border-border-subtle"}`,
|
|
336
336
|
required: !0
|
|
337
337
|
}),
|
|
338
|
-
E && /* @__PURE__ */
|
|
338
|
+
E && /* @__PURE__ */ I("p", {
|
|
339
339
|
className: "text-xs text-status-error-text mt-1",
|
|
340
340
|
children: [
|
|
341
341
|
"Amount cannot exceed the original payment of",
|
|
@@ -344,10 +344,10 @@ var L = {
|
|
|
344
344
|
]
|
|
345
345
|
})
|
|
346
346
|
] }),
|
|
347
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
|
|
348
348
|
className: "block text-sm font-medium mb-1",
|
|
349
349
|
children: "Reason"
|
|
350
|
-
}), /* @__PURE__ */
|
|
350
|
+
}), /* @__PURE__ */ F("input", {
|
|
351
351
|
type: "text",
|
|
352
352
|
value: _.reason || "",
|
|
353
353
|
onChange: (e) => y({
|
|
@@ -357,10 +357,10 @@ var L = {
|
|
|
357
357
|
className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
358
358
|
placeholder: "Reason for refund"
|
|
359
359
|
})] }),
|
|
360
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
|
|
361
361
|
className: "block text-sm font-medium mb-1",
|
|
362
362
|
children: "Notes"
|
|
363
|
-
}), /* @__PURE__ */
|
|
363
|
+
}), /* @__PURE__ */ F("textarea", {
|
|
364
364
|
value: _.notes || "",
|
|
365
365
|
onChange: (e) => y({
|
|
366
366
|
..._,
|
|
@@ -371,18 +371,18 @@ var L = {
|
|
|
371
371
|
placeholder: "Internal notes"
|
|
372
372
|
})] })
|
|
373
373
|
] }),
|
|
374
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ I("div", {
|
|
375
375
|
className: "flex gap-2 pt-2",
|
|
376
|
-
children: [/* @__PURE__ */
|
|
376
|
+
children: [/* @__PURE__ */ F("button", {
|
|
377
377
|
type: "button",
|
|
378
378
|
onClick: x,
|
|
379
379
|
className: "flex-1 py-2 px-4 border border-border-subtle rounded-md hover:bg-bg-sunken/50 transition-colors",
|
|
380
380
|
children: "Cancel"
|
|
381
|
-
}), /* @__PURE__ */
|
|
381
|
+
}), /* @__PURE__ */ I("button", {
|
|
382
382
|
type: "submit",
|
|
383
383
|
disabled: r || !c || !_.gatewayPaymentId || _.amount <= 0 || E,
|
|
384
384
|
className: "flex-1 py-2 px-4 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bgHover transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2",
|
|
385
|
-
children: [r && /* @__PURE__ */
|
|
385
|
+
children: [r && /* @__PURE__ */ F(T, { className: "size-4 animate-spin" }), "Create Refund"]
|
|
386
386
|
})]
|
|
387
387
|
})
|
|
388
388
|
]
|
|
@@ -391,47 +391,47 @@ var L = {
|
|
|
391
391
|
});
|
|
392
392
|
}, se = ({ isOpen: e, record: t, onClose: n, onSubmit: i, isSubmitting: o }) => {
|
|
393
393
|
let [s, c] = h("");
|
|
394
|
-
return !e || !t ? null : /* @__PURE__ */
|
|
394
|
+
return !e || !t ? null : /* @__PURE__ */ I("div", {
|
|
395
395
|
className: "fixed inset-0 z-50 flex items-center justify-center",
|
|
396
|
-
children: [/* @__PURE__ */
|
|
396
|
+
children: [/* @__PURE__ */ F("div", {
|
|
397
397
|
className: "absolute inset-0 bg-overlay-scrim",
|
|
398
398
|
onClick: n
|
|
399
|
-
}), /* @__PURE__ */
|
|
400
|
-
className: "relative bg-bg-elevated border border-border-
|
|
401
|
-
children: [/* @__PURE__ */
|
|
399
|
+
}), /* @__PURE__ */ I("div", {
|
|
400
|
+
className: "relative bg-bg-elevated border border-border-seam rounded-card shadow-[var(--shadow-elevation-4)] max-w-md w-full mx-4",
|
|
401
|
+
children: [/* @__PURE__ */ I("div", {
|
|
402
402
|
className: "flex items-center justify-between p-4 border-b border-border-subtle",
|
|
403
|
-
children: [/* @__PURE__ */
|
|
403
|
+
children: [/* @__PURE__ */ F("h2", {
|
|
404
404
|
className: "text-lg font-semibold",
|
|
405
405
|
children: "Skip Refund"
|
|
406
|
-
}), /* @__PURE__ */
|
|
406
|
+
}), /* @__PURE__ */ F("button", {
|
|
407
407
|
type: "button",
|
|
408
408
|
onClick: n,
|
|
409
409
|
className: "p-1 rounded-md hover:bg-bg-sunken/50 transition-colors",
|
|
410
|
-
children: /* @__PURE__ */
|
|
410
|
+
children: /* @__PURE__ */ F(M, { className: "size-5" })
|
|
411
411
|
})]
|
|
412
|
-
}), /* @__PURE__ */
|
|
412
|
+
}), /* @__PURE__ */ I("form", {
|
|
413
413
|
onSubmit: async (e) => {
|
|
414
414
|
e.preventDefault(), await i(s), c("");
|
|
415
415
|
},
|
|
416
416
|
className: "p-4 space-y-4",
|
|
417
417
|
children: [
|
|
418
|
-
/* @__PURE__ */
|
|
418
|
+
/* @__PURE__ */ F("div", {
|
|
419
419
|
className: `p-3 ${r.warning.bg} border ${r.warning.border} rounded-md`,
|
|
420
|
-
children: /* @__PURE__ */
|
|
420
|
+
children: /* @__PURE__ */ I("div", {
|
|
421
421
|
className: "flex items-start gap-2",
|
|
422
|
-
children: [/* @__PURE__ */
|
|
422
|
+
children: [/* @__PURE__ */ F(g, { className: `size-5 ${r.warning.icon} mt-0.5` }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
423
423
|
className: `text-sm font-medium ${r.warning.text}`,
|
|
424
424
|
children: "You are about to skip this refund"
|
|
425
|
-
}), /* @__PURE__ */
|
|
425
|
+
}), /* @__PURE__ */ I("p", {
|
|
426
426
|
className: `text-sm ${r.warning.text} mt-1`,
|
|
427
427
|
children: ["Amount: ", a(t.amount, t.currency)]
|
|
428
428
|
})] })]
|
|
429
429
|
})
|
|
430
430
|
}),
|
|
431
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
|
|
432
432
|
className: "block text-sm font-medium mb-1",
|
|
433
433
|
children: "Reason for skipping *"
|
|
434
|
-
}), /* @__PURE__ */
|
|
434
|
+
}), /* @__PURE__ */ F("textarea", {
|
|
435
435
|
value: s,
|
|
436
436
|
onChange: (e) => c(e.target.value),
|
|
437
437
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface resize-none",
|
|
@@ -439,18 +439,18 @@ var L = {
|
|
|
439
439
|
placeholder: "Explain why this refund is being skipped...",
|
|
440
440
|
required: !0
|
|
441
441
|
})] }),
|
|
442
|
-
/* @__PURE__ */
|
|
442
|
+
/* @__PURE__ */ I("div", {
|
|
443
443
|
className: "flex gap-2",
|
|
444
|
-
children: [/* @__PURE__ */
|
|
444
|
+
children: [/* @__PURE__ */ F("button", {
|
|
445
445
|
type: "button",
|
|
446
446
|
onClick: n,
|
|
447
447
|
className: "flex-1 py-2 px-4 border border-border-subtle rounded-md hover:bg-bg-sunken/50 transition-colors",
|
|
448
448
|
children: "Cancel"
|
|
449
|
-
}), /* @__PURE__ */
|
|
449
|
+
}), /* @__PURE__ */ I("button", {
|
|
450
450
|
type: "submit",
|
|
451
451
|
disabled: o || !s.trim(),
|
|
452
452
|
className: `flex-1 py-2 px-4 ${r.warning.dot} text-action-primary-text rounded-md hover:opacity-90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2`,
|
|
453
|
-
children: [o && /* @__PURE__ */
|
|
453
|
+
children: [o && /* @__PURE__ */ F(T, { className: "size-4 animate-spin" }), "Skip Refund"]
|
|
454
454
|
})]
|
|
455
455
|
})
|
|
456
456
|
]
|
|
@@ -459,160 +459,160 @@ var L = {
|
|
|
459
459
|
});
|
|
460
460
|
}, ce = ({ record: e, onClose: t }) => {
|
|
461
461
|
if (!e) return null;
|
|
462
|
-
let n =
|
|
463
|
-
return /* @__PURE__ */
|
|
462
|
+
let n = R[e.status].icon;
|
|
463
|
+
return /* @__PURE__ */ I("div", {
|
|
464
464
|
className: "fixed inset-0 z-50 flex items-center justify-center",
|
|
465
|
-
children: [/* @__PURE__ */
|
|
465
|
+
children: [/* @__PURE__ */ F("div", {
|
|
466
466
|
className: "absolute inset-0 bg-overlay-scrim",
|
|
467
467
|
onClick: t
|
|
468
|
-
}), /* @__PURE__ */
|
|
469
|
-
className: "relative bg-bg-elevated border border-border-
|
|
468
|
+
}), /* @__PURE__ */ I("div", {
|
|
469
|
+
className: "relative bg-bg-elevated border border-border-seam rounded-card shadow-[var(--shadow-elevation-4)] max-w-lg w-full mx-4 max-h-[90vh] overflow-auto",
|
|
470
470
|
children: [
|
|
471
|
-
/* @__PURE__ */
|
|
471
|
+
/* @__PURE__ */ I("div", {
|
|
472
472
|
className: "flex items-center justify-between p-4 border-b border-border-subtle",
|
|
473
|
-
children: [/* @__PURE__ */
|
|
473
|
+
children: [/* @__PURE__ */ F("h2", {
|
|
474
474
|
className: "text-lg font-semibold",
|
|
475
475
|
children: "Refund Details"
|
|
476
|
-
}), /* @__PURE__ */
|
|
476
|
+
}), /* @__PURE__ */ F("button", {
|
|
477
477
|
type: "button",
|
|
478
478
|
onClick: t,
|
|
479
479
|
className: "p-1 rounded-md hover:bg-bg-sunken/50 transition-colors",
|
|
480
|
-
children: /* @__PURE__ */
|
|
480
|
+
children: /* @__PURE__ */ F(M, { className: "size-5" })
|
|
481
481
|
})]
|
|
482
482
|
}),
|
|
483
|
-
/* @__PURE__ */
|
|
483
|
+
/* @__PURE__ */ I("div", {
|
|
484
484
|
className: "p-4 space-y-4",
|
|
485
485
|
children: [
|
|
486
|
-
/* @__PURE__ */
|
|
487
|
-
className: `flex items-center gap-2 p-3 rounded-md ${
|
|
488
|
-
children: [/* @__PURE__ */
|
|
486
|
+
/* @__PURE__ */ I("div", {
|
|
487
|
+
className: `flex items-center gap-2 p-3 rounded-md ${B(R[e.status].color)}`,
|
|
488
|
+
children: [/* @__PURE__ */ F(n, { className: "size-5" }), /* @__PURE__ */ F("span", {
|
|
489
489
|
className: "font-medium",
|
|
490
|
-
children:
|
|
490
|
+
children: R[e.status].label
|
|
491
491
|
})]
|
|
492
492
|
}),
|
|
493
|
-
/* @__PURE__ */
|
|
493
|
+
/* @__PURE__ */ I("div", {
|
|
494
494
|
className: "grid grid-cols-2 gap-4",
|
|
495
|
-
children: [/* @__PURE__ */
|
|
495
|
+
children: [/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
496
496
|
className: "text-xs text-text-muted mb-1",
|
|
497
497
|
children: "Refund ID"
|
|
498
|
-
}), /* @__PURE__ */
|
|
498
|
+
}), /* @__PURE__ */ F("p", {
|
|
499
499
|
className: "text-sm font-mono break-all",
|
|
500
500
|
children: e.id
|
|
501
|
-
})] }), /* @__PURE__ */
|
|
501
|
+
})] }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
502
502
|
className: "text-xs text-text-muted mb-1",
|
|
503
503
|
children: "Source"
|
|
504
|
-
}), /* @__PURE__ */
|
|
504
|
+
}), /* @__PURE__ */ F("p", {
|
|
505
505
|
className: "text-sm",
|
|
506
|
-
children:
|
|
506
|
+
children: z[e.source]
|
|
507
507
|
})] })]
|
|
508
508
|
}),
|
|
509
|
-
/* @__PURE__ */
|
|
509
|
+
/* @__PURE__ */ I("div", {
|
|
510
510
|
className: "grid grid-cols-2 gap-4",
|
|
511
|
-
children: [/* @__PURE__ */
|
|
511
|
+
children: [/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
512
512
|
className: "text-xs text-text-muted mb-1",
|
|
513
513
|
children: "Amount"
|
|
514
|
-
}), /* @__PURE__ */
|
|
514
|
+
}), /* @__PURE__ */ F("p", {
|
|
515
515
|
className: "text-lg font-semibold",
|
|
516
516
|
children: a(e.amount, e.currency)
|
|
517
|
-
})] }), /* @__PURE__ */
|
|
517
|
+
})] }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
518
518
|
className: "text-xs text-text-muted mb-1",
|
|
519
519
|
children: "Provider"
|
|
520
|
-
}), /* @__PURE__ */
|
|
520
|
+
}), /* @__PURE__ */ F("p", {
|
|
521
521
|
className: "text-sm capitalize",
|
|
522
522
|
children: e.provider
|
|
523
523
|
})] })]
|
|
524
524
|
}),
|
|
525
|
-
/* @__PURE__ */
|
|
525
|
+
/* @__PURE__ */ I("div", {
|
|
526
526
|
className: "grid grid-cols-2 gap-4",
|
|
527
|
-
children: [/* @__PURE__ */
|
|
527
|
+
children: [/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
528
528
|
className: "text-xs text-text-muted mb-1",
|
|
529
529
|
children: "Gateway Payment ID"
|
|
530
|
-
}), /* @__PURE__ */
|
|
530
|
+
}), /* @__PURE__ */ F("p", {
|
|
531
531
|
className: "text-sm font-mono break-all",
|
|
532
532
|
children: e.gatewayPaymentId
|
|
533
|
-
})] }), e.gatewayOrderId && /* @__PURE__ */
|
|
533
|
+
})] }), e.gatewayOrderId && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
534
534
|
className: "text-xs text-text-muted mb-1",
|
|
535
535
|
children: "Gateway Order ID"
|
|
536
|
-
}), /* @__PURE__ */
|
|
536
|
+
}), /* @__PURE__ */ F("p", {
|
|
537
537
|
className: "text-sm font-mono break-all",
|
|
538
538
|
children: e.gatewayOrderId
|
|
539
539
|
})] })]
|
|
540
540
|
}),
|
|
541
|
-
e.gatewayRefundId && /* @__PURE__ */
|
|
541
|
+
e.gatewayRefundId && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
542
542
|
className: "text-xs text-text-muted mb-1",
|
|
543
543
|
children: "Gateway Refund ID"
|
|
544
|
-
}), /* @__PURE__ */
|
|
544
|
+
}), /* @__PURE__ */ F("p", {
|
|
545
545
|
className: "text-sm font-mono break-all",
|
|
546
546
|
children: e.gatewayRefundId
|
|
547
547
|
})] }),
|
|
548
|
-
(e.purchaseType || e.purchaseDetail) && /* @__PURE__ */
|
|
548
|
+
(e.purchaseType || e.purchaseDetail) && /* @__PURE__ */ I("div", {
|
|
549
549
|
className: "grid grid-cols-2 gap-4",
|
|
550
|
-
children: [e.purchaseType && /* @__PURE__ */
|
|
550
|
+
children: [e.purchaseType && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
551
551
|
className: "text-xs text-text-muted mb-1",
|
|
552
552
|
children: "Purchase Type"
|
|
553
|
-
}), /* @__PURE__ */
|
|
553
|
+
}), /* @__PURE__ */ F("p", {
|
|
554
554
|
className: "text-sm",
|
|
555
555
|
children: e.purchaseType
|
|
556
|
-
})] }), e.purchaseDetail && /* @__PURE__ */
|
|
556
|
+
})] }), e.purchaseDetail && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
557
557
|
className: "text-xs text-text-muted mb-1",
|
|
558
558
|
children: "Purchase Detail"
|
|
559
|
-
}), /* @__PURE__ */
|
|
559
|
+
}), /* @__PURE__ */ F("p", {
|
|
560
560
|
className: "text-sm",
|
|
561
561
|
children: e.purchaseDetail
|
|
562
562
|
})] })]
|
|
563
563
|
}),
|
|
564
|
-
e.reason && /* @__PURE__ */
|
|
564
|
+
e.reason && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
565
565
|
className: "text-xs text-text-muted mb-1",
|
|
566
566
|
children: "Reason"
|
|
567
|
-
}), /* @__PURE__ */
|
|
567
|
+
}), /* @__PURE__ */ F("p", {
|
|
568
568
|
className: "text-sm",
|
|
569
569
|
children: e.reason
|
|
570
570
|
})] }),
|
|
571
|
-
e.notes && /* @__PURE__ */
|
|
571
|
+
e.notes && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
572
572
|
className: "text-xs text-text-muted mb-1",
|
|
573
573
|
children: "Notes"
|
|
574
|
-
}), /* @__PURE__ */
|
|
574
|
+
}), /* @__PURE__ */ F("p", {
|
|
575
575
|
className: "text-sm",
|
|
576
576
|
children: e.notes
|
|
577
577
|
})] }),
|
|
578
|
-
e.errorMessage && /* @__PURE__ */
|
|
578
|
+
e.errorMessage && /* @__PURE__ */ I("div", {
|
|
579
579
|
className: `p-3 ${r.error.bg} border ${r.error.border} rounded-md`,
|
|
580
|
-
children: [/* @__PURE__ */
|
|
580
|
+
children: [/* @__PURE__ */ F("p", {
|
|
581
581
|
className: `text-xs ${r.error.text} mb-1`,
|
|
582
582
|
children: "Error Message"
|
|
583
|
-
}), /* @__PURE__ */
|
|
583
|
+
}), /* @__PURE__ */ F("p", {
|
|
584
584
|
className: `text-sm ${r.error.text}`,
|
|
585
585
|
children: e.errorMessage
|
|
586
586
|
})]
|
|
587
587
|
}),
|
|
588
|
-
/* @__PURE__ */
|
|
588
|
+
/* @__PURE__ */ I("div", {
|
|
589
589
|
className: "grid grid-cols-2 gap-4 pt-2 border-t border-border-subtle",
|
|
590
|
-
children: [/* @__PURE__ */
|
|
590
|
+
children: [/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
591
591
|
className: "text-xs text-text-muted mb-1",
|
|
592
592
|
children: "Created At"
|
|
593
|
-
}), /* @__PURE__ */
|
|
593
|
+
}), /* @__PURE__ */ F("p", {
|
|
594
594
|
className: "text-sm",
|
|
595
595
|
children: o(e.createdAt)
|
|
596
|
-
})] }), e.processedAt && /* @__PURE__ */
|
|
596
|
+
})] }), e.processedAt && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
597
597
|
className: "text-xs text-text-muted mb-1",
|
|
598
598
|
children: "Processed At"
|
|
599
|
-
}), /* @__PURE__ */
|
|
599
|
+
}), /* @__PURE__ */ F("p", {
|
|
600
600
|
className: "text-sm",
|
|
601
601
|
children: o(e.processedAt)
|
|
602
602
|
})] })]
|
|
603
603
|
}),
|
|
604
|
-
e.retryCount > 0 && /* @__PURE__ */
|
|
604
|
+
e.retryCount > 0 && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
605
605
|
className: "text-xs text-text-muted mb-1",
|
|
606
606
|
children: "Retry Count"
|
|
607
|
-
}), /* @__PURE__ */
|
|
607
|
+
}), /* @__PURE__ */ F("p", {
|
|
608
608
|
className: "text-sm",
|
|
609
609
|
children: e.retryCount
|
|
610
610
|
})] })
|
|
611
611
|
]
|
|
612
612
|
}),
|
|
613
|
-
/* @__PURE__ */
|
|
613
|
+
/* @__PURE__ */ F("div", {
|
|
614
614
|
className: "p-4 border-t border-border-subtle",
|
|
615
|
-
children: /* @__PURE__ */
|
|
615
|
+
children: /* @__PURE__ */ F("button", {
|
|
616
616
|
type: "button",
|
|
617
617
|
onClick: t,
|
|
618
618
|
className: "w-full py-2 px-4 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bgHover transition-colors",
|
|
@@ -622,7 +622,7 @@ var L = {
|
|
|
622
622
|
]
|
|
623
623
|
})]
|
|
624
624
|
});
|
|
625
|
-
},
|
|
625
|
+
}, H = {
|
|
626
626
|
PENDING: {
|
|
627
627
|
label: "Pending",
|
|
628
628
|
status: "PENDING"
|
|
@@ -639,25 +639,25 @@ var L = {
|
|
|
639
639
|
label: "All",
|
|
640
640
|
status: void 0
|
|
641
641
|
}
|
|
642
|
-
},
|
|
643
|
-
let { t:
|
|
644
|
-
let n =
|
|
642
|
+
}, U = () => {
|
|
643
|
+
let { t: r } = te(), l = (e, t) => {
|
|
644
|
+
let n = r(e);
|
|
645
645
|
return n === e ? t : n;
|
|
646
|
-
},
|
|
647
|
-
...
|
|
648
|
-
status:
|
|
646
|
+
}, d = c(), [f, m] = h("PENDING"), [g, _] = h(""), [v, x] = h({}), [C, E] = h(!1), [D, k] = h(null), [j, N] = h(!1), [P, L] = h(!1), [V, U] = h(null), [le, W] = h(null), { records: G, stats: K, pagination: q, isLoading: ue, recordsError: J, unprocessedWebhooks: Y, refetch: X, goToNextPage: de, goToPreviousPage: fe, setFilters: Z, createRefundRecord: pe, processRefund: me, skipRefund: he, retryRefund: ge, createRefundRecordsFromFailedWebhooks: _e, isCreating: ve, isProcessing: ye, isCreatingFromWebhooks: Q } = u({ filters: p(() => ({
|
|
647
|
+
...v,
|
|
648
|
+
status: H[f].status
|
|
649
649
|
}), [
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
650
|
+
f,
|
|
651
|
+
v.source,
|
|
652
|
+
v.provider,
|
|
653
|
+
v.billingAccountId,
|
|
654
|
+
v.fromDate,
|
|
655
|
+
v.toDate
|
|
656
656
|
]) });
|
|
657
|
-
if (!
|
|
658
|
-
if (J && s(J)) return /* @__PURE__ */
|
|
657
|
+
if (!d.canViewPayments) return /* @__PURE__ */ F(e, { message: "You don't have permission to view refunds." });
|
|
658
|
+
if (J && s(J)) return /* @__PURE__ */ F("div", {
|
|
659
659
|
className: "p-6",
|
|
660
|
-
children: /* @__PURE__ */
|
|
660
|
+
children: /* @__PURE__ */ F(i, {
|
|
661
661
|
title: "Server Unavailable",
|
|
662
662
|
message: "Unable to load refunds. The server might be down or experiencing issues.",
|
|
663
663
|
onRetry: () => X(),
|
|
@@ -665,16 +665,16 @@ var L = {
|
|
|
665
665
|
})
|
|
666
666
|
});
|
|
667
667
|
let be = (e) => {
|
|
668
|
-
|
|
668
|
+
m(e), x({}), _("");
|
|
669
669
|
}, $ = (e, t) => {
|
|
670
670
|
if (e === "status") return;
|
|
671
671
|
let n = {
|
|
672
|
-
...
|
|
672
|
+
...v,
|
|
673
673
|
[e]: t || void 0
|
|
674
674
|
};
|
|
675
|
-
|
|
675
|
+
x(n), Z({
|
|
676
676
|
...n,
|
|
677
|
-
status:
|
|
677
|
+
status: H[f].status
|
|
678
678
|
});
|
|
679
679
|
}, xe = async (e) => {
|
|
680
680
|
try {
|
|
@@ -693,8 +693,8 @@ var L = {
|
|
|
693
693
|
W(null);
|
|
694
694
|
}
|
|
695
695
|
}, Ce = async (e) => {
|
|
696
|
-
if (
|
|
697
|
-
await he(
|
|
696
|
+
if (V) try {
|
|
697
|
+
await he(V.id, e), L(!1), U(null);
|
|
698
698
|
} catch (e) {
|
|
699
699
|
console.error("Failed to skip refund:", e);
|
|
700
700
|
}
|
|
@@ -714,12 +714,102 @@ var L = {
|
|
|
714
714
|
} catch (e) {
|
|
715
715
|
console.error("Failed to create refunds from webhooks:", e);
|
|
716
716
|
}
|
|
717
|
-
}, Ee =
|
|
718
|
-
|
|
717
|
+
}, Ee = g ? G.filter((e) => e.gatewayPaymentId.toLowerCase().includes(g.toLowerCase()) || e.gatewayOrderId?.toLowerCase().includes(g.toLowerCase()) || e.reason?.toLowerCase().includes(g.toLowerCase())) : G, De = [
|
|
718
|
+
{
|
|
719
|
+
key: "date",
|
|
720
|
+
header: "Date",
|
|
721
|
+
priority: "primary",
|
|
722
|
+
cellClassName: "whitespace-nowrap",
|
|
723
|
+
cell: (e) => /* @__PURE__ */ I("div", {
|
|
724
|
+
className: "flex flex-col",
|
|
725
|
+
children: [/* @__PURE__ */ F("span", {
|
|
726
|
+
className: "text-sm text-text-primary",
|
|
727
|
+
children: o(e.createdAt).split(" ")[0]
|
|
728
|
+
}), /* @__PURE__ */ F("span", {
|
|
729
|
+
className: "text-xs text-text-muted",
|
|
730
|
+
children: o(e.createdAt).split(" ")[1]
|
|
731
|
+
})]
|
|
732
|
+
})
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
key: "status",
|
|
736
|
+
header: "Status",
|
|
737
|
+
cellClassName: "whitespace-nowrap",
|
|
738
|
+
cell: (e) => {
|
|
739
|
+
let t = R[e.status].icon;
|
|
740
|
+
return /* @__PURE__ */ I("span", {
|
|
741
|
+
className: `inline-flex items-center gap-1 px-2 py-0.5 text-xs font-medium rounded ${B(R[e.status].color)}`,
|
|
742
|
+
children: [/* @__PURE__ */ F(t, { className: "size-3" }), /* @__PURE__ */ F("span", {
|
|
743
|
+
className: "hidden sm:inline",
|
|
744
|
+
children: R[e.status].label
|
|
745
|
+
})]
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
key: "source",
|
|
751
|
+
header: "Source",
|
|
752
|
+
priority: "hidden-on-mobile",
|
|
753
|
+
cellClassName: "whitespace-nowrap",
|
|
754
|
+
cell: (e) => /* @__PURE__ */ F("span", {
|
|
755
|
+
className: "text-sm text-text-muted",
|
|
756
|
+
children: z[e.source]
|
|
757
|
+
})
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
key: "provider",
|
|
761
|
+
header: "Provider",
|
|
762
|
+
priority: "hidden-on-mobile",
|
|
763
|
+
cellClassName: "whitespace-nowrap",
|
|
764
|
+
cell: (e) => /* @__PURE__ */ F("span", {
|
|
765
|
+
className: "text-sm text-text-primary capitalize",
|
|
766
|
+
children: e.provider
|
|
767
|
+
})
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
key: "paymentId",
|
|
771
|
+
header: "Payment ID",
|
|
772
|
+
cellClassName: "whitespace-nowrap max-w-[120px] sm:max-w-[200px] truncate",
|
|
773
|
+
cell: (e) => /* @__PURE__ */ F("span", {
|
|
774
|
+
className: "text-sm font-mono text-text-muted",
|
|
775
|
+
children: e.gatewayPaymentId
|
|
776
|
+
})
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
key: "amount",
|
|
780
|
+
header: "Amount",
|
|
781
|
+
headerClassName: "text-right",
|
|
782
|
+
cellClassName: "text-right whitespace-nowrap",
|
|
783
|
+
cell: (e) => /* @__PURE__ */ F("span", {
|
|
784
|
+
className: "text-sm font-medium tabular-nums",
|
|
785
|
+
children: a(e.amount, e.currency)
|
|
786
|
+
})
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
key: "reason",
|
|
790
|
+
header: "Reason",
|
|
791
|
+
priority: "hidden-on-mobile",
|
|
792
|
+
cellClassName: "max-w-[200px] truncate",
|
|
793
|
+
cell: (e) => /* @__PURE__ */ F("span", {
|
|
794
|
+
className: "text-sm text-text-muted",
|
|
795
|
+
children: e.reason || "-"
|
|
796
|
+
})
|
|
797
|
+
}
|
|
798
|
+
], Oe = (e) => /* @__PURE__ */ F(ae, {
|
|
799
|
+
record: e,
|
|
800
|
+
onViewDetails: () => k(e),
|
|
801
|
+
onProcess: () => Se(e),
|
|
802
|
+
onSkip: () => {
|
|
803
|
+
U(e), L(!0);
|
|
804
|
+
},
|
|
805
|
+
onRetry: () => we(e),
|
|
806
|
+
isProcessing: le === e.id
|
|
807
|
+
});
|
|
808
|
+
return ue ? /* @__PURE__ */ I("div", {
|
|
719
809
|
className: "space-y-6 p-6",
|
|
720
810
|
children: [
|
|
721
|
-
/* @__PURE__ */
|
|
722
|
-
/* @__PURE__ */
|
|
811
|
+
/* @__PURE__ */ F("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }),
|
|
812
|
+
/* @__PURE__ */ F("div", {
|
|
723
813
|
className: "grid grid-cols-5 gap-4",
|
|
724
814
|
children: [
|
|
725
815
|
1,
|
|
@@ -727,9 +817,9 @@ var L = {
|
|
|
727
817
|
3,
|
|
728
818
|
4,
|
|
729
819
|
5
|
|
730
|
-
].map((e) => /* @__PURE__ */
|
|
820
|
+
].map((e) => /* @__PURE__ */ F("div", { className: "h-24 bg-bg-sunken animate-pulse rounded-lg" }, e))
|
|
731
821
|
}),
|
|
732
|
-
/* @__PURE__ */
|
|
822
|
+
/* @__PURE__ */ F("div", {
|
|
733
823
|
className: "space-y-2",
|
|
734
824
|
children: [
|
|
735
825
|
1,
|
|
@@ -737,56 +827,46 @@ var L = {
|
|
|
737
827
|
3,
|
|
738
828
|
4,
|
|
739
829
|
5
|
|
740
|
-
].map((e) => /* @__PURE__ */
|
|
830
|
+
].map((e) => /* @__PURE__ */ F("div", { className: "h-16 bg-bg-sunken animate-pulse rounded" }, e))
|
|
741
831
|
})
|
|
742
832
|
]
|
|
743
|
-
}) : /* @__PURE__ */
|
|
833
|
+
}) : /* @__PURE__ */ I("div", {
|
|
744
834
|
className: "space-y-6 p-6",
|
|
745
835
|
children: [
|
|
746
|
-
/* @__PURE__ */
|
|
747
|
-
title:
|
|
836
|
+
/* @__PURE__ */ F(t, {
|
|
837
|
+
title: l("billing.refunds.title", "Refund Management"),
|
|
748
838
|
description: "View and manage refund records",
|
|
749
|
-
actions: /* @__PURE__ */ F(
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
className: "inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-button border border-border-subtle bg-bg-surface hover:bg-bg-sunken/50 transition-colors",
|
|
768
|
-
children: [/* @__PURE__ */ P(O, { className: "size-4" }), "Refresh"]
|
|
769
|
-
}),
|
|
770
|
-
/* @__PURE__ */ F("button", {
|
|
771
|
-
type: "button",
|
|
772
|
-
onClick: () => N(!0),
|
|
773
|
-
className: "inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-button bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bgHover transition-colors",
|
|
774
|
-
children: [/* @__PURE__ */ P(ee, { className: "size-4" }), "Create Manual Refund"]
|
|
775
|
-
})
|
|
776
|
-
]
|
|
839
|
+
actions: /* @__PURE__ */ F(ne, {
|
|
840
|
+
primary: {
|
|
841
|
+
label: "Create Manual Refund",
|
|
842
|
+
onSelect: () => N(!0),
|
|
843
|
+
icon: /* @__PURE__ */ F(ee, { className: "size-4" })
|
|
844
|
+
},
|
|
845
|
+
actions: [...Y.length > 0 ? [{
|
|
846
|
+
label: `Import ${Y.length} Failed Webhooks`,
|
|
847
|
+
onSelect: Te,
|
|
848
|
+
disabled: Q,
|
|
849
|
+
icon: Q ? /* @__PURE__ */ F(T, { className: "size-4 animate-spin" }) : /* @__PURE__ */ F(S, { className: "size-4" })
|
|
850
|
+
}] : [], {
|
|
851
|
+
label: "Refresh",
|
|
852
|
+
onSelect: () => {
|
|
853
|
+
X();
|
|
854
|
+
},
|
|
855
|
+
icon: /* @__PURE__ */ F(O, { className: "size-4" })
|
|
856
|
+
}]
|
|
777
857
|
})
|
|
778
858
|
}),
|
|
779
|
-
/* @__PURE__ */
|
|
859
|
+
/* @__PURE__ */ F("div", {
|
|
780
860
|
className: "border-b border-border-subtle",
|
|
781
|
-
children: /* @__PURE__ */
|
|
861
|
+
children: /* @__PURE__ */ F("div", {
|
|
782
862
|
className: "flex flex-wrap gap-2 sm:gap-0",
|
|
783
|
-
children: Object.keys(
|
|
784
|
-
let t =
|
|
785
|
-
return /* @__PURE__ */
|
|
863
|
+
children: Object.keys(H).map((e) => {
|
|
864
|
+
let t = f === e, n = K ? e === "PENDING" ? K.pending : e === "COMPLETED" ? K.completed : e === "FAILED" ? K.failed : K.pending + K.processing + K.completed + K.failed + K.skipped : 0;
|
|
865
|
+
return /* @__PURE__ */ I("button", {
|
|
786
866
|
type: "button",
|
|
787
867
|
onClick: () => be(e),
|
|
788
868
|
className: `flex items-center gap-2 px-4 py-3 text-sm font-medium border-b-2 transition-colors whitespace-nowrap ${t ? "border-action-primary-bg text-text-link" : "border-transparent text-text-muted hover:text-text-primary hover:border-border-subtle"}`,
|
|
789
|
-
children: [
|
|
869
|
+
children: [H[e].label, K && /* @__PURE__ */ F("span", {
|
|
790
870
|
className: `px-2 py-0.5 text-xs rounded-full ${t ? "bg-[var(--color-accent-soft)] text-text-link" : "bg-bg-sunken text-text-muted"}`,
|
|
791
871
|
children: n
|
|
792
872
|
})]
|
|
@@ -794,96 +874,96 @@ var L = {
|
|
|
794
874
|
})
|
|
795
875
|
})
|
|
796
876
|
}),
|
|
797
|
-
/* @__PURE__ */
|
|
877
|
+
/* @__PURE__ */ I("div", {
|
|
798
878
|
className: "flex flex-col sm:flex-row gap-4",
|
|
799
879
|
children: [
|
|
800
|
-
/* @__PURE__ */
|
|
880
|
+
/* @__PURE__ */ I("div", {
|
|
801
881
|
className: "relative flex-1",
|
|
802
|
-
children: [/* @__PURE__ */
|
|
882
|
+
children: [/* @__PURE__ */ F(A, { className: "absolute left-3 top-1/2 -translate-y-1/2 size-4 text-text-muted" }), /* @__PURE__ */ F("input", {
|
|
803
883
|
type: "text",
|
|
804
884
|
placeholder: "Search by payment ID, order ID, or reason...",
|
|
805
|
-
value:
|
|
806
|
-
onChange: (e) =>
|
|
885
|
+
value: g,
|
|
886
|
+
onChange: (e) => _(e.target.value),
|
|
807
887
|
className: "w-full pl-[3.25rem] pr-4 py-2 border border-border-subtle rounded-md bg-bg-surface"
|
|
808
888
|
})]
|
|
809
889
|
}),
|
|
810
|
-
/* @__PURE__ */
|
|
890
|
+
/* @__PURE__ */ I("button", {
|
|
811
891
|
type: "button",
|
|
812
|
-
onClick: () =>
|
|
813
|
-
className: `inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md border transition-colors ${
|
|
892
|
+
onClick: () => E(!C),
|
|
893
|
+
className: `inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md border transition-colors ${C ? "border-action-primary-bg bg-[var(--color-accent-soft)] text-text-link" : "border-border-subtle bg-bg-surface hover:bg-bg-sunken/50"}`,
|
|
814
894
|
children: [
|
|
815
|
-
/* @__PURE__ */
|
|
895
|
+
/* @__PURE__ */ F(w, { className: "size-4" }),
|
|
816
896
|
"Filters",
|
|
817
|
-
Object.values(
|
|
897
|
+
Object.values(v).filter(Boolean).length > 0 && /* @__PURE__ */ F("span", {
|
|
818
898
|
className: "px-1.5 py-0.5 text-xs rounded-full bg-action-primary-bg text-action-primary-text",
|
|
819
|
-
children: Object.values(
|
|
899
|
+
children: Object.values(v).filter(Boolean).length
|
|
820
900
|
})
|
|
821
901
|
]
|
|
822
902
|
}),
|
|
823
|
-
Object.values(
|
|
903
|
+
Object.values(v).filter(Boolean).length > 0 && /* @__PURE__ */ I("button", {
|
|
824
904
|
type: "button",
|
|
825
905
|
onClick: () => {
|
|
826
|
-
|
|
906
|
+
x({}), Z({});
|
|
827
907
|
},
|
|
828
908
|
className: "inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md text-text-muted hover:text-text-primary transition-colors",
|
|
829
|
-
children: [/* @__PURE__ */
|
|
909
|
+
children: [/* @__PURE__ */ F(M, { className: "size-4" }), "Clear"]
|
|
830
910
|
})
|
|
831
911
|
]
|
|
832
912
|
}),
|
|
833
|
-
|
|
913
|
+
C && /* @__PURE__ */ I("div", {
|
|
834
914
|
className: "p-4 border border-border-subtle rounded-lg bg-bg-sunken/30 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
835
915
|
children: [
|
|
836
|
-
/* @__PURE__ */
|
|
916
|
+
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
|
|
837
917
|
className: "block text-sm font-medium mb-1",
|
|
838
918
|
children: "Source"
|
|
839
|
-
}), /* @__PURE__ */
|
|
840
|
-
value:
|
|
919
|
+
}), /* @__PURE__ */ I("select", {
|
|
920
|
+
value: v.source || "",
|
|
841
921
|
onChange: (e) => $("source", e.target.value),
|
|
842
922
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface",
|
|
843
|
-
children: [/* @__PURE__ */
|
|
923
|
+
children: [/* @__PURE__ */ F("option", {
|
|
844
924
|
value: "",
|
|
845
925
|
children: "All Sources"
|
|
846
|
-
}), Object.entries(
|
|
926
|
+
}), Object.entries(z).map(([e, t]) => /* @__PURE__ */ F("option", {
|
|
847
927
|
value: e,
|
|
848
928
|
children: t
|
|
849
929
|
}, e))]
|
|
850
930
|
})] }),
|
|
851
|
-
/* @__PURE__ */
|
|
931
|
+
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
|
|
852
932
|
className: "block text-sm font-medium mb-1",
|
|
853
933
|
children: "Provider"
|
|
854
|
-
}), /* @__PURE__ */
|
|
855
|
-
value:
|
|
934
|
+
}), /* @__PURE__ */ I("select", {
|
|
935
|
+
value: v.provider || "",
|
|
856
936
|
onChange: (e) => $("provider", e.target.value),
|
|
857
937
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface",
|
|
858
|
-
children: [/* @__PURE__ */
|
|
938
|
+
children: [/* @__PURE__ */ F("option", {
|
|
859
939
|
value: "",
|
|
860
940
|
children: "All Providers"
|
|
861
|
-
}), ie.map((e) => /* @__PURE__ */
|
|
941
|
+
}), ie.map((e) => /* @__PURE__ */ F("option", {
|
|
862
942
|
value: e,
|
|
863
943
|
children: e.charAt(0).toUpperCase() + e.slice(1)
|
|
864
944
|
}, e))]
|
|
865
945
|
})] }),
|
|
866
|
-
/* @__PURE__ */
|
|
946
|
+
/* @__PURE__ */ I("div", {
|
|
867
947
|
className: "sm:col-span-2 lg:col-span-1",
|
|
868
|
-
children: [/* @__PURE__ */
|
|
948
|
+
children: [/* @__PURE__ */ F("label", {
|
|
869
949
|
className: "block text-sm font-medium mb-1",
|
|
870
950
|
children: "Date Range"
|
|
871
|
-
}), /* @__PURE__ */
|
|
951
|
+
}), /* @__PURE__ */ I("div", {
|
|
872
952
|
className: "flex flex-col sm:flex-row items-start sm:items-center gap-2",
|
|
873
953
|
children: [
|
|
874
|
-
/* @__PURE__ */
|
|
954
|
+
/* @__PURE__ */ F("input", {
|
|
875
955
|
type: "date",
|
|
876
|
-
value:
|
|
956
|
+
value: v.fromDate ? v.fromDate.split("T")[0] : "",
|
|
877
957
|
onChange: (e) => $("fromDate", e.target.value ? new Date(e.target.value).toISOString() : void 0),
|
|
878
958
|
className: "w-full sm:flex-1 p-2 border border-border-subtle rounded-md bg-bg-surface text-sm"
|
|
879
959
|
}),
|
|
880
|
-
/* @__PURE__ */
|
|
960
|
+
/* @__PURE__ */ F("span", {
|
|
881
961
|
className: "text-text-muted hidden sm:inline",
|
|
882
962
|
children: "-"
|
|
883
963
|
}),
|
|
884
|
-
/* @__PURE__ */
|
|
964
|
+
/* @__PURE__ */ F("input", {
|
|
885
965
|
type: "date",
|
|
886
|
-
value:
|
|
966
|
+
value: v.toDate ? v.toDate.split("T")[0] : "",
|
|
887
967
|
onChange: (e) => $("toDate", e.target.value ? new Date(e.target.value).toISOString() : void 0),
|
|
888
968
|
className: "w-full sm:flex-1 p-2 border border-border-subtle rounded-md bg-bg-surface text-sm"
|
|
889
969
|
})
|
|
@@ -892,112 +972,22 @@ var L = {
|
|
|
892
972
|
})
|
|
893
973
|
]
|
|
894
974
|
}),
|
|
895
|
-
Ee.length === 0 ? /* @__PURE__ */
|
|
896
|
-
icon: /* @__PURE__ */
|
|
975
|
+
Ee.length === 0 ? /* @__PURE__ */ F(n, {
|
|
976
|
+
icon: /* @__PURE__ */ F(O, { className: "size-6 text-text-muted" }),
|
|
897
977
|
title: "No refund records found",
|
|
898
|
-
description: Object.values(
|
|
899
|
-
}) : /* @__PURE__ */
|
|
978
|
+
description: Object.values(v).filter(Boolean).length > 0 ? "Try adjusting your filters." : f === "PENDING" ? "No pending refunds to process." : "Refund records will appear here when created."
|
|
979
|
+
}) : /* @__PURE__ */ F("div", {
|
|
900
980
|
className: "border border-border-subtle rounded-lg overflow-hidden",
|
|
901
|
-
children: /* @__PURE__ */
|
|
902
|
-
columns:
|
|
903
|
-
{
|
|
904
|
-
key: "date",
|
|
905
|
-
header: "Date",
|
|
906
|
-
priority: "primary",
|
|
907
|
-
cellClassName: "whitespace-nowrap",
|
|
908
|
-
cell: (e) => /* @__PURE__ */ F("div", {
|
|
909
|
-
className: "flex flex-col",
|
|
910
|
-
children: [/* @__PURE__ */ P("span", {
|
|
911
|
-
className: "text-sm text-text-primary",
|
|
912
|
-
children: o(e.createdAt).split(" ")[0]
|
|
913
|
-
}), /* @__PURE__ */ P("span", {
|
|
914
|
-
className: "text-xs text-text-muted",
|
|
915
|
-
children: o(e.createdAt).split(" ")[1]
|
|
916
|
-
})]
|
|
917
|
-
})
|
|
918
|
-
},
|
|
919
|
-
{
|
|
920
|
-
key: "status",
|
|
921
|
-
header: "Status",
|
|
922
|
-
cellClassName: "whitespace-nowrap",
|
|
923
|
-
cell: (e) => {
|
|
924
|
-
let t = L[e.status].icon;
|
|
925
|
-
return /* @__PURE__ */ F("span", {
|
|
926
|
-
className: `inline-flex items-center gap-1 px-2 py-0.5 text-xs font-medium rounded ${z(L[e.status].color)}`,
|
|
927
|
-
children: [/* @__PURE__ */ P(t, { className: "size-3" }), /* @__PURE__ */ P("span", {
|
|
928
|
-
className: "hidden sm:inline",
|
|
929
|
-
children: L[e.status].label
|
|
930
|
-
})]
|
|
931
|
-
});
|
|
932
|
-
}
|
|
933
|
-
},
|
|
934
|
-
{
|
|
935
|
-
key: "source",
|
|
936
|
-
header: "Source",
|
|
937
|
-
priority: "hidden-on-mobile",
|
|
938
|
-
cellClassName: "whitespace-nowrap",
|
|
939
|
-
cell: (e) => /* @__PURE__ */ P("span", {
|
|
940
|
-
className: "text-sm text-text-muted",
|
|
941
|
-
children: R[e.source]
|
|
942
|
-
})
|
|
943
|
-
},
|
|
944
|
-
{
|
|
945
|
-
key: "provider",
|
|
946
|
-
header: "Provider",
|
|
947
|
-
priority: "hidden-on-mobile",
|
|
948
|
-
cellClassName: "whitespace-nowrap",
|
|
949
|
-
cell: (e) => /* @__PURE__ */ P("span", {
|
|
950
|
-
className: "text-sm text-text-primary capitalize",
|
|
951
|
-
children: e.provider
|
|
952
|
-
})
|
|
953
|
-
},
|
|
954
|
-
{
|
|
955
|
-
key: "paymentId",
|
|
956
|
-
header: "Payment ID",
|
|
957
|
-
cellClassName: "whitespace-nowrap max-w-[120px] sm:max-w-[200px] truncate",
|
|
958
|
-
cell: (e) => /* @__PURE__ */ P("span", {
|
|
959
|
-
className: "text-sm font-mono text-text-muted",
|
|
960
|
-
children: e.gatewayPaymentId
|
|
961
|
-
})
|
|
962
|
-
},
|
|
963
|
-
{
|
|
964
|
-
key: "amount",
|
|
965
|
-
header: "Amount",
|
|
966
|
-
headerClassName: "text-right",
|
|
967
|
-
cellClassName: "text-right whitespace-nowrap",
|
|
968
|
-
cell: (e) => /* @__PURE__ */ P("span", {
|
|
969
|
-
className: "text-sm font-medium tabular-nums",
|
|
970
|
-
children: a(e.amount, e.currency)
|
|
971
|
-
})
|
|
972
|
-
},
|
|
973
|
-
{
|
|
974
|
-
key: "reason",
|
|
975
|
-
header: "Reason",
|
|
976
|
-
priority: "hidden-on-mobile",
|
|
977
|
-
cellClassName: "max-w-[200px] truncate",
|
|
978
|
-
cell: (e) => /* @__PURE__ */ P("span", {
|
|
979
|
-
className: "text-sm text-text-muted",
|
|
980
|
-
children: e.reason || "-"
|
|
981
|
-
})
|
|
982
|
-
}
|
|
983
|
-
],
|
|
981
|
+
children: /* @__PURE__ */ F(re, {
|
|
982
|
+
columns: De,
|
|
984
983
|
data: Ee,
|
|
985
984
|
rowKey: (e) => e.id,
|
|
986
|
-
rowActions:
|
|
987
|
-
record: e,
|
|
988
|
-
onViewDetails: () => j(e),
|
|
989
|
-
onProcess: () => Se(e),
|
|
990
|
-
onSkip: () => {
|
|
991
|
-
U(e), B(!0);
|
|
992
|
-
},
|
|
993
|
-
onRetry: () => we(e),
|
|
994
|
-
isProcessing: le === e.id
|
|
995
|
-
})
|
|
985
|
+
rowActions: Oe
|
|
996
986
|
})
|
|
997
987
|
}),
|
|
998
|
-
q.totalCount > 0 && /* @__PURE__ */
|
|
988
|
+
q.totalCount > 0 && /* @__PURE__ */ I("div", {
|
|
999
989
|
className: "flex flex-col sm:flex-row items-center justify-between gap-4 border-t border-border-subtle pt-4",
|
|
1000
|
-
children: [/* @__PURE__ */
|
|
990
|
+
children: [/* @__PURE__ */ I("p", {
|
|
1001
991
|
className: "text-sm text-text-muted text-center sm:text-left",
|
|
1002
992
|
children: [
|
|
1003
993
|
"Showing ",
|
|
@@ -1010,33 +1000,33 @@ var L = {
|
|
|
1010
1000
|
q.totalCount,
|
|
1011
1001
|
" refunds"
|
|
1012
1002
|
]
|
|
1013
|
-
}), /* @__PURE__ */
|
|
1003
|
+
}), /* @__PURE__ */ I("div", {
|
|
1014
1004
|
className: "flex items-center gap-2",
|
|
1015
1005
|
children: [
|
|
1016
|
-
/* @__PURE__ */
|
|
1006
|
+
/* @__PURE__ */ I("button", {
|
|
1017
1007
|
type: "button",
|
|
1018
1008
|
onClick: fe,
|
|
1019
1009
|
disabled: !q.hasPrevious,
|
|
1020
1010
|
className: "inline-flex items-center gap-1 px-3 py-1.5 text-sm font-medium rounded-button border border-border-subtle bg-bg-surface hover:bg-bg-sunken/50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
|
|
1021
|
-
children: [/* @__PURE__ */
|
|
1011
|
+
children: [/* @__PURE__ */ F(y, { className: "size-4" }), /* @__PURE__ */ F("span", {
|
|
1022
1012
|
className: "hidden sm:inline",
|
|
1023
1013
|
children: "Previous"
|
|
1024
1014
|
})]
|
|
1025
1015
|
}),
|
|
1026
|
-
/* @__PURE__ */
|
|
1016
|
+
/* @__PURE__ */ I("span", {
|
|
1027
1017
|
className: "text-sm text-text-muted px-2",
|
|
1028
1018
|
children: [
|
|
1029
|
-
/* @__PURE__ */
|
|
1019
|
+
/* @__PURE__ */ F("span", {
|
|
1030
1020
|
className: "hidden sm:inline",
|
|
1031
1021
|
children: "Page "
|
|
1032
1022
|
}),
|
|
1033
1023
|
q.page + 1,
|
|
1034
1024
|
" ",
|
|
1035
|
-
/* @__PURE__ */
|
|
1025
|
+
/* @__PURE__ */ F("span", {
|
|
1036
1026
|
className: "hidden sm:inline",
|
|
1037
1027
|
children: "of"
|
|
1038
1028
|
}),
|
|
1039
|
-
/* @__PURE__ */
|
|
1029
|
+
/* @__PURE__ */ F("span", {
|
|
1040
1030
|
className: "sm:hidden",
|
|
1041
1031
|
children: "/"
|
|
1042
1032
|
}),
|
|
@@ -1044,42 +1034,42 @@ var L = {
|
|
|
1044
1034
|
Math.ceil(q.totalCount / q.pageSize)
|
|
1045
1035
|
]
|
|
1046
1036
|
}),
|
|
1047
|
-
/* @__PURE__ */
|
|
1037
|
+
/* @__PURE__ */ I("button", {
|
|
1048
1038
|
type: "button",
|
|
1049
1039
|
onClick: de,
|
|
1050
1040
|
disabled: !q.hasMore,
|
|
1051
1041
|
className: "inline-flex items-center gap-1 px-3 py-1.5 text-sm font-medium rounded-button border border-border-subtle bg-bg-surface hover:bg-bg-sunken/50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
|
|
1052
|
-
children: [/* @__PURE__ */
|
|
1042
|
+
children: [/* @__PURE__ */ F("span", {
|
|
1053
1043
|
className: "hidden sm:inline",
|
|
1054
1044
|
children: "Next"
|
|
1055
|
-
}), /* @__PURE__ */
|
|
1045
|
+
}), /* @__PURE__ */ F(b, { className: "size-4" })]
|
|
1056
1046
|
})
|
|
1057
1047
|
]
|
|
1058
1048
|
})]
|
|
1059
1049
|
}),
|
|
1060
|
-
/* @__PURE__ */
|
|
1061
|
-
isOpen:
|
|
1050
|
+
/* @__PURE__ */ F(oe, {
|
|
1051
|
+
isOpen: j,
|
|
1062
1052
|
onClose: () => N(!1),
|
|
1063
1053
|
onSubmit: xe,
|
|
1064
1054
|
isSubmitting: ve
|
|
1065
1055
|
}),
|
|
1066
|
-
/* @__PURE__ */
|
|
1067
|
-
isOpen:
|
|
1068
|
-
record:
|
|
1056
|
+
/* @__PURE__ */ F(se, {
|
|
1057
|
+
isOpen: P,
|
|
1058
|
+
record: V,
|
|
1069
1059
|
onClose: () => {
|
|
1070
|
-
|
|
1060
|
+
L(!1), U(null);
|
|
1071
1061
|
},
|
|
1072
1062
|
onSubmit: Ce,
|
|
1073
1063
|
isSubmitting: ye
|
|
1074
1064
|
}),
|
|
1075
|
-
/* @__PURE__ */
|
|
1076
|
-
record:
|
|
1077
|
-
onClose: () =>
|
|
1065
|
+
/* @__PURE__ */ F(ce, {
|
|
1066
|
+
record: D,
|
|
1067
|
+
onClose: () => k(null)
|
|
1078
1068
|
})
|
|
1079
1069
|
]
|
|
1080
1070
|
});
|
|
1081
1071
|
};
|
|
1082
1072
|
//#endregion
|
|
1083
|
-
export {
|
|
1073
|
+
export { U as RefundsPage };
|
|
1084
1074
|
|
|
1085
1075
|
//# sourceMappingURL=RefundsPage.js.map
|