braid-ui 1.0.41 → 1.0.42
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 +17 -0
- package/dist/css/braid-ui.min.css +1 -1
- package/dist/index.cjs +1783 -236
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -5
- package/dist/index.d.ts +14 -5
- package/dist/index.js +1782 -239
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React15 from 'react';
|
|
2
|
-
import { useState, useEffect, useCallback, useMemo } from 'react';
|
|
2
|
+
import { useState, useEffect, useCallback, useMemo, useRef } from 'react';
|
|
3
3
|
import { cva } from 'class-variance-authority';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
|
-
import { ChevronDown, ChevronUp, Check, X, PanelLeft, Edit, Home, Globe, CreditCard, Building, MoreVertical, Minus, TrendingDown, TrendingUp, ChevronRight, Eye, Trash2, Plus, MessageSquare, Upload, FileText, Download, Copy, LayoutDashboard, Bell, Briefcase, FileCheck, Receipt, ArrowLeftRight, Users, Building2, Shield, AlertCircle, RefreshCw, Landmark, Search, Repeat, Zap, Box, Settings, BarChart3, Key, ChevronLeft, AlertTriangle, XCircle, CheckCircle, Clock, Ban, Circle, Wallet, Filter, User, Loader2, ArrowDownRight, ArrowUpRight, CheckCircle2, StickyNote, FileUp, RotateCcw, Send, PlayCircle, UserPlus, ChevronsUpDown, UserCheck, CalendarIcon, Package, FileJson, DollarSign } from 'lucide-react';
|
|
7
|
+
import { ChevronDown, ChevronUp, Check, X, PanelLeft, Edit, Home, Globe, CreditCard, Building, MoreVertical, Minus, TrendingDown, TrendingUp, ChevronRight, Eye, Trash2, Plus, MessageSquare, Upload, FileText, Download, Copy, LayoutDashboard, Bell, Briefcase, FileCheck, Receipt, ArrowLeftRight, Users, Building2, Shield, AlertCircle, RefreshCw, Landmark, Search, Repeat, Zap, Box, Settings, BarChart3, Key, ChevronLeft, AlertTriangle, XCircle, CheckCircle, Clock, Ban, Circle, Wallet, Filter, User, Loader2, ArrowDownRight, ArrowUpRight, CheckCircle2, ArrowLeft, StickyNote, FileUp, RotateCcw, Send, PlayCircle, UserPlus, ChevronsUpDown, ArrowRightLeft, UserCheck, CalendarIcon, Package, File, FileJson, DollarSign } from 'lucide-react';
|
|
8
8
|
import { createPortal } from 'react-dom';
|
|
9
9
|
import { Slot } from '@radix-ui/react-slot';
|
|
10
10
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
@@ -18,7 +18,7 @@ import { z } from 'zod';
|
|
|
18
18
|
import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '@radix-ui/react-collapsible';
|
|
19
19
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
20
20
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
21
|
-
import {
|
|
21
|
+
import { format, parseISO } from 'date-fns';
|
|
22
22
|
import { DayPicker } from 'react-day-picker';
|
|
23
23
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
24
24
|
import { Toaster as Toaster$1, toast as toast$1 } from 'sonner';
|
|
@@ -524,8 +524,8 @@ var reducer = (state, action) => {
|
|
|
524
524
|
if (toastId) {
|
|
525
525
|
addToRemoveQueue(toastId);
|
|
526
526
|
} else {
|
|
527
|
-
state.toasts.forEach((
|
|
528
|
-
addToRemoveQueue(
|
|
527
|
+
state.toasts.forEach((toast6) => {
|
|
528
|
+
addToRemoveQueue(toast6.id);
|
|
529
529
|
});
|
|
530
530
|
}
|
|
531
531
|
return {
|
|
@@ -4427,7 +4427,7 @@ function DatePicker({
|
|
|
4427
4427
|
) })
|
|
4428
4428
|
] });
|
|
4429
4429
|
if (label) {
|
|
4430
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("space-y-
|
|
4430
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("space-y-4", wrapperClassName), children: [
|
|
4431
4431
|
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: label }),
|
|
4432
4432
|
picker
|
|
4433
4433
|
] });
|
|
@@ -8371,7 +8371,8 @@ var DetailPageLayout = ({
|
|
|
8371
8371
|
description,
|
|
8372
8372
|
cards,
|
|
8373
8373
|
actions,
|
|
8374
|
-
initialEditingState = {}
|
|
8374
|
+
initialEditingState = {},
|
|
8375
|
+
headerContent
|
|
8375
8376
|
}) => {
|
|
8376
8377
|
const [editingCards, setEditingCards] = useState(
|
|
8377
8378
|
initialEditingState
|
|
@@ -8390,6 +8391,7 @@ var DetailPageLayout = ({
|
|
|
8390
8391
|
{
|
|
8391
8392
|
title,
|
|
8392
8393
|
description,
|
|
8394
|
+
headerContent,
|
|
8393
8395
|
actions: actions?.map((action) => ({
|
|
8394
8396
|
label: action.label,
|
|
8395
8397
|
variant: action.variant || "default",
|
|
@@ -11588,6 +11590,53 @@ var CounterpartyDetail = () => {
|
|
|
11588
11590
|
);
|
|
11589
11591
|
};
|
|
11590
11592
|
var CounterpartyDetail_default = CounterpartyDetail;
|
|
11593
|
+
var CreateCounterpartyView = ({
|
|
11594
|
+
paymentMethods,
|
|
11595
|
+
onPaymentMethodsChange,
|
|
11596
|
+
onBasicInfoChange,
|
|
11597
|
+
onCancel,
|
|
11598
|
+
onSubmit
|
|
11599
|
+
}) => {
|
|
11600
|
+
return /* @__PURE__ */ jsx(
|
|
11601
|
+
PageLayout,
|
|
11602
|
+
{
|
|
11603
|
+
title: "Create Counterparty",
|
|
11604
|
+
description: "Create a new counterparty with all required information",
|
|
11605
|
+
actions: [
|
|
11606
|
+
{ label: "Cancel", variant: "outline", onClick: onCancel },
|
|
11607
|
+
{ label: "Create Counterparty", variant: "default", onClick: onSubmit }
|
|
11608
|
+
],
|
|
11609
|
+
children: /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
11610
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
11611
|
+
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Basic Information" }) }),
|
|
11612
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(CounterpartyBasicInfo, { onDataChange: onBasicInfoChange }) })
|
|
11613
|
+
] }),
|
|
11614
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
11615
|
+
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, { children: [
|
|
11616
|
+
"Address",
|
|
11617
|
+
paymentMethods.some((m) => m.type === "wire") && /* @__PURE__ */ jsx("span", { className: "text-destructive ml-1", children: "*" })
|
|
11618
|
+
] }) }),
|
|
11619
|
+
/* @__PURE__ */ jsxs(CardContent, { children: [
|
|
11620
|
+
paymentMethods.length === 0 && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-4", children: "Optional for ACH payments, required for wire transfers" }),
|
|
11621
|
+
paymentMethods.some((m) => m.type === "wire") && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-4", children: "Required because you have wire payment methods" }),
|
|
11622
|
+
/* @__PURE__ */ jsx(
|
|
11623
|
+
AddressForm,
|
|
11624
|
+
{
|
|
11625
|
+
title: "",
|
|
11626
|
+
description: "",
|
|
11627
|
+
showApartment: true
|
|
11628
|
+
}
|
|
11629
|
+
)
|
|
11630
|
+
] })
|
|
11631
|
+
] }),
|
|
11632
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
11633
|
+
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Payment Configuration" }) }),
|
|
11634
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(PaymentInformationSection, { onPaymentMethodsChange }) })
|
|
11635
|
+
] })
|
|
11636
|
+
] })
|
|
11637
|
+
}
|
|
11638
|
+
);
|
|
11639
|
+
};
|
|
11591
11640
|
var CreateCounterparty = () => {
|
|
11592
11641
|
const navigate = useNavigate();
|
|
11593
11642
|
const [counterpartyData, setCounterpartyData] = useState(null);
|
|
@@ -11598,11 +11647,11 @@ var CreateCounterparty = () => {
|
|
|
11598
11647
|
const handleBasicInfoChange = (data) => {
|
|
11599
11648
|
setCounterpartyData(data);
|
|
11600
11649
|
};
|
|
11601
|
-
const counterpartyType = counterpartyData?.type || "";
|
|
11602
11650
|
const handleCancel = () => {
|
|
11603
11651
|
navigate("/counterparty");
|
|
11604
11652
|
};
|
|
11605
11653
|
const handleSubmit = () => {
|
|
11654
|
+
const counterpartyType = counterpartyData?.type || "";
|
|
11606
11655
|
if (!counterpartyType) {
|
|
11607
11656
|
toast({
|
|
11608
11657
|
title: "Error",
|
|
@@ -11635,42 +11684,13 @@ var CreateCounterparty = () => {
|
|
|
11635
11684
|
}, 1e3);
|
|
11636
11685
|
};
|
|
11637
11686
|
return /* @__PURE__ */ jsx(
|
|
11638
|
-
|
|
11687
|
+
CreateCounterpartyView,
|
|
11639
11688
|
{
|
|
11640
|
-
|
|
11641
|
-
|
|
11642
|
-
|
|
11643
|
-
|
|
11644
|
-
|
|
11645
|
-
],
|
|
11646
|
-
children: /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
11647
|
-
/* @__PURE__ */ jsxs(Card, { children: [
|
|
11648
|
-
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Basic Information" }) }),
|
|
11649
|
-
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(CounterpartyBasicInfo, { onDataChange: handleBasicInfoChange }) })
|
|
11650
|
-
] }),
|
|
11651
|
-
/* @__PURE__ */ jsxs(Card, { children: [
|
|
11652
|
-
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, { children: [
|
|
11653
|
-
"Address",
|
|
11654
|
-
paymentMethods.some((m) => m.type === "wire") && /* @__PURE__ */ jsx("span", { className: "text-destructive ml-1", children: "*" })
|
|
11655
|
-
] }) }),
|
|
11656
|
-
/* @__PURE__ */ jsxs(CardContent, { children: [
|
|
11657
|
-
paymentMethods.length === 0 && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-4", children: "Optional for ACH payments, required for wire transfers" }),
|
|
11658
|
-
paymentMethods.some((m) => m.type === "wire") && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-4", children: "Required because you have wire payment methods" }),
|
|
11659
|
-
/* @__PURE__ */ jsx(
|
|
11660
|
-
AddressForm,
|
|
11661
|
-
{
|
|
11662
|
-
title: "",
|
|
11663
|
-
description: "",
|
|
11664
|
-
showApartment: true
|
|
11665
|
-
}
|
|
11666
|
-
)
|
|
11667
|
-
] })
|
|
11668
|
-
] }),
|
|
11669
|
-
/* @__PURE__ */ jsxs(Card, { children: [
|
|
11670
|
-
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Payment Configuration" }) }),
|
|
11671
|
-
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(PaymentInformationSection, { onPaymentMethodsChange: handlePaymentMethodsChange }) })
|
|
11672
|
-
] })
|
|
11673
|
-
] })
|
|
11689
|
+
paymentMethods,
|
|
11690
|
+
onPaymentMethodsChange: handlePaymentMethodsChange,
|
|
11691
|
+
onBasicInfoChange: handleBasicInfoChange,
|
|
11692
|
+
onCancel: handleCancel,
|
|
11693
|
+
onSubmit: handleSubmit
|
|
11674
11694
|
}
|
|
11675
11695
|
);
|
|
11676
11696
|
};
|
|
@@ -14221,7 +14241,7 @@ var TransactionDetail = () => {
|
|
|
14221
14241
|
/* @__PURE__ */ jsx(Button, { onClick: () => navigate("/transactions/history"), children: "Back to Transaction History" })
|
|
14222
14242
|
] }) });
|
|
14223
14243
|
}
|
|
14224
|
-
const
|
|
14244
|
+
const getStatusVariant3 = (status) => {
|
|
14225
14245
|
switch (status) {
|
|
14226
14246
|
case "POSTED":
|
|
14227
14247
|
return "success";
|
|
@@ -14277,7 +14297,7 @@ var TransactionDetail = () => {
|
|
|
14277
14297
|
isInbound: transaction.isInbound
|
|
14278
14298
|
}
|
|
14279
14299
|
),
|
|
14280
|
-
/* @__PURE__ */ jsx(Badge, { variant:
|
|
14300
|
+
/* @__PURE__ */ jsx(Badge, { variant: getStatusVariant3(transaction.status), children: transaction.status }),
|
|
14281
14301
|
/* @__PURE__ */ jsx(Badge, { variant: getProcessingStatusVariant(transaction.processingStatus), children: transaction.processingStatus })
|
|
14282
14302
|
] }),
|
|
14283
14303
|
maxWidth: "full",
|
|
@@ -14376,22 +14396,22 @@ function UIKit() {
|
|
|
14376
14396
|
] })
|
|
14377
14397
|
] }) }) });
|
|
14378
14398
|
}
|
|
14379
|
-
function
|
|
14399
|
+
function VelocityLimitFiltersSheet({
|
|
14380
14400
|
filters,
|
|
14381
14401
|
onFilterChange,
|
|
14382
14402
|
onResetFilters
|
|
14383
14403
|
}) {
|
|
14384
|
-
const hasActiveFilters = filters.status !== "" || filters.
|
|
14404
|
+
const hasActiveFilters = filters.accountNumber !== "" || filters.counterpartyId !== "" || filters.productId !== "" || filters.programId !== "" || filters.limitName !== "" || filters.limitType !== "" || filters.status !== "" || filters.aggregationLevel !== "" || filters.action !== "" || filters.transactionType !== "" || filters.transactionGroup !== "";
|
|
14385
14405
|
return /* @__PURE__ */ jsxs(Sheet, { children: [
|
|
14386
14406
|
/* @__PURE__ */ jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", children: [
|
|
14387
14407
|
/* @__PURE__ */ jsx(Filter, { className: "mr-2 h-4 w-4" }),
|
|
14388
14408
|
"Filters",
|
|
14389
|
-
hasActiveFilters && /* @__PURE__ */ jsx("span", { className: "ml-2 flex h-5 w-5 items-center justify-center rounded-full bg-primary text-xs text-primary-foreground", children:
|
|
14409
|
+
hasActiveFilters && /* @__PURE__ */ jsx("span", { className: "ml-2 flex h-5 w-5 items-center justify-center rounded-full bg-primary text-xs text-primary-foreground", children: Object.values(filters).filter((v) => v !== "").length })
|
|
14390
14410
|
] }) }),
|
|
14391
14411
|
/* @__PURE__ */ jsxs(SheetContent, { className: "w-full sm:max-w-md overflow-y-auto", children: [
|
|
14392
14412
|
/* @__PURE__ */ jsxs(SheetHeader, { children: [
|
|
14393
14413
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
14394
|
-
/* @__PURE__ */ jsx(SheetTitle, { children: "Filter
|
|
14414
|
+
/* @__PURE__ */ jsx(SheetTitle, { children: "Filter Velocity Limits" }),
|
|
14395
14415
|
hasActiveFilters && /* @__PURE__ */ jsxs(
|
|
14396
14416
|
Button,
|
|
14397
14417
|
{
|
|
@@ -14406,20 +14426,78 @@ function OFACFiltersSheet({
|
|
|
14406
14426
|
}
|
|
14407
14427
|
)
|
|
14408
14428
|
] }),
|
|
14409
|
-
/* @__PURE__ */ jsx(SheetDescription, { children: "Filter
|
|
14429
|
+
/* @__PURE__ */ jsx(SheetDescription, { children: "Filter velocity limits by account, limit details, and transaction settings" })
|
|
14410
14430
|
] }),
|
|
14411
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
14431
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4 mt-6", children: [
|
|
14432
|
+
/* @__PURE__ */ jsx(
|
|
14433
|
+
EnhancedInput,
|
|
14434
|
+
{
|
|
14435
|
+
label: "Account Number",
|
|
14436
|
+
placeholder: "Enter account number",
|
|
14437
|
+
value: filters.accountNumber,
|
|
14438
|
+
onChange: (e) => onFilterChange("accountNumber", e.target.value)
|
|
14439
|
+
}
|
|
14440
|
+
),
|
|
14441
|
+
/* @__PURE__ */ jsx(
|
|
14442
|
+
EnhancedInput,
|
|
14443
|
+
{
|
|
14444
|
+
label: "Counterparty ID",
|
|
14445
|
+
placeholder: "Enter counterparty ID",
|
|
14446
|
+
value: filters.counterpartyId,
|
|
14447
|
+
onChange: (e) => onFilterChange("counterpartyId", e.target.value)
|
|
14448
|
+
}
|
|
14449
|
+
),
|
|
14450
|
+
/* @__PURE__ */ jsx(
|
|
14451
|
+
EnhancedInput,
|
|
14452
|
+
{
|
|
14453
|
+
label: "Product ID",
|
|
14454
|
+
placeholder: "Enter product ID",
|
|
14455
|
+
value: filters.productId,
|
|
14456
|
+
onChange: (e) => onFilterChange("productId", e.target.value)
|
|
14457
|
+
}
|
|
14458
|
+
),
|
|
14459
|
+
/* @__PURE__ */ jsx(
|
|
14460
|
+
EnhancedInput,
|
|
14461
|
+
{
|
|
14462
|
+
label: "Program ID",
|
|
14463
|
+
placeholder: "Enter program ID",
|
|
14464
|
+
value: filters.programId,
|
|
14465
|
+
onChange: (e) => onFilterChange("programId", e.target.value)
|
|
14466
|
+
}
|
|
14467
|
+
),
|
|
14468
|
+
/* @__PURE__ */ jsx(
|
|
14469
|
+
EnhancedInput,
|
|
14470
|
+
{
|
|
14471
|
+
label: "Limit Name",
|
|
14472
|
+
placeholder: "Enter limit name",
|
|
14473
|
+
value: filters.limitName,
|
|
14474
|
+
onChange: (e) => onFilterChange("limitName", e.target.value)
|
|
14475
|
+
}
|
|
14476
|
+
),
|
|
14477
|
+
/* @__PURE__ */ jsx(
|
|
14478
|
+
EnhancedSelect,
|
|
14479
|
+
{
|
|
14480
|
+
label: "Limit Type",
|
|
14481
|
+
placeholder: "Select limit type",
|
|
14482
|
+
options: [
|
|
14483
|
+
{ value: "all", label: "All types" },
|
|
14484
|
+
{ value: "AMOUNT", label: "Amount" },
|
|
14485
|
+
{ value: "COUNT", label: "Count" }
|
|
14486
|
+
],
|
|
14487
|
+
value: filters.limitType || "all",
|
|
14488
|
+
onValueChange: (value) => onFilterChange("limitType", value === "all" ? "" : value)
|
|
14489
|
+
}
|
|
14490
|
+
),
|
|
14412
14491
|
/* @__PURE__ */ jsx(
|
|
14413
14492
|
EnhancedSelect,
|
|
14414
14493
|
{
|
|
14415
14494
|
label: "Status",
|
|
14416
|
-
placeholder: "
|
|
14495
|
+
placeholder: "Select status",
|
|
14417
14496
|
options: [
|
|
14418
14497
|
{ value: "all", label: "All statuses" },
|
|
14419
|
-
{ value: "
|
|
14420
|
-
{ value: "
|
|
14421
|
-
{ value: "
|
|
14422
|
-
{ value: "CONFIRMED", label: "Confirmed" }
|
|
14498
|
+
{ value: "ACTIVE", label: "Active" },
|
|
14499
|
+
{ value: "INACTIVE", label: "Inactive" },
|
|
14500
|
+
{ value: "DELETED", label: "Deleted" }
|
|
14423
14501
|
],
|
|
14424
14502
|
value: filters.status || "all",
|
|
14425
14503
|
onValueChange: (value) => onFilterChange("status", value === "all" ? "" : value)
|
|
@@ -14428,180 +14506,246 @@ function OFACFiltersSheet({
|
|
|
14428
14506
|
/* @__PURE__ */ jsx(
|
|
14429
14507
|
EnhancedSelect,
|
|
14430
14508
|
{
|
|
14431
|
-
label: "
|
|
14432
|
-
placeholder: "
|
|
14509
|
+
label: "Aggregation Level",
|
|
14510
|
+
placeholder: "Select aggregation level",
|
|
14433
14511
|
options: [
|
|
14434
|
-
{ value: "all", label: "All
|
|
14435
|
-
{ value: "
|
|
14436
|
-
{ value: "
|
|
14437
|
-
{ value: "
|
|
14512
|
+
{ value: "all", label: "All levels" },
|
|
14513
|
+
{ value: "ACCOUNT", label: "Account" },
|
|
14514
|
+
{ value: "PROGRAM", label: "Program" },
|
|
14515
|
+
{ value: "PRODUCT", label: "Product" }
|
|
14438
14516
|
],
|
|
14439
|
-
value: filters.
|
|
14440
|
-
onValueChange: (value) => onFilterChange("
|
|
14517
|
+
value: filters.aggregationLevel || "all",
|
|
14518
|
+
onValueChange: (value) => onFilterChange("aggregationLevel", value === "all" ? "" : value)
|
|
14441
14519
|
}
|
|
14442
14520
|
),
|
|
14443
14521
|
/* @__PURE__ */ jsx(
|
|
14444
|
-
|
|
14522
|
+
EnhancedSelect,
|
|
14445
14523
|
{
|
|
14446
|
-
|
|
14447
|
-
|
|
14448
|
-
|
|
14449
|
-
|
|
14524
|
+
label: "Action",
|
|
14525
|
+
placeholder: "Select action",
|
|
14526
|
+
options: [
|
|
14527
|
+
{ value: "all", label: "All actions" },
|
|
14528
|
+
{ value: "DECLINE", label: "Decline" },
|
|
14529
|
+
{ value: "FLAG", label: "Flag" }
|
|
14530
|
+
],
|
|
14531
|
+
value: filters.action || "all",
|
|
14532
|
+
onValueChange: (value) => onFilterChange("action", value === "all" ? "" : value)
|
|
14450
14533
|
}
|
|
14451
14534
|
),
|
|
14452
14535
|
/* @__PURE__ */ jsx(
|
|
14453
|
-
|
|
14536
|
+
EnhancedSelect,
|
|
14454
14537
|
{
|
|
14455
|
-
|
|
14456
|
-
|
|
14457
|
-
|
|
14458
|
-
|
|
14459
|
-
|
|
14538
|
+
label: "Transaction Type",
|
|
14539
|
+
placeholder: "Select transaction type",
|
|
14540
|
+
options: [
|
|
14541
|
+
{ value: "all", label: "All types" },
|
|
14542
|
+
{ value: "WIRE", label: "Wire" },
|
|
14543
|
+
{ value: "ACH", label: "ACH" },
|
|
14544
|
+
{ value: "CARD", label: "Card" }
|
|
14545
|
+
],
|
|
14546
|
+
value: filters.transactionType || "all",
|
|
14547
|
+
onValueChange: (value) => onFilterChange("transactionType", value === "all" ? "" : value)
|
|
14460
14548
|
}
|
|
14461
|
-
)
|
|
14549
|
+
),
|
|
14550
|
+
/* @__PURE__ */ jsx("div", { className: "col-span-2", children: /* @__PURE__ */ jsx(
|
|
14551
|
+
EnhancedSelect,
|
|
14552
|
+
{
|
|
14553
|
+
label: "Transaction Group",
|
|
14554
|
+
placeholder: "Select transaction group",
|
|
14555
|
+
options: [
|
|
14556
|
+
{ value: "all", label: "All groups" },
|
|
14557
|
+
{ value: "INBOUND", label: "Inbound" },
|
|
14558
|
+
{ value: "OUTBOUND", label: "Outbound" }
|
|
14559
|
+
],
|
|
14560
|
+
value: filters.transactionGroup || "all",
|
|
14561
|
+
onValueChange: (value) => onFilterChange("transactionGroup", value === "all" ? "" : value)
|
|
14562
|
+
}
|
|
14563
|
+
) })
|
|
14462
14564
|
] })
|
|
14463
14565
|
] })
|
|
14464
14566
|
] });
|
|
14465
14567
|
}
|
|
14466
14568
|
|
|
14467
|
-
// src/lib/mock-data/
|
|
14468
|
-
var
|
|
14469
|
-
{
|
|
14470
|
-
id: "
|
|
14471
|
-
created: "
|
|
14472
|
-
|
|
14473
|
-
|
|
14474
|
-
|
|
14475
|
-
|
|
14476
|
-
|
|
14477
|
-
|
|
14478
|
-
|
|
14479
|
-
|
|
14480
|
-
|
|
14481
|
-
|
|
14482
|
-
|
|
14483
|
-
|
|
14484
|
-
|
|
14485
|
-
|
|
14486
|
-
|
|
14487
|
-
|
|
14488
|
-
|
|
14489
|
-
|
|
14490
|
-
|
|
14491
|
-
|
|
14492
|
-
|
|
14493
|
-
|
|
14494
|
-
|
|
14495
|
-
|
|
14496
|
-
|
|
14497
|
-
|
|
14498
|
-
|
|
14499
|
-
|
|
14500
|
-
|
|
14501
|
-
|
|
14502
|
-
|
|
14503
|
-
|
|
14504
|
-
|
|
14505
|
-
|
|
14506
|
-
|
|
14507
|
-
|
|
14508
|
-
|
|
14509
|
-
|
|
14510
|
-
|
|
14511
|
-
|
|
14512
|
-
|
|
14513
|
-
|
|
14514
|
-
|
|
14515
|
-
|
|
14516
|
-
|
|
14517
|
-
|
|
14518
|
-
|
|
14519
|
-
|
|
14520
|
-
|
|
14521
|
-
|
|
14522
|
-
|
|
14523
|
-
|
|
14524
|
-
|
|
14525
|
-
|
|
14526
|
-
|
|
14527
|
-
|
|
14528
|
-
|
|
14529
|
-
|
|
14530
|
-
|
|
14531
|
-
|
|
14532
|
-
|
|
14533
|
-
|
|
14534
|
-
|
|
14535
|
-
|
|
14536
|
-
|
|
14537
|
-
entityType: "
|
|
14538
|
-
|
|
14539
|
-
|
|
14540
|
-
|
|
14541
|
-
|
|
14542
|
-
|
|
14543
|
-
|
|
14544
|
-
|
|
14545
|
-
|
|
14546
|
-
|
|
14547
|
-
|
|
14548
|
-
|
|
14549
|
-
|
|
14550
|
-
|
|
14551
|
-
|
|
14552
|
-
|
|
14553
|
-
|
|
14554
|
-
|
|
14555
|
-
|
|
14556
|
-
|
|
14557
|
-
|
|
14569
|
+
// src/lib/mock-data/velocity-limit-data.ts
|
|
14570
|
+
var mockVelocityLimits = [
|
|
14571
|
+
{
|
|
14572
|
+
id: "1",
|
|
14573
|
+
created: "2025-11-13T10:00:00Z",
|
|
14574
|
+
limitName: "QA - Decline inbound wire",
|
|
14575
|
+
limitType: "transaction",
|
|
14576
|
+
action: "DECLINE",
|
|
14577
|
+
status: "ACTIVE",
|
|
14578
|
+
associatedEntity: "Account",
|
|
14579
|
+
associatedEntityId: "9539334834",
|
|
14580
|
+
transactionGroup: ["inbound"],
|
|
14581
|
+
transactionType: ["wire"],
|
|
14582
|
+
aggregationLevel: "account",
|
|
14583
|
+
timePeriod: "daily",
|
|
14584
|
+
maxAmount: "50000",
|
|
14585
|
+
maxCount: "10"
|
|
14586
|
+
},
|
|
14587
|
+
{
|
|
14588
|
+
id: "2",
|
|
14589
|
+
created: "2025-11-13T10:00:00Z",
|
|
14590
|
+
limitName: "QA - Decline inbound wire",
|
|
14591
|
+
limitType: "transaction",
|
|
14592
|
+
action: "DECLINE",
|
|
14593
|
+
status: "ACTIVE",
|
|
14594
|
+
associatedEntity: "Account",
|
|
14595
|
+
associatedEntityId: "8895578481",
|
|
14596
|
+
transactionType: ["wire"],
|
|
14597
|
+
aggregationLevel: "account",
|
|
14598
|
+
timePeriod: "daily",
|
|
14599
|
+
maxAmount: "100000",
|
|
14600
|
+
maxCount: "20"
|
|
14601
|
+
},
|
|
14602
|
+
{
|
|
14603
|
+
id: "3",
|
|
14604
|
+
created: "2025-11-13T10:00:00Z",
|
|
14605
|
+
limitName: "QA - Decline inbound wire",
|
|
14606
|
+
limitType: "transaction",
|
|
14607
|
+
action: "DECLINE",
|
|
14608
|
+
status: "ACTIVE",
|
|
14609
|
+
associatedEntity: "Account",
|
|
14610
|
+
associatedEntityId: "86046257",
|
|
14611
|
+
transactionType: ["wire"],
|
|
14612
|
+
aggregationLevel: "transaction",
|
|
14613
|
+
maxAmount: "25000"
|
|
14614
|
+
},
|
|
14615
|
+
{
|
|
14616
|
+
id: "4",
|
|
14617
|
+
created: "2025-11-13T10:00:00Z",
|
|
14618
|
+
limitName: "QA - Decline inbound wire",
|
|
14619
|
+
limitType: "transaction",
|
|
14620
|
+
action: "DECLINE",
|
|
14621
|
+
status: "ACTIVE",
|
|
14622
|
+
associatedEntity: "Account",
|
|
14623
|
+
associatedEntityId: "86046257",
|
|
14624
|
+
transactionType: ["ACH_RECEIVER_CREDIT", "ACH_ORIGINATOR_CREDIT", "WIRE_INBOUND", "WIRE_OUTBOUND", "CARD_TRANSACTION"],
|
|
14625
|
+
aggregationLevel: "account",
|
|
14626
|
+
timePeriod: "monthly",
|
|
14627
|
+
maxAmount: "500000",
|
|
14628
|
+
maxCount: "50"
|
|
14629
|
+
},
|
|
14630
|
+
{
|
|
14631
|
+
id: "5",
|
|
14632
|
+
created: "2025-10-23T10:00:00Z",
|
|
14633
|
+
limitName: "prohibited country list v2",
|
|
14634
|
+
limitType: "prohibited_entity",
|
|
14635
|
+
action: "DECLINE",
|
|
14636
|
+
status: "DELETED",
|
|
14637
|
+
associatedEntity: "Global",
|
|
14638
|
+
entityListName: "OFAC Sanctioned Countries",
|
|
14639
|
+
entityType: "country",
|
|
14640
|
+
prohibitedEntities: "Iran, North Korea, Syria, Cuba"
|
|
14641
|
+
},
|
|
14642
|
+
{
|
|
14643
|
+
id: "6",
|
|
14644
|
+
created: "2025-10-16T10:00:00Z",
|
|
14645
|
+
limitName: "global wire debit limit",
|
|
14646
|
+
limitType: "transaction",
|
|
14647
|
+
action: "DECLINE",
|
|
14648
|
+
status: "INACTIVE",
|
|
14649
|
+
associatedEntity: "Global",
|
|
14650
|
+
transactionType: ["wire"],
|
|
14651
|
+
aggregationLevel: "program",
|
|
14652
|
+
timePeriod: "daily",
|
|
14653
|
+
maxAmount: "1000000",
|
|
14654
|
+
maxCount: "100"
|
|
14655
|
+
},
|
|
14656
|
+
{
|
|
14657
|
+
id: "7",
|
|
14658
|
+
created: "2025-10-16T10:00:00Z",
|
|
14659
|
+
limitName: "global wire debit limit",
|
|
14660
|
+
limitType: "transaction",
|
|
14661
|
+
action: "DECLINE",
|
|
14662
|
+
status: "ACTIVE",
|
|
14663
|
+
associatedEntity: "Global",
|
|
14664
|
+
transactionType: ["wire"],
|
|
14665
|
+
aggregationLevel: "program",
|
|
14666
|
+
timePeriod: "daily",
|
|
14667
|
+
maxAmount: "1000000",
|
|
14668
|
+
maxCount: "100"
|
|
14669
|
+
},
|
|
14670
|
+
{
|
|
14671
|
+
id: "8",
|
|
14672
|
+
created: "2025-09-04T10:00:00Z",
|
|
14673
|
+
limitName: "wire_ach_rounded_amt",
|
|
14674
|
+
limitType: "round_number",
|
|
14675
|
+
action: "FLAG",
|
|
14676
|
+
status: "ACTIVE",
|
|
14677
|
+
associatedEntity: "Program",
|
|
14678
|
+
associatedEntityId: "167989",
|
|
14679
|
+
amountThreshold: "10000",
|
|
14680
|
+
roundPattern: "1000, 5000, 10000, 50000"
|
|
14681
|
+
},
|
|
14682
|
+
{
|
|
14683
|
+
id: "9",
|
|
14684
|
+
created: "2025-08-20T10:00:00Z",
|
|
14685
|
+
limitName: "receiver name validation",
|
|
14686
|
+
limitType: "receiver_name_mismatch",
|
|
14687
|
+
action: "FLAG",
|
|
14688
|
+
status: "ACTIVE",
|
|
14689
|
+
associatedEntity: "Global",
|
|
14690
|
+
mismatchThreshold: "80",
|
|
14691
|
+
comparisonMethod: "fuzzy"
|
|
14558
14692
|
}
|
|
14559
14693
|
];
|
|
14560
14694
|
var getStatusVariant = (status) => {
|
|
14561
14695
|
switch (status) {
|
|
14562
|
-
case "
|
|
14696
|
+
case "ACTIVE":
|
|
14563
14697
|
return "success";
|
|
14564
|
-
case "
|
|
14698
|
+
case "INACTIVE":
|
|
14565
14699
|
return "warning";
|
|
14566
|
-
case "
|
|
14567
|
-
return "active";
|
|
14568
|
-
case "CONFIRMED":
|
|
14700
|
+
case "DELETED":
|
|
14569
14701
|
return "destructive";
|
|
14570
14702
|
default:
|
|
14571
14703
|
return "secondary";
|
|
14572
14704
|
}
|
|
14573
14705
|
};
|
|
14574
|
-
var
|
|
14575
|
-
switch (
|
|
14576
|
-
case "
|
|
14577
|
-
return
|
|
14578
|
-
case "
|
|
14579
|
-
return
|
|
14580
|
-
case "Counterparty":
|
|
14581
|
-
return `/counterparty/${entityId}`;
|
|
14706
|
+
var getActionVariant = (action) => {
|
|
14707
|
+
switch (action) {
|
|
14708
|
+
case "DECLINE":
|
|
14709
|
+
return "destructive";
|
|
14710
|
+
case "FLAG":
|
|
14711
|
+
return "warning";
|
|
14582
14712
|
default:
|
|
14583
|
-
return "
|
|
14713
|
+
return "secondary";
|
|
14584
14714
|
}
|
|
14585
14715
|
};
|
|
14586
|
-
function
|
|
14716
|
+
function VelocityLimits() {
|
|
14587
14717
|
const navigate = useNavigate();
|
|
14588
14718
|
const [sortField, setSortField] = useState("created");
|
|
14589
14719
|
const [sortDirection, setSortDirection] = useState("desc");
|
|
14590
14720
|
const [filters, setFilters] = useState({
|
|
14721
|
+
accountNumber: "",
|
|
14722
|
+
counterpartyId: "",
|
|
14723
|
+
productId: "",
|
|
14724
|
+
programId: "",
|
|
14725
|
+
limitName: "",
|
|
14726
|
+
limitType: "",
|
|
14591
14727
|
status: "",
|
|
14592
|
-
|
|
14593
|
-
|
|
14594
|
-
|
|
14728
|
+
aggregationLevel: "",
|
|
14729
|
+
action: "",
|
|
14730
|
+
transactionType: "",
|
|
14731
|
+
transactionGroup: ""
|
|
14595
14732
|
});
|
|
14596
14733
|
const handleFilterChange = (field, value) => {
|
|
14597
14734
|
setFilters((prev) => ({ ...prev, [field]: value }));
|
|
14598
14735
|
};
|
|
14599
14736
|
const handleResetFilters = () => {
|
|
14600
14737
|
setFilters({
|
|
14738
|
+
accountNumber: "",
|
|
14739
|
+
counterpartyId: "",
|
|
14740
|
+
productId: "",
|
|
14741
|
+
programId: "",
|
|
14742
|
+
limitName: "",
|
|
14743
|
+
limitType: "",
|
|
14601
14744
|
status: "",
|
|
14602
|
-
|
|
14603
|
-
|
|
14604
|
-
|
|
14745
|
+
aggregationLevel: "",
|
|
14746
|
+
action: "",
|
|
14747
|
+
transactionType: "",
|
|
14748
|
+
transactionGroup: ""
|
|
14605
14749
|
});
|
|
14606
14750
|
};
|
|
14607
14751
|
const handleSort = (field) => {
|
|
@@ -14612,27 +14756,24 @@ function OFAC() {
|
|
|
14612
14756
|
setSortDirection("desc");
|
|
14613
14757
|
}
|
|
14614
14758
|
};
|
|
14615
|
-
const
|
|
14616
|
-
return
|
|
14617
|
-
if (filters.
|
|
14759
|
+
const filteredLimits = useMemo(() => {
|
|
14760
|
+
return mockVelocityLimits.filter((limit) => {
|
|
14761
|
+
if (filters.accountNumber && limit.associatedEntityId && !limit.associatedEntityId.includes(filters.accountNumber)) {
|
|
14618
14762
|
return false;
|
|
14619
14763
|
}
|
|
14620
|
-
if (filters.
|
|
14764
|
+
if (filters.limitName && !limit.limitName.toLowerCase().includes(filters.limitName.toLowerCase())) {
|
|
14621
14765
|
return false;
|
|
14622
14766
|
}
|
|
14623
|
-
if (filters.
|
|
14624
|
-
|
|
14625
|
-
|
|
14626
|
-
|
|
14627
|
-
|
|
14628
|
-
if (filters.endDate && isAfter(checkDate, endOfDay(filters.endDate))) {
|
|
14629
|
-
return false;
|
|
14630
|
-
}
|
|
14767
|
+
if (filters.action && limit.action !== filters.action) {
|
|
14768
|
+
return false;
|
|
14769
|
+
}
|
|
14770
|
+
if (filters.status && limit.status !== filters.status) {
|
|
14771
|
+
return false;
|
|
14631
14772
|
}
|
|
14632
14773
|
return true;
|
|
14633
14774
|
});
|
|
14634
14775
|
}, [filters]);
|
|
14635
|
-
const
|
|
14776
|
+
const sortedLimits = [...filteredLimits].sort((a, b) => {
|
|
14636
14777
|
const aValue = a[sortField];
|
|
14637
14778
|
const bValue = b[sortField];
|
|
14638
14779
|
if (aValue == null) return 1;
|
|
@@ -14648,70 +14789,1472 @@ function OFAC() {
|
|
|
14648
14789
|
key: "created",
|
|
14649
14790
|
title: "Created",
|
|
14650
14791
|
sortable: true,
|
|
14651
|
-
render: (value) => /* @__PURE__ */ jsx("span", { className: "text-sm
|
|
14652
|
-
},
|
|
14653
|
-
{
|
|
14654
|
-
key: "entityName",
|
|
14655
|
-
title: "Entity",
|
|
14656
|
-
render: (value, row) => /* @__PURE__ */ jsx(
|
|
14657
|
-
"button",
|
|
14658
|
-
{
|
|
14659
|
-
onClick: () => navigate(getEntityUrl(row.entityType, row.entityId)),
|
|
14660
|
-
className: "text-sm text-primary hover:underline font-medium",
|
|
14661
|
-
children: value
|
|
14662
|
-
}
|
|
14663
|
-
)
|
|
14792
|
+
render: (value) => /* @__PURE__ */ jsx("span", { className: "text-sm", children: format(parseISO(value), "yyyy-MM-dd") })
|
|
14664
14793
|
},
|
|
14665
14794
|
{
|
|
14666
|
-
key: "
|
|
14667
|
-
title: "
|
|
14795
|
+
key: "limitName",
|
|
14796
|
+
title: "Limit Name",
|
|
14668
14797
|
sortable: true,
|
|
14669
|
-
render: (value) => /* @__PURE__ */ jsx("span", { className: "text-sm", children: value })
|
|
14798
|
+
render: (value) => /* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: value })
|
|
14670
14799
|
},
|
|
14671
14800
|
{
|
|
14672
|
-
key: "
|
|
14673
|
-
title: "
|
|
14674
|
-
|
|
14675
|
-
|
|
14676
|
-
{
|
|
14677
|
-
onClick: () => navigate(`/alerts/${value}`),
|
|
14678
|
-
className: "text-sm text-primary hover:underline font-medium",
|
|
14679
|
-
children: value
|
|
14680
|
-
}
|
|
14681
|
-
) : /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "\u2014" })
|
|
14801
|
+
key: "action",
|
|
14802
|
+
title: "Action",
|
|
14803
|
+
sortable: true,
|
|
14804
|
+
render: (value) => /* @__PURE__ */ jsx(Badge, { variant: getActionVariant(value), children: value })
|
|
14682
14805
|
},
|
|
14683
14806
|
{
|
|
14684
14807
|
key: "status",
|
|
14685
14808
|
title: "Status",
|
|
14686
14809
|
sortable: true,
|
|
14687
14810
|
render: (value) => /* @__PURE__ */ jsx(Badge, { variant: getStatusVariant(value), children: value })
|
|
14811
|
+
},
|
|
14812
|
+
{
|
|
14813
|
+
key: "associatedEntity",
|
|
14814
|
+
title: "Associated Entity",
|
|
14815
|
+
sortable: true,
|
|
14816
|
+
render: (value) => /* @__PURE__ */ jsx("span", { className: "text-sm", children: value })
|
|
14817
|
+
},
|
|
14818
|
+
{
|
|
14819
|
+
key: "associatedEntityId",
|
|
14820
|
+
title: "Associated Entity ID",
|
|
14821
|
+
render: (value) => /* @__PURE__ */ jsx("span", { className: "text-sm", children: value || "\u2014" })
|
|
14688
14822
|
}
|
|
14689
14823
|
];
|
|
14690
14824
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-screen bg-gradient-subtle", children: [
|
|
14691
14825
|
/* @__PURE__ */ jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-6 max-w-none", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
14692
|
-
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold text-foreground", children: "
|
|
14693
|
-
/* @__PURE__ */
|
|
14694
|
-
|
|
14695
|
-
|
|
14696
|
-
|
|
14697
|
-
|
|
14698
|
-
|
|
14699
|
-
|
|
14700
|
-
|
|
14826
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold text-foreground", children: "Velocity Limits" }) }),
|
|
14827
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
14828
|
+
/* @__PURE__ */ jsx(
|
|
14829
|
+
VelocityLimitFiltersSheet,
|
|
14830
|
+
{
|
|
14831
|
+
filters,
|
|
14832
|
+
onFilterChange: handleFilterChange,
|
|
14833
|
+
onResetFilters: handleResetFilters
|
|
14834
|
+
}
|
|
14835
|
+
),
|
|
14836
|
+
/* @__PURE__ */ jsxs(Button, { onClick: () => navigate("/compliance/velocity/create"), children: [
|
|
14837
|
+
/* @__PURE__ */ jsx(Plus, { className: "mr-2 h-4 w-4" }),
|
|
14838
|
+
"Create Limit"
|
|
14839
|
+
] })
|
|
14840
|
+
] })
|
|
14701
14841
|
] }) }) }),
|
|
14702
14842
|
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 h-full max-w-none flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "flex-1 mt-4 overflow-auto", children: /* @__PURE__ */ jsx(
|
|
14703
14843
|
DataTable,
|
|
14704
14844
|
{
|
|
14705
14845
|
columns: columns3,
|
|
14706
|
-
data:
|
|
14846
|
+
data: sortedLimits,
|
|
14707
14847
|
sortBy: sortField,
|
|
14708
14848
|
sortDirection,
|
|
14709
|
-
onSort: handleSort
|
|
14849
|
+
onSort: handleSort,
|
|
14850
|
+
onRowClick: (limit) => navigate(`/compliance/velocity/${limit.id}`),
|
|
14851
|
+
pagination: {
|
|
14852
|
+
pageSize: 10,
|
|
14853
|
+
currentPage: 1,
|
|
14854
|
+
totalItems: sortedLimits.length,
|
|
14855
|
+
onPageChange: () => {
|
|
14856
|
+
}
|
|
14857
|
+
}
|
|
14710
14858
|
}
|
|
14711
14859
|
) }) }) })
|
|
14712
14860
|
] });
|
|
14713
14861
|
}
|
|
14862
|
+
function CreateVelocityLimit() {
|
|
14863
|
+
const navigate = useNavigate();
|
|
14864
|
+
const [limitType, setLimitType] = useState("");
|
|
14865
|
+
const [formData, setFormData] = useState({
|
|
14866
|
+
limitName: "",
|
|
14867
|
+
action: "",
|
|
14868
|
+
associatedEntityType: "",
|
|
14869
|
+
associatedEntityId: "",
|
|
14870
|
+
transactionFilterType: "",
|
|
14871
|
+
// "type" or "group"
|
|
14872
|
+
transactionType: "",
|
|
14873
|
+
transactionGroup: "",
|
|
14874
|
+
aggregationLevel: ""
|
|
14875
|
+
// Type-specific fields will be added based on limitType
|
|
14876
|
+
});
|
|
14877
|
+
const handleFieldChange = (field, value) => {
|
|
14878
|
+
setFormData((prev) => ({ ...prev, [field]: value }));
|
|
14879
|
+
};
|
|
14880
|
+
const handleSubmit = (e) => {
|
|
14881
|
+
e.preventDefault();
|
|
14882
|
+
console.log("Creating velocity limit:", { limitType, ...formData });
|
|
14883
|
+
navigate("/compliance/velocity");
|
|
14884
|
+
};
|
|
14885
|
+
const renderTypeSpecificFields = () => {
|
|
14886
|
+
switch (limitType) {
|
|
14887
|
+
case "receiver_name_mismatch":
|
|
14888
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
14889
|
+
/* @__PURE__ */ jsx(
|
|
14890
|
+
EnhancedInput,
|
|
14891
|
+
{
|
|
14892
|
+
label: "Mismatch Threshold (%)",
|
|
14893
|
+
placeholder: "Enter threshold percentage",
|
|
14894
|
+
onChange: (e) => handleFieldChange("mismatchThreshold", e.target.value)
|
|
14895
|
+
}
|
|
14896
|
+
),
|
|
14897
|
+
/* @__PURE__ */ jsx(
|
|
14898
|
+
EnhancedSelect,
|
|
14899
|
+
{
|
|
14900
|
+
label: "Comparison Method",
|
|
14901
|
+
placeholder: "Select method",
|
|
14902
|
+
options: [
|
|
14903
|
+
{ value: "exact", label: "Exact Match" },
|
|
14904
|
+
{ value: "fuzzy", label: "Fuzzy Match" },
|
|
14905
|
+
{ value: "partial", label: "Partial Match" }
|
|
14906
|
+
],
|
|
14907
|
+
onValueChange: (value) => handleFieldChange("comparisonMethod", value)
|
|
14908
|
+
}
|
|
14909
|
+
)
|
|
14910
|
+
] }) });
|
|
14911
|
+
case "round_number":
|
|
14912
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
14913
|
+
/* @__PURE__ */ jsx(
|
|
14914
|
+
EnhancedInput,
|
|
14915
|
+
{
|
|
14916
|
+
label: "Amount Threshold",
|
|
14917
|
+
placeholder: "Enter amount",
|
|
14918
|
+
onChange: (e) => handleFieldChange("amountThreshold", e.target.value)
|
|
14919
|
+
}
|
|
14920
|
+
),
|
|
14921
|
+
/* @__PURE__ */ jsx(
|
|
14922
|
+
EnhancedInput,
|
|
14923
|
+
{
|
|
14924
|
+
label: "Round Number Pattern",
|
|
14925
|
+
placeholder: "e.g., 1000, 5000, 10000",
|
|
14926
|
+
onChange: (e) => handleFieldChange("roundPattern", e.target.value)
|
|
14927
|
+
}
|
|
14928
|
+
)
|
|
14929
|
+
] }) });
|
|
14930
|
+
case "transaction":
|
|
14931
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14932
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-6", children: [
|
|
14933
|
+
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium text-foreground mb-3 block", children: "Filter By" }),
|
|
14934
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-6", children: [
|
|
14935
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-6", children: [
|
|
14936
|
+
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2 cursor-pointer", children: [
|
|
14937
|
+
/* @__PURE__ */ jsx(
|
|
14938
|
+
"input",
|
|
14939
|
+
{
|
|
14940
|
+
type: "radio",
|
|
14941
|
+
name: "transactionFilterType",
|
|
14942
|
+
value: "type",
|
|
14943
|
+
checked: formData.transactionFilterType === "type",
|
|
14944
|
+
onChange: (e) => {
|
|
14945
|
+
handleFieldChange("transactionFilterType", e.target.value);
|
|
14946
|
+
handleFieldChange("transactionGroup", "");
|
|
14947
|
+
},
|
|
14948
|
+
className: "w-4 h-4 text-primary border-border focus:ring-2 focus:ring-primary"
|
|
14949
|
+
}
|
|
14950
|
+
),
|
|
14951
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm text-foreground", children: "Transaction Type" })
|
|
14952
|
+
] }),
|
|
14953
|
+
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2 cursor-pointer", children: [
|
|
14954
|
+
/* @__PURE__ */ jsx(
|
|
14955
|
+
"input",
|
|
14956
|
+
{
|
|
14957
|
+
type: "radio",
|
|
14958
|
+
name: "transactionFilterType",
|
|
14959
|
+
value: "group",
|
|
14960
|
+
checked: formData.transactionFilterType === "group",
|
|
14961
|
+
onChange: (e) => {
|
|
14962
|
+
handleFieldChange("transactionFilterType", e.target.value);
|
|
14963
|
+
handleFieldChange("transactionType", "");
|
|
14964
|
+
},
|
|
14965
|
+
className: "w-4 h-4 text-primary border-border focus:ring-2 focus:ring-primary"
|
|
14966
|
+
}
|
|
14967
|
+
),
|
|
14968
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm text-foreground", children: "Transaction Group" })
|
|
14969
|
+
] })
|
|
14970
|
+
] }),
|
|
14971
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
14972
|
+
formData.transactionFilterType === "type" && /* @__PURE__ */ jsx(
|
|
14973
|
+
EnhancedSelect,
|
|
14974
|
+
{
|
|
14975
|
+
label: "",
|
|
14976
|
+
placeholder: "Select type",
|
|
14977
|
+
options: [
|
|
14978
|
+
{ value: "wire", label: "Wire" },
|
|
14979
|
+
{ value: "ach", label: "ACH" },
|
|
14980
|
+
{ value: "card", label: "Card" }
|
|
14981
|
+
],
|
|
14982
|
+
value: formData.transactionType,
|
|
14983
|
+
onValueChange: (value) => handleFieldChange("transactionType", value)
|
|
14984
|
+
}
|
|
14985
|
+
),
|
|
14986
|
+
formData.transactionFilterType === "group" && /* @__PURE__ */ jsx(
|
|
14987
|
+
EnhancedSelect,
|
|
14988
|
+
{
|
|
14989
|
+
label: "",
|
|
14990
|
+
placeholder: "Select group",
|
|
14991
|
+
options: [
|
|
14992
|
+
{ value: "inbound", label: "Inbound" },
|
|
14993
|
+
{ value: "outbound", label: "Outbound" }
|
|
14994
|
+
],
|
|
14995
|
+
value: formData.transactionGroup,
|
|
14996
|
+
onValueChange: (value) => handleFieldChange("transactionGroup", value)
|
|
14997
|
+
}
|
|
14998
|
+
)
|
|
14999
|
+
] })
|
|
15000
|
+
] })
|
|
15001
|
+
] }),
|
|
15002
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
15003
|
+
/* @__PURE__ */ jsx(
|
|
15004
|
+
EnhancedSelect,
|
|
15005
|
+
{
|
|
15006
|
+
label: "Aggregation Level",
|
|
15007
|
+
placeholder: "Select level",
|
|
15008
|
+
options: [
|
|
15009
|
+
{ value: "transaction", label: "Transaction" },
|
|
15010
|
+
{ value: "account", label: "Account" },
|
|
15011
|
+
{ value: "program", label: "Program" },
|
|
15012
|
+
{ value: "product", label: "Product" }
|
|
15013
|
+
],
|
|
15014
|
+
onValueChange: (value) => handleFieldChange("aggregationLevel", value)
|
|
15015
|
+
}
|
|
15016
|
+
),
|
|
15017
|
+
formData.aggregationLevel !== "transaction" && /* @__PURE__ */ jsx(
|
|
15018
|
+
EnhancedSelect,
|
|
15019
|
+
{
|
|
15020
|
+
label: "Time Period",
|
|
15021
|
+
placeholder: "Select period",
|
|
15022
|
+
options: [
|
|
15023
|
+
{ value: "daily", label: "Daily" },
|
|
15024
|
+
{ value: "weekly", label: "Weekly" },
|
|
15025
|
+
{ value: "monthly", label: "Monthly" }
|
|
15026
|
+
],
|
|
15027
|
+
onValueChange: (value) => handleFieldChange("timePeriod", value)
|
|
15028
|
+
}
|
|
15029
|
+
),
|
|
15030
|
+
/* @__PURE__ */ jsx(
|
|
15031
|
+
EnhancedInput,
|
|
15032
|
+
{
|
|
15033
|
+
label: "Max Transaction Amount",
|
|
15034
|
+
placeholder: "Enter amount",
|
|
15035
|
+
onChange: (e) => handleFieldChange("maxAmount", e.target.value)
|
|
15036
|
+
}
|
|
15037
|
+
),
|
|
15038
|
+
formData.aggregationLevel !== "transaction" && /* @__PURE__ */ jsx(
|
|
15039
|
+
EnhancedInput,
|
|
15040
|
+
{
|
|
15041
|
+
label: "Max Transaction Count",
|
|
15042
|
+
placeholder: "Enter count",
|
|
15043
|
+
onChange: (e) => handleFieldChange("maxCount", e.target.value)
|
|
15044
|
+
}
|
|
15045
|
+
)
|
|
15046
|
+
] })
|
|
15047
|
+
] });
|
|
15048
|
+
case "prohibited_entity":
|
|
15049
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
15050
|
+
/* @__PURE__ */ jsx(
|
|
15051
|
+
EnhancedInput,
|
|
15052
|
+
{
|
|
15053
|
+
label: "Entity List Name",
|
|
15054
|
+
placeholder: "Enter list name",
|
|
15055
|
+
onChange: (e) => handleFieldChange("entityListName", e.target.value)
|
|
15056
|
+
}
|
|
15057
|
+
),
|
|
15058
|
+
/* @__PURE__ */ jsx(
|
|
15059
|
+
EnhancedSelect,
|
|
15060
|
+
{
|
|
15061
|
+
label: "Entity Type",
|
|
15062
|
+
placeholder: "Select type",
|
|
15063
|
+
options: [
|
|
15064
|
+
{ value: "country", label: "Country" },
|
|
15065
|
+
{ value: "individual", label: "Individual" },
|
|
15066
|
+
{ value: "business", label: "Business" }
|
|
15067
|
+
],
|
|
15068
|
+
onValueChange: (value) => handleFieldChange("entityType", value)
|
|
15069
|
+
}
|
|
15070
|
+
),
|
|
15071
|
+
/* @__PURE__ */ jsx("div", { className: "col-span-2", children: /* @__PURE__ */ jsx(
|
|
15072
|
+
EnhancedInput,
|
|
15073
|
+
{
|
|
15074
|
+
label: "Prohibited Entities (comma-separated)",
|
|
15075
|
+
placeholder: "Enter entities",
|
|
15076
|
+
onChange: (e) => handleFieldChange("prohibitedEntities", e.target.value)
|
|
15077
|
+
}
|
|
15078
|
+
) })
|
|
15079
|
+
] }) });
|
|
15080
|
+
default:
|
|
15081
|
+
return null;
|
|
15082
|
+
}
|
|
15083
|
+
};
|
|
15084
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-screen bg-gradient-subtle", children: [
|
|
15085
|
+
/* @__PURE__ */ jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-6 max-w-none", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
|
|
15086
|
+
/* @__PURE__ */ jsxs(
|
|
15087
|
+
Button,
|
|
15088
|
+
{
|
|
15089
|
+
variant: "ghost",
|
|
15090
|
+
size: "sm",
|
|
15091
|
+
onClick: () => navigate("/compliance/velocity"),
|
|
15092
|
+
children: [
|
|
15093
|
+
/* @__PURE__ */ jsx(ArrowLeft, { className: "mr-2 h-4 w-4" }),
|
|
15094
|
+
"Back"
|
|
15095
|
+
]
|
|
15096
|
+
}
|
|
15097
|
+
),
|
|
15098
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold text-foreground", children: "Create Velocity Limit" }) })
|
|
15099
|
+
] }) }) }),
|
|
15100
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-6 max-w-4xl", children: /* @__PURE__ */ jsx("form", { onSubmit: handleSubmit, children: /* @__PURE__ */ jsx(Card, { className: "p-6", children: /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
15101
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
15102
|
+
/* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold mb-4", children: "Select Limit Type" }),
|
|
15103
|
+
/* @__PURE__ */ jsx(
|
|
15104
|
+
EnhancedSelect,
|
|
15105
|
+
{
|
|
15106
|
+
label: "Limit Type",
|
|
15107
|
+
placeholder: "Select a limit type",
|
|
15108
|
+
options: [
|
|
15109
|
+
{ value: "receiver_name_mismatch", label: "Receiver Name Mismatch" },
|
|
15110
|
+
{ value: "round_number", label: "Round Number" },
|
|
15111
|
+
{ value: "transaction", label: "Transaction" },
|
|
15112
|
+
{ value: "prohibited_entity", label: "Prohibited Entity" }
|
|
15113
|
+
],
|
|
15114
|
+
value: limitType,
|
|
15115
|
+
onValueChange: (value) => setLimitType(value)
|
|
15116
|
+
}
|
|
15117
|
+
)
|
|
15118
|
+
] }),
|
|
15119
|
+
limitType && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15120
|
+
/* @__PURE__ */ jsxs("div", { className: "border-t pt-6", children: [
|
|
15121
|
+
/* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold mb-4", children: "Basic Information" }),
|
|
15122
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
15123
|
+
/* @__PURE__ */ jsx(
|
|
15124
|
+
EnhancedInput,
|
|
15125
|
+
{
|
|
15126
|
+
label: "Limit Name",
|
|
15127
|
+
placeholder: "Enter limit name",
|
|
15128
|
+
value: formData.limitName,
|
|
15129
|
+
onChange: (e) => handleFieldChange("limitName", e.target.value)
|
|
15130
|
+
}
|
|
15131
|
+
),
|
|
15132
|
+
/* @__PURE__ */ jsx(
|
|
15133
|
+
EnhancedSelect,
|
|
15134
|
+
{
|
|
15135
|
+
label: "Action",
|
|
15136
|
+
placeholder: "Select action",
|
|
15137
|
+
options: [
|
|
15138
|
+
{ value: "decline", label: "Decline" },
|
|
15139
|
+
{ value: "flag", label: "Flag" }
|
|
15140
|
+
],
|
|
15141
|
+
onValueChange: (value) => handleFieldChange("action", value)
|
|
15142
|
+
}
|
|
15143
|
+
),
|
|
15144
|
+
/* @__PURE__ */ jsx(
|
|
15145
|
+
EnhancedSelect,
|
|
15146
|
+
{
|
|
15147
|
+
label: "Associated Entity Type",
|
|
15148
|
+
placeholder: "Select entity type",
|
|
15149
|
+
options: [
|
|
15150
|
+
{ value: "global", label: "Global" },
|
|
15151
|
+
{ value: "program", label: "Program" },
|
|
15152
|
+
{ value: "product", label: "Product" },
|
|
15153
|
+
{ value: "account", label: "Account" }
|
|
15154
|
+
],
|
|
15155
|
+
value: formData.associatedEntityType,
|
|
15156
|
+
onValueChange: (value) => {
|
|
15157
|
+
handleFieldChange("associatedEntityType", value);
|
|
15158
|
+
handleFieldChange("associatedEntityId", "");
|
|
15159
|
+
}
|
|
15160
|
+
}
|
|
15161
|
+
),
|
|
15162
|
+
formData.associatedEntityType && formData.associatedEntityType !== "global" && /* @__PURE__ */ jsx(
|
|
15163
|
+
EnhancedInput,
|
|
15164
|
+
{
|
|
15165
|
+
label: `${formData.associatedEntityType.charAt(0).toUpperCase() + formData.associatedEntityType.slice(1)} ID`,
|
|
15166
|
+
placeholder: `Enter ${formData.associatedEntityType} ID`,
|
|
15167
|
+
value: formData.associatedEntityId,
|
|
15168
|
+
onChange: (e) => handleFieldChange("associatedEntityId", e.target.value)
|
|
15169
|
+
}
|
|
15170
|
+
)
|
|
15171
|
+
] })
|
|
15172
|
+
] }),
|
|
15173
|
+
/* @__PURE__ */ jsxs("div", { className: "border-t pt-6", children: [
|
|
15174
|
+
/* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold mb-4", children: "Limit Configuration" }),
|
|
15175
|
+
renderTypeSpecificFields()
|
|
15176
|
+
] }),
|
|
15177
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-3 border-t pt-6", children: [
|
|
15178
|
+
/* @__PURE__ */ jsx(
|
|
15179
|
+
Button,
|
|
15180
|
+
{
|
|
15181
|
+
type: "button",
|
|
15182
|
+
variant: "outline",
|
|
15183
|
+
onClick: () => navigate("/compliance/velocity"),
|
|
15184
|
+
children: "Cancel"
|
|
15185
|
+
}
|
|
15186
|
+
),
|
|
15187
|
+
/* @__PURE__ */ jsx(Button, { type: "submit", children: "Create Limit" })
|
|
15188
|
+
] })
|
|
15189
|
+
] })
|
|
15190
|
+
] }) }) }) }) })
|
|
15191
|
+
] });
|
|
15192
|
+
}
|
|
15193
|
+
var getStatusVariant2 = (status) => {
|
|
15194
|
+
switch (status) {
|
|
15195
|
+
case "ACTIVE":
|
|
15196
|
+
return "success";
|
|
15197
|
+
case "INACTIVE":
|
|
15198
|
+
return "warning";
|
|
15199
|
+
case "DELETED":
|
|
15200
|
+
return "destructive";
|
|
15201
|
+
default:
|
|
15202
|
+
return "secondary";
|
|
15203
|
+
}
|
|
15204
|
+
};
|
|
15205
|
+
var getActionVariant2 = (action) => {
|
|
15206
|
+
switch (action) {
|
|
15207
|
+
case "DECLINE":
|
|
15208
|
+
return "destructive";
|
|
15209
|
+
case "FLAG":
|
|
15210
|
+
return "warning";
|
|
15211
|
+
default:
|
|
15212
|
+
return "secondary";
|
|
15213
|
+
}
|
|
15214
|
+
};
|
|
15215
|
+
var VelocityLimitDetailsCard = ({
|
|
15216
|
+
isEditing,
|
|
15217
|
+
onToggleEdit,
|
|
15218
|
+
limit
|
|
15219
|
+
}) => {
|
|
15220
|
+
const renderTransactionFields = () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15221
|
+
limit.transactionType && limit.transactionType.length > 0 && /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
15222
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
15223
|
+
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium text-muted-foreground mb-1", children: "Transaction Type" }),
|
|
15224
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-1", children: limit.transactionType.map((type, index) => /* @__PURE__ */ jsx("div", { className: "text-sm text-foreground", children: type }, index)) })
|
|
15225
|
+
] }),
|
|
15226
|
+
limit.transactionGroup && limit.transactionGroup.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
15227
|
+
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium text-muted-foreground mb-1", children: "Transaction Group" }),
|
|
15228
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-1", children: limit.transactionGroup.map((group, index) => /* @__PURE__ */ jsx("div", { className: "text-sm text-foreground", children: group.toUpperCase() }, index)) })
|
|
15229
|
+
] })
|
|
15230
|
+
] }),
|
|
15231
|
+
!limit.transactionType && limit.transactionGroup && limit.transactionGroup.length > 0 && /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-4", children: /* @__PURE__ */ jsxs("div", { children: [
|
|
15232
|
+
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium text-muted-foreground mb-1", children: "Transaction Group" }),
|
|
15233
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-1", children: limit.transactionGroup.map((group, index) => /* @__PURE__ */ jsx("div", { className: "text-sm text-foreground", children: group.toUpperCase() }, index)) })
|
|
15234
|
+
] }) }),
|
|
15235
|
+
(limit.aggregationLevel || limit.timePeriod) && /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
15236
|
+
limit.aggregationLevel && /* @__PURE__ */ jsx(
|
|
15237
|
+
InfoField,
|
|
15238
|
+
{
|
|
15239
|
+
label: "Aggregation Level",
|
|
15240
|
+
value: limit.aggregationLevel.charAt(0).toUpperCase() + limit.aggregationLevel.slice(1),
|
|
15241
|
+
layout: "horizontal"
|
|
15242
|
+
}
|
|
15243
|
+
),
|
|
15244
|
+
limit.timePeriod && /* @__PURE__ */ jsx(
|
|
15245
|
+
InfoField,
|
|
15246
|
+
{
|
|
15247
|
+
label: "Time Period",
|
|
15248
|
+
value: limit.timePeriod.charAt(0).toUpperCase() + limit.timePeriod.slice(1),
|
|
15249
|
+
layout: "horizontal"
|
|
15250
|
+
}
|
|
15251
|
+
)
|
|
15252
|
+
] }),
|
|
15253
|
+
(limit.maxAmount || limit.maxCount) && /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
15254
|
+
limit.maxAmount && /* @__PURE__ */ jsx(
|
|
15255
|
+
InfoField,
|
|
15256
|
+
{
|
|
15257
|
+
label: "Max Amount",
|
|
15258
|
+
value: `$${parseFloat(limit.maxAmount).toLocaleString()}`,
|
|
15259
|
+
layout: "horizontal"
|
|
15260
|
+
}
|
|
15261
|
+
),
|
|
15262
|
+
limit.maxCount && /* @__PURE__ */ jsx(
|
|
15263
|
+
InfoField,
|
|
15264
|
+
{
|
|
15265
|
+
label: "Max Count",
|
|
15266
|
+
value: limit.maxCount,
|
|
15267
|
+
layout: "horizontal"
|
|
15268
|
+
}
|
|
15269
|
+
)
|
|
15270
|
+
] })
|
|
15271
|
+
] });
|
|
15272
|
+
const renderReceiverNameMismatchFields = () => /* @__PURE__ */ jsx(Fragment, { children: limit.mismatchThreshold && /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
15273
|
+
/* @__PURE__ */ jsx(
|
|
15274
|
+
InfoField,
|
|
15275
|
+
{
|
|
15276
|
+
label: "Mismatch Threshold",
|
|
15277
|
+
value: `${limit.mismatchThreshold}%`,
|
|
15278
|
+
layout: "horizontal"
|
|
15279
|
+
}
|
|
15280
|
+
),
|
|
15281
|
+
limit.comparisonMethod && /* @__PURE__ */ jsx(
|
|
15282
|
+
InfoField,
|
|
15283
|
+
{
|
|
15284
|
+
label: "Comparison Method",
|
|
15285
|
+
value: limit.comparisonMethod.charAt(0).toUpperCase() + limit.comparisonMethod.slice(1),
|
|
15286
|
+
layout: "horizontal"
|
|
15287
|
+
}
|
|
15288
|
+
)
|
|
15289
|
+
] }) });
|
|
15290
|
+
const renderRoundNumberFields = () => /* @__PURE__ */ jsx(Fragment, { children: limit.amountThreshold && /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
15291
|
+
/* @__PURE__ */ jsx(
|
|
15292
|
+
InfoField,
|
|
15293
|
+
{
|
|
15294
|
+
label: "Amount Threshold",
|
|
15295
|
+
value: `$${parseFloat(limit.amountThreshold).toLocaleString()}`,
|
|
15296
|
+
layout: "horizontal"
|
|
15297
|
+
}
|
|
15298
|
+
),
|
|
15299
|
+
limit.roundPattern && /* @__PURE__ */ jsx(
|
|
15300
|
+
InfoField,
|
|
15301
|
+
{
|
|
15302
|
+
label: "Round Patterns",
|
|
15303
|
+
value: limit.roundPattern,
|
|
15304
|
+
layout: "horizontal"
|
|
15305
|
+
}
|
|
15306
|
+
)
|
|
15307
|
+
] }) });
|
|
15308
|
+
const renderProhibitedEntityFields = () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15309
|
+
limit.entityListName && /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
15310
|
+
/* @__PURE__ */ jsx(
|
|
15311
|
+
InfoField,
|
|
15312
|
+
{
|
|
15313
|
+
label: "Entity List Name",
|
|
15314
|
+
value: limit.entityListName,
|
|
15315
|
+
layout: "horizontal"
|
|
15316
|
+
}
|
|
15317
|
+
),
|
|
15318
|
+
limit.entityType && /* @__PURE__ */ jsx(
|
|
15319
|
+
InfoField,
|
|
15320
|
+
{
|
|
15321
|
+
label: "Entity Type",
|
|
15322
|
+
value: limit.entityType.charAt(0).toUpperCase() + limit.entityType.slice(1),
|
|
15323
|
+
layout: "horizontal"
|
|
15324
|
+
}
|
|
15325
|
+
)
|
|
15326
|
+
] }),
|
|
15327
|
+
limit.prohibitedEntities && /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-4", children: /* @__PURE__ */ jsx(
|
|
15328
|
+
InfoField,
|
|
15329
|
+
{
|
|
15330
|
+
label: "Prohibited Entities",
|
|
15331
|
+
value: limit.prohibitedEntities,
|
|
15332
|
+
layout: "horizontal"
|
|
15333
|
+
}
|
|
15334
|
+
) })
|
|
15335
|
+
] });
|
|
15336
|
+
const viewContent = /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
15337
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
15338
|
+
/* @__PURE__ */ jsx(
|
|
15339
|
+
InfoField,
|
|
15340
|
+
{
|
|
15341
|
+
label: "Limit Name",
|
|
15342
|
+
value: limit.limitName,
|
|
15343
|
+
layout: "horizontal"
|
|
15344
|
+
}
|
|
15345
|
+
),
|
|
15346
|
+
/* @__PURE__ */ jsx(
|
|
15347
|
+
InfoField,
|
|
15348
|
+
{
|
|
15349
|
+
label: "Limit Type",
|
|
15350
|
+
value: limit.limitType.replace(/_/g, " ").replace(/\b\w/g, (l) => l.toUpperCase()),
|
|
15351
|
+
layout: "horizontal"
|
|
15352
|
+
}
|
|
15353
|
+
)
|
|
15354
|
+
] }),
|
|
15355
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
15356
|
+
/* @__PURE__ */ jsx(
|
|
15357
|
+
InfoField,
|
|
15358
|
+
{
|
|
15359
|
+
label: "Action",
|
|
15360
|
+
value: /* @__PURE__ */ jsx(Badge, { variant: getActionVariant2(limit.action), children: limit.action }),
|
|
15361
|
+
layout: "horizontal"
|
|
15362
|
+
}
|
|
15363
|
+
),
|
|
15364
|
+
/* @__PURE__ */ jsx(
|
|
15365
|
+
InfoField,
|
|
15366
|
+
{
|
|
15367
|
+
label: "Created",
|
|
15368
|
+
value: format(parseISO(limit.created), "MMM dd, yyyy 'at' h:mm a"),
|
|
15369
|
+
layout: "horizontal"
|
|
15370
|
+
}
|
|
15371
|
+
)
|
|
15372
|
+
] }),
|
|
15373
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
15374
|
+
/* @__PURE__ */ jsx(
|
|
15375
|
+
InfoField,
|
|
15376
|
+
{
|
|
15377
|
+
label: "Associated Entity",
|
|
15378
|
+
value: limit.associatedEntity,
|
|
15379
|
+
layout: "horizontal"
|
|
15380
|
+
}
|
|
15381
|
+
),
|
|
15382
|
+
limit.associatedEntityId && /* @__PURE__ */ jsx(
|
|
15383
|
+
InfoField,
|
|
15384
|
+
{
|
|
15385
|
+
label: "Associated Entity ID",
|
|
15386
|
+
value: limit.associatedEntityId,
|
|
15387
|
+
layout: "horizontal"
|
|
15388
|
+
}
|
|
15389
|
+
)
|
|
15390
|
+
] }),
|
|
15391
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
15392
|
+
limit.limitType === "transaction" && renderTransactionFields(),
|
|
15393
|
+
limit.limitType === "receiver_name_mismatch" && renderReceiverNameMismatchFields(),
|
|
15394
|
+
limit.limitType === "round_number" && renderRoundNumberFields(),
|
|
15395
|
+
limit.limitType === "prohibited_entity" && renderProhibitedEntityFields()
|
|
15396
|
+
] })
|
|
15397
|
+
] });
|
|
15398
|
+
const editContent = /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground", children: "Edit mode coming soon..." });
|
|
15399
|
+
return /* @__PURE__ */ jsx(
|
|
15400
|
+
EditableFormCard,
|
|
15401
|
+
{
|
|
15402
|
+
title: "Velocity Limit Details",
|
|
15403
|
+
viewContent,
|
|
15404
|
+
editContent,
|
|
15405
|
+
isEditing,
|
|
15406
|
+
onToggleEdit,
|
|
15407
|
+
variant: "subtle"
|
|
15408
|
+
}
|
|
15409
|
+
);
|
|
15410
|
+
};
|
|
15411
|
+
function VelocityLimitDetail() {
|
|
15412
|
+
const { id } = useParams();
|
|
15413
|
+
const navigate = useNavigate();
|
|
15414
|
+
const limit = mockVelocityLimits.find((l) => l.id === id);
|
|
15415
|
+
if (!limit) {
|
|
15416
|
+
return /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-8", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
15417
|
+
/* @__PURE__ */ jsx("h1", { className: "text-2xl font-bold mb-2", children: "Velocity Limit Not Found" }),
|
|
15418
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground mb-4", children: "The velocity limit could not be found." }),
|
|
15419
|
+
/* @__PURE__ */ jsxs(Button, { onClick: () => navigate("/compliance/velocity"), children: [
|
|
15420
|
+
/* @__PURE__ */ jsx(ArrowLeft, { className: "mr-2 h-4 w-4" }),
|
|
15421
|
+
"Back to Velocity Limits"
|
|
15422
|
+
] })
|
|
15423
|
+
] }) });
|
|
15424
|
+
}
|
|
15425
|
+
return /* @__PURE__ */ jsx(
|
|
15426
|
+
DetailPageLayout,
|
|
15427
|
+
{
|
|
15428
|
+
title: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
15429
|
+
/* @__PURE__ */ jsx("span", { children: limit.limitName }),
|
|
15430
|
+
/* @__PURE__ */ jsx(Badge, { variant: getStatusVariant2(limit.status), children: limit.status })
|
|
15431
|
+
] }),
|
|
15432
|
+
cards: [
|
|
15433
|
+
{
|
|
15434
|
+
key: "details",
|
|
15435
|
+
component: (props) => /* @__PURE__ */ jsx(VelocityLimitDetailsCard, { ...props, limit })
|
|
15436
|
+
}
|
|
15437
|
+
],
|
|
15438
|
+
actions: [
|
|
15439
|
+
{
|
|
15440
|
+
label: "Deactivate",
|
|
15441
|
+
variant: "destructive",
|
|
15442
|
+
onClick: () => console.log("Deactivate limit")
|
|
15443
|
+
}
|
|
15444
|
+
]
|
|
15445
|
+
}
|
|
15446
|
+
);
|
|
15447
|
+
}
|
|
15448
|
+
function UploadReconDialog({ open, onOpenChange }) {
|
|
15449
|
+
const [fileType, setFileType] = useState(null);
|
|
15450
|
+
const [selectedFile, setSelectedFile] = useState(null);
|
|
15451
|
+
const [isUploading, setIsUploading] = useState(false);
|
|
15452
|
+
const fileInputRef = useRef(null);
|
|
15453
|
+
const handleFileChange = (event) => {
|
|
15454
|
+
const file = event.target.files?.[0];
|
|
15455
|
+
if (file) {
|
|
15456
|
+
setSelectedFile(file);
|
|
15457
|
+
}
|
|
15458
|
+
};
|
|
15459
|
+
const handleRemoveFile = () => {
|
|
15460
|
+
setSelectedFile(null);
|
|
15461
|
+
if (fileInputRef.current) {
|
|
15462
|
+
fileInputRef.current.value = "";
|
|
15463
|
+
}
|
|
15464
|
+
};
|
|
15465
|
+
const handleReset = () => {
|
|
15466
|
+
setFileType(null);
|
|
15467
|
+
setSelectedFile(null);
|
|
15468
|
+
if (fileInputRef.current) {
|
|
15469
|
+
fileInputRef.current.value = "";
|
|
15470
|
+
}
|
|
15471
|
+
};
|
|
15472
|
+
const handleUpload = async () => {
|
|
15473
|
+
if (!selectedFile || !fileType) return;
|
|
15474
|
+
setIsUploading(true);
|
|
15475
|
+
setTimeout(() => {
|
|
15476
|
+
setIsUploading(false);
|
|
15477
|
+
toast$1.success(`${fileType} file uploaded successfully`);
|
|
15478
|
+
handleReset();
|
|
15479
|
+
onOpenChange(false);
|
|
15480
|
+
}, 2e3);
|
|
15481
|
+
};
|
|
15482
|
+
return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(DialogContent, { className: "sm:max-w-[500px]", children: [
|
|
15483
|
+
/* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { children: "Upload Recon File" }) }),
|
|
15484
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-4 py-4", children: [
|
|
15485
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
15486
|
+
/* @__PURE__ */ jsx(Label, { children: "File Type" }),
|
|
15487
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
|
|
15488
|
+
/* @__PURE__ */ jsxs(
|
|
15489
|
+
"button",
|
|
15490
|
+
{
|
|
15491
|
+
type: "button",
|
|
15492
|
+
onClick: () => setFileType("ACH"),
|
|
15493
|
+
className: cn(
|
|
15494
|
+
"flex flex-col items-center gap-3 p-4 border-2 rounded-lg transition-all",
|
|
15495
|
+
fileType === "ACH" ? "border-primary bg-primary/5" : "border-border hover:border-primary/50"
|
|
15496
|
+
),
|
|
15497
|
+
children: [
|
|
15498
|
+
/* @__PURE__ */ jsx(ArrowRightLeft, { className: "h-8 w-8 text-primary" }),
|
|
15499
|
+
/* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
15500
|
+
/* @__PURE__ */ jsx("div", { className: "font-medium", children: "ACH" }),
|
|
15501
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground mt-1", children: "ACH Originated/Received Entries Detail Report in .csv format" })
|
|
15502
|
+
] })
|
|
15503
|
+
]
|
|
15504
|
+
}
|
|
15505
|
+
),
|
|
15506
|
+
/* @__PURE__ */ jsxs(
|
|
15507
|
+
"button",
|
|
15508
|
+
{
|
|
15509
|
+
type: "button",
|
|
15510
|
+
onClick: () => setFileType("Wire"),
|
|
15511
|
+
className: cn(
|
|
15512
|
+
"flex flex-col items-center gap-3 p-4 border-2 rounded-lg transition-all",
|
|
15513
|
+
fileType === "Wire" ? "border-primary bg-primary/5" : "border-border hover:border-primary/50"
|
|
15514
|
+
),
|
|
15515
|
+
children: [
|
|
15516
|
+
/* @__PURE__ */ jsx(Zap, { className: "h-8 w-8 text-primary" }),
|
|
15517
|
+
/* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
15518
|
+
/* @__PURE__ */ jsx("div", { className: "font-medium", children: "Wire" }),
|
|
15519
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground mt-1", children: "FedTransaction Analyzer report in .csv format" })
|
|
15520
|
+
] })
|
|
15521
|
+
]
|
|
15522
|
+
}
|
|
15523
|
+
)
|
|
15524
|
+
] })
|
|
15525
|
+
] }),
|
|
15526
|
+
fileType && /* @__PURE__ */ jsx("div", { className: "border-2 border-dashed border-border rounded-lg p-6", children: !selectedFile ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center gap-4", children: [
|
|
15527
|
+
/* @__PURE__ */ jsx(Upload, { className: "h-12 w-12 text-muted-foreground" }),
|
|
15528
|
+
/* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
15529
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: "Select a file to upload" }),
|
|
15530
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-1", children: "CSV, TXT files supported" })
|
|
15531
|
+
] }),
|
|
15532
|
+
/* @__PURE__ */ jsx(
|
|
15533
|
+
"input",
|
|
15534
|
+
{
|
|
15535
|
+
ref: fileInputRef,
|
|
15536
|
+
type: "file",
|
|
15537
|
+
onChange: handleFileChange,
|
|
15538
|
+
className: "hidden",
|
|
15539
|
+
accept: ".csv,.txt",
|
|
15540
|
+
id: "recon-file-upload"
|
|
15541
|
+
}
|
|
15542
|
+
),
|
|
15543
|
+
/* @__PURE__ */ jsx(
|
|
15544
|
+
Button,
|
|
15545
|
+
{
|
|
15546
|
+
type: "button",
|
|
15547
|
+
variant: "outline",
|
|
15548
|
+
onClick: () => fileInputRef.current?.click(),
|
|
15549
|
+
children: "Select File"
|
|
15550
|
+
}
|
|
15551
|
+
)
|
|
15552
|
+
] }) : /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
15553
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
15554
|
+
/* @__PURE__ */ jsx(File, { className: "h-8 w-8 text-primary flex-shrink-0" }),
|
|
15555
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
15556
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium truncate", children: selectedFile.name }),
|
|
15557
|
+
/* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
15558
|
+
(selectedFile.size / 1024).toFixed(2),
|
|
15559
|
+
" KB"
|
|
15560
|
+
] })
|
|
15561
|
+
] })
|
|
15562
|
+
] }),
|
|
15563
|
+
/* @__PURE__ */ jsx(
|
|
15564
|
+
Button,
|
|
15565
|
+
{
|
|
15566
|
+
type: "button",
|
|
15567
|
+
variant: "ghost",
|
|
15568
|
+
size: "icon",
|
|
15569
|
+
onClick: handleRemoveFile,
|
|
15570
|
+
className: "flex-shrink-0",
|
|
15571
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
|
|
15572
|
+
}
|
|
15573
|
+
)
|
|
15574
|
+
] }) })
|
|
15575
|
+
] }),
|
|
15576
|
+
/* @__PURE__ */ jsxs(DialogFooter, { children: [
|
|
15577
|
+
/* @__PURE__ */ jsx(Button, { variant: "outline", onClick: () => {
|
|
15578
|
+
handleReset();
|
|
15579
|
+
onOpenChange(false);
|
|
15580
|
+
}, children: "Cancel" }),
|
|
15581
|
+
/* @__PURE__ */ jsx(
|
|
15582
|
+
Button,
|
|
15583
|
+
{
|
|
15584
|
+
onClick: handleUpload,
|
|
15585
|
+
disabled: !selectedFile || !fileType || isUploading,
|
|
15586
|
+
children: isUploading ? "Uploading..." : "Upload"
|
|
15587
|
+
}
|
|
15588
|
+
)
|
|
15589
|
+
] })
|
|
15590
|
+
] }) });
|
|
15591
|
+
}
|
|
15592
|
+
|
|
15593
|
+
// src/lib/mock-data/recon-data.ts
|
|
15594
|
+
var mockReconUploads = [
|
|
15595
|
+
{
|
|
15596
|
+
id: "1",
|
|
15597
|
+
uploaded: "2025-11-14T10:30:00Z",
|
|
15598
|
+
fileName: "OE_ACH Originated Entries ...",
|
|
15599
|
+
type: "FED_ACH_CONF...",
|
|
15600
|
+
status: "Processed",
|
|
15601
|
+
requester: "bcontrucci@ssbp...",
|
|
15602
|
+
totalRecords: 2872,
|
|
15603
|
+
matchedRecords: 2872,
|
|
15604
|
+
exceptionRecords: 0,
|
|
15605
|
+
skippedRecords: 0,
|
|
15606
|
+
invalidRecords: 0
|
|
15607
|
+
},
|
|
15608
|
+
{
|
|
15609
|
+
id: "2",
|
|
15610
|
+
uploaded: "2025-11-14T09:15:00Z",
|
|
15611
|
+
fileName: "RER_ACH Received Entries ...",
|
|
15612
|
+
type: "FED_ACH_CONF...",
|
|
15613
|
+
status: "Processed",
|
|
15614
|
+
requester: "bcontrucci@ssbp...",
|
|
15615
|
+
totalRecords: 220,
|
|
15616
|
+
matchedRecords: 220,
|
|
15617
|
+
exceptionRecords: 0,
|
|
15618
|
+
skippedRecords: 0,
|
|
15619
|
+
invalidRecords: 0
|
|
15620
|
+
},
|
|
15621
|
+
{
|
|
15622
|
+
id: "3",
|
|
15623
|
+
uploaded: "2025-11-14T08:45:00Z",
|
|
15624
|
+
fileName: "243073959_335935.csv",
|
|
15625
|
+
type: "FED_WIRE_CON...",
|
|
15626
|
+
status: "Processed",
|
|
15627
|
+
requester: "bcontrucci@ssbp...",
|
|
15628
|
+
totalRecords: 304,
|
|
15629
|
+
matchedRecords: 220,
|
|
15630
|
+
exceptionRecords: 2,
|
|
15631
|
+
skippedRecords: 82,
|
|
15632
|
+
invalidRecords: 0
|
|
15633
|
+
},
|
|
15634
|
+
{
|
|
15635
|
+
id: "4",
|
|
15636
|
+
uploaded: "2025-11-13T16:20:00Z",
|
|
15637
|
+
fileName: "OE_ACH Originated Entries ...",
|
|
15638
|
+
type: "FED_ACH_CONF...",
|
|
15639
|
+
status: "Processed",
|
|
15640
|
+
requester: "bcontrucci@ssbp...",
|
|
15641
|
+
totalRecords: 4813,
|
|
15642
|
+
matchedRecords: 4811,
|
|
15643
|
+
exceptionRecords: 2,
|
|
15644
|
+
skippedRecords: 0,
|
|
15645
|
+
invalidRecords: 0
|
|
15646
|
+
},
|
|
15647
|
+
{
|
|
15648
|
+
id: "5",
|
|
15649
|
+
uploaded: "2025-11-13T15:10:00Z",
|
|
15650
|
+
fileName: "243073959_335846.csv",
|
|
15651
|
+
type: "FED_WIRE_CON...",
|
|
15652
|
+
status: "Processed",
|
|
15653
|
+
requester: "bcontrucci@ssbp...",
|
|
15654
|
+
totalRecords: 391,
|
|
15655
|
+
matchedRecords: 258,
|
|
15656
|
+
exceptionRecords: 2,
|
|
15657
|
+
skippedRecords: 131,
|
|
15658
|
+
invalidRecords: 0
|
|
15659
|
+
},
|
|
15660
|
+
{
|
|
15661
|
+
id: "6",
|
|
15662
|
+
uploaded: "2025-11-13T14:30:00Z",
|
|
15663
|
+
fileName: "RER_ACH Received Entries ...",
|
|
15664
|
+
type: "FED_ACH_CONF...",
|
|
15665
|
+
status: "Processed",
|
|
15666
|
+
requester: "bcontrucci@ssbp...",
|
|
15667
|
+
totalRecords: 227,
|
|
15668
|
+
matchedRecords: 221,
|
|
15669
|
+
exceptionRecords: 6,
|
|
15670
|
+
skippedRecords: 0,
|
|
15671
|
+
invalidRecords: 0
|
|
15672
|
+
},
|
|
15673
|
+
{
|
|
15674
|
+
id: "7",
|
|
15675
|
+
uploaded: "2025-11-13T13:45:00Z",
|
|
15676
|
+
fileName: "OE_ACH Originated Entries ...",
|
|
15677
|
+
type: "FED_ACH_CONF...",
|
|
15678
|
+
status: "Processed",
|
|
15679
|
+
requester: "bcontrucci@ssbp...",
|
|
15680
|
+
totalRecords: 6471,
|
|
15681
|
+
matchedRecords: 6471,
|
|
15682
|
+
exceptionRecords: 0,
|
|
15683
|
+
skippedRecords: 0,
|
|
15684
|
+
invalidRecords: 0
|
|
15685
|
+
},
|
|
15686
|
+
{
|
|
15687
|
+
id: "8",
|
|
15688
|
+
uploaded: "2025-11-12T11:20:00Z",
|
|
15689
|
+
fileName: "OE_ACH Originated Entries ...",
|
|
15690
|
+
type: "FED_ACH_CONF...",
|
|
15691
|
+
status: "Failed",
|
|
15692
|
+
requester: "bcontrucci@ssbp...",
|
|
15693
|
+
totalRecords: 0,
|
|
15694
|
+
matchedRecords: 0,
|
|
15695
|
+
exceptionRecords: 0,
|
|
15696
|
+
skippedRecords: 0,
|
|
15697
|
+
invalidRecords: 0
|
|
15698
|
+
},
|
|
15699
|
+
{
|
|
15700
|
+
id: "9",
|
|
15701
|
+
uploaded: "2025-11-12T10:15:00Z",
|
|
15702
|
+
fileName: "RER_ACH Received Entries ...",
|
|
15703
|
+
type: "FED_ACH_CONF...",
|
|
15704
|
+
status: "Processed",
|
|
15705
|
+
requester: "bcontrucci@ssbp...",
|
|
15706
|
+
totalRecords: 189,
|
|
15707
|
+
matchedRecords: 170,
|
|
15708
|
+
exceptionRecords: 19,
|
|
15709
|
+
skippedRecords: 0,
|
|
15710
|
+
invalidRecords: 0
|
|
15711
|
+
}
|
|
15712
|
+
];
|
|
15713
|
+
function ReconUpload() {
|
|
15714
|
+
const [sortField, setSortField] = useState("uploaded");
|
|
15715
|
+
const [sortDirection, setSortDirection] = useState("desc");
|
|
15716
|
+
const [uploadDialogOpen, setUploadDialogOpen] = useState(false);
|
|
15717
|
+
const handleSort = (field) => {
|
|
15718
|
+
if (sortField === field) {
|
|
15719
|
+
setSortDirection(sortDirection === "asc" ? "desc" : "asc");
|
|
15720
|
+
} else {
|
|
15721
|
+
setSortField(field);
|
|
15722
|
+
setSortDirection("desc");
|
|
15723
|
+
}
|
|
15724
|
+
};
|
|
15725
|
+
const sortedUploads = [...mockReconUploads].sort((a, b) => {
|
|
15726
|
+
const aValue = a[sortField];
|
|
15727
|
+
const bValue = b[sortField];
|
|
15728
|
+
if (aValue == null) return 1;
|
|
15729
|
+
if (bValue == null) return -1;
|
|
15730
|
+
if (sortDirection === "asc") {
|
|
15731
|
+
return aValue > bValue ? 1 : -1;
|
|
15732
|
+
} else {
|
|
15733
|
+
return aValue < bValue ? 1 : -1;
|
|
15734
|
+
}
|
|
15735
|
+
});
|
|
15736
|
+
const columns3 = [
|
|
15737
|
+
{
|
|
15738
|
+
key: "uploaded",
|
|
15739
|
+
title: "Uploaded",
|
|
15740
|
+
sortable: true,
|
|
15741
|
+
render: (value) => /* @__PURE__ */ jsx("span", { className: "text-sm", children: format(parseISO(value), "yyyy-MM-dd") })
|
|
15742
|
+
},
|
|
15743
|
+
{
|
|
15744
|
+
key: "fileName",
|
|
15745
|
+
title: "File Name",
|
|
15746
|
+
render: (value, row) => {
|
|
15747
|
+
const isACH = row.type.includes("ACH");
|
|
15748
|
+
const Icon2 = isACH ? ArrowRightLeft : Zap;
|
|
15749
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
15750
|
+
/* @__PURE__ */ jsx(Icon2, { className: "h-4 w-4 text-muted-foreground flex-shrink-0" }),
|
|
15751
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: value })
|
|
15752
|
+
] });
|
|
15753
|
+
}
|
|
15754
|
+
},
|
|
15755
|
+
{
|
|
15756
|
+
key: "status",
|
|
15757
|
+
title: "Status",
|
|
15758
|
+
render: (value) => {
|
|
15759
|
+
if (value === "Processed") {
|
|
15760
|
+
return /* @__PURE__ */ jsx(CheckCircle2, { className: "h-5 w-5 text-green-600" });
|
|
15761
|
+
}
|
|
15762
|
+
if (value === "Failed") {
|
|
15763
|
+
return /* @__PURE__ */ jsx(XCircle, { className: "h-5 w-5 text-red-600" });
|
|
15764
|
+
}
|
|
15765
|
+
if (value === "Processing") {
|
|
15766
|
+
return /* @__PURE__ */ jsx(Circle, { className: "h-5 w-5 text-green-600" });
|
|
15767
|
+
}
|
|
15768
|
+
return /* @__PURE__ */ jsx("span", { className: "text-sm", children: value });
|
|
15769
|
+
}
|
|
15770
|
+
},
|
|
15771
|
+
{
|
|
15772
|
+
key: "requester",
|
|
15773
|
+
title: "Requester",
|
|
15774
|
+
render: (value) => /* @__PURE__ */ jsx("span", { className: "text-sm", children: value })
|
|
15775
|
+
},
|
|
15776
|
+
{
|
|
15777
|
+
key: "totalRecords",
|
|
15778
|
+
title: "Total",
|
|
15779
|
+
sortable: true,
|
|
15780
|
+
render: (value) => /* @__PURE__ */ jsx("span", { className: "text-sm", children: value.toLocaleString() })
|
|
15781
|
+
},
|
|
15782
|
+
{
|
|
15783
|
+
key: "matchedRecords",
|
|
15784
|
+
title: "Matched",
|
|
15785
|
+
sortable: true,
|
|
15786
|
+
render: (value) => /* @__PURE__ */ jsx("span", { className: "text-sm", children: value.toLocaleString() })
|
|
15787
|
+
},
|
|
15788
|
+
{
|
|
15789
|
+
key: "exceptionRecords",
|
|
15790
|
+
title: "Exception",
|
|
15791
|
+
sortable: true,
|
|
15792
|
+
render: (value) => /* @__PURE__ */ jsx("span", { className: "text-sm", children: value.toLocaleString() })
|
|
15793
|
+
},
|
|
15794
|
+
{
|
|
15795
|
+
key: "skippedRecords",
|
|
15796
|
+
title: "Skipped",
|
|
15797
|
+
sortable: true,
|
|
15798
|
+
render: (value) => /* @__PURE__ */ jsx("span", { className: "text-sm", children: value.toLocaleString() })
|
|
15799
|
+
},
|
|
15800
|
+
{
|
|
15801
|
+
key: "invalidRecords",
|
|
15802
|
+
title: "Invalid",
|
|
15803
|
+
sortable: true,
|
|
15804
|
+
render: (value) => /* @__PURE__ */ jsx("span", { className: "text-sm", children: value.toLocaleString() })
|
|
15805
|
+
}
|
|
15806
|
+
];
|
|
15807
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-screen bg-gradient-subtle", children: [
|
|
15808
|
+
/* @__PURE__ */ jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-6 max-w-none", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
15809
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold text-foreground", children: "Recon File Uploads" }) }),
|
|
15810
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ jsxs(Button, { onClick: () => setUploadDialogOpen(true), children: [
|
|
15811
|
+
/* @__PURE__ */ jsx(Upload, { className: "mr-2 h-4 w-4" }),
|
|
15812
|
+
"Upload Recon file"
|
|
15813
|
+
] }) })
|
|
15814
|
+
] }) }) }),
|
|
15815
|
+
/* @__PURE__ */ jsx(UploadReconDialog, { open: uploadDialogOpen, onOpenChange: setUploadDialogOpen }),
|
|
15816
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 h-full max-w-none flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "flex-1 mt-4 overflow-auto", children: /* @__PURE__ */ jsx(
|
|
15817
|
+
DataTable,
|
|
15818
|
+
{
|
|
15819
|
+
columns: columns3,
|
|
15820
|
+
data: sortedUploads,
|
|
15821
|
+
sortBy: sortField,
|
|
15822
|
+
sortDirection,
|
|
15823
|
+
onSort: handleSort
|
|
15824
|
+
}
|
|
15825
|
+
) }) }) })
|
|
15826
|
+
] });
|
|
15827
|
+
}
|
|
15828
|
+
|
|
15829
|
+
// src/lib/mock-data/recon-exception-data.ts
|
|
15830
|
+
var mockBraidTransactions = [
|
|
15831
|
+
{
|
|
15832
|
+
id: "BT-001",
|
|
15833
|
+
amount: 15e3,
|
|
15834
|
+
postDate: "2025-01-15",
|
|
15835
|
+
senderAccount: "1234567890",
|
|
15836
|
+
receiverAccount: "9876543210",
|
|
15837
|
+
type: "ACH"
|
|
15838
|
+
},
|
|
15839
|
+
{
|
|
15840
|
+
id: "BT-002",
|
|
15841
|
+
amount: 8500.5,
|
|
15842
|
+
postDate: "2025-01-15",
|
|
15843
|
+
senderAccount: "2345678901",
|
|
15844
|
+
receiverAccount: "8765432109",
|
|
15845
|
+
type: "ACH"
|
|
15846
|
+
},
|
|
15847
|
+
{
|
|
15848
|
+
id: "BT-003",
|
|
15849
|
+
amount: 25e3,
|
|
15850
|
+
postDate: "2025-01-16",
|
|
15851
|
+
senderAccount: "3456789012",
|
|
15852
|
+
receiverAccount: "7654321098",
|
|
15853
|
+
type: "ACH"
|
|
15854
|
+
},
|
|
15855
|
+
{
|
|
15856
|
+
id: "BT-004",
|
|
15857
|
+
amount: 5e4,
|
|
15858
|
+
postDate: "2025-01-15",
|
|
15859
|
+
senderAccount: "4567890123",
|
|
15860
|
+
receiverAccount: "6543210987",
|
|
15861
|
+
type: "Wire"
|
|
15862
|
+
},
|
|
15863
|
+
{
|
|
15864
|
+
id: "BT-005",
|
|
15865
|
+
amount: 12500.75,
|
|
15866
|
+
postDate: "2025-01-16",
|
|
15867
|
+
senderAccount: "5678901234",
|
|
15868
|
+
receiverAccount: "5432109876",
|
|
15869
|
+
type: "Wire"
|
|
15870
|
+
},
|
|
15871
|
+
{
|
|
15872
|
+
id: "BT-006",
|
|
15873
|
+
amount: 3200,
|
|
15874
|
+
postDate: "2025-01-17",
|
|
15875
|
+
senderAccount: "6789012345",
|
|
15876
|
+
receiverAccount: "4321098765",
|
|
15877
|
+
type: "ACH"
|
|
15878
|
+
}
|
|
15879
|
+
];
|
|
15880
|
+
var mockFedSettlements = [
|
|
15881
|
+
{
|
|
15882
|
+
id: "FS-001",
|
|
15883
|
+
amount: 15e3,
|
|
15884
|
+
settlementDate: "2025-01-15",
|
|
15885
|
+
receiverAccount: "9876543210",
|
|
15886
|
+
type: "ACH"
|
|
15887
|
+
},
|
|
15888
|
+
{
|
|
15889
|
+
id: "FS-002",
|
|
15890
|
+
amount: 8500.5,
|
|
15891
|
+
settlementDate: "2025-01-15",
|
|
15892
|
+
receiverAccount: "8765432109",
|
|
15893
|
+
type: "ACH"
|
|
15894
|
+
},
|
|
15895
|
+
{
|
|
15896
|
+
id: "FS-003",
|
|
15897
|
+
amount: 24999,
|
|
15898
|
+
settlementDate: "2025-01-16",
|
|
15899
|
+
receiverAccount: "7654321098",
|
|
15900
|
+
type: "ACH"
|
|
15901
|
+
},
|
|
15902
|
+
{
|
|
15903
|
+
id: "FS-004",
|
|
15904
|
+
amount: 5e4,
|
|
15905
|
+
settlementDate: "2025-01-15",
|
|
15906
|
+
receiverAccount: "6543210987",
|
|
15907
|
+
type: "Wire"
|
|
15908
|
+
},
|
|
15909
|
+
{
|
|
15910
|
+
id: "FS-005",
|
|
15911
|
+
amount: 12500.75,
|
|
15912
|
+
settlementDate: "2025-01-16",
|
|
15913
|
+
receiverAccount: "5432109876",
|
|
15914
|
+
type: "Wire"
|
|
15915
|
+
},
|
|
15916
|
+
{
|
|
15917
|
+
id: "FS-006",
|
|
15918
|
+
amount: 7800,
|
|
15919
|
+
settlementDate: "2025-01-17",
|
|
15920
|
+
receiverAccount: "3210987654",
|
|
15921
|
+
type: "ACH"
|
|
15922
|
+
}
|
|
15923
|
+
];
|
|
15924
|
+
function ReconExceptions() {
|
|
15925
|
+
const [fromDate, setFromDate] = useState();
|
|
15926
|
+
const [toDate, setToDate] = useState();
|
|
15927
|
+
const [transactionType, setTransactionType] = useState("ACH");
|
|
15928
|
+
const [braidData, setBraidData] = useState(mockBraidTransactions);
|
|
15929
|
+
const [fedData, setFedData] = useState(mockFedSettlements);
|
|
15930
|
+
const [selectedBraid, setSelectedBraid] = useState(null);
|
|
15931
|
+
const [selectedFed, setSelectedFed] = useState(null);
|
|
15932
|
+
const [dataLoaded, setDataLoaded] = useState(true);
|
|
15933
|
+
const [braidPage, setBraidPage] = useState(1);
|
|
15934
|
+
const [braidRowsPerPage, setBraidRowsPerPage] = useState(10);
|
|
15935
|
+
const [fedPage, setFedPage] = useState(1);
|
|
15936
|
+
const [fedRowsPerPage, setFedRowsPerPage] = useState(10);
|
|
15937
|
+
const handleSearch = () => {
|
|
15938
|
+
if (!fromDate || !toDate) {
|
|
15939
|
+
toast({
|
|
15940
|
+
title: "Missing Date Range",
|
|
15941
|
+
description: "Please select both from and to dates",
|
|
15942
|
+
variant: "destructive"
|
|
15943
|
+
});
|
|
15944
|
+
return;
|
|
15945
|
+
}
|
|
15946
|
+
const filteredBraid = mockBraidTransactions.filter((t) => {
|
|
15947
|
+
const tDate = new Date(t.postDate);
|
|
15948
|
+
return t.type === transactionType && tDate >= fromDate && tDate <= toDate;
|
|
15949
|
+
});
|
|
15950
|
+
const filteredFed = mockFedSettlements.filter((s) => {
|
|
15951
|
+
const sDate = new Date(s.settlementDate);
|
|
15952
|
+
return s.type === transactionType && sDate >= fromDate && sDate <= toDate;
|
|
15953
|
+
});
|
|
15954
|
+
setBraidData(filteredBraid);
|
|
15955
|
+
setFedData(filteredFed);
|
|
15956
|
+
setDataLoaded(true);
|
|
15957
|
+
setSelectedBraid(null);
|
|
15958
|
+
setSelectedFed(null);
|
|
15959
|
+
setBraidPage(1);
|
|
15960
|
+
setFedPage(1);
|
|
15961
|
+
toast({
|
|
15962
|
+
title: "Data Loaded",
|
|
15963
|
+
description: `Found ${filteredBraid.length} Braid transactions and ${filteredFed.length} Fed settlements`
|
|
15964
|
+
});
|
|
15965
|
+
};
|
|
15966
|
+
const handleMatch = () => {
|
|
15967
|
+
if (!selectedBraid || !selectedFed) {
|
|
15968
|
+
toast({
|
|
15969
|
+
title: "Selection Required",
|
|
15970
|
+
description: "Please select one transaction from each table",
|
|
15971
|
+
variant: "destructive"
|
|
15972
|
+
});
|
|
15973
|
+
return;
|
|
15974
|
+
}
|
|
15975
|
+
const braidTxn = braidData.find((t) => t.id === selectedBraid);
|
|
15976
|
+
const fedTxn = fedData.find((s) => s.id === selectedFed);
|
|
15977
|
+
setBraidData((prev) => prev.filter((t) => t.id !== selectedBraid));
|
|
15978
|
+
setFedData((prev) => prev.filter((s) => s.id !== selectedFed));
|
|
15979
|
+
setSelectedBraid(null);
|
|
15980
|
+
setSelectedFed(null);
|
|
15981
|
+
toast({
|
|
15982
|
+
title: "Transactions Matched",
|
|
15983
|
+
description: `Matched ${braidTxn?.id} with ${fedTxn?.id}`
|
|
15984
|
+
});
|
|
15985
|
+
};
|
|
15986
|
+
const canMatch = selectedBraid && selectedFed;
|
|
15987
|
+
const braidTotalPages = Math.ceil(braidData.length / braidRowsPerPage);
|
|
15988
|
+
const braidStartIndex = (braidPage - 1) * braidRowsPerPage;
|
|
15989
|
+
const braidPaginatedData = braidData.slice(braidStartIndex, braidStartIndex + braidRowsPerPage);
|
|
15990
|
+
const fedTotalPages = Math.ceil(fedData.length / fedRowsPerPage);
|
|
15991
|
+
const fedStartIndex = (fedPage - 1) * fedRowsPerPage;
|
|
15992
|
+
const fedPaginatedData = fedData.slice(fedStartIndex, fedStartIndex + fedRowsPerPage);
|
|
15993
|
+
return /* @__PURE__ */ jsx(Container, { size: "full", padding: "lg", children: /* @__PURE__ */ jsxs(Stack, { spacing: "lg", children: [
|
|
15994
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
15995
|
+
/* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold tracking-tight", children: "Exception Review" }),
|
|
15996
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-2", children: "Compare Braid posted transactions with Fed settlement records for reconciliation" })
|
|
15997
|
+
] }),
|
|
15998
|
+
/* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsx(CardContent, { className: "pt-6", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-end gap-4", children: [
|
|
15999
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 min-w-[200px]", children: /* @__PURE__ */ jsx(
|
|
16000
|
+
DatePicker,
|
|
16001
|
+
{
|
|
16002
|
+
label: "From Date",
|
|
16003
|
+
date: fromDate,
|
|
16004
|
+
onDateChange: setFromDate,
|
|
16005
|
+
placeholder: "Select from date"
|
|
16006
|
+
}
|
|
16007
|
+
) }),
|
|
16008
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 min-w-[200px]", children: /* @__PURE__ */ jsx(
|
|
16009
|
+
DatePicker,
|
|
16010
|
+
{
|
|
16011
|
+
label: "To Date",
|
|
16012
|
+
date: toDate,
|
|
16013
|
+
onDateChange: setToDate,
|
|
16014
|
+
placeholder: "Select to date"
|
|
16015
|
+
}
|
|
16016
|
+
) }),
|
|
16017
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-[200px]", children: [
|
|
16018
|
+
/* @__PURE__ */ jsx(Label, { children: "Transaction Type" }),
|
|
16019
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-4 mt-2", children: [
|
|
16020
|
+
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2 cursor-pointer", children: [
|
|
16021
|
+
/* @__PURE__ */ jsx(
|
|
16022
|
+
"input",
|
|
16023
|
+
{
|
|
16024
|
+
type: "radio",
|
|
16025
|
+
value: "ACH",
|
|
16026
|
+
checked: transactionType === "ACH",
|
|
16027
|
+
onChange: (e) => setTransactionType(e.target.value),
|
|
16028
|
+
className: "w-4 h-4 text-primary"
|
|
16029
|
+
}
|
|
16030
|
+
),
|
|
16031
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm", children: "ACH" })
|
|
16032
|
+
] }),
|
|
16033
|
+
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2 cursor-pointer", children: [
|
|
16034
|
+
/* @__PURE__ */ jsx(
|
|
16035
|
+
"input",
|
|
16036
|
+
{
|
|
16037
|
+
type: "radio",
|
|
16038
|
+
value: "Wire",
|
|
16039
|
+
checked: transactionType === "Wire",
|
|
16040
|
+
onChange: (e) => setTransactionType(e.target.value),
|
|
16041
|
+
className: "w-4 h-4 text-primary"
|
|
16042
|
+
}
|
|
16043
|
+
),
|
|
16044
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm", children: "Wire" })
|
|
16045
|
+
] })
|
|
16046
|
+
] })
|
|
16047
|
+
] }),
|
|
16048
|
+
/* @__PURE__ */ jsxs(Button, { onClick: handleSearch, className: "gap-2", children: [
|
|
16049
|
+
/* @__PURE__ */ jsx(Search, { className: "h-4 w-4" }),
|
|
16050
|
+
"Search"
|
|
16051
|
+
] })
|
|
16052
|
+
] }) }) }),
|
|
16053
|
+
!dataLoaded ? /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsx(CardContent, { className: "py-12 text-center text-muted-foreground", children: "Select date range and transaction type, then click Search to load data" }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
16054
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
|
|
16055
|
+
/* @__PURE__ */ jsxs(Card, { className: "flex flex-col", children: [
|
|
16056
|
+
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, { className: "text-lg", children: [
|
|
16057
|
+
"Braid Posted Transactions (",
|
|
16058
|
+
braidData.length,
|
|
16059
|
+
")"
|
|
16060
|
+
] }) }),
|
|
16061
|
+
/* @__PURE__ */ jsxs(CardContent, { className: "flex flex-col flex-1", children: [
|
|
16062
|
+
/* @__PURE__ */ jsx("div", { className: "rounded-md border flex-1 overflow-auto", children: /* @__PURE__ */ jsxs(Table, { children: [
|
|
16063
|
+
/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
16064
|
+
/* @__PURE__ */ jsx(TableHead, { className: "w-12" }),
|
|
16065
|
+
/* @__PURE__ */ jsx(TableHead, { children: "Amount" }),
|
|
16066
|
+
/* @__PURE__ */ jsx(TableHead, { children: "Post Date" }),
|
|
16067
|
+
/* @__PURE__ */ jsx(TableHead, { children: "Sender Account" }),
|
|
16068
|
+
/* @__PURE__ */ jsx(TableHead, { children: "Receiver Account" })
|
|
16069
|
+
] }) }),
|
|
16070
|
+
/* @__PURE__ */ jsx(TableBody, { children: braidData.length === 0 ? /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, { colSpan: 5, className: "text-center text-muted-foreground", children: "No transactions found" }) }) : braidPaginatedData.map((txn) => /* @__PURE__ */ jsxs(
|
|
16071
|
+
TableRow,
|
|
16072
|
+
{
|
|
16073
|
+
className: selectedBraid === txn.id ? "bg-muted" : "",
|
|
16074
|
+
children: [
|
|
16075
|
+
/* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(
|
|
16076
|
+
"input",
|
|
16077
|
+
{
|
|
16078
|
+
type: "radio",
|
|
16079
|
+
name: "braid-select",
|
|
16080
|
+
checked: selectedBraid === txn.id,
|
|
16081
|
+
onChange: () => setSelectedBraid(txn.id),
|
|
16082
|
+
className: "w-4 h-4 text-primary cursor-pointer"
|
|
16083
|
+
}
|
|
16084
|
+
) }),
|
|
16085
|
+
/* @__PURE__ */ jsxs(TableCell, { className: "font-medium", children: [
|
|
16086
|
+
"$",
|
|
16087
|
+
txn.amount.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })
|
|
16088
|
+
] }),
|
|
16089
|
+
/* @__PURE__ */ jsx(TableCell, { children: format(new Date(txn.postDate), "MMM dd, yyyy") }),
|
|
16090
|
+
/* @__PURE__ */ jsx(TableCell, { className: "font-mono text-sm", children: txn.senderAccount }),
|
|
16091
|
+
/* @__PURE__ */ jsx(TableCell, { className: "font-mono text-sm", children: txn.receiverAccount })
|
|
16092
|
+
]
|
|
16093
|
+
},
|
|
16094
|
+
txn.id
|
|
16095
|
+
)) })
|
|
16096
|
+
] }) }),
|
|
16097
|
+
braidData.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-2 py-4", children: [
|
|
16098
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
16099
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "Rows per page:" }),
|
|
16100
|
+
/* @__PURE__ */ jsxs(
|
|
16101
|
+
"select",
|
|
16102
|
+
{
|
|
16103
|
+
value: braidRowsPerPage,
|
|
16104
|
+
onChange: (e) => {
|
|
16105
|
+
setBraidRowsPerPage(Number(e.target.value));
|
|
16106
|
+
setBraidPage(1);
|
|
16107
|
+
},
|
|
16108
|
+
className: "h-8 w-16 rounded-md border border-input bg-background px-2 text-sm",
|
|
16109
|
+
children: [
|
|
16110
|
+
/* @__PURE__ */ jsx("option", { value: 10, children: "10" }),
|
|
16111
|
+
/* @__PURE__ */ jsx("option", { value: 25, children: "25" }),
|
|
16112
|
+
/* @__PURE__ */ jsx("option", { value: 50, children: "50" })
|
|
16113
|
+
]
|
|
16114
|
+
}
|
|
16115
|
+
)
|
|
16116
|
+
] }),
|
|
16117
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
16118
|
+
/* @__PURE__ */ jsxs("span", { className: "text-sm text-muted-foreground", children: [
|
|
16119
|
+
"Page ",
|
|
16120
|
+
braidPage,
|
|
16121
|
+
" of ",
|
|
16122
|
+
braidTotalPages
|
|
16123
|
+
] }),
|
|
16124
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-1", children: [
|
|
16125
|
+
/* @__PURE__ */ jsx(
|
|
16126
|
+
Button,
|
|
16127
|
+
{
|
|
16128
|
+
variant: "outline",
|
|
16129
|
+
size: "sm",
|
|
16130
|
+
onClick: () => setBraidPage(Math.max(1, braidPage - 1)),
|
|
16131
|
+
disabled: braidPage === 1,
|
|
16132
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" })
|
|
16133
|
+
}
|
|
16134
|
+
),
|
|
16135
|
+
/* @__PURE__ */ jsx(
|
|
16136
|
+
Button,
|
|
16137
|
+
{
|
|
16138
|
+
variant: "outline",
|
|
16139
|
+
size: "sm",
|
|
16140
|
+
onClick: () => setBraidPage(Math.min(braidTotalPages, braidPage + 1)),
|
|
16141
|
+
disabled: braidPage === braidTotalPages,
|
|
16142
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
|
|
16143
|
+
}
|
|
16144
|
+
)
|
|
16145
|
+
] })
|
|
16146
|
+
] })
|
|
16147
|
+
] })
|
|
16148
|
+
] })
|
|
16149
|
+
] }),
|
|
16150
|
+
/* @__PURE__ */ jsxs(Card, { className: "flex flex-col", children: [
|
|
16151
|
+
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, { className: "text-lg", children: [
|
|
16152
|
+
"Fed Settlement Records (",
|
|
16153
|
+
fedData.length,
|
|
16154
|
+
")"
|
|
16155
|
+
] }) }),
|
|
16156
|
+
/* @__PURE__ */ jsxs(CardContent, { className: "flex flex-col flex-1", children: [
|
|
16157
|
+
/* @__PURE__ */ jsx("div", { className: "rounded-md border flex-1 overflow-auto", children: /* @__PURE__ */ jsxs(Table, { children: [
|
|
16158
|
+
/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
16159
|
+
/* @__PURE__ */ jsx(TableHead, { className: "w-12" }),
|
|
16160
|
+
/* @__PURE__ */ jsx(TableHead, { children: "Amount" }),
|
|
16161
|
+
/* @__PURE__ */ jsx(TableHead, { children: "Settlement Date" }),
|
|
16162
|
+
/* @__PURE__ */ jsx(TableHead, { children: "Receiver Account" })
|
|
16163
|
+
] }) }),
|
|
16164
|
+
/* @__PURE__ */ jsx(TableBody, { children: fedData.length === 0 ? /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, { colSpan: 4, className: "text-center text-muted-foreground", children: "No settlements found" }) }) : fedPaginatedData.map((settlement) => /* @__PURE__ */ jsxs(
|
|
16165
|
+
TableRow,
|
|
16166
|
+
{
|
|
16167
|
+
className: selectedFed === settlement.id ? "bg-muted" : "",
|
|
16168
|
+
children: [
|
|
16169
|
+
/* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(
|
|
16170
|
+
"input",
|
|
16171
|
+
{
|
|
16172
|
+
type: "radio",
|
|
16173
|
+
name: "fed-select",
|
|
16174
|
+
checked: selectedFed === settlement.id,
|
|
16175
|
+
onChange: () => setSelectedFed(settlement.id),
|
|
16176
|
+
className: "w-4 h-4 text-primary cursor-pointer"
|
|
16177
|
+
}
|
|
16178
|
+
) }),
|
|
16179
|
+
/* @__PURE__ */ jsxs(TableCell, { className: "font-medium", children: [
|
|
16180
|
+
"$",
|
|
16181
|
+
settlement.amount.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })
|
|
16182
|
+
] }),
|
|
16183
|
+
/* @__PURE__ */ jsx(TableCell, { children: format(new Date(settlement.settlementDate), "MMM dd, yyyy") }),
|
|
16184
|
+
/* @__PURE__ */ jsx(TableCell, { className: "font-mono text-sm", children: settlement.receiverAccount })
|
|
16185
|
+
]
|
|
16186
|
+
},
|
|
16187
|
+
settlement.id
|
|
16188
|
+
)) })
|
|
16189
|
+
] }) }),
|
|
16190
|
+
fedData.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-2 py-4", children: [
|
|
16191
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
16192
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "Rows per page:" }),
|
|
16193
|
+
/* @__PURE__ */ jsxs(
|
|
16194
|
+
"select",
|
|
16195
|
+
{
|
|
16196
|
+
value: fedRowsPerPage,
|
|
16197
|
+
onChange: (e) => {
|
|
16198
|
+
setFedRowsPerPage(Number(e.target.value));
|
|
16199
|
+
setFedPage(1);
|
|
16200
|
+
},
|
|
16201
|
+
className: "h-8 w-16 rounded-md border border-input bg-background px-2 text-sm",
|
|
16202
|
+
children: [
|
|
16203
|
+
/* @__PURE__ */ jsx("option", { value: 10, children: "10" }),
|
|
16204
|
+
/* @__PURE__ */ jsx("option", { value: 25, children: "25" }),
|
|
16205
|
+
/* @__PURE__ */ jsx("option", { value: 50, children: "50" })
|
|
16206
|
+
]
|
|
16207
|
+
}
|
|
16208
|
+
)
|
|
16209
|
+
] }),
|
|
16210
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
16211
|
+
/* @__PURE__ */ jsxs("span", { className: "text-sm text-muted-foreground", children: [
|
|
16212
|
+
"Page ",
|
|
16213
|
+
fedPage,
|
|
16214
|
+
" of ",
|
|
16215
|
+
fedTotalPages
|
|
16216
|
+
] }),
|
|
16217
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-1", children: [
|
|
16218
|
+
/* @__PURE__ */ jsx(
|
|
16219
|
+
Button,
|
|
16220
|
+
{
|
|
16221
|
+
variant: "outline",
|
|
16222
|
+
size: "sm",
|
|
16223
|
+
onClick: () => setFedPage(Math.max(1, fedPage - 1)),
|
|
16224
|
+
disabled: fedPage === 1,
|
|
16225
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" })
|
|
16226
|
+
}
|
|
16227
|
+
),
|
|
16228
|
+
/* @__PURE__ */ jsx(
|
|
16229
|
+
Button,
|
|
16230
|
+
{
|
|
16231
|
+
variant: "outline",
|
|
16232
|
+
size: "sm",
|
|
16233
|
+
onClick: () => setFedPage(Math.min(fedTotalPages, fedPage + 1)),
|
|
16234
|
+
disabled: fedPage === fedTotalPages,
|
|
16235
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
|
|
16236
|
+
}
|
|
16237
|
+
)
|
|
16238
|
+
] })
|
|
16239
|
+
] })
|
|
16240
|
+
] })
|
|
16241
|
+
] })
|
|
16242
|
+
] })
|
|
16243
|
+
] }),
|
|
16244
|
+
/* @__PURE__ */ jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx(
|
|
16245
|
+
Button,
|
|
16246
|
+
{
|
|
16247
|
+
size: "lg",
|
|
16248
|
+
onClick: handleMatch,
|
|
16249
|
+
disabled: !canMatch,
|
|
16250
|
+
className: "min-w-[200px]",
|
|
16251
|
+
children: "Match Selected"
|
|
16252
|
+
}
|
|
16253
|
+
) })
|
|
16254
|
+
] })
|
|
16255
|
+
] }) });
|
|
16256
|
+
}
|
|
14714
16257
|
|
|
14715
|
-
export { ACHBankCard, ACHBasicInfoCard, ACHDetailsSection, ACHTransferSection, AccountCard, AccountDetail_default as AccountDetail, Accounts_default as Accounts, AddressForm, AlertDetail_default as AlertDetail, AlertDetailRouter, AlertDocuments, AlertHeaderControls, AlertNotes, AlertTimeline, Alerts_default as Alerts, AppSidebar, Badge, BankAddressCard, BankingDetailsCard, BasicInfoCard, BasicInfoSection, BeneficiaryAddress, BeneficiaryCard, BeneficiaryDomesticWire, Breadcrumb, BusinessDetail_default as BusinessDetail, BusinessDetailView, BusinessFiltersSheet, BusinessProfileCard, BusinessStatusCard, BusinessTypeBadge, Businesses_default as Businesses, Button, CIPStatusBadge, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Cases_default as Cases, Checkbox, ContactInfoCard, Container, ContextSection, Counterparties_default as Counterparties, CounterpartiesView, CounterpartyBasicInfo, CounterpartyDetail_default as CounterpartyDetail, CounterpartyDetailView, CounterpartyProfileCard, CounterpartyRecordsCard, CounterpartyTypeBadge, Create_default as CreateBusiness, CreateBusinessView, Create_default2 as CreateCounterparty, Create_default3 as CreateIndividual, Dashboard_default as Dashboard, DashboardDemo, DataGrid, DataTable, DetailPageLayout, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EditableFormCard, EditableInfoField, EnhancedInput, EnhancedSelect, EnhancedTextarea, EntityCard, FormCard, FormField, FormInput, FormProvider, FormSection, FormSelect, IndividualDetail_default as IndividualDetail, Individuals_default as Individuals, InfoField, IntermediaryCard, IntermediaryFI, IntermediaryFIAddress, JsonViewer, Label, ListPage, MainLayout, MetricCard, NewTransaction, NotFound_default as NotFound,
|
|
16258
|
+
export { ACHBankCard, ACHBasicInfoCard, ACHDetailsSection, ACHTransferSection, AccountCard, AccountDetail_default as AccountDetail, Accounts_default as Accounts, AddressForm, AlertDetail_default as AlertDetail, AlertDetailRouter, AlertDocuments, AlertHeaderControls, AlertNotes, AlertTimeline, Alerts_default as Alerts, AppSidebar, Badge, BankAddressCard, BankingDetailsCard, BasicInfoCard, BasicInfoSection, BeneficiaryAddress, BeneficiaryCard, BeneficiaryDomesticWire, Breadcrumb, BusinessDetail_default as BusinessDetail, BusinessDetailView, BusinessFiltersSheet, BusinessProfileCard, BusinessStatusCard, BusinessTypeBadge, Businesses_default as Businesses, Button, CIPStatusBadge, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Cases_default as Cases, Checkbox, ContactInfoCard, Container, ContextSection, Counterparties_default as Counterparties, CounterpartiesView, CounterpartyBasicInfo, CounterpartyDetail_default as CounterpartyDetail, CounterpartyDetailView, CounterpartyProfileCard, CounterpartyRecordsCard, CounterpartyTypeBadge, Create_default as CreateBusiness, CreateBusinessView, Create_default2 as CreateCounterparty, Create_default3 as CreateIndividual, CreateVelocityLimit, Dashboard_default as Dashboard, DashboardDemo, DataGrid, DataTable, DetailPageLayout, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EditableFormCard, EditableInfoField, EnhancedInput, EnhancedSelect, EnhancedTextarea, EntityCard, FormCard, FormField, FormInput, FormProvider, FormSection, FormSelect, IndividualDetail_default as IndividualDetail, Individuals_default as Individuals, InfoField, IntermediaryCard, IntermediaryFI, IntermediaryFIAddress, JsonViewer, Label, ListPage, MainLayout, MetricCard, NewTransaction, NotFound_default as NotFound, OFACAlertView, OriginatorCard, OriginatorFI, OriginatorFIAddress, PageLayout, PatternLibrary, PaymentInformationSection, Popover, PopoverContent, PopoverTrigger, ReceiverCard, ReconExceptions, ReconUpload, ResolveAlertDialog, ResponsiveGrid, ScrollArea, ScrollBar, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Stack, Statement, StatementHeader, StatementView, StatusBadge, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransactionDetail_default as TransactionDetail, TransactionHistory_default as TransactionHistory, TransactionTypeBadge, UIKit, UIKitShowcase, VelocityLimitDetail, VelocityLimits, WireDetailsSection, WireTransferSection, badgeVariants, buttonVariants, cardVariants, downloadCSV, generateStatementCSV, inputVariants, reducer, textareaVariants, toast, useAlertDetail, useCounterpartyEntity, useEditState, useFormWithEditState, useIsMobile, useSidebar, useToast };
|
|
14716
16259
|
//# sourceMappingURL=index.js.map
|
|
14717
16260
|
//# sourceMappingURL=index.js.map
|