@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.
@@ -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 ee, Plus as te, RefreshCw as D, RotateCcw as O, Search as k, SkipForward as A, X as j, XCircle as M } from "lucide-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 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: M
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
- }, re = ["stripe", "razorpay"], z = (e) => {
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
- }, ie = ({ record: e, onViewDetails: t, onProcess: n, onSkip: i, onRetry: a, isProcessing: o }) => {
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(ee, { className: "size-4" }), "Process Refund"]
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(A, { className: "size-4" }), "Skip Refund"]
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(O, { className: "size-4" }), "Retry Refund"]
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
- }, ae = ({ isOpen: e, onClose: t, onSubmit: n, isSubmitting: r }) => {
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(j, { className: "size-5" })
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(k, { className: "size-4" })
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
- }, oe = ({ isOpen: e, record: t, onClose: n, onSubmit: i, isSubmitting: o }) => {
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(j, { className: "size-5" })
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
- }, se = ({ record: e, onClose: t }) => {
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(j, { className: "size-5" })
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, ee] = h(!1), [O, A] = h(null), [M, N] = h(!1), [I, B] = h(!1), [H, U] = h(null), [ce, W] = h(null), { records: G, stats: K, pagination: q, isLoading: le, recordsError: J, unprocessedWebhooks: Y, refetch: X, goToNextPage: ue, goToPreviousPage: de, setFilters: Z, createRefundRecord: fe, processRefund: pe, skipRefund: me, retryRefund: he, createRefundRecordsFromFailedWebhooks: ge, isCreating: _e, isProcessing: ve, isCreatingFromWebhooks: Q } = u({ filters: p(() => ({
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 ye = (e) => {
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
- }, be = async (e) => {
679
+ }, xe = async (e) => {
679
680
  try {
680
- await fe(e), N(!1);
681
+ await pe(e), N(!1);
681
682
  } catch (e) {
682
683
  console.error("Failed to create refund:", e);
683
684
  }
684
- }, xe = async (e) => {
685
+ }, Se = async (e) => {
685
686
  W(e.id);
686
687
  try {
687
- let t = await pe(e.id);
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
- }, Se = async (e) => {
695
+ }, Ce = async (e) => {
695
696
  if (H) try {
696
- await me(H.id, e), B(!1), U(null);
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
- }, Ce = async (e) => {
701
+ }, we = async (e) => {
701
702
  W(e.id);
702
703
  try {
703
- let t = await he(e.id);
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
- }, we = async () => {
711
+ }, Te = async () => {
711
712
  try {
712
- await ge();
713
+ await _e();
713
714
  } catch (e) {
714
715
  console.error("Failed to create refunds from webhooks:", e);
715
716
  }
716
- }, Te = _ ? G.filter((e) => e.gatewayPaymentId.toLowerCase().includes(_.toLowerCase()) || e.gatewayOrderId?.toLowerCase().includes(_.toLowerCase()) || e.reason?.toLowerCase().includes(_.toLowerCase())) : G;
717
- return le ? /* @__PURE__ */ F("div", {
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: we,
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(D, { className: "size-4" }), "Refresh"]
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(te, { className: "size-4" }), "Create Manual Refund"]
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: () => ye(e),
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(k, { className: "absolute left-3 top-1/2 -translate-y-1/2 size-4 text-text-muted" }), /* @__PURE__ */ P("input", {
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: () => ee(!E),
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(j, { className: "size-4" }), "Clear"]
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
- }), re.map((e) => /* @__PURE__ */ P("option", {
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
- Te.length === 0 ? /* @__PURE__ */ P(n, {
895
- icon: /* @__PURE__ */ P(D, { className: "size-6 text-text-muted" }),
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("div", {
901
- className: "overflow-x-auto",
902
- children: /* @__PURE__ */ F("table", {
903
- className: "w-full min-w-[400px]",
904
- children: [/* @__PURE__ */ P("thead", {
905
- className: "bg-bg-sunken/50",
906
- children: /* @__PURE__ */ F("tr", { children: [
907
- /* @__PURE__ */ P("th", {
908
- className: "text-left text-sm font-medium text-text-muted px-3 py-2 whitespace-nowrap",
909
- children: "Date"
910
- }),
911
- /* @__PURE__ */ P("th", {
912
- className: "text-left text-sm font-medium text-text-muted px-3 py-2 whitespace-nowrap",
913
- children: "Status"
914
- }),
915
- /* @__PURE__ */ P("th", {
916
- className: "text-left text-sm font-medium text-text-muted px-3 py-2 whitespace-nowrap hidden sm:table-cell",
917
- children: "Source"
918
- }),
919
- /* @__PURE__ */ P("th", {
920
- className: "text-left text-sm font-medium text-text-muted px-3 py-2 whitespace-nowrap hidden md:table-cell",
921
- children: "Provider"
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("tr", {
942
- className: "hover:bg-bg-sunken/30 transition-colors",
943
- children: [
944
- /* @__PURE__ */ P("td", {
945
- className: "px-3 py-2 text-sm text-text-primary whitespace-nowrap",
946
- children: /* @__PURE__ */ F("div", {
947
- className: "flex flex-col",
948
- children: [/* @__PURE__ */ P("span", { children: o(e.createdAt).split(" ")[0] }), /* @__PURE__ */ P("span", {
949
- className: "text-xs text-text-muted",
950
- children: o(e.createdAt).split(" ")[1]
951
- })]
952
- })
953
- }),
954
- /* @__PURE__ */ P("td", {
955
- className: "px-3 py-2 whitespace-nowrap",
956
- children: /* @__PURE__ */ F("span", {
957
- className: `inline-flex items-center gap-1 px-2 py-0.5 text-xs font-medium rounded ${z(L[e.status].color)}`,
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: de,
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: ue,
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(ae, {
1067
- isOpen: M,
1060
+ /* @__PURE__ */ P(oe, {
1061
+ isOpen: te,
1068
1062
  onClose: () => N(!1),
1069
- onSubmit: be,
1070
- isSubmitting: _e
1063
+ onSubmit: xe,
1064
+ isSubmitting: ve
1071
1065
  }),
1072
- /* @__PURE__ */ P(oe, {
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: Se,
1079
- isSubmitting: ve
1072
+ onSubmit: Ce,
1073
+ isSubmitting: ye
1080
1074
  }),
1081
- /* @__PURE__ */ P(se, {
1082
- record: O,
1083
- onClose: () => A(null)
1075
+ /* @__PURE__ */ P(ce, {
1076
+ record: k,
1077
+ onClose: () => j(null)
1084
1078
  })
1085
1079
  ]
1086
1080
  });