@burdenoff/microfe-billing 2026.912.6 → 2026.913.1
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 +87 -74
- package/dist/billing/BillingAdminRoutes.js.map +1 -1
- package/dist/billing/modules/billing/hooks/useRefunds.js.map +1 -1
- package/dist/billing/modules/billing/index.js +5 -4
- package/dist/billing/modules/billing/pages/RefundIssueLogsPage.js +201 -0
- package/dist/billing/modules/billing/pages/RefundIssueLogsPage.js.map +1 -0
- package/dist/billing/modules/billing/pages/RefundsPage.js +116 -108
- package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/index.js +1 -0
- package/dist/generated/global-operations.js +2 -1
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.js.map +1 -1
- package/package.json +1 -1
|
@@ -12,9 +12,10 @@ import { useRefunds as l } from "../hooks/useRefunds.js";
|
|
|
12
12
|
import "../hooks/index.js";
|
|
13
13
|
import { useCallback as u, useEffect as d, useMemo as f, useRef as p, useState as m } from "react";
|
|
14
14
|
import { AlertTriangle as h, Ban as g, CheckCircle as _, ChevronLeft as v, ChevronRight as y, Clock as b, Download as x, Eye as S, Filter as C, Loader2 as w, MoreHorizontal as T, Play as E, Plus as ee, RefreshCw as te, RotateCcw as D, Search as O, SkipForward as k, X as A, XCircle as j } from "lucide-react";
|
|
15
|
+
import { Link as ne } from "react-router";
|
|
15
16
|
import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
16
|
-
import { useI18n as
|
|
17
|
-
import { CTAOverflowMenu as
|
|
17
|
+
import { useI18n as re } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
18
|
+
import { CTAOverflowMenu as ie, IllustratedEmptyState as ae, PagePurpose as oe, ResponsiveTable as se } from "@burdenoff/fe-libs/ui";
|
|
18
19
|
import { useApolloClient as F } from "@apollo/client/react";
|
|
19
20
|
//#region src/billing/modules/billing/pages/RefundsPage.tsx
|
|
20
21
|
var I = {
|
|
@@ -48,7 +49,7 @@ var I = {
|
|
|
48
49
|
WEBHOOK_RECOVERY: "Webhook Recovery",
|
|
49
50
|
SUBSCRIPTION_CANCEL: "Subscription Cancel",
|
|
50
51
|
DUPLICATE_PAYMENT: "Duplicate Payment"
|
|
51
|
-
},
|
|
52
|
+
}, ce = ["stripe", "razorpay"], R = (e) => {
|
|
52
53
|
let t = {
|
|
53
54
|
yellow: `${n.warning.bg} ${n.warning.text}`,
|
|
54
55
|
blue: `${n.info.bg} ${n.info.text}`,
|
|
@@ -57,7 +58,7 @@ var I = {
|
|
|
57
58
|
gray: `${n.neutral.bg} ${n.neutral.text}`
|
|
58
59
|
};
|
|
59
60
|
return t[e] || t.gray;
|
|
60
|
-
},
|
|
61
|
+
}, le = ({ record: e, onViewDetails: t, onProcess: r, onSkip: i, onRetry: a, isProcessing: o }) => {
|
|
61
62
|
let [s, c] = m(!1), l = p(null);
|
|
62
63
|
d(() => {
|
|
63
64
|
let e = (e) => {
|
|
@@ -119,7 +120,7 @@ var I = {
|
|
|
119
120
|
gatewayPaymentId: "",
|
|
120
121
|
amount: 0,
|
|
121
122
|
currency: "USD"
|
|
122
|
-
},
|
|
123
|
+
}, ue = ({ isOpen: e, onClose: t, onSubmit: n, isSubmitting: r }) => {
|
|
123
124
|
let a = F(), [o, s] = m(""), [l, d] = m(null), [f, p] = m(null), [h, g] = m(!1), [v, y] = m(z), b = () => {
|
|
124
125
|
s(""), d(null), p(null), y(z);
|
|
125
126
|
}, x = () => {
|
|
@@ -387,7 +388,7 @@ var I = {
|
|
|
387
388
|
})]
|
|
388
389
|
})]
|
|
389
390
|
});
|
|
390
|
-
},
|
|
391
|
+
}, de = ({ isOpen: e, record: t, onClose: r, onSubmit: a, isSubmitting: o }) => {
|
|
391
392
|
let [s, c] = m("");
|
|
392
393
|
return !e || !t ? null : /* @__PURE__ */ P("div", {
|
|
393
394
|
className: "fixed inset-0 z-50 flex items-center justify-center",
|
|
@@ -455,7 +456,7 @@ var I = {
|
|
|
455
456
|
})]
|
|
456
457
|
})]
|
|
457
458
|
});
|
|
458
|
-
},
|
|
459
|
+
}, fe = ({ record: e, onClose: t }) => {
|
|
459
460
|
if (!e) return null;
|
|
460
461
|
let r = I[e.status].icon;
|
|
461
462
|
return /* @__PURE__ */ P("div", {
|
|
@@ -638,81 +639,81 @@ var I = {
|
|
|
638
639
|
status: void 0
|
|
639
640
|
}
|
|
640
641
|
}, V = () => {
|
|
641
|
-
let { t: n } =
|
|
642
|
+
let { t: n } = re(), c = (e, t) => {
|
|
642
643
|
let r = n(e);
|
|
643
644
|
return r === e ? t : r;
|
|
644
|
-
}, u = s(), [d, p] = m("PENDING"), [
|
|
645
|
-
...
|
|
645
|
+
}, u = s(), [d, p] = m("PENDING"), [g, _] = m(""), [b, S] = m({}), [T, E] = m(!1), [D, k] = m(null), [j, M] = m(!1), [F, z] = m(!1), [V, H] = m(null), [pe, U] = m(null), { records: W, stats: G, pagination: K, isLoading: me, recordsError: q, unprocessedWebhooks: J, refetch: Y, goToNextPage: he, goToPreviousPage: ge, setFilters: X, createRefundRecord: _e, processRefund: ve, skipRefund: ye, retryRefund: be, createRefundRecordsFromFailedWebhooks: xe, isCreating: Se, isProcessing: Ce, isCreatingFromWebhooks: Z } = l({ filters: f(() => ({
|
|
646
|
+
...b,
|
|
646
647
|
status: B[d].status
|
|
647
648
|
}), [
|
|
648
649
|
d,
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
650
|
+
b.source,
|
|
651
|
+
b.provider,
|
|
652
|
+
b.billingAccountId,
|
|
653
|
+
b.fromDate,
|
|
654
|
+
b.toDate
|
|
654
655
|
]) });
|
|
655
656
|
if (!u.canViewPayments) return /* @__PURE__ */ N(e, { message: "You don't have permission to view refunds." });
|
|
656
|
-
if (
|
|
657
|
+
if (q && o(q)) return /* @__PURE__ */ N("div", {
|
|
657
658
|
className: "p-6",
|
|
658
659
|
children: /* @__PURE__ */ N(r, {
|
|
659
660
|
title: "Server Unavailable",
|
|
660
661
|
message: "Unable to load refunds. The server might be down or experiencing issues.",
|
|
661
|
-
onRetry: () =>
|
|
662
|
+
onRetry: () => Y(),
|
|
662
663
|
showRetry: !0
|
|
663
664
|
})
|
|
664
665
|
});
|
|
665
|
-
let
|
|
666
|
-
p(e),
|
|
666
|
+
let we = (e) => {
|
|
667
|
+
p(e), S({}), _("");
|
|
667
668
|
}, Q = (e, t) => {
|
|
668
669
|
if (e === "status") return;
|
|
669
670
|
let n = {
|
|
670
|
-
...
|
|
671
|
+
...b,
|
|
671
672
|
[e]: t || void 0
|
|
672
673
|
};
|
|
673
|
-
|
|
674
|
+
S(n), X({
|
|
674
675
|
...n,
|
|
675
676
|
status: B[d].status
|
|
676
677
|
});
|
|
677
|
-
},
|
|
678
|
+
}, Te = async (e) => {
|
|
678
679
|
try {
|
|
679
|
-
await
|
|
680
|
+
await _e(e), M(!1);
|
|
680
681
|
} catch (e) {
|
|
681
682
|
console.error("Failed to create refund:", e);
|
|
682
683
|
}
|
|
683
|
-
},
|
|
684
|
-
|
|
684
|
+
}, Ee = async (e) => {
|
|
685
|
+
U(e.id);
|
|
685
686
|
try {
|
|
686
|
-
let t = await
|
|
687
|
+
let t = await ve(e.id);
|
|
687
688
|
!t.success && t.error && console.error("Refund processing failed:", t.error);
|
|
688
689
|
} catch (e) {
|
|
689
690
|
console.error("Failed to process refund:", e);
|
|
690
691
|
} finally {
|
|
691
|
-
|
|
692
|
+
U(null);
|
|
692
693
|
}
|
|
693
|
-
},
|
|
694
|
-
if (
|
|
695
|
-
await
|
|
694
|
+
}, De = async (e) => {
|
|
695
|
+
if (V) try {
|
|
696
|
+
await ye(V.id, e), z(!1), H(null);
|
|
696
697
|
} catch (e) {
|
|
697
698
|
console.error("Failed to skip refund:", e);
|
|
698
699
|
}
|
|
699
|
-
},
|
|
700
|
-
|
|
700
|
+
}, Oe = async (e) => {
|
|
701
|
+
U(e.id);
|
|
701
702
|
try {
|
|
702
|
-
let t = await
|
|
703
|
+
let t = await be(e.id);
|
|
703
704
|
!t.success && t.error && console.error("Refund retry failed:", t.error);
|
|
704
705
|
} catch (e) {
|
|
705
706
|
console.error("Failed to retry refund:", e);
|
|
706
707
|
} finally {
|
|
707
|
-
|
|
708
|
+
U(null);
|
|
708
709
|
}
|
|
709
|
-
},
|
|
710
|
+
}, ke = async () => {
|
|
710
711
|
try {
|
|
711
|
-
await
|
|
712
|
+
await xe();
|
|
712
713
|
} catch (e) {
|
|
713
714
|
console.error("Failed to create refunds from webhooks:", e);
|
|
714
715
|
}
|
|
715
|
-
}, $ =
|
|
716
|
+
}, $ = g ? W.filter((e) => e.gatewayPaymentId.toLowerCase().includes(g.toLowerCase()) || e.gatewayOrderId?.toLowerCase().includes(g.toLowerCase()) || e.reason?.toLowerCase().includes(g.toLowerCase())) : W, Ae = [
|
|
716
717
|
{
|
|
717
718
|
key: "date",
|
|
718
719
|
header: "Date",
|
|
@@ -793,17 +794,17 @@ var I = {
|
|
|
793
794
|
children: e.reason || "-"
|
|
794
795
|
})
|
|
795
796
|
}
|
|
796
|
-
],
|
|
797
|
+
], je = (e) => /* @__PURE__ */ N(le, {
|
|
797
798
|
record: e,
|
|
798
|
-
onViewDetails: () =>
|
|
799
|
-
onProcess: () =>
|
|
799
|
+
onViewDetails: () => k(e),
|
|
800
|
+
onProcess: () => Ee(e),
|
|
800
801
|
onSkip: () => {
|
|
801
|
-
|
|
802
|
+
H(e), z(!0);
|
|
802
803
|
},
|
|
803
|
-
onRetry: () =>
|
|
804
|
-
isProcessing:
|
|
804
|
+
onRetry: () => Oe(e),
|
|
805
|
+
isProcessing: pe === e.id
|
|
805
806
|
});
|
|
806
|
-
return
|
|
807
|
+
return me ? /* @__PURE__ */ P("div", {
|
|
807
808
|
className: "space-y-6 p-6",
|
|
808
809
|
children: [
|
|
809
810
|
/* @__PURE__ */ N("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }),
|
|
@@ -834,38 +835,45 @@ var I = {
|
|
|
834
835
|
/* @__PURE__ */ N(t, {
|
|
835
836
|
title: c("billing.refunds.title", "Refund Management"),
|
|
836
837
|
description: "View and manage refund records",
|
|
837
|
-
actions: /* @__PURE__ */
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
}] : [], {
|
|
849
|
-
label: "Refresh",
|
|
850
|
-
onSelect: () => {
|
|
851
|
-
J();
|
|
838
|
+
actions: /* @__PURE__ */ P("div", {
|
|
839
|
+
className: "flex items-center gap-2",
|
|
840
|
+
children: [/* @__PURE__ */ P(ne, {
|
|
841
|
+
to: "logs",
|
|
842
|
+
className: "inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md border border-border-subtle bg-bg-surface hover:bg-bg-sunken/50 transition-colors",
|
|
843
|
+
children: [/* @__PURE__ */ N(h, { className: "size-4" }), "View Issue Log"]
|
|
844
|
+
}), /* @__PURE__ */ N(ie, {
|
|
845
|
+
primary: {
|
|
846
|
+
label: "Create Manual Refund",
|
|
847
|
+
onSelect: () => M(!0),
|
|
848
|
+
icon: /* @__PURE__ */ N(ee, { className: "size-4" })
|
|
852
849
|
},
|
|
853
|
-
|
|
854
|
-
|
|
850
|
+
actions: [...J.length > 0 ? [{
|
|
851
|
+
label: `Import ${J.length} Failed Webhooks`,
|
|
852
|
+
onSelect: ke,
|
|
853
|
+
disabled: Z,
|
|
854
|
+
icon: Z ? /* @__PURE__ */ N(w, { className: "size-4 animate-spin" }) : /* @__PURE__ */ N(x, { className: "size-4" })
|
|
855
|
+
}] : [], {
|
|
856
|
+
label: "Refresh",
|
|
857
|
+
onSelect: () => {
|
|
858
|
+
Y();
|
|
859
|
+
},
|
|
860
|
+
icon: /* @__PURE__ */ N(te, { className: "size-4" })
|
|
861
|
+
}]
|
|
862
|
+
})]
|
|
855
863
|
})
|
|
856
864
|
}),
|
|
857
|
-
/* @__PURE__ */ N(
|
|
865
|
+
/* @__PURE__ */ N(oe, { children: c("billing.refunds.purpose", "Track and act on every refund across all billing accounts — manual refunds, ones triggered by cancellations, and those recovered from failed payment-gateway webhooks. Use it to process pending refunds, retry failed ones, skip a refund with a reason, or create a manual refund for a specific transaction.") }),
|
|
858
866
|
/* @__PURE__ */ N("div", {
|
|
859
867
|
className: "border-b border-border-subtle",
|
|
860
868
|
children: /* @__PURE__ */ N("div", {
|
|
861
869
|
className: "flex flex-wrap gap-2 sm:gap-0",
|
|
862
870
|
children: Object.keys(B).map((e) => {
|
|
863
|
-
let t = d === e, n =
|
|
871
|
+
let t = d === e, n = G ? e === "PENDING" ? G.pending : e === "COMPLETED" ? G.completed : e === "FAILED" ? G.failed : G.pending + G.processing + G.completed + G.failed + G.skipped : 0;
|
|
864
872
|
return /* @__PURE__ */ P("button", {
|
|
865
873
|
type: "button",
|
|
866
|
-
onClick: () =>
|
|
874
|
+
onClick: () => we(e),
|
|
867
875
|
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"}`,
|
|
868
|
-
children: [B[e].label,
|
|
876
|
+
children: [B[e].label, G && /* @__PURE__ */ N("span", {
|
|
869
877
|
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"}`,
|
|
870
878
|
children: n
|
|
871
879
|
})]
|
|
@@ -881,42 +889,42 @@ var I = {
|
|
|
881
889
|
children: [/* @__PURE__ */ N(O, { className: "absolute left-3 top-1/2 -translate-y-1/2 size-4 text-text-muted" }), /* @__PURE__ */ N("input", {
|
|
882
890
|
type: "text",
|
|
883
891
|
placeholder: "Search by payment ID, order ID, or reason...",
|
|
884
|
-
value:
|
|
885
|
-
onChange: (e) =>
|
|
892
|
+
value: g,
|
|
893
|
+
onChange: (e) => _(e.target.value),
|
|
886
894
|
className: "w-full pl-[3.25rem] pr-4 py-2 border border-border-subtle rounded-md bg-bg-surface"
|
|
887
895
|
})]
|
|
888
896
|
}),
|
|
889
897
|
/* @__PURE__ */ P("button", {
|
|
890
898
|
type: "button",
|
|
891
|
-
onClick: () =>
|
|
892
|
-
className: `inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md border transition-colors ${
|
|
899
|
+
onClick: () => E(!T),
|
|
900
|
+
className: `inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md border transition-colors ${T ? "border-action-primary-bg bg-[var(--color-accent-soft)] text-text-link" : "border-border-subtle bg-bg-surface hover:bg-bg-sunken/50"}`,
|
|
893
901
|
children: [
|
|
894
902
|
/* @__PURE__ */ N(C, { className: "size-4" }),
|
|
895
903
|
"Filters",
|
|
896
|
-
Object.values(
|
|
904
|
+
Object.values(b).filter(Boolean).length > 0 && /* @__PURE__ */ N("span", {
|
|
897
905
|
className: "px-1.5 py-0.5 text-xs rounded-full bg-action-primary-bg text-action-primary-text",
|
|
898
|
-
children: Object.values(
|
|
906
|
+
children: Object.values(b).filter(Boolean).length
|
|
899
907
|
})
|
|
900
908
|
]
|
|
901
909
|
}),
|
|
902
|
-
Object.values(
|
|
910
|
+
Object.values(b).filter(Boolean).length > 0 && /* @__PURE__ */ P("button", {
|
|
903
911
|
type: "button",
|
|
904
912
|
onClick: () => {
|
|
905
|
-
|
|
913
|
+
S({}), X({});
|
|
906
914
|
},
|
|
907
915
|
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",
|
|
908
916
|
children: [/* @__PURE__ */ N(A, { className: "size-4" }), "Clear"]
|
|
909
917
|
})
|
|
910
918
|
]
|
|
911
919
|
}),
|
|
912
|
-
|
|
920
|
+
T && /* @__PURE__ */ P("div", {
|
|
913
921
|
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",
|
|
914
922
|
children: [
|
|
915
923
|
/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
|
|
916
924
|
className: "block text-sm font-medium mb-1",
|
|
917
925
|
children: "Source"
|
|
918
926
|
}), /* @__PURE__ */ P("select", {
|
|
919
|
-
value:
|
|
927
|
+
value: b.source || "",
|
|
920
928
|
onChange: (e) => Q("source", e.target.value),
|
|
921
929
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface",
|
|
922
930
|
children: [/* @__PURE__ */ N("option", {
|
|
@@ -931,13 +939,13 @@ var I = {
|
|
|
931
939
|
className: "block text-sm font-medium mb-1",
|
|
932
940
|
children: "Provider"
|
|
933
941
|
}), /* @__PURE__ */ P("select", {
|
|
934
|
-
value:
|
|
942
|
+
value: b.provider || "",
|
|
935
943
|
onChange: (e) => Q("provider", e.target.value),
|
|
936
944
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface",
|
|
937
945
|
children: [/* @__PURE__ */ N("option", {
|
|
938
946
|
value: "",
|
|
939
947
|
children: "All Providers"
|
|
940
|
-
}),
|
|
948
|
+
}), ce.map((e) => /* @__PURE__ */ N("option", {
|
|
941
949
|
value: e,
|
|
942
950
|
children: e.charAt(0).toUpperCase() + e.slice(1)
|
|
943
951
|
}, e))]
|
|
@@ -952,7 +960,7 @@ var I = {
|
|
|
952
960
|
children: [
|
|
953
961
|
/* @__PURE__ */ N("input", {
|
|
954
962
|
type: "date",
|
|
955
|
-
value:
|
|
963
|
+
value: b.fromDate ? b.fromDate.split("T")[0] : "",
|
|
956
964
|
onChange: (e) => Q("fromDate", e.target.value ? new Date(e.target.value).toISOString() : void 0),
|
|
957
965
|
className: "w-full sm:flex-1 p-2 border border-border-subtle rounded-md bg-bg-surface text-sm"
|
|
958
966
|
}),
|
|
@@ -962,7 +970,7 @@ var I = {
|
|
|
962
970
|
}),
|
|
963
971
|
/* @__PURE__ */ N("input", {
|
|
964
972
|
type: "date",
|
|
965
|
-
value:
|
|
973
|
+
value: b.toDate ? b.toDate.split("T")[0] : "",
|
|
966
974
|
onChange: (e) => Q("toDate", e.target.value ? new Date(e.target.value).toISOString() : void 0),
|
|
967
975
|
className: "w-full sm:flex-1 p-2 border border-border-subtle rounded-md bg-bg-surface text-sm"
|
|
968
976
|
})
|
|
@@ -971,32 +979,32 @@ var I = {
|
|
|
971
979
|
})
|
|
972
980
|
]
|
|
973
981
|
}),
|
|
974
|
-
$.length === 0 ? /* @__PURE__ */ N(
|
|
975
|
-
illustration: Object.values(
|
|
982
|
+
$.length === 0 ? /* @__PURE__ */ N(ae, {
|
|
983
|
+
illustration: Object.values(b).filter(Boolean).length > 0 ? "empty-search" : "empty-data",
|
|
976
984
|
title: "No refund records found",
|
|
977
|
-
description: Object.values(
|
|
985
|
+
description: Object.values(b).filter(Boolean).length > 0 ? "Try adjusting your filters." : d === "PENDING" ? "No pending refunds to process." : "Refund records will appear here when created."
|
|
978
986
|
}) : /* @__PURE__ */ N("div", {
|
|
979
987
|
className: "border border-border-subtle rounded-lg overflow-hidden",
|
|
980
|
-
children: /* @__PURE__ */ N(
|
|
981
|
-
columns:
|
|
988
|
+
children: /* @__PURE__ */ N(se, {
|
|
989
|
+
columns: Ae,
|
|
982
990
|
data: $,
|
|
983
991
|
rowKey: (e) => e.id,
|
|
984
|
-
rowActions:
|
|
992
|
+
rowActions: je
|
|
985
993
|
})
|
|
986
994
|
}),
|
|
987
|
-
|
|
995
|
+
K.totalCount > 0 && /* @__PURE__ */ P("div", {
|
|
988
996
|
className: "flex flex-col sm:flex-row items-center justify-between gap-4 border-t border-border-subtle pt-4",
|
|
989
997
|
children: [/* @__PURE__ */ P("p", {
|
|
990
998
|
className: "text-sm text-text-muted text-center sm:text-left",
|
|
991
999
|
children: [
|
|
992
1000
|
"Showing ",
|
|
993
|
-
|
|
1001
|
+
K.page * K.pageSize + 1,
|
|
994
1002
|
" to",
|
|
995
1003
|
" ",
|
|
996
|
-
Math.min((
|
|
1004
|
+
Math.min((K.page + 1) * K.pageSize, K.totalCount),
|
|
997
1005
|
" of",
|
|
998
1006
|
" ",
|
|
999
|
-
|
|
1007
|
+
K.totalCount,
|
|
1000
1008
|
" refunds"
|
|
1001
1009
|
]
|
|
1002
1010
|
}), /* @__PURE__ */ P("div", {
|
|
@@ -1004,8 +1012,8 @@ var I = {
|
|
|
1004
1012
|
children: [
|
|
1005
1013
|
/* @__PURE__ */ P("button", {
|
|
1006
1014
|
type: "button",
|
|
1007
|
-
onClick:
|
|
1008
|
-
disabled: !
|
|
1015
|
+
onClick: ge,
|
|
1016
|
+
disabled: !K.hasPrevious,
|
|
1009
1017
|
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",
|
|
1010
1018
|
children: [/* @__PURE__ */ N(v, { className: "size-4" }), /* @__PURE__ */ N("span", {
|
|
1011
1019
|
className: "hidden sm:inline",
|
|
@@ -1019,7 +1027,7 @@ var I = {
|
|
|
1019
1027
|
className: "hidden sm:inline",
|
|
1020
1028
|
children: "Page "
|
|
1021
1029
|
}),
|
|
1022
|
-
|
|
1030
|
+
K.page + 1,
|
|
1023
1031
|
" ",
|
|
1024
1032
|
/* @__PURE__ */ N("span", {
|
|
1025
1033
|
className: "hidden sm:inline",
|
|
@@ -1030,13 +1038,13 @@ var I = {
|
|
|
1030
1038
|
children: "/"
|
|
1031
1039
|
}),
|
|
1032
1040
|
" ",
|
|
1033
|
-
Math.ceil(
|
|
1041
|
+
Math.ceil(K.totalCount / K.pageSize)
|
|
1034
1042
|
]
|
|
1035
1043
|
}),
|
|
1036
1044
|
/* @__PURE__ */ P("button", {
|
|
1037
1045
|
type: "button",
|
|
1038
|
-
onClick:
|
|
1039
|
-
disabled: !
|
|
1046
|
+
onClick: he,
|
|
1047
|
+
disabled: !K.hasMore,
|
|
1040
1048
|
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",
|
|
1041
1049
|
children: [/* @__PURE__ */ N("span", {
|
|
1042
1050
|
className: "hidden sm:inline",
|
|
@@ -1046,24 +1054,24 @@ var I = {
|
|
|
1046
1054
|
]
|
|
1047
1055
|
})]
|
|
1048
1056
|
}),
|
|
1049
|
-
/* @__PURE__ */ N(le, {
|
|
1050
|
-
isOpen: k,
|
|
1051
|
-
onClose: () => j(!1),
|
|
1052
|
-
onSubmit: Ce,
|
|
1053
|
-
isSubmitting: xe
|
|
1054
|
-
}),
|
|
1055
1057
|
/* @__PURE__ */ N(ue, {
|
|
1056
|
-
isOpen:
|
|
1057
|
-
|
|
1058
|
-
onClose: () => {
|
|
1059
|
-
F(!1), V(null);
|
|
1060
|
-
},
|
|
1058
|
+
isOpen: j,
|
|
1059
|
+
onClose: () => M(!1),
|
|
1061
1060
|
onSubmit: Te,
|
|
1062
1061
|
isSubmitting: Se
|
|
1063
1062
|
}),
|
|
1064
1063
|
/* @__PURE__ */ N(de, {
|
|
1065
|
-
|
|
1066
|
-
|
|
1064
|
+
isOpen: F,
|
|
1065
|
+
record: V,
|
|
1066
|
+
onClose: () => {
|
|
1067
|
+
z(!1), H(null);
|
|
1068
|
+
},
|
|
1069
|
+
onSubmit: De,
|
|
1070
|
+
isSubmitting: Ce
|
|
1071
|
+
}),
|
|
1072
|
+
/* @__PURE__ */ N(fe, {
|
|
1073
|
+
record: D,
|
|
1074
|
+
onClose: () => k(null)
|
|
1067
1075
|
})
|
|
1068
1076
|
]
|
|
1069
1077
|
});
|