braid-ui 1.0.62 → 1.0.63
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/css/braid-ui.css +43 -0
- package/dist/css/braid-ui.min.css +1 -1
- package/dist/index.cjs +589 -344
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +68 -24
- package/dist/index.d.ts +68 -24
- package/dist/index.js +589 -346
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -65,6 +65,14 @@ var ToastPrimitives__namespace = /*#__PURE__*/_interopNamespace(ToastPrimitives)
|
|
|
65
65
|
function cn(...inputs) {
|
|
66
66
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
67
67
|
}
|
|
68
|
+
function formatCurrency(value, currency = "USD") {
|
|
69
|
+
return new Intl.NumberFormat("en-US", {
|
|
70
|
+
style: "currency",
|
|
71
|
+
currency,
|
|
72
|
+
minimumFractionDigits: 2,
|
|
73
|
+
maximumFractionDigits: 2
|
|
74
|
+
}).format(value);
|
|
75
|
+
}
|
|
68
76
|
var cardVariants = classVarianceAuthority.cva(
|
|
69
77
|
"rounded-lg border bg-card text-card-foreground transition-all duration-200",
|
|
70
78
|
{
|
|
@@ -310,7 +318,12 @@ var badgeVariants = classVarianceAuthority.cva(
|
|
|
310
318
|
"alert-ofac": "border-red-200 bg-red-50 text-red-700 hover:bg-red-100 dark:border-red-800 dark:bg-red-950 dark:text-red-300 font-medium",
|
|
311
319
|
"alert-dual": "border-emerald-200 bg-emerald-50 text-emerald-700 hover:bg-emerald-100 dark:border-emerald-800 dark:bg-emerald-950 dark:text-emerald-300 font-medium",
|
|
312
320
|
"alert-monitoring": "border-amber-200 bg-amber-50 text-amber-700 hover:bg-amber-100 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-300 font-medium",
|
|
313
|
-
"alert-error": "border-rose-200 bg-rose-50 text-rose-700 hover:bg-rose-100 dark:border-rose-800 dark:bg-rose-950 dark:text-rose-300 font-medium"
|
|
321
|
+
"alert-error": "border-rose-200 bg-rose-50 text-rose-700 hover:bg-rose-100 dark:border-rose-800 dark:bg-rose-950 dark:text-rose-300 font-medium",
|
|
322
|
+
// Account type variants
|
|
323
|
+
checking: "border-blue-200 bg-blue-50 text-blue-700 hover:bg-blue-100 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-300",
|
|
324
|
+
savings: "border-emerald-200 bg-emerald-50 text-emerald-700 hover:bg-emerald-100 dark:border-emerald-800 dark:bg-emerald-950 dark:text-emerald-300",
|
|
325
|
+
"zero-balance": "border-slate-200 bg-slate-50 text-slate-700 hover:bg-slate-100 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-300",
|
|
326
|
+
funding: "border-violet-200 bg-violet-50 text-violet-700 hover:bg-violet-100 dark:border-violet-800 dark:bg-violet-950 dark:text-violet-300"
|
|
314
327
|
}
|
|
315
328
|
},
|
|
316
329
|
defaultVariants: {
|
|
@@ -8060,7 +8073,7 @@ var columns = [
|
|
|
8060
8073
|
title: "Amount",
|
|
8061
8074
|
sortable: true,
|
|
8062
8075
|
align: "right",
|
|
8063
|
-
render: (value) =>
|
|
8076
|
+
render: (value) => formatCurrency(value)
|
|
8064
8077
|
},
|
|
8065
8078
|
{
|
|
8066
8079
|
key: "count",
|
|
@@ -8257,7 +8270,7 @@ var StatementView = ({
|
|
|
8257
8270
|
] });
|
|
8258
8271
|
};
|
|
8259
8272
|
var ACHDetailsSection = ({ data }) => {
|
|
8260
|
-
const
|
|
8273
|
+
const formatCurrency5 = (value) => {
|
|
8261
8274
|
return new Intl.NumberFormat("en-US", {
|
|
8262
8275
|
style: "currency",
|
|
8263
8276
|
currency: "USD",
|
|
@@ -8293,7 +8306,7 @@ var ACHDetailsSection = ({ data }) => {
|
|
|
8293
8306
|
layout: "horizontal"
|
|
8294
8307
|
}
|
|
8295
8308
|
),
|
|
8296
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Amount", value:
|
|
8309
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Amount", value: formatCurrency5(data.amount), layout: "horizontal" }),
|
|
8297
8310
|
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "SEC Code", value: data.secCode, layout: "horizontal" }),
|
|
8298
8311
|
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Company Entry Description", value: data.companyEntryDescription, layout: "horizontal" }),
|
|
8299
8312
|
data.companyDiscretionaryData && /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Company Discretionary Data", value: data.companyDiscretionaryData, layout: "horizontal" }),
|
|
@@ -8376,7 +8389,7 @@ var WireDetailsSection = ({ data }) => {
|
|
|
8376
8389
|
) })
|
|
8377
8390
|
] });
|
|
8378
8391
|
};
|
|
8379
|
-
var
|
|
8392
|
+
var formatCurrency2 = (value) => {
|
|
8380
8393
|
const numValue = typeof value === "string" ? parseFloat(value) : value;
|
|
8381
8394
|
if (isNaN(numValue)) return "";
|
|
8382
8395
|
return new Intl.NumberFormat("en-US", {
|
|
@@ -8387,7 +8400,7 @@ var formatCurrency = (value) => {
|
|
|
8387
8400
|
};
|
|
8388
8401
|
var CurrencyInput = ({ value, onChange, ...props }) => {
|
|
8389
8402
|
const [isFocused, setIsFocused] = React15__namespace.useState(false);
|
|
8390
|
-
const displayValue = value ? isFocused ? value :
|
|
8403
|
+
const displayValue = value ? isFocused ? value : formatCurrency2(value) : "";
|
|
8391
8404
|
const handleChange = (e) => {
|
|
8392
8405
|
const rawValue = e.target.value.replace(/[^0-9.]/g, "");
|
|
8393
8406
|
const parts = rawValue.split(".");
|
|
@@ -8426,7 +8439,7 @@ var Checkbox = React15__namespace.forwardRef(({ className, ...props }, ref) => /
|
|
|
8426
8439
|
}
|
|
8427
8440
|
));
|
|
8428
8441
|
Checkbox.displayName = CheckboxPrimitive__namespace.Root.displayName;
|
|
8429
|
-
var
|
|
8442
|
+
var formatCurrency3 = (value) => {
|
|
8430
8443
|
const numValue = typeof value === "string" ? parseFloat(value) : value;
|
|
8431
8444
|
if (isNaN(numValue)) return "-";
|
|
8432
8445
|
return new Intl.NumberFormat("en-US", {
|
|
@@ -8538,7 +8551,7 @@ var NewTransactionView = ({
|
|
|
8538
8551
|
] : [],
|
|
8539
8552
|
...isTransfer ? [{ label: "Receiver Account", value: receiverAccountNumber || "-" }] : [],
|
|
8540
8553
|
...requiresCounterparty ? [{ label: "Counterparty", value: counterpartyName || "-" }] : [],
|
|
8541
|
-
{ label: "Amount", value: amount ?
|
|
8554
|
+
{ label: "Amount", value: amount ? formatCurrency3(amount) : "-" },
|
|
8542
8555
|
{ label: "Description", value: form.watch("description") || "N/A" }
|
|
8543
8556
|
];
|
|
8544
8557
|
const reviewData = [
|
|
@@ -8904,7 +8917,7 @@ var NewTransactionView = ({
|
|
|
8904
8917
|
] }),
|
|
8905
8918
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between text-sm", children: [
|
|
8906
8919
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Amount:" }),
|
|
8907
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children:
|
|
8920
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: formatCurrency3(amount) })
|
|
8908
8921
|
] }),
|
|
8909
8922
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between text-sm", children: [
|
|
8910
8923
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Description:" }),
|
|
@@ -8935,6 +8948,115 @@ var NewTransactionView = ({
|
|
|
8935
8948
|
] }) })
|
|
8936
8949
|
] });
|
|
8937
8950
|
};
|
|
8951
|
+
var EnhancedMultiSelect = ({
|
|
8952
|
+
label,
|
|
8953
|
+
value = [],
|
|
8954
|
+
onValueChange,
|
|
8955
|
+
options,
|
|
8956
|
+
placeholder = "Select options",
|
|
8957
|
+
className,
|
|
8958
|
+
disabled = false
|
|
8959
|
+
}) => {
|
|
8960
|
+
const [open, setOpen] = React15__namespace.useState(false);
|
|
8961
|
+
const handleSelect = (optionValue) => {
|
|
8962
|
+
if (value.includes(optionValue)) {
|
|
8963
|
+
onValueChange(value.filter((v) => v !== optionValue));
|
|
8964
|
+
} else {
|
|
8965
|
+
onValueChange([...value, optionValue]);
|
|
8966
|
+
}
|
|
8967
|
+
};
|
|
8968
|
+
const handleRemove = (optionValue, e) => {
|
|
8969
|
+
e.stopPropagation();
|
|
8970
|
+
onValueChange(value.filter((v) => v !== optionValue));
|
|
8971
|
+
};
|
|
8972
|
+
const selectedLabels = value.map((v) => options.find((opt) => opt.value === v)?.label).filter(Boolean);
|
|
8973
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("space-y-2", className), children: [
|
|
8974
|
+
label && /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: label }),
|
|
8975
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
8976
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8977
|
+
Button,
|
|
8978
|
+
{
|
|
8979
|
+
variant: "outline",
|
|
8980
|
+
role: "combobox",
|
|
8981
|
+
"aria-expanded": open,
|
|
8982
|
+
disabled,
|
|
8983
|
+
className: "w-full justify-between font-normal h-auto min-h-10",
|
|
8984
|
+
children: [
|
|
8985
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1 flex-1 text-left", children: selectedLabels.length > 0 ? selectedLabels.map((label2, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8986
|
+
Badge,
|
|
8987
|
+
{
|
|
8988
|
+
variant: "secondary",
|
|
8989
|
+
className: "text-xs",
|
|
8990
|
+
children: [
|
|
8991
|
+
label2,
|
|
8992
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8993
|
+
lucideReact.X,
|
|
8994
|
+
{
|
|
8995
|
+
className: "ml-1 h-3 w-3 cursor-pointer",
|
|
8996
|
+
onClick: (e) => handleRemove(value[index], e)
|
|
8997
|
+
}
|
|
8998
|
+
)
|
|
8999
|
+
]
|
|
9000
|
+
},
|
|
9001
|
+
value[index]
|
|
9002
|
+
)) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: placeholder }) }),
|
|
9003
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
9004
|
+
]
|
|
9005
|
+
}
|
|
9006
|
+
) }),
|
|
9007
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-full min-w-[200px] p-0", align: "start", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-60 overflow-auto p-1", children: options.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9008
|
+
"div",
|
|
9009
|
+
{
|
|
9010
|
+
className: cn(
|
|
9011
|
+
"flex items-center gap-2 rounded-sm px-2 py-1.5 text-sm cursor-pointer hover:bg-accent hover:text-accent-foreground",
|
|
9012
|
+
value.includes(option.value) && "bg-accent"
|
|
9013
|
+
),
|
|
9014
|
+
onClick: () => handleSelect(option.value),
|
|
9015
|
+
children: [
|
|
9016
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9017
|
+
"div",
|
|
9018
|
+
{
|
|
9019
|
+
className: cn(
|
|
9020
|
+
"flex h-4 w-4 items-center justify-center rounded-sm border border-primary",
|
|
9021
|
+
value.includes(option.value) ? "bg-primary text-primary-foreground" : "opacity-50"
|
|
9022
|
+
),
|
|
9023
|
+
children: value.includes(option.value) && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-3 w-3" })
|
|
9024
|
+
}
|
|
9025
|
+
),
|
|
9026
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: option.label })
|
|
9027
|
+
]
|
|
9028
|
+
},
|
|
9029
|
+
option.value
|
|
9030
|
+
)) }) })
|
|
9031
|
+
] })
|
|
9032
|
+
] });
|
|
9033
|
+
};
|
|
9034
|
+
var defaultFilters = {
|
|
9035
|
+
originalFileName: "",
|
|
9036
|
+
requesterIpAddress: "",
|
|
9037
|
+
requesterUsername: "",
|
|
9038
|
+
showAchNoc: false,
|
|
9039
|
+
excludeWire: false,
|
|
9040
|
+
excludeAch: false,
|
|
9041
|
+
wireFileHandle: "",
|
|
9042
|
+
direction: "",
|
|
9043
|
+
counterpartyId: "",
|
|
9044
|
+
customerId: "",
|
|
9045
|
+
settlementFileName: "",
|
|
9046
|
+
isInbound: false,
|
|
9047
|
+
accountNumber: "",
|
|
9048
|
+
processingStatus: [],
|
|
9049
|
+
beginDate: void 0,
|
|
9050
|
+
endDate: void 0,
|
|
9051
|
+
postDateStart: void 0,
|
|
9052
|
+
postDateEnd: void 0,
|
|
9053
|
+
maxAmount: "",
|
|
9054
|
+
minAmount: "",
|
|
9055
|
+
productId: "",
|
|
9056
|
+
paymentId: "",
|
|
9057
|
+
transactionStatus: [],
|
|
9058
|
+
transactionType: []
|
|
9059
|
+
};
|
|
8938
9060
|
var TransactionHistoryFiltersSheet = ({
|
|
8939
9061
|
filters,
|
|
8940
9062
|
onFilterChange,
|
|
@@ -8949,6 +9071,10 @@ var TransactionHistoryFiltersSheet = ({
|
|
|
8949
9071
|
const handleLocalFilterChange = (field, value) => {
|
|
8950
9072
|
setLocalFilters((prev) => ({ ...prev, [field]: value }));
|
|
8951
9073
|
};
|
|
9074
|
+
const handleDateChange = (field, date) => {
|
|
9075
|
+
const isoString = date ? date.toISOString() : void 0;
|
|
9076
|
+
handleLocalFilterChange(field, isoString);
|
|
9077
|
+
};
|
|
8952
9078
|
const handleApplyFilters = () => {
|
|
8953
9079
|
Object.entries(localFilters).forEach(([key, value]) => {
|
|
8954
9080
|
onFilterChange(key, value);
|
|
@@ -8957,32 +9083,15 @@ var TransactionHistoryFiltersSheet = ({
|
|
|
8957
9083
|
setOpen(false);
|
|
8958
9084
|
};
|
|
8959
9085
|
const handleResetFilters = () => {
|
|
8960
|
-
|
|
8961
|
-
accountNumber: "",
|
|
8962
|
-
product: "",
|
|
8963
|
-
customerId: "",
|
|
8964
|
-
counterpartyId: "",
|
|
8965
|
-
settlementFileName: "",
|
|
8966
|
-
originalFileName: "",
|
|
8967
|
-
requesterIpAddress: "",
|
|
8968
|
-
requesterUsername: "",
|
|
8969
|
-
wireFileHandle: "",
|
|
8970
|
-
paymentId: "",
|
|
8971
|
-
transactionType: "",
|
|
8972
|
-
transactionStatus: "",
|
|
8973
|
-
processingStatus: "",
|
|
8974
|
-
direction: "",
|
|
8975
|
-
minAmount: "",
|
|
8976
|
-
maxAmount: "",
|
|
8977
|
-
creationDateStart: void 0,
|
|
8978
|
-
creationDateEnd: void 0,
|
|
8979
|
-
postDateStart: void 0,
|
|
8980
|
-
postDateEnd: void 0
|
|
8981
|
-
};
|
|
8982
|
-
setLocalFilters(resetFilters);
|
|
9086
|
+
setLocalFilters(defaultFilters);
|
|
8983
9087
|
onResetFilters();
|
|
8984
9088
|
setOpen(false);
|
|
8985
9089
|
};
|
|
9090
|
+
const parseDate = (dateStr) => {
|
|
9091
|
+
if (!dateStr) return void 0;
|
|
9092
|
+
const date = new Date(dateStr);
|
|
9093
|
+
return isNaN(date.getTime()) ? void 0 : date;
|
|
9094
|
+
};
|
|
8986
9095
|
return /* @__PURE__ */ jsxRuntime.jsxs(Sheet, { open, onOpenChange: setOpen, children: [
|
|
8987
9096
|
/* @__PURE__ */ jsxRuntime.jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", className: "gap-2", children: [
|
|
8988
9097
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Filter, { className: "h-4 w-4" }),
|
|
@@ -8991,12 +9100,61 @@ var TransactionHistoryFiltersSheet = ({
|
|
|
8991
9100
|
/* @__PURE__ */ jsxRuntime.jsxs(SheetContent, { side: "right", className: "w-full sm:max-w-xl overflow-y-auto", children: [
|
|
8992
9101
|
/* @__PURE__ */ jsxRuntime.jsx(SheetHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { children: "Transaction Filters" }) }),
|
|
8993
9102
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6 py-6", children: [
|
|
9103
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
9104
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-medium text-muted-foreground", children: "Options" }),
|
|
9105
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
9106
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
9107
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9108
|
+
Checkbox,
|
|
9109
|
+
{
|
|
9110
|
+
id: "showAchNoc",
|
|
9111
|
+
checked: localFilters.showAchNoc || false,
|
|
9112
|
+
onCheckedChange: (checked) => handleLocalFilterChange("showAchNoc", checked === true)
|
|
9113
|
+
}
|
|
9114
|
+
),
|
|
9115
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "showAchNoc", className: "text-sm font-normal", children: "Show ACH NOC" })
|
|
9116
|
+
] }),
|
|
9117
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
9118
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9119
|
+
Checkbox,
|
|
9120
|
+
{
|
|
9121
|
+
id: "isInbound",
|
|
9122
|
+
checked: localFilters.isInbound || false,
|
|
9123
|
+
onCheckedChange: (checked) => handleLocalFilterChange("isInbound", checked === true)
|
|
9124
|
+
}
|
|
9125
|
+
),
|
|
9126
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "isInbound", className: "text-sm font-normal", children: "Is Inbound" })
|
|
9127
|
+
] }),
|
|
9128
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
9129
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9130
|
+
Checkbox,
|
|
9131
|
+
{
|
|
9132
|
+
id: "excludeWire",
|
|
9133
|
+
checked: localFilters.excludeWire || false,
|
|
9134
|
+
onCheckedChange: (checked) => handleLocalFilterChange("excludeWire", checked === true)
|
|
9135
|
+
}
|
|
9136
|
+
),
|
|
9137
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "excludeWire", className: "text-sm font-normal", children: "Exclude Wire" })
|
|
9138
|
+
] }),
|
|
9139
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
9140
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9141
|
+
Checkbox,
|
|
9142
|
+
{
|
|
9143
|
+
id: "excludeAch",
|
|
9144
|
+
checked: localFilters.excludeAch || false,
|
|
9145
|
+
onCheckedChange: (checked) => handleLocalFilterChange("excludeAch", checked === true)
|
|
9146
|
+
}
|
|
9147
|
+
),
|
|
9148
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "excludeAch", className: "text-sm font-normal", children: "Exclude ACH" })
|
|
9149
|
+
] })
|
|
9150
|
+
] })
|
|
9151
|
+
] }),
|
|
8994
9152
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
8995
9153
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8996
9154
|
EnhancedInput,
|
|
8997
9155
|
{
|
|
8998
9156
|
label: "Account Number",
|
|
8999
|
-
value: localFilters.accountNumber,
|
|
9157
|
+
value: localFilters.accountNumber || "",
|
|
9000
9158
|
onChange: (e) => handleLocalFilterChange("accountNumber", e.target.value),
|
|
9001
9159
|
placeholder: "Enter account number"
|
|
9002
9160
|
}
|
|
@@ -9004,9 +9162,9 @@ var TransactionHistoryFiltersSheet = ({
|
|
|
9004
9162
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9005
9163
|
EnhancedSelect,
|
|
9006
9164
|
{
|
|
9007
|
-
label: "Product",
|
|
9008
|
-
value: localFilters.
|
|
9009
|
-
onValueChange: (value) => handleLocalFilterChange("
|
|
9165
|
+
label: "Product ID",
|
|
9166
|
+
value: localFilters.productId || "",
|
|
9167
|
+
onValueChange: (value) => handleLocalFilterChange("productId", value),
|
|
9010
9168
|
placeholder: "Select product",
|
|
9011
9169
|
options: [
|
|
9012
9170
|
{ value: "wire", label: "Wire" },
|
|
@@ -9021,7 +9179,7 @@ var TransactionHistoryFiltersSheet = ({
|
|
|
9021
9179
|
EnhancedInput,
|
|
9022
9180
|
{
|
|
9023
9181
|
label: "Customer ID",
|
|
9024
|
-
value: localFilters.customerId,
|
|
9182
|
+
value: localFilters.customerId || "",
|
|
9025
9183
|
onChange: (e) => handleLocalFilterChange("customerId", e.target.value),
|
|
9026
9184
|
placeholder: "Enter customer ID"
|
|
9027
9185
|
}
|
|
@@ -9030,7 +9188,7 @@ var TransactionHistoryFiltersSheet = ({
|
|
|
9030
9188
|
EnhancedInput,
|
|
9031
9189
|
{
|
|
9032
9190
|
label: "Counterparty ID",
|
|
9033
|
-
value: localFilters.counterpartyId,
|
|
9191
|
+
value: localFilters.counterpartyId || "",
|
|
9034
9192
|
onChange: (e) => handleLocalFilterChange("counterpartyId", e.target.value),
|
|
9035
9193
|
placeholder: "Enter counterparty ID"
|
|
9036
9194
|
}
|
|
@@ -9040,7 +9198,7 @@ var TransactionHistoryFiltersSheet = ({
|
|
|
9040
9198
|
EnhancedInput,
|
|
9041
9199
|
{
|
|
9042
9200
|
label: "Settlement File Name",
|
|
9043
|
-
value: localFilters.settlementFileName,
|
|
9201
|
+
value: localFilters.settlementFileName || "",
|
|
9044
9202
|
onChange: (e) => handleLocalFilterChange("settlementFileName", e.target.value),
|
|
9045
9203
|
placeholder: "Enter settlement file name"
|
|
9046
9204
|
}
|
|
@@ -9049,7 +9207,7 @@ var TransactionHistoryFiltersSheet = ({
|
|
|
9049
9207
|
EnhancedInput,
|
|
9050
9208
|
{
|
|
9051
9209
|
label: "Original File Name",
|
|
9052
|
-
value: localFilters.originalFileName,
|
|
9210
|
+
value: localFilters.originalFileName || "",
|
|
9053
9211
|
onChange: (e) => handleLocalFilterChange("originalFileName", e.target.value),
|
|
9054
9212
|
placeholder: "Enter original file name"
|
|
9055
9213
|
}
|
|
@@ -9058,7 +9216,7 @@ var TransactionHistoryFiltersSheet = ({
|
|
|
9058
9216
|
EnhancedInput,
|
|
9059
9217
|
{
|
|
9060
9218
|
label: "Requester IP Address",
|
|
9061
|
-
value: localFilters.requesterIpAddress,
|
|
9219
|
+
value: localFilters.requesterIpAddress || "",
|
|
9062
9220
|
onChange: (e) => handleLocalFilterChange("requesterIpAddress", e.target.value),
|
|
9063
9221
|
placeholder: "Enter IP address"
|
|
9064
9222
|
}
|
|
@@ -9067,7 +9225,7 @@ var TransactionHistoryFiltersSheet = ({
|
|
|
9067
9225
|
EnhancedInput,
|
|
9068
9226
|
{
|
|
9069
9227
|
label: "Requester Username",
|
|
9070
|
-
value: localFilters.requesterUsername,
|
|
9228
|
+
value: localFilters.requesterUsername || "",
|
|
9071
9229
|
onChange: (e) => handleLocalFilterChange("requesterUsername", e.target.value),
|
|
9072
9230
|
placeholder: "Enter username"
|
|
9073
9231
|
}
|
|
@@ -9076,7 +9234,7 @@ var TransactionHistoryFiltersSheet = ({
|
|
|
9076
9234
|
EnhancedInput,
|
|
9077
9235
|
{
|
|
9078
9236
|
label: "Wire File Handle",
|
|
9079
|
-
value: localFilters.wireFileHandle,
|
|
9237
|
+
value: localFilters.wireFileHandle || "",
|
|
9080
9238
|
onChange: (e) => handleLocalFilterChange("wireFileHandle", e.target.value),
|
|
9081
9239
|
placeholder: "Enter wire file handle"
|
|
9082
9240
|
}
|
|
@@ -9085,18 +9243,18 @@ var TransactionHistoryFiltersSheet = ({
|
|
|
9085
9243
|
EnhancedInput,
|
|
9086
9244
|
{
|
|
9087
9245
|
label: "Payment ID",
|
|
9088
|
-
value: localFilters.paymentId,
|
|
9246
|
+
value: localFilters.paymentId || "",
|
|
9089
9247
|
onChange: (e) => handleLocalFilterChange("paymentId", e.target.value),
|
|
9090
9248
|
placeholder: "Enter payment ID"
|
|
9091
9249
|
}
|
|
9092
9250
|
),
|
|
9093
9251
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9094
|
-
|
|
9252
|
+
EnhancedMultiSelect,
|
|
9095
9253
|
{
|
|
9096
9254
|
label: "Transaction Type",
|
|
9097
|
-
value: localFilters.transactionType,
|
|
9255
|
+
value: localFilters.transactionType || [],
|
|
9098
9256
|
onValueChange: (value) => handleLocalFilterChange("transactionType", value),
|
|
9099
|
-
placeholder: "Select transaction
|
|
9257
|
+
placeholder: "Select transaction types",
|
|
9100
9258
|
options: [
|
|
9101
9259
|
{ value: "ach_credit", label: "ACH Credit" },
|
|
9102
9260
|
{ value: "ach_debit", label: "ACH Debit" },
|
|
@@ -9106,12 +9264,12 @@ var TransactionHistoryFiltersSheet = ({
|
|
|
9106
9264
|
}
|
|
9107
9265
|
),
|
|
9108
9266
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9109
|
-
|
|
9267
|
+
EnhancedMultiSelect,
|
|
9110
9268
|
{
|
|
9111
9269
|
label: "Transaction Status",
|
|
9112
|
-
value: localFilters.transactionStatus,
|
|
9270
|
+
value: localFilters.transactionStatus || [],
|
|
9113
9271
|
onValueChange: (value) => handleLocalFilterChange("transactionStatus", value),
|
|
9114
|
-
placeholder: "Select transaction
|
|
9272
|
+
placeholder: "Select transaction statuses",
|
|
9115
9273
|
options: [
|
|
9116
9274
|
{ value: "PENDING", label: "Pending" },
|
|
9117
9275
|
{ value: "POSTED", label: "Posted" },
|
|
@@ -9121,12 +9279,12 @@ var TransactionHistoryFiltersSheet = ({
|
|
|
9121
9279
|
}
|
|
9122
9280
|
),
|
|
9123
9281
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9124
|
-
|
|
9282
|
+
EnhancedMultiSelect,
|
|
9125
9283
|
{
|
|
9126
9284
|
label: "Processing Status",
|
|
9127
|
-
value: localFilters.processingStatus,
|
|
9285
|
+
value: localFilters.processingStatus || [],
|
|
9128
9286
|
onValueChange: (value) => handleLocalFilterChange("processingStatus", value),
|
|
9129
|
-
placeholder: "Select processing
|
|
9287
|
+
placeholder: "Select processing statuses",
|
|
9130
9288
|
options: [
|
|
9131
9289
|
{ value: "processing", label: "Processing" },
|
|
9132
9290
|
{ value: "completed", label: "Completed" },
|
|
@@ -9138,7 +9296,7 @@ var TransactionHistoryFiltersSheet = ({
|
|
|
9138
9296
|
EnhancedSelect,
|
|
9139
9297
|
{
|
|
9140
9298
|
label: "Direction",
|
|
9141
|
-
value: localFilters.direction,
|
|
9299
|
+
value: localFilters.direction || "",
|
|
9142
9300
|
onValueChange: (value) => handleLocalFilterChange("direction", value),
|
|
9143
9301
|
placeholder: "Select direction",
|
|
9144
9302
|
options: [
|
|
@@ -9152,7 +9310,7 @@ var TransactionHistoryFiltersSheet = ({
|
|
|
9152
9310
|
CurrencyInput,
|
|
9153
9311
|
{
|
|
9154
9312
|
label: "Min Amount",
|
|
9155
|
-
value: localFilters.minAmount,
|
|
9313
|
+
value: localFilters.minAmount || "",
|
|
9156
9314
|
onChange: (value) => handleLocalFilterChange("minAmount", value)
|
|
9157
9315
|
}
|
|
9158
9316
|
),
|
|
@@ -9160,19 +9318,19 @@ var TransactionHistoryFiltersSheet = ({
|
|
|
9160
9318
|
CurrencyInput,
|
|
9161
9319
|
{
|
|
9162
9320
|
label: "Max Amount",
|
|
9163
|
-
value: localFilters.maxAmount,
|
|
9321
|
+
value: localFilters.maxAmount || "",
|
|
9164
9322
|
onChange: (value) => handleLocalFilterChange("maxAmount", value)
|
|
9165
9323
|
}
|
|
9166
9324
|
)
|
|
9167
9325
|
] }),
|
|
9168
9326
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
9169
9327
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
9170
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "
|
|
9328
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "Begin Date" }),
|
|
9171
9329
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9172
9330
|
DatePicker,
|
|
9173
9331
|
{
|
|
9174
|
-
date: localFilters.
|
|
9175
|
-
onDateChange: (date) =>
|
|
9332
|
+
date: parseDate(localFilters.beginDate),
|
|
9333
|
+
onDateChange: (date) => handleDateChange("beginDate", date),
|
|
9176
9334
|
placeholder: "MM/DD/YYYY",
|
|
9177
9335
|
buttonClassName: "w-full",
|
|
9178
9336
|
className: "bg-background z-50"
|
|
@@ -9180,12 +9338,12 @@ var TransactionHistoryFiltersSheet = ({
|
|
|
9180
9338
|
)
|
|
9181
9339
|
] }),
|
|
9182
9340
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
9183
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "
|
|
9341
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "End Date" }),
|
|
9184
9342
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9185
9343
|
DatePicker,
|
|
9186
9344
|
{
|
|
9187
|
-
date: localFilters.
|
|
9188
|
-
onDateChange: (date) =>
|
|
9345
|
+
date: parseDate(localFilters.endDate),
|
|
9346
|
+
onDateChange: (date) => handleDateChange("endDate", date),
|
|
9189
9347
|
placeholder: "MM/DD/YYYY",
|
|
9190
9348
|
buttonClassName: "w-full",
|
|
9191
9349
|
className: "bg-background z-50"
|
|
@@ -9199,8 +9357,8 @@ var TransactionHistoryFiltersSheet = ({
|
|
|
9199
9357
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9200
9358
|
DatePicker,
|
|
9201
9359
|
{
|
|
9202
|
-
date: localFilters.postDateStart,
|
|
9203
|
-
onDateChange: (date) =>
|
|
9360
|
+
date: parseDate(localFilters.postDateStart),
|
|
9361
|
+
onDateChange: (date) => handleDateChange("postDateStart", date),
|
|
9204
9362
|
placeholder: "MM/DD/YYYY",
|
|
9205
9363
|
buttonClassName: "w-full",
|
|
9206
9364
|
className: "bg-background z-50"
|
|
@@ -9212,8 +9370,8 @@ var TransactionHistoryFiltersSheet = ({
|
|
|
9212
9370
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9213
9371
|
DatePicker,
|
|
9214
9372
|
{
|
|
9215
|
-
date: localFilters.postDateEnd,
|
|
9216
|
-
onDateChange: (date) =>
|
|
9373
|
+
date: parseDate(localFilters.postDateEnd),
|
|
9374
|
+
onDateChange: (date) => handleDateChange("postDateEnd", date),
|
|
9217
9375
|
placeholder: "MM/DD/YYYY",
|
|
9218
9376
|
buttonClassName: "w-full",
|
|
9219
9377
|
className: "bg-background z-50"
|
|
@@ -9249,7 +9407,7 @@ var TransactionHistoryView = ({
|
|
|
9249
9407
|
}
|
|
9250
9408
|
)
|
|
9251
9409
|
] }) }) }),
|
|
9252
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container mx-auto px-4 h-full max-w-none flex flex-col", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 mt-4 overflow-auto", children: table }) }) })
|
|
9410
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container mx-auto px-4 h-full max-w-none flex flex-col", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 mt-4 pb-6 overflow-auto", children: table }) }) })
|
|
9253
9411
|
] });
|
|
9254
9412
|
};
|
|
9255
9413
|
var TransactionTypeBadge = ({
|
|
@@ -9295,7 +9453,7 @@ var getProcessingStatusVariant = (status) => {
|
|
|
9295
9453
|
return "outline";
|
|
9296
9454
|
}
|
|
9297
9455
|
};
|
|
9298
|
-
var
|
|
9456
|
+
var formatCurrency4 = (value) => {
|
|
9299
9457
|
return new Intl.NumberFormat("en-US", {
|
|
9300
9458
|
style: "currency",
|
|
9301
9459
|
currency: "USD",
|
|
@@ -9324,7 +9482,7 @@ var TransactionDetailView = ({
|
|
|
9324
9482
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
|
|
9325
9483
|
"font-semibold",
|
|
9326
9484
|
transaction.amount < 0 ? "text-destructive" : "text-success"
|
|
9327
|
-
), children:
|
|
9485
|
+
), children: formatCurrency4(transaction.amount) }),
|
|
9328
9486
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9329
9487
|
TransactionTypeBadge,
|
|
9330
9488
|
{
|
|
@@ -9455,6 +9613,181 @@ var TransactionDetailView = ({
|
|
|
9455
9613
|
}
|
|
9456
9614
|
);
|
|
9457
9615
|
};
|
|
9616
|
+
var cancelTransactionSchema = zod.z.object({
|
|
9617
|
+
reason: zod.z.string().min(1, "Reason is required").max(500, "Reason must be less than 500 characters")
|
|
9618
|
+
});
|
|
9619
|
+
var returnTransactionSchema = zod.z.object({
|
|
9620
|
+
reasonCode: zod.z.string().min(1, "Reason code is required")
|
|
9621
|
+
});
|
|
9622
|
+
var CancelTransactionDialog = ({
|
|
9623
|
+
transactionId,
|
|
9624
|
+
open,
|
|
9625
|
+
onOpenChange,
|
|
9626
|
+
onCancel
|
|
9627
|
+
}) => {
|
|
9628
|
+
const { toast: toast6 } = useToast();
|
|
9629
|
+
const {
|
|
9630
|
+
register,
|
|
9631
|
+
handleSubmit,
|
|
9632
|
+
formState: { errors, isSubmitting },
|
|
9633
|
+
reset
|
|
9634
|
+
} = useFormWithEditState({
|
|
9635
|
+
schema: cancelTransactionSchema,
|
|
9636
|
+
defaultValues: {
|
|
9637
|
+
reason: ""
|
|
9638
|
+
}
|
|
9639
|
+
});
|
|
9640
|
+
const onSubmit = async (data) => {
|
|
9641
|
+
try {
|
|
9642
|
+
await onCancel(data);
|
|
9643
|
+
toast6({
|
|
9644
|
+
title: "Transaction Cancelled",
|
|
9645
|
+
description: `Transaction ${transactionId} has been cancelled successfully.`
|
|
9646
|
+
});
|
|
9647
|
+
reset();
|
|
9648
|
+
onOpenChange(false);
|
|
9649
|
+
} catch (error) {
|
|
9650
|
+
toast6({
|
|
9651
|
+
title: "Error",
|
|
9652
|
+
description: "Failed to cancel the transaction. Please try again.",
|
|
9653
|
+
variant: "destructive"
|
|
9654
|
+
});
|
|
9655
|
+
}
|
|
9656
|
+
};
|
|
9657
|
+
const handleClose = () => {
|
|
9658
|
+
reset();
|
|
9659
|
+
onOpenChange(false);
|
|
9660
|
+
};
|
|
9661
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange: handleClose, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "sm:max-w-md", children: [
|
|
9662
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
|
|
9663
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: "Cancel Transaction" }),
|
|
9664
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogDescription, { children: [
|
|
9665
|
+
"Please provide a reason for cancelling transaction ",
|
|
9666
|
+
transactionId,
|
|
9667
|
+
"."
|
|
9668
|
+
] })
|
|
9669
|
+
] }),
|
|
9670
|
+
/* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit(onSubmit), className: "space-y-4", children: [
|
|
9671
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9672
|
+
EnhancedTextarea,
|
|
9673
|
+
{
|
|
9674
|
+
label: "Cancellation Reason",
|
|
9675
|
+
placeholder: "Enter the reason for cancellation...",
|
|
9676
|
+
error: errors.reason?.message,
|
|
9677
|
+
...register("reason")
|
|
9678
|
+
}
|
|
9679
|
+
),
|
|
9680
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogFooter, { className: "gap-2 sm:gap-0", children: [
|
|
9681
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9682
|
+
Button,
|
|
9683
|
+
{
|
|
9684
|
+
type: "button",
|
|
9685
|
+
variant: "outline",
|
|
9686
|
+
onClick: handleClose,
|
|
9687
|
+
disabled: isSubmitting,
|
|
9688
|
+
children: "Close"
|
|
9689
|
+
}
|
|
9690
|
+
),
|
|
9691
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9692
|
+
Button,
|
|
9693
|
+
{
|
|
9694
|
+
type: "submit",
|
|
9695
|
+
variant: "destructive",
|
|
9696
|
+
disabled: isSubmitting,
|
|
9697
|
+
children: isSubmitting ? "Cancelling..." : "Cancel Transaction"
|
|
9698
|
+
}
|
|
9699
|
+
)
|
|
9700
|
+
] })
|
|
9701
|
+
] })
|
|
9702
|
+
] }) });
|
|
9703
|
+
};
|
|
9704
|
+
function ReturnTransactionDialog({
|
|
9705
|
+
transactionId,
|
|
9706
|
+
open,
|
|
9707
|
+
onOpenChange,
|
|
9708
|
+
onReturn,
|
|
9709
|
+
reasonCodes
|
|
9710
|
+
}) {
|
|
9711
|
+
const {
|
|
9712
|
+
watch,
|
|
9713
|
+
setValue,
|
|
9714
|
+
handleSave,
|
|
9715
|
+
handleCancel,
|
|
9716
|
+
isLoading,
|
|
9717
|
+
formState: { errors }
|
|
9718
|
+
} = useFormWithEditState({
|
|
9719
|
+
schema: returnTransactionSchema,
|
|
9720
|
+
initialEditing: true,
|
|
9721
|
+
onSave: async (data) => {
|
|
9722
|
+
try {
|
|
9723
|
+
await onReturn(data);
|
|
9724
|
+
toast({
|
|
9725
|
+
title: "Transaction returned",
|
|
9726
|
+
description: `Transaction #${transactionId} has been returned successfully.`
|
|
9727
|
+
});
|
|
9728
|
+
onOpenChange(false);
|
|
9729
|
+
} catch (error) {
|
|
9730
|
+
toast({
|
|
9731
|
+
title: "Error",
|
|
9732
|
+
description: "Failed to return transaction. Please try again.",
|
|
9733
|
+
variant: "destructive"
|
|
9734
|
+
});
|
|
9735
|
+
throw error;
|
|
9736
|
+
}
|
|
9737
|
+
},
|
|
9738
|
+
onCancel: () => {
|
|
9739
|
+
onOpenChange(false);
|
|
9740
|
+
}
|
|
9741
|
+
});
|
|
9742
|
+
const reasonCode = watch("reasonCode");
|
|
9743
|
+
const selectOptions = reasonCodes.map((code) => ({
|
|
9744
|
+
value: code.value,
|
|
9745
|
+
label: code.label
|
|
9746
|
+
}));
|
|
9747
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "sm:max-w-[425px]", children: [
|
|
9748
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
|
|
9749
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: "Return Transaction" }),
|
|
9750
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogDescription, { children: [
|
|
9751
|
+
"Select a reason code to return transaction #",
|
|
9752
|
+
transactionId,
|
|
9753
|
+
"."
|
|
9754
|
+
] })
|
|
9755
|
+
] }),
|
|
9756
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9757
|
+
EnhancedSelect,
|
|
9758
|
+
{
|
|
9759
|
+
label: "Reason Code",
|
|
9760
|
+
placeholder: "Select a reason code",
|
|
9761
|
+
options: selectOptions,
|
|
9762
|
+
value: reasonCode || "",
|
|
9763
|
+
onValueChange: (value) => setValue("reasonCode", value),
|
|
9764
|
+
error: errors.reasonCode?.message
|
|
9765
|
+
}
|
|
9766
|
+
) }),
|
|
9767
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogFooter, { children: [
|
|
9768
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9769
|
+
Button,
|
|
9770
|
+
{
|
|
9771
|
+
type: "button",
|
|
9772
|
+
variant: "outline",
|
|
9773
|
+
onClick: handleCancel,
|
|
9774
|
+
disabled: isLoading,
|
|
9775
|
+
children: "Cancel"
|
|
9776
|
+
}
|
|
9777
|
+
),
|
|
9778
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9779
|
+
Button,
|
|
9780
|
+
{
|
|
9781
|
+
type: "button",
|
|
9782
|
+
variant: "destructive",
|
|
9783
|
+
onClick: handleSave,
|
|
9784
|
+
disabled: isLoading || !reasonCode,
|
|
9785
|
+
children: isLoading ? "Returning..." : "Return Transaction"
|
|
9786
|
+
}
|
|
9787
|
+
)
|
|
9788
|
+
] })
|
|
9789
|
+
] }) });
|
|
9790
|
+
}
|
|
9458
9791
|
var typeIcons = {
|
|
9459
9792
|
checking: lucideReact.CreditCard,
|
|
9460
9793
|
savings: lucideReact.Building,
|
|
@@ -10724,6 +11057,36 @@ var useCounterpartyEntity = (counterparties) => {
|
|
|
10724
11057
|
}, [counterparties]);
|
|
10725
11058
|
return { counterparties: enrichedCounterparties, loading };
|
|
10726
11059
|
};
|
|
11060
|
+
var typeConfig4 = {
|
|
11061
|
+
checking: {
|
|
11062
|
+
variant: "checking",
|
|
11063
|
+
label: "Checking",
|
|
11064
|
+
icon: lucideReact.Wallet
|
|
11065
|
+
},
|
|
11066
|
+
savings: {
|
|
11067
|
+
variant: "savings",
|
|
11068
|
+
label: "Savings",
|
|
11069
|
+
icon: lucideReact.PiggyBank
|
|
11070
|
+
},
|
|
11071
|
+
"zero-balance": {
|
|
11072
|
+
variant: "zero-balance",
|
|
11073
|
+
label: "Zero Balance",
|
|
11074
|
+
icon: lucideReact.CircleDollarSign
|
|
11075
|
+
},
|
|
11076
|
+
funding: {
|
|
11077
|
+
variant: "funding",
|
|
11078
|
+
label: "Funding",
|
|
11079
|
+
icon: lucideReact.Landmark
|
|
11080
|
+
}
|
|
11081
|
+
};
|
|
11082
|
+
var AccountTypeBadge = ({ type, className }) => {
|
|
11083
|
+
const config = typeConfig4[type] || typeConfig4.checking;
|
|
11084
|
+
const Icon2 = config.icon;
|
|
11085
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: config.variant, className, children: [
|
|
11086
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "w-3 h-3 mr-1" }),
|
|
11087
|
+
config.label
|
|
11088
|
+
] });
|
|
11089
|
+
};
|
|
10727
11090
|
|
|
10728
11091
|
// src/lib/mock-data/business-account-data.ts
|
|
10729
11092
|
var mockBusinessAccounts = [
|
|
@@ -10733,8 +11096,12 @@ var mockBusinessAccounts = [
|
|
|
10733
11096
|
number: "1234567890",
|
|
10734
11097
|
type: "checking",
|
|
10735
11098
|
status: "active",
|
|
10736
|
-
|
|
10737
|
-
|
|
11099
|
+
settledBalance: 127450,
|
|
11100
|
+
pendingCredits: 0,
|
|
11101
|
+
pendingDebits: 2e3,
|
|
11102
|
+
fundsOnHold: 0,
|
|
11103
|
+
accountBalance: 125450,
|
|
11104
|
+
availableBalance: 123450,
|
|
10738
11105
|
currency: "USD",
|
|
10739
11106
|
institution: "Chase Bank",
|
|
10740
11107
|
routingNumber: "021000021",
|
|
@@ -10751,8 +11118,12 @@ var mockBusinessAccounts = [
|
|
|
10751
11118
|
number: "9876544567",
|
|
10752
11119
|
type: "savings",
|
|
10753
11120
|
status: "active",
|
|
10754
|
-
|
|
10755
|
-
|
|
11121
|
+
settledBalance: 45230,
|
|
11122
|
+
pendingCredits: 0,
|
|
11123
|
+
pendingDebits: 0,
|
|
11124
|
+
fundsOnHold: 0,
|
|
11125
|
+
accountBalance: 45230,
|
|
11126
|
+
availableBalance: 45230,
|
|
10756
11127
|
currency: "USD",
|
|
10757
11128
|
institution: "Chase Bank",
|
|
10758
11129
|
routingNumber: "021000021",
|
|
@@ -10769,8 +11140,12 @@ var mockBusinessAccounts = [
|
|
|
10769
11140
|
number: "5555551234",
|
|
10770
11141
|
type: "checking",
|
|
10771
11142
|
status: "active",
|
|
10772
|
-
|
|
10773
|
-
|
|
11143
|
+
settledBalance: 8e4,
|
|
11144
|
+
pendingCredits: 1900,
|
|
11145
|
+
pendingDebits: 3e3,
|
|
11146
|
+
fundsOnHold: 0,
|
|
11147
|
+
accountBalance: 78900,
|
|
11148
|
+
availableBalance: 75900,
|
|
10774
11149
|
currency: "USD",
|
|
10775
11150
|
institution: "Wells Fargo",
|
|
10776
11151
|
routingNumber: "121000248",
|
|
@@ -10785,10 +11160,14 @@ var mockBusinessAccounts = [
|
|
|
10785
11160
|
id: "acc-004",
|
|
10786
11161
|
name: "Merchant Services Account",
|
|
10787
11162
|
number: "4444445678",
|
|
10788
|
-
type: "
|
|
11163
|
+
type: "funding",
|
|
10789
11164
|
status: "active",
|
|
10790
|
-
|
|
10791
|
-
|
|
11165
|
+
settledBalance: 23e4,
|
|
11166
|
+
pendingCredits: 4567.89,
|
|
11167
|
+
pendingDebits: 0,
|
|
11168
|
+
fundsOnHold: 4567.89,
|
|
11169
|
+
accountBalance: 234567.89,
|
|
11170
|
+
availableBalance: 23e4,
|
|
10792
11171
|
currency: "USD",
|
|
10793
11172
|
institution: "Bank of America",
|
|
10794
11173
|
routingNumber: "026009593",
|
|
@@ -10805,8 +11184,12 @@ var mockBusinessAccounts = [
|
|
|
10805
11184
|
number: "7777779012",
|
|
10806
11185
|
type: "savings",
|
|
10807
11186
|
status: "active",
|
|
10808
|
-
|
|
10809
|
-
|
|
11187
|
+
settledBalance: 5e5,
|
|
11188
|
+
pendingCredits: 0,
|
|
11189
|
+
pendingDebits: 0,
|
|
11190
|
+
fundsOnHold: 0,
|
|
11191
|
+
accountBalance: 5e5,
|
|
11192
|
+
availableBalance: 5e5,
|
|
10810
11193
|
currency: "USD",
|
|
10811
11194
|
institution: "Citibank",
|
|
10812
11195
|
routingNumber: "021000089",
|
|
@@ -10821,10 +11204,14 @@ var mockBusinessAccounts = [
|
|
|
10821
11204
|
id: "acc-006",
|
|
10822
11205
|
name: "Operating Account",
|
|
10823
11206
|
number: "3333333456",
|
|
10824
|
-
type: "
|
|
11207
|
+
type: "zero-balance",
|
|
10825
11208
|
status: "inactive",
|
|
10826
|
-
|
|
10827
|
-
|
|
11209
|
+
settledBalance: 0,
|
|
11210
|
+
pendingCredits: 0,
|
|
11211
|
+
pendingDebits: 0,
|
|
11212
|
+
fundsOnHold: 0,
|
|
11213
|
+
accountBalance: 0,
|
|
11214
|
+
availableBalance: 0,
|
|
10828
11215
|
currency: "USD",
|
|
10829
11216
|
institution: "Wells Fargo",
|
|
10830
11217
|
routingNumber: "121000248",
|
|
@@ -10892,6 +11279,12 @@ var Accounts = () => {
|
|
|
10892
11279
|
title: "Account Number",
|
|
10893
11280
|
sortable: true
|
|
10894
11281
|
},
|
|
11282
|
+
{
|
|
11283
|
+
key: "type",
|
|
11284
|
+
title: "Type",
|
|
11285
|
+
sortable: true,
|
|
11286
|
+
render: (value, row) => /* @__PURE__ */ jsxRuntime.jsx(AccountTypeBadge, { type: row.type })
|
|
11287
|
+
},
|
|
10895
11288
|
{
|
|
10896
11289
|
key: "name",
|
|
10897
11290
|
title: "Account Name",
|
|
@@ -10915,16 +11308,18 @@ var Accounts = () => {
|
|
|
10915
11308
|
}
|
|
10916
11309
|
},
|
|
10917
11310
|
{
|
|
10918
|
-
key: "
|
|
11311
|
+
key: "accountBalance",
|
|
10919
11312
|
title: "Account Balance",
|
|
10920
11313
|
sortable: true,
|
|
10921
|
-
align: "right"
|
|
11314
|
+
align: "right",
|
|
11315
|
+
render: (value) => formatCurrency(value)
|
|
10922
11316
|
},
|
|
10923
11317
|
{
|
|
10924
11318
|
key: "availableBalance",
|
|
10925
11319
|
title: "Available Balance",
|
|
10926
11320
|
sortable: true,
|
|
10927
|
-
align: "right"
|
|
11321
|
+
align: "right",
|
|
11322
|
+
render: (value) => formatCurrency(value)
|
|
10928
11323
|
},
|
|
10929
11324
|
{
|
|
10930
11325
|
key: "status",
|
|
@@ -10936,11 +11331,6 @@ var Accounts = () => {
|
|
|
10936
11331
|
key: "created",
|
|
10937
11332
|
title: "Create Date",
|
|
10938
11333
|
sortable: true
|
|
10939
|
-
},
|
|
10940
|
-
{
|
|
10941
|
-
key: "modified",
|
|
10942
|
-
title: "Modify Date",
|
|
10943
|
-
sortable: true
|
|
10944
11334
|
}
|
|
10945
11335
|
];
|
|
10946
11336
|
const startIndex = (currentPage - 1) * pageSize;
|
|
@@ -11100,7 +11490,8 @@ var AccountDetail = () => {
|
|
|
11100
11490
|
PageLayout,
|
|
11101
11491
|
{
|
|
11102
11492
|
title: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
11103
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: account.
|
|
11493
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: account.number }),
|
|
11494
|
+
/* @__PURE__ */ jsxRuntime.jsx(AccountTypeBadge, { type: account.type }),
|
|
11104
11495
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11105
11496
|
EditableInfoField,
|
|
11106
11497
|
{
|
|
@@ -11144,7 +11535,7 @@ var AccountDetail = () => {
|
|
|
11144
11535
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11145
11536
|
EditableFormCard,
|
|
11146
11537
|
{
|
|
11147
|
-
title:
|
|
11538
|
+
title: account.name,
|
|
11148
11539
|
variant: "subtle",
|
|
11149
11540
|
isEditing: form.isEditing,
|
|
11150
11541
|
onToggleEdit: form.handleToggleEdit,
|
|
@@ -11152,20 +11543,42 @@ var AccountDetail = () => {
|
|
|
11152
11543
|
onCancel: form.handleCancel,
|
|
11153
11544
|
viewContent: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11154
11545
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-6 p-6 rounded-lg bg-gradient-to-br from-primary/10 via-primary/5 to-background border border-primary/20", children: [
|
|
11155
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-
|
|
11156
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wallet, { className: "h-4 w-4 text-primary" }),
|
|
11157
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: account.number }),
|
|
11158
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "\u2022" }),
|
|
11159
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground capitalize", children: account.type })
|
|
11160
|
-
] }),
|
|
11161
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-end gap-8", children: [
|
|
11546
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-end gap-8 mb-6", children: [
|
|
11162
11547
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
11163
11548
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-muted-foreground mb-1", children: "Account Balance" }),
|
|
11164
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-3xl font-bold text-foreground tracking-tight", children: account.
|
|
11549
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-3xl font-bold text-foreground tracking-tight", children: formatCurrency(account.accountBalance) })
|
|
11165
11550
|
] }),
|
|
11166
11551
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
11167
11552
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-muted-foreground mb-1", children: "Available Balance" }),
|
|
11168
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-3xl font-bold text-foreground tracking-tight", children: account.
|
|
11553
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-3xl font-bold text-foreground tracking-tight", children: formatCurrency(account.availableBalance) })
|
|
11554
|
+
] })
|
|
11555
|
+
] }),
|
|
11556
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t border-border/50 mb-4" }),
|
|
11557
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-4", children: [
|
|
11558
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
11559
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: "Settled Balance" }),
|
|
11560
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg font-semibold", children: formatCurrency(account.settledBalance) })
|
|
11561
|
+
] }),
|
|
11562
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
11563
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: "Pending Credits" }),
|
|
11564
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-lg font-semibold text-success", children: [
|
|
11565
|
+
"+",
|
|
11566
|
+
formatCurrency(account.pendingCredits)
|
|
11567
|
+
] })
|
|
11568
|
+
] }),
|
|
11569
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
11570
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: "Pending Debits" }),
|
|
11571
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-lg font-semibold text-destructive", children: [
|
|
11572
|
+
"-",
|
|
11573
|
+
formatCurrency(account.pendingDebits)
|
|
11574
|
+
] })
|
|
11575
|
+
] }),
|
|
11576
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
11577
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: "Funds on Hold" }),
|
|
11578
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: cn(
|
|
11579
|
+
"text-lg font-semibold",
|
|
11580
|
+
account.fundsOnHold > 0 && "text-warning"
|
|
11581
|
+
), children: formatCurrency(account.fundsOnHold) })
|
|
11169
11582
|
] })
|
|
11170
11583
|
] })
|
|
11171
11584
|
] }),
|
|
@@ -11237,20 +11650,42 @@ var AccountDetail = () => {
|
|
|
11237
11650
|
] }),
|
|
11238
11651
|
editContent: /* @__PURE__ */ jsxRuntime.jsx(FormProvider, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11239
11652
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-6 p-6 rounded-lg bg-gradient-to-br from-primary/10 via-primary/5 to-background border border-primary/20", children: [
|
|
11240
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-
|
|
11241
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wallet, { className: "h-4 w-4 text-primary" }),
|
|
11242
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: account.number }),
|
|
11243
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "\u2022" }),
|
|
11244
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground capitalize", children: account.type })
|
|
11245
|
-
] }),
|
|
11246
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-end gap-8", children: [
|
|
11653
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-end gap-8 mb-6", children: [
|
|
11247
11654
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
11248
11655
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-muted-foreground mb-1", children: "Account Balance" }),
|
|
11249
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-3xl font-bold text-foreground tracking-tight", children: account.
|
|
11656
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-3xl font-bold text-foreground tracking-tight", children: formatCurrency(account.accountBalance) })
|
|
11250
11657
|
] }),
|
|
11251
11658
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
11252
11659
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-muted-foreground mb-1", children: "Available Balance" }),
|
|
11253
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-3xl font-bold text-foreground tracking-tight", children: account.
|
|
11660
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-3xl font-bold text-foreground tracking-tight", children: formatCurrency(account.availableBalance) })
|
|
11661
|
+
] })
|
|
11662
|
+
] }),
|
|
11663
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t border-border/50 mb-4" }),
|
|
11664
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-4", children: [
|
|
11665
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
11666
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: "Settled Balance" }),
|
|
11667
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg font-semibold", children: formatCurrency(account.settledBalance) })
|
|
11668
|
+
] }),
|
|
11669
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
11670
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: "Pending Credits" }),
|
|
11671
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-lg font-semibold text-success", children: [
|
|
11672
|
+
"+",
|
|
11673
|
+
formatCurrency(account.pendingCredits)
|
|
11674
|
+
] })
|
|
11675
|
+
] }),
|
|
11676
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
11677
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: "Pending Debits" }),
|
|
11678
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-lg font-semibold text-destructive", children: [
|
|
11679
|
+
"-",
|
|
11680
|
+
formatCurrency(account.pendingDebits)
|
|
11681
|
+
] })
|
|
11682
|
+
] }),
|
|
11683
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
11684
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: "Funds on Hold" }),
|
|
11685
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: cn(
|
|
11686
|
+
"text-lg font-semibold",
|
|
11687
|
+
account.fundsOnHold > 0 && "text-warning"
|
|
11688
|
+
), children: formatCurrency(account.fundsOnHold) })
|
|
11254
11689
|
] })
|
|
11255
11690
|
] })
|
|
11256
11691
|
] }),
|
|
@@ -14460,32 +14895,37 @@ var mockTransactionTimeline = [
|
|
|
14460
14895
|
timestamp: "2025-10-01 00:19:45"
|
|
14461
14896
|
}
|
|
14462
14897
|
];
|
|
14898
|
+
var defaultFilters2 = {
|
|
14899
|
+
originalFileName: "",
|
|
14900
|
+
requesterIpAddress: "",
|
|
14901
|
+
requesterUsername: "",
|
|
14902
|
+
showAchNoc: false,
|
|
14903
|
+
excludeWire: false,
|
|
14904
|
+
excludeAch: false,
|
|
14905
|
+
wireFileHandle: "",
|
|
14906
|
+
direction: "",
|
|
14907
|
+
counterpartyId: "",
|
|
14908
|
+
customerId: "",
|
|
14909
|
+
settlementFileName: "",
|
|
14910
|
+
isInbound: false,
|
|
14911
|
+
accountNumber: "",
|
|
14912
|
+
processingStatus: [],
|
|
14913
|
+
beginDate: void 0,
|
|
14914
|
+
endDate: void 0,
|
|
14915
|
+
postDateStart: void 0,
|
|
14916
|
+
postDateEnd: void 0,
|
|
14917
|
+
maxAmount: "",
|
|
14918
|
+
minAmount: "",
|
|
14919
|
+
productId: "",
|
|
14920
|
+
paymentId: "",
|
|
14921
|
+
transactionStatus: [],
|
|
14922
|
+
transactionType: []
|
|
14923
|
+
};
|
|
14463
14924
|
var TransactionHistory = () => {
|
|
14464
14925
|
const navigate = reactRouterDom.useNavigate();
|
|
14465
14926
|
const [sortBy, setSortBy] = React15.useState("created");
|
|
14466
14927
|
const [sortDirection, setSortDirection] = React15.useState("desc");
|
|
14467
|
-
const [filters, setFilters] = React15.useState(
|
|
14468
|
-
accountNumber: "",
|
|
14469
|
-
product: "",
|
|
14470
|
-
customerId: "",
|
|
14471
|
-
counterpartyId: "",
|
|
14472
|
-
settlementFileName: "",
|
|
14473
|
-
originalFileName: "",
|
|
14474
|
-
requesterIpAddress: "",
|
|
14475
|
-
requesterUsername: "",
|
|
14476
|
-
wireFileHandle: "",
|
|
14477
|
-
paymentId: "",
|
|
14478
|
-
transactionType: "",
|
|
14479
|
-
transactionStatus: "",
|
|
14480
|
-
processingStatus: "",
|
|
14481
|
-
direction: "",
|
|
14482
|
-
minAmount: "",
|
|
14483
|
-
maxAmount: "",
|
|
14484
|
-
creationDateStart: void 0,
|
|
14485
|
-
creationDateEnd: void 0,
|
|
14486
|
-
postDateStart: void 0,
|
|
14487
|
-
postDateEnd: void 0
|
|
14488
|
-
});
|
|
14928
|
+
const [filters, setFilters] = React15.useState(defaultFilters2);
|
|
14489
14929
|
const filteredTransactions = React15.useMemo(() => {
|
|
14490
14930
|
let filtered = [...mockTransactions];
|
|
14491
14931
|
if (filters.accountNumber) {
|
|
@@ -14493,11 +14933,11 @@ var TransactionHistory = () => {
|
|
|
14493
14933
|
(t) => t.accountNumber.toLowerCase().includes(filters.accountNumber.toLowerCase())
|
|
14494
14934
|
);
|
|
14495
14935
|
}
|
|
14496
|
-
if (filters.transactionType) {
|
|
14497
|
-
filtered = filtered.filter((t) =>
|
|
14936
|
+
if (filters.transactionType && filters.transactionType.length > 0) {
|
|
14937
|
+
filtered = filtered.filter((t) => filters.transactionType.includes(t.transactionType));
|
|
14498
14938
|
}
|
|
14499
|
-
if (filters.transactionStatus) {
|
|
14500
|
-
filtered = filtered.filter((t) => t.status
|
|
14939
|
+
if (filters.transactionStatus && filters.transactionStatus.length > 0) {
|
|
14940
|
+
filtered = filtered.filter((t) => filters.transactionStatus.includes(t.status));
|
|
14501
14941
|
}
|
|
14502
14942
|
if (filters.minAmount) {
|
|
14503
14943
|
const minAmount = parseFloat(filters.minAmount.replace(/[^0-9.-]/g, ""));
|
|
@@ -14511,6 +14951,12 @@ var TransactionHistory = () => {
|
|
|
14511
14951
|
filtered = filtered.filter((t) => t.amount <= maxAmount);
|
|
14512
14952
|
}
|
|
14513
14953
|
}
|
|
14954
|
+
if (filters.excludeWire) {
|
|
14955
|
+
filtered = filtered.filter((t) => !t.transactionType.toLowerCase().includes("wire"));
|
|
14956
|
+
}
|
|
14957
|
+
if (filters.excludeAch) {
|
|
14958
|
+
filtered = filtered.filter((t) => !t.transactionType.toLowerCase().includes("ach"));
|
|
14959
|
+
}
|
|
14514
14960
|
return filtered;
|
|
14515
14961
|
}, [filters]);
|
|
14516
14962
|
const sortedTransactions = React15.useMemo(() => {
|
|
@@ -14527,28 +14973,7 @@ var TransactionHistory = () => {
|
|
|
14527
14973
|
setFilters((prev) => ({ ...prev, [field]: value }));
|
|
14528
14974
|
}, []);
|
|
14529
14975
|
const handleResetFilters = React15.useCallback(() => {
|
|
14530
|
-
setFilters(
|
|
14531
|
-
accountNumber: "",
|
|
14532
|
-
product: "",
|
|
14533
|
-
customerId: "",
|
|
14534
|
-
counterpartyId: "",
|
|
14535
|
-
settlementFileName: "",
|
|
14536
|
-
originalFileName: "",
|
|
14537
|
-
requesterIpAddress: "",
|
|
14538
|
-
requesterUsername: "",
|
|
14539
|
-
wireFileHandle: "",
|
|
14540
|
-
paymentId: "",
|
|
14541
|
-
transactionType: "",
|
|
14542
|
-
transactionStatus: "",
|
|
14543
|
-
processingStatus: "",
|
|
14544
|
-
direction: "",
|
|
14545
|
-
minAmount: "",
|
|
14546
|
-
maxAmount: "",
|
|
14547
|
-
creationDateStart: void 0,
|
|
14548
|
-
creationDateEnd: void 0,
|
|
14549
|
-
postDateStart: void 0,
|
|
14550
|
-
postDateEnd: void 0
|
|
14551
|
-
});
|
|
14976
|
+
setFilters(defaultFilters2);
|
|
14552
14977
|
}, []);
|
|
14553
14978
|
const handleApplyFilters = React15.useCallback(() => {
|
|
14554
14979
|
console.log("Applying filters:", filters);
|
|
@@ -14564,13 +14989,6 @@ var TransactionHistory = () => {
|
|
|
14564
14989
|
const handleRowClick = React15.useCallback((transaction) => {
|
|
14565
14990
|
navigate(`/transactions/${transaction.id}`);
|
|
14566
14991
|
}, [navigate]);
|
|
14567
|
-
const formatCurrency4 = (value) => {
|
|
14568
|
-
return new Intl.NumberFormat("en-US", {
|
|
14569
|
-
style: "currency",
|
|
14570
|
-
currency: "USD",
|
|
14571
|
-
minimumFractionDigits: 2
|
|
14572
|
-
}).format(value);
|
|
14573
|
-
};
|
|
14574
14992
|
const columns3 = React15.useMemo(() => [
|
|
14575
14993
|
{
|
|
14576
14994
|
key: "created",
|
|
@@ -14587,7 +15005,7 @@ var TransactionHistory = () => {
|
|
|
14587
15005
|
title: "Amount",
|
|
14588
15006
|
sortable: true,
|
|
14589
15007
|
align: "right",
|
|
14590
|
-
render: (value) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: value < 0 ? "text-destructive" : "", children:
|
|
15008
|
+
render: (value) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: value < 0 ? "text-destructive" : "", children: formatCurrency(value) })
|
|
14591
15009
|
},
|
|
14592
15010
|
{
|
|
14593
15011
|
key: "customer",
|
|
@@ -15127,181 +15545,6 @@ function NewTransaction() {
|
|
|
15127
15545
|
}
|
|
15128
15546
|
);
|
|
15129
15547
|
}
|
|
15130
|
-
var cancelTransactionSchema = zod.z.object({
|
|
15131
|
-
reason: zod.z.string().min(1, "Reason is required").max(500, "Reason must be less than 500 characters")
|
|
15132
|
-
});
|
|
15133
|
-
var returnTransactionSchema = zod.z.object({
|
|
15134
|
-
reasonCode: zod.z.string().min(1, "Reason code is required")
|
|
15135
|
-
});
|
|
15136
|
-
var CancelTransactionDialog = ({
|
|
15137
|
-
transactionId,
|
|
15138
|
-
open,
|
|
15139
|
-
onOpenChange,
|
|
15140
|
-
onCancel
|
|
15141
|
-
}) => {
|
|
15142
|
-
const { toast: toast6 } = useToast();
|
|
15143
|
-
const {
|
|
15144
|
-
register,
|
|
15145
|
-
handleSubmit,
|
|
15146
|
-
formState: { errors, isSubmitting },
|
|
15147
|
-
reset
|
|
15148
|
-
} = useFormWithEditState({
|
|
15149
|
-
schema: cancelTransactionSchema,
|
|
15150
|
-
defaultValues: {
|
|
15151
|
-
reason: ""
|
|
15152
|
-
}
|
|
15153
|
-
});
|
|
15154
|
-
const onSubmit = async (data) => {
|
|
15155
|
-
try {
|
|
15156
|
-
await onCancel(data);
|
|
15157
|
-
toast6({
|
|
15158
|
-
title: "Transaction Cancelled",
|
|
15159
|
-
description: `Transaction ${transactionId} has been cancelled successfully.`
|
|
15160
|
-
});
|
|
15161
|
-
reset();
|
|
15162
|
-
onOpenChange(false);
|
|
15163
|
-
} catch (error) {
|
|
15164
|
-
toast6({
|
|
15165
|
-
title: "Error",
|
|
15166
|
-
description: "Failed to cancel the transaction. Please try again.",
|
|
15167
|
-
variant: "destructive"
|
|
15168
|
-
});
|
|
15169
|
-
}
|
|
15170
|
-
};
|
|
15171
|
-
const handleClose = () => {
|
|
15172
|
-
reset();
|
|
15173
|
-
onOpenChange(false);
|
|
15174
|
-
};
|
|
15175
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange: handleClose, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "sm:max-w-md", children: [
|
|
15176
|
-
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
|
|
15177
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: "Cancel Transaction" }),
|
|
15178
|
-
/* @__PURE__ */ jsxRuntime.jsxs(DialogDescription, { children: [
|
|
15179
|
-
"Please provide a reason for cancelling transaction ",
|
|
15180
|
-
transactionId,
|
|
15181
|
-
"."
|
|
15182
|
-
] })
|
|
15183
|
-
] }),
|
|
15184
|
-
/* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit(onSubmit), className: "space-y-4", children: [
|
|
15185
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15186
|
-
EnhancedTextarea,
|
|
15187
|
-
{
|
|
15188
|
-
label: "Cancellation Reason",
|
|
15189
|
-
placeholder: "Enter the reason for cancellation...",
|
|
15190
|
-
error: errors.reason?.message,
|
|
15191
|
-
...register("reason")
|
|
15192
|
-
}
|
|
15193
|
-
),
|
|
15194
|
-
/* @__PURE__ */ jsxRuntime.jsxs(DialogFooter, { className: "gap-2 sm:gap-0", children: [
|
|
15195
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15196
|
-
Button,
|
|
15197
|
-
{
|
|
15198
|
-
type: "button",
|
|
15199
|
-
variant: "outline",
|
|
15200
|
-
onClick: handleClose,
|
|
15201
|
-
disabled: isSubmitting,
|
|
15202
|
-
children: "Close"
|
|
15203
|
-
}
|
|
15204
|
-
),
|
|
15205
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15206
|
-
Button,
|
|
15207
|
-
{
|
|
15208
|
-
type: "submit",
|
|
15209
|
-
variant: "destructive",
|
|
15210
|
-
disabled: isSubmitting,
|
|
15211
|
-
children: isSubmitting ? "Cancelling..." : "Cancel Transaction"
|
|
15212
|
-
}
|
|
15213
|
-
)
|
|
15214
|
-
] })
|
|
15215
|
-
] })
|
|
15216
|
-
] }) });
|
|
15217
|
-
};
|
|
15218
|
-
function ReturnTransactionDialog({
|
|
15219
|
-
transactionId,
|
|
15220
|
-
open,
|
|
15221
|
-
onOpenChange,
|
|
15222
|
-
onReturn,
|
|
15223
|
-
reasonCodes
|
|
15224
|
-
}) {
|
|
15225
|
-
const {
|
|
15226
|
-
watch,
|
|
15227
|
-
setValue,
|
|
15228
|
-
handleSave,
|
|
15229
|
-
handleCancel,
|
|
15230
|
-
isLoading,
|
|
15231
|
-
formState: { errors }
|
|
15232
|
-
} = useFormWithEditState({
|
|
15233
|
-
schema: returnTransactionSchema,
|
|
15234
|
-
initialEditing: true,
|
|
15235
|
-
onSave: async (data) => {
|
|
15236
|
-
try {
|
|
15237
|
-
await onReturn(data);
|
|
15238
|
-
toast({
|
|
15239
|
-
title: "Transaction returned",
|
|
15240
|
-
description: `Transaction #${transactionId} has been returned successfully.`
|
|
15241
|
-
});
|
|
15242
|
-
onOpenChange(false);
|
|
15243
|
-
} catch (error) {
|
|
15244
|
-
toast({
|
|
15245
|
-
title: "Error",
|
|
15246
|
-
description: "Failed to return transaction. Please try again.",
|
|
15247
|
-
variant: "destructive"
|
|
15248
|
-
});
|
|
15249
|
-
throw error;
|
|
15250
|
-
}
|
|
15251
|
-
},
|
|
15252
|
-
onCancel: () => {
|
|
15253
|
-
onOpenChange(false);
|
|
15254
|
-
}
|
|
15255
|
-
});
|
|
15256
|
-
const reasonCode = watch("reasonCode");
|
|
15257
|
-
const selectOptions = reasonCodes.map((code) => ({
|
|
15258
|
-
value: code.value,
|
|
15259
|
-
label: code.label
|
|
15260
|
-
}));
|
|
15261
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "sm:max-w-[425px]", children: [
|
|
15262
|
-
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
|
|
15263
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: "Return Transaction" }),
|
|
15264
|
-
/* @__PURE__ */ jsxRuntime.jsxs(DialogDescription, { children: [
|
|
15265
|
-
"Select a reason code to return transaction #",
|
|
15266
|
-
transactionId,
|
|
15267
|
-
"."
|
|
15268
|
-
] })
|
|
15269
|
-
] }),
|
|
15270
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15271
|
-
EnhancedSelect,
|
|
15272
|
-
{
|
|
15273
|
-
label: "Reason Code",
|
|
15274
|
-
placeholder: "Select a reason code",
|
|
15275
|
-
options: selectOptions,
|
|
15276
|
-
value: reasonCode || "",
|
|
15277
|
-
onValueChange: (value) => setValue("reasonCode", value),
|
|
15278
|
-
error: errors.reasonCode?.message
|
|
15279
|
-
}
|
|
15280
|
-
) }),
|
|
15281
|
-
/* @__PURE__ */ jsxRuntime.jsxs(DialogFooter, { children: [
|
|
15282
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15283
|
-
Button,
|
|
15284
|
-
{
|
|
15285
|
-
type: "button",
|
|
15286
|
-
variant: "outline",
|
|
15287
|
-
onClick: handleCancel,
|
|
15288
|
-
disabled: isLoading,
|
|
15289
|
-
children: "Cancel"
|
|
15290
|
-
}
|
|
15291
|
-
),
|
|
15292
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15293
|
-
Button,
|
|
15294
|
-
{
|
|
15295
|
-
type: "button",
|
|
15296
|
-
variant: "destructive",
|
|
15297
|
-
onClick: handleSave,
|
|
15298
|
-
disabled: isLoading || !reasonCode,
|
|
15299
|
-
children: isLoading ? "Returning..." : "Return Transaction"
|
|
15300
|
-
}
|
|
15301
|
-
)
|
|
15302
|
-
] })
|
|
15303
|
-
] }) });
|
|
15304
|
-
}
|
|
15305
15548
|
var returnReasonCodes = [
|
|
15306
15549
|
{ value: "R01", label: "R01 - Insufficient Funds" },
|
|
15307
15550
|
{ value: "R02", label: "R02 - Account Closed" },
|
|
@@ -16305,7 +16548,7 @@ var VelocityLimitDetailsCard = ({
|
|
|
16305
16548
|
InfoField,
|
|
16306
16549
|
{
|
|
16307
16550
|
label: "Max Amount",
|
|
16308
|
-
value:
|
|
16551
|
+
value: formatCurrency(parseFloat(limit.maxAmount)),
|
|
16309
16552
|
layout: "horizontal"
|
|
16310
16553
|
}
|
|
16311
16554
|
),
|
|
@@ -16342,7 +16585,7 @@ var VelocityLimitDetailsCard = ({
|
|
|
16342
16585
|
InfoField,
|
|
16343
16586
|
{
|
|
16344
16587
|
label: "Amount Threshold",
|
|
16345
|
-
value:
|
|
16588
|
+
value: formatCurrency(parseFloat(limit.amountThreshold)),
|
|
16346
16589
|
layout: "horizontal"
|
|
16347
16590
|
}
|
|
16348
16591
|
),
|
|
@@ -17341,6 +17584,7 @@ exports.Businesses = Businesses_default;
|
|
|
17341
17584
|
exports.Button = Button;
|
|
17342
17585
|
exports.CIPStatusBadge = CIPStatusBadge;
|
|
17343
17586
|
exports.Calendar = Calendar;
|
|
17587
|
+
exports.CancelTransactionDialog = CancelTransactionDialog;
|
|
17344
17588
|
exports.Card = Card;
|
|
17345
17589
|
exports.CardContent = CardContent;
|
|
17346
17590
|
exports.CardDescription = CardDescription;
|
|
@@ -17428,6 +17672,7 @@ exports.ReconExceptions = ReconExceptions;
|
|
|
17428
17672
|
exports.ReconUpload = ReconUpload;
|
|
17429
17673
|
exports.ResolveAlertDialog = ResolveAlertDialog;
|
|
17430
17674
|
exports.ResponsiveGrid = ResponsiveGrid;
|
|
17675
|
+
exports.ReturnTransactionDialog = ReturnTransactionDialog;
|
|
17431
17676
|
exports.ScrollArea = ScrollArea;
|
|
17432
17677
|
exports.ScrollBar = ScrollBar;
|
|
17433
17678
|
exports.Separator = Separator;
|