@burdenoff/microfe-billing 2026.624.2 → 2026.624.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/billing/modules/billing/pages/RefundsPage.js +143 -149
- package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/TransactionsPage.js +232 -252
- package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CouponsListPage.js +206 -244
- package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -12,9 +12,10 @@ 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
|
|
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 te } from "lucide-react";
|
|
16
16
|
import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
|
|
17
17
|
import { useI18n as ne } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
18
|
+
import { ResponsiveTable as re } from "@burdenoff/fe-libs/ui";
|
|
18
19
|
import { useApolloClient as I } from "@apollo/client/react";
|
|
19
20
|
//#region src/billing/modules/billing/pages/RefundsPage.tsx
|
|
20
21
|
var L = {
|
|
@@ -36,7 +37,7 @@ var L = {
|
|
|
36
37
|
FAILED: {
|
|
37
38
|
label: "Failed",
|
|
38
39
|
color: "red",
|
|
39
|
-
icon:
|
|
40
|
+
icon: te
|
|
40
41
|
},
|
|
41
42
|
SKIPPED: {
|
|
42
43
|
label: "Skipped",
|
|
@@ -48,7 +49,7 @@ var L = {
|
|
|
48
49
|
WEBHOOK_RECOVERY: "Webhook Recovery",
|
|
49
50
|
SUBSCRIPTION_CANCEL: "Subscription Cancel",
|
|
50
51
|
DUPLICATE_PAYMENT: "Duplicate Payment"
|
|
51
|
-
},
|
|
52
|
+
}, ie = ["stripe", "razorpay"], z = (e) => {
|
|
52
53
|
let t = {
|
|
53
54
|
yellow: `${r.warning.bg} ${r.warning.text}`,
|
|
54
55
|
blue: `${r.info.bg} ${r.info.text}`,
|
|
@@ -57,7 +58,7 @@ var L = {
|
|
|
57
58
|
gray: `${r.neutral.bg} ${r.neutral.text}`
|
|
58
59
|
};
|
|
59
60
|
return t[e] || t.gray;
|
|
60
|
-
},
|
|
61
|
+
}, ae = ({ record: e, onViewDetails: t, onProcess: n, onSkip: i, onRetry: a, isProcessing: o }) => {
|
|
61
62
|
let [s, c] = h(!1), l = m(null);
|
|
62
63
|
f(() => {
|
|
63
64
|
let e = (e) => {
|
|
@@ -93,7 +94,7 @@ var L = {
|
|
|
93
94
|
n(), c(!1);
|
|
94
95
|
},
|
|
95
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`,
|
|
96
|
-
children: [/* @__PURE__ */ P(
|
|
97
|
+
children: [/* @__PURE__ */ P(D, { className: "size-4" }), "Process Refund"]
|
|
97
98
|
}),
|
|
98
99
|
d && /* @__PURE__ */ F("button", {
|
|
99
100
|
type: "button",
|
|
@@ -101,7 +102,7 @@ var L = {
|
|
|
101
102
|
i(), c(!1);
|
|
102
103
|
},
|
|
103
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`,
|
|
104
|
-
children: [/* @__PURE__ */ P(
|
|
105
|
+
children: [/* @__PURE__ */ P(j, { className: "size-4" }), "Skip Refund"]
|
|
105
106
|
}),
|
|
106
107
|
p && /* @__PURE__ */ F("button", {
|
|
107
108
|
type: "button",
|
|
@@ -109,7 +110,7 @@ var L = {
|
|
|
109
110
|
a(), c(!1);
|
|
110
111
|
},
|
|
111
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`,
|
|
112
|
-
children: [/* @__PURE__ */ P(
|
|
113
|
+
children: [/* @__PURE__ */ P(k, { className: "size-4" }), "Retry Refund"]
|
|
113
114
|
})
|
|
114
115
|
]
|
|
115
116
|
})]
|
|
@@ -119,7 +120,7 @@ var L = {
|
|
|
119
120
|
gatewayPaymentId: "",
|
|
120
121
|
amount: 0,
|
|
121
122
|
currency: "USD"
|
|
122
|
-
},
|
|
123
|
+
}, oe = ({ isOpen: e, onClose: t, onSubmit: n, isSubmitting: r }) => {
|
|
123
124
|
let i = I(), [o, s] = h(""), [c, u] = h(null), [f, p] = h(null), [m, g] = h(!1), [_, y] = h(B), b = () => {
|
|
124
125
|
s(""), u(null), p(null), y(B);
|
|
125
126
|
}, x = () => {
|
|
@@ -190,7 +191,7 @@ var L = {
|
|
|
190
191
|
type: "button",
|
|
191
192
|
onClick: x,
|
|
192
193
|
className: "p-1 rounded-md hover:bg-bg-sunken/50 transition-colors",
|
|
193
|
-
children: /* @__PURE__ */ P(
|
|
194
|
+
children: /* @__PURE__ */ P(M, { className: "size-5" })
|
|
194
195
|
})]
|
|
195
196
|
}), /* @__PURE__ */ F("form", {
|
|
196
197
|
onSubmit: C,
|
|
@@ -218,7 +219,7 @@ var L = {
|
|
|
218
219
|
onClick: () => S(o),
|
|
219
220
|
disabled: !o.trim() || m,
|
|
220
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",
|
|
221
|
-
children: m ? /* @__PURE__ */ P(T, { className: "size-4 animate-spin" }) : /* @__PURE__ */ P(
|
|
222
|
+
children: m ? /* @__PURE__ */ P(T, { className: "size-4 animate-spin" }) : /* @__PURE__ */ P(A, { className: "size-4" })
|
|
222
223
|
})]
|
|
223
224
|
}),
|
|
224
225
|
f && /* @__PURE__ */ P("p", {
|
|
@@ -388,7 +389,7 @@ var L = {
|
|
|
388
389
|
})]
|
|
389
390
|
})]
|
|
390
391
|
});
|
|
391
|
-
},
|
|
392
|
+
}, se = ({ isOpen: e, record: t, onClose: n, onSubmit: i, isSubmitting: o }) => {
|
|
392
393
|
let [s, c] = h("");
|
|
393
394
|
return !e || !t ? null : /* @__PURE__ */ F("div", {
|
|
394
395
|
className: "fixed inset-0 z-50 flex items-center justify-center",
|
|
@@ -406,7 +407,7 @@ var L = {
|
|
|
406
407
|
type: "button",
|
|
407
408
|
onClick: n,
|
|
408
409
|
className: "p-1 rounded-md hover:bg-bg-sunken/50 transition-colors",
|
|
409
|
-
children: /* @__PURE__ */ P(
|
|
410
|
+
children: /* @__PURE__ */ P(M, { className: "size-5" })
|
|
410
411
|
})]
|
|
411
412
|
}), /* @__PURE__ */ F("form", {
|
|
412
413
|
onSubmit: async (e) => {
|
|
@@ -456,7 +457,7 @@ var L = {
|
|
|
456
457
|
})]
|
|
457
458
|
})]
|
|
458
459
|
});
|
|
459
|
-
},
|
|
460
|
+
}, ce = ({ record: e, onClose: t }) => {
|
|
460
461
|
if (!e) return null;
|
|
461
462
|
let n = L[e.status].icon;
|
|
462
463
|
return /* @__PURE__ */ F("div", {
|
|
@@ -476,7 +477,7 @@ var L = {
|
|
|
476
477
|
type: "button",
|
|
477
478
|
onClick: t,
|
|
478
479
|
className: "p-1 rounded-md hover:bg-bg-sunken/50 transition-colors",
|
|
479
|
-
children: /* @__PURE__ */ P(
|
|
480
|
+
children: /* @__PURE__ */ P(M, { className: "size-5" })
|
|
480
481
|
})]
|
|
481
482
|
}),
|
|
482
483
|
/* @__PURE__ */ F("div", {
|
|
@@ -642,7 +643,7 @@ var L = {
|
|
|
642
643
|
let { t: l } = ne(), d = (e, t) => {
|
|
643
644
|
let n = l(e);
|
|
644
645
|
return n === e ? t : n;
|
|
645
|
-
}, f = c(), [m, g] = h("PENDING"), [_, v] = h(""), [x, C] = h({}), [E,
|
|
646
|
+
}, f = c(), [m, g] = h("PENDING"), [_, v] = h(""), [x, C] = h({}), [E, D] = h(!1), [k, j] = h(null), [te, N] = h(!1), [I, B] = h(!1), [H, 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(() => ({
|
|
646
647
|
...x,
|
|
647
648
|
status: V[m].status
|
|
648
649
|
}), [
|
|
@@ -663,7 +664,7 @@ var L = {
|
|
|
663
664
|
showRetry: !0
|
|
664
665
|
})
|
|
665
666
|
});
|
|
666
|
-
let
|
|
667
|
+
let be = (e) => {
|
|
667
668
|
g(e), C({}), v("");
|
|
668
669
|
}, $ = (e, t) => {
|
|
669
670
|
if (e === "status") return;
|
|
@@ -675,46 +676,46 @@ var L = {
|
|
|
675
676
|
...n,
|
|
676
677
|
status: V[m].status
|
|
677
678
|
});
|
|
678
|
-
},
|
|
679
|
+
}, xe = async (e) => {
|
|
679
680
|
try {
|
|
680
|
-
await
|
|
681
|
+
await pe(e), N(!1);
|
|
681
682
|
} catch (e) {
|
|
682
683
|
console.error("Failed to create refund:", e);
|
|
683
684
|
}
|
|
684
|
-
},
|
|
685
|
+
}, Se = async (e) => {
|
|
685
686
|
W(e.id);
|
|
686
687
|
try {
|
|
687
|
-
let t = await
|
|
688
|
+
let t = await me(e.id);
|
|
688
689
|
!t.success && t.error && console.error("Refund processing failed:", t.error);
|
|
689
690
|
} catch (e) {
|
|
690
691
|
console.error("Failed to process refund:", e);
|
|
691
692
|
} finally {
|
|
692
693
|
W(null);
|
|
693
694
|
}
|
|
694
|
-
},
|
|
695
|
+
}, Ce = async (e) => {
|
|
695
696
|
if (H) try {
|
|
696
|
-
await
|
|
697
|
+
await he(H.id, e), B(!1), U(null);
|
|
697
698
|
} catch (e) {
|
|
698
699
|
console.error("Failed to skip refund:", e);
|
|
699
700
|
}
|
|
700
|
-
},
|
|
701
|
+
}, we = async (e) => {
|
|
701
702
|
W(e.id);
|
|
702
703
|
try {
|
|
703
|
-
let t = await
|
|
704
|
+
let t = await ge(e.id);
|
|
704
705
|
!t.success && t.error && console.error("Refund retry failed:", t.error);
|
|
705
706
|
} catch (e) {
|
|
706
707
|
console.error("Failed to retry refund:", e);
|
|
707
708
|
} finally {
|
|
708
709
|
W(null);
|
|
709
710
|
}
|
|
710
|
-
},
|
|
711
|
+
}, Te = async () => {
|
|
711
712
|
try {
|
|
712
|
-
await
|
|
713
|
+
await _e();
|
|
713
714
|
} catch (e) {
|
|
714
715
|
console.error("Failed to create refunds from webhooks:", e);
|
|
715
716
|
}
|
|
716
|
-
},
|
|
717
|
-
return
|
|
717
|
+
}, Ee = _ ? G.filter((e) => e.gatewayPaymentId.toLowerCase().includes(_.toLowerCase()) || e.gatewayOrderId?.toLowerCase().includes(_.toLowerCase()) || e.reason?.toLowerCase().includes(_.toLowerCase())) : G;
|
|
718
|
+
return ue ? /* @__PURE__ */ F("div", {
|
|
718
719
|
className: "space-y-6 p-6",
|
|
719
720
|
children: [
|
|
720
721
|
/* @__PURE__ */ P("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }),
|
|
@@ -750,7 +751,7 @@ var L = {
|
|
|
750
751
|
children: [
|
|
751
752
|
Y.length > 0 && /* @__PURE__ */ F("button", {
|
|
752
753
|
type: "button",
|
|
753
|
-
onClick:
|
|
754
|
+
onClick: Te,
|
|
754
755
|
disabled: Q,
|
|
755
756
|
className: `inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md border ${r.warning.border} ${r.warning.bg} ${r.warning.text} hover:opacity-90 transition-colors disabled:opacity-50`,
|
|
756
757
|
children: [
|
|
@@ -764,13 +765,13 @@ var L = {
|
|
|
764
765
|
type: "button",
|
|
765
766
|
onClick: () => X(),
|
|
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",
|
|
767
|
-
children: [/* @__PURE__ */ P(
|
|
768
|
+
children: [/* @__PURE__ */ P(O, { className: "size-4" }), "Refresh"]
|
|
768
769
|
}),
|
|
769
770
|
/* @__PURE__ */ F("button", {
|
|
770
771
|
type: "button",
|
|
771
772
|
onClick: () => N(!0),
|
|
772
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",
|
|
773
|
-
children: [/* @__PURE__ */ P(
|
|
774
|
+
children: [/* @__PURE__ */ P(ee, { className: "size-4" }), "Create Manual Refund"]
|
|
774
775
|
})
|
|
775
776
|
]
|
|
776
777
|
})
|
|
@@ -783,7 +784,7 @@ var L = {
|
|
|
783
784
|
let t = m === 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;
|
|
784
785
|
return /* @__PURE__ */ F("button", {
|
|
785
786
|
type: "button",
|
|
786
|
-
onClick: () =>
|
|
787
|
+
onClick: () => be(e),
|
|
787
788
|
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"}`,
|
|
788
789
|
children: [V[e].label, K && /* @__PURE__ */ P("span", {
|
|
789
790
|
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"}`,
|
|
@@ -798,7 +799,7 @@ var L = {
|
|
|
798
799
|
children: [
|
|
799
800
|
/* @__PURE__ */ F("div", {
|
|
800
801
|
className: "relative flex-1",
|
|
801
|
-
children: [/* @__PURE__ */ P(
|
|
802
|
+
children: [/* @__PURE__ */ P(A, { className: "absolute left-3 top-1/2 -translate-y-1/2 size-4 text-text-muted" }), /* @__PURE__ */ P("input", {
|
|
802
803
|
type: "text",
|
|
803
804
|
placeholder: "Search by payment ID, order ID, or reason...",
|
|
804
805
|
value: _,
|
|
@@ -808,7 +809,7 @@ var L = {
|
|
|
808
809
|
}),
|
|
809
810
|
/* @__PURE__ */ F("button", {
|
|
810
811
|
type: "button",
|
|
811
|
-
onClick: () =>
|
|
812
|
+
onClick: () => D(!E),
|
|
812
813
|
className: `inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md border transition-colors ${E ? "border-action-primary-bg bg-[var(--color-accent-soft)] text-text-link" : "border-border-subtle bg-bg-surface hover:bg-bg-sunken/50"}`,
|
|
813
814
|
children: [
|
|
814
815
|
/* @__PURE__ */ P(w, { className: "size-4" }),
|
|
@@ -825,7 +826,7 @@ var L = {
|
|
|
825
826
|
C({}), Z({});
|
|
826
827
|
},
|
|
827
828
|
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",
|
|
828
|
-
children: [/* @__PURE__ */ P(
|
|
829
|
+
children: [/* @__PURE__ */ P(M, { className: "size-4" }), "Clear"]
|
|
829
830
|
})
|
|
830
831
|
]
|
|
831
832
|
}),
|
|
@@ -857,7 +858,7 @@ var L = {
|
|
|
857
858
|
children: [/* @__PURE__ */ P("option", {
|
|
858
859
|
value: "",
|
|
859
860
|
children: "All Providers"
|
|
860
|
-
}),
|
|
861
|
+
}), ie.map((e) => /* @__PURE__ */ P("option", {
|
|
861
862
|
value: e,
|
|
862
863
|
children: e.charAt(0).toUpperCase() + e.slice(1)
|
|
863
864
|
}, e))]
|
|
@@ -891,113 +892,106 @@ var L = {
|
|
|
891
892
|
})
|
|
892
893
|
]
|
|
893
894
|
}),
|
|
894
|
-
|
|
895
|
-
icon: /* @__PURE__ */ P(
|
|
895
|
+
Ee.length === 0 ? /* @__PURE__ */ P(n, {
|
|
896
|
+
icon: /* @__PURE__ */ P(O, { className: "size-6 text-text-muted" }),
|
|
896
897
|
title: "No refund records found",
|
|
897
898
|
description: Object.values(x).filter(Boolean).length > 0 ? "Try adjusting your filters." : m === "PENDING" ? "No pending refunds to process." : "Refund records will appear here when created."
|
|
898
899
|
}) : /* @__PURE__ */ P("div", {
|
|
899
900
|
className: "border border-border-subtle rounded-lg overflow-hidden",
|
|
900
|
-
children: /* @__PURE__ */ P(
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
/* @__PURE__ */ P("th", {
|
|
924
|
-
className: "text-left text-sm font-medium text-text-muted px-3 py-2 whitespace-nowrap",
|
|
925
|
-
children: "Payment ID"
|
|
926
|
-
}),
|
|
927
|
-
/* @__PURE__ */ P("th", {
|
|
928
|
-
className: "text-right text-sm font-medium text-text-muted px-3 py-2 whitespace-nowrap",
|
|
929
|
-
children: "Amount"
|
|
930
|
-
}),
|
|
931
|
-
/* @__PURE__ */ P("th", {
|
|
932
|
-
className: "text-left text-sm font-medium text-text-muted px-3 py-2 whitespace-nowrap hidden lg:table-cell",
|
|
933
|
-
children: "Reason"
|
|
934
|
-
}),
|
|
935
|
-
/* @__PURE__ */ P("th", { className: "p-2 w-10" })
|
|
936
|
-
] })
|
|
937
|
-
}), /* @__PURE__ */ P("tbody", {
|
|
938
|
-
className: "divide-y divide-border-subtle",
|
|
939
|
-
children: Te.map((e) => {
|
|
901
|
+
children: /* @__PURE__ */ P(re, {
|
|
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) => {
|
|
940
924
|
let t = L[e.status].icon;
|
|
941
|
-
return /* @__PURE__ */ F("
|
|
942
|
-
className:
|
|
943
|
-
children: [
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
children: [/* @__PURE__ */ P(t, { className: "size-3" }), /* @__PURE__ */ P("span", {
|
|
959
|
-
className: "hidden sm:inline",
|
|
960
|
-
children: L[e.status].label
|
|
961
|
-
})]
|
|
962
|
-
})
|
|
963
|
-
}),
|
|
964
|
-
/* @__PURE__ */ P("td", {
|
|
965
|
-
className: "px-3 py-2 text-sm text-text-muted whitespace-nowrap hidden sm:table-cell",
|
|
966
|
-
children: R[e.source]
|
|
967
|
-
}),
|
|
968
|
-
/* @__PURE__ */ P("td", {
|
|
969
|
-
className: "px-3 py-2 text-sm text-text-primary capitalize whitespace-nowrap hidden md:table-cell",
|
|
970
|
-
children: e.provider
|
|
971
|
-
}),
|
|
972
|
-
/* @__PURE__ */ P("td", {
|
|
973
|
-
className: "px-3 py-2 text-sm font-mono text-text-muted whitespace-nowrap max-w-[120px] sm:max-w-[200px] truncate",
|
|
974
|
-
children: e.gatewayPaymentId
|
|
975
|
-
}),
|
|
976
|
-
/* @__PURE__ */ P("td", {
|
|
977
|
-
className: "px-3 py-2 text-sm text-right font-medium whitespace-nowrap",
|
|
978
|
-
children: a(e.amount, e.currency)
|
|
979
|
-
}),
|
|
980
|
-
/* @__PURE__ */ P("td", {
|
|
981
|
-
className: "px-3 py-2 text-sm text-text-muted max-w-[200px] truncate hidden lg:table-cell",
|
|
982
|
-
children: e.reason || "-"
|
|
983
|
-
}),
|
|
984
|
-
/* @__PURE__ */ P("td", {
|
|
985
|
-
className: "p-2 text-center",
|
|
986
|
-
children: /* @__PURE__ */ P(ie, {
|
|
987
|
-
record: e,
|
|
988
|
-
onViewDetails: () => A(e),
|
|
989
|
-
onProcess: () => xe(e),
|
|
990
|
-
onSkip: () => {
|
|
991
|
-
U(e), B(!0);
|
|
992
|
-
},
|
|
993
|
-
onRetry: () => Ce(e),
|
|
994
|
-
isProcessing: ce === e.id
|
|
995
|
-
})
|
|
996
|
-
})
|
|
997
|
-
]
|
|
998
|
-
}, e.id);
|
|
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]
|
|
999
942
|
})
|
|
1000
|
-
}
|
|
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
|
+
],
|
|
984
|
+
data: Ee,
|
|
985
|
+
rowKey: (e) => e.id,
|
|
986
|
+
rowActions: (e) => /* @__PURE__ */ P(ae, {
|
|
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
|
|
1001
995
|
})
|
|
1002
996
|
})
|
|
1003
997
|
}),
|
|
@@ -1021,7 +1015,7 @@ var L = {
|
|
|
1021
1015
|
children: [
|
|
1022
1016
|
/* @__PURE__ */ F("button", {
|
|
1023
1017
|
type: "button",
|
|
1024
|
-
onClick:
|
|
1018
|
+
onClick: fe,
|
|
1025
1019
|
disabled: !q.hasPrevious,
|
|
1026
1020
|
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",
|
|
1027
1021
|
children: [/* @__PURE__ */ P(y, { className: "size-4" }), /* @__PURE__ */ P("span", {
|
|
@@ -1052,7 +1046,7 @@ var L = {
|
|
|
1052
1046
|
}),
|
|
1053
1047
|
/* @__PURE__ */ F("button", {
|
|
1054
1048
|
type: "button",
|
|
1055
|
-
onClick:
|
|
1049
|
+
onClick: de,
|
|
1056
1050
|
disabled: !q.hasMore,
|
|
1057
1051
|
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",
|
|
1058
1052
|
children: [/* @__PURE__ */ P("span", {
|
|
@@ -1063,24 +1057,24 @@ var L = {
|
|
|
1063
1057
|
]
|
|
1064
1058
|
})]
|
|
1065
1059
|
}),
|
|
1066
|
-
/* @__PURE__ */ P(
|
|
1067
|
-
isOpen:
|
|
1060
|
+
/* @__PURE__ */ P(oe, {
|
|
1061
|
+
isOpen: te,
|
|
1068
1062
|
onClose: () => N(!1),
|
|
1069
|
-
onSubmit:
|
|
1070
|
-
isSubmitting:
|
|
1063
|
+
onSubmit: xe,
|
|
1064
|
+
isSubmitting: ve
|
|
1071
1065
|
}),
|
|
1072
|
-
/* @__PURE__ */ P(
|
|
1066
|
+
/* @__PURE__ */ P(se, {
|
|
1073
1067
|
isOpen: I,
|
|
1074
1068
|
record: H,
|
|
1075
1069
|
onClose: () => {
|
|
1076
1070
|
B(!1), U(null);
|
|
1077
1071
|
},
|
|
1078
|
-
onSubmit:
|
|
1079
|
-
isSubmitting:
|
|
1072
|
+
onSubmit: Ce,
|
|
1073
|
+
isSubmitting: ye
|
|
1080
1074
|
}),
|
|
1081
|
-
/* @__PURE__ */ P(
|
|
1082
|
-
record:
|
|
1083
|
-
onClose: () =>
|
|
1075
|
+
/* @__PURE__ */ P(ce, {
|
|
1076
|
+
record: k,
|
|
1077
|
+
onClose: () => j(null)
|
|
1084
1078
|
})
|
|
1085
1079
|
]
|
|
1086
1080
|
});
|