braid-ui 1.0.67 → 1.0.68

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/index.js CHANGED
@@ -4,10 +4,13 @@ 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, Clock, XCircle, CheckCircle, Ban, Circle, Wallet, Filter, User, Loader2, Pencil, CheckCircle2, ArrowDownRight, ArrowUpRight, ArrowLeft, StickyNote, FileUp, RotateCcw, Send, PlayCircle, UserPlus, ChevronsUpDown, ArrowRightLeft, UserCheck, CalendarIcon, CircleDollarSign, PiggyBank, Package, File, 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, Loader2, EyeOff, ChevronLeft, AlertTriangle, Clock, XCircle, CheckCircle, Ban, Circle, Wallet, Filter, User, Pencil, CheckCircle2, ArrowDownRight, ArrowUpRight, ArrowLeft, StickyNote, FileUp, RotateCcw, Send, PlayCircle, UserPlus, ChevronsUpDown, ArrowRightLeft, ZoomOut, ZoomIn, UserCheck, CalendarIcon, CircleDollarSign, PiggyBank, 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';
11
+ import { pdfjs, Document, Page } from 'react-pdf';
12
+ import 'react-pdf/dist/Page/AnnotationLayer.css';
13
+ import 'react-pdf/dist/Page/TextLayer.css';
11
14
  import { NavLink, useLocation, useNavigate, useSearchParams, useParams, Link } from 'react-router-dom';
12
15
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
13
16
  import * as DialogPrimitive from '@radix-ui/react-dialog';
@@ -223,7 +226,7 @@ var CardFooter = React15.forwardRef(
223
226
  );
224
227
  CardFooter.displayName = "CardFooter";
225
228
  var FormCard = React15.forwardRef(
226
- ({ title, description, children, headerActions, className, variant = "default", ...props }, ref) => /* @__PURE__ */ jsxs(
229
+ ({ title, titleBadge, description, children, headerActions, className, variant = "default", ...props }, ref) => /* @__PURE__ */ jsxs(
227
230
  Card,
228
231
  {
229
232
  ref,
@@ -238,7 +241,10 @@ var FormCard = React15.forwardRef(
238
241
  direction: headerActions ? "row" : "column",
239
242
  size: "sm",
240
243
  children: [
241
- /* @__PURE__ */ jsx("div", { className: "space-y-1", children: /* @__PURE__ */ jsx(CardTitle, { size: "md", children: title }) }),
244
+ /* @__PURE__ */ jsx("div", { className: "space-y-1", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
245
+ /* @__PURE__ */ jsx(CardTitle, { size: "md", children: title }),
246
+ titleBadge
247
+ ] }) }),
242
248
  headerActions && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: headerActions })
243
249
  ]
244
250
  }
@@ -825,6 +831,92 @@ var EnhancedInput = React15.forwardRef(
825
831
  }
826
832
  );
827
833
  EnhancedInput.displayName = "EnhancedInput";
834
+ pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/build/pdf.worker.min.mjs`;
835
+ var PDFViewer = ({ url, className }) => {
836
+ const [numPages, setNumPages] = useState(0);
837
+ const [pageNumber, setPageNumber] = useState(1);
838
+ const [scale, setScale] = useState(1);
839
+ const [isLoading, setIsLoading] = useState(true);
840
+ const onDocumentLoadSuccess = ({ numPages: numPages2 }) => {
841
+ setNumPages(numPages2);
842
+ setPageNumber(1);
843
+ setIsLoading(false);
844
+ };
845
+ const onDocumentLoadError = () => {
846
+ setIsLoading(false);
847
+ };
848
+ return /* @__PURE__ */ jsxs("div", { className, children: [
849
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between p-3 border-b bg-muted/50", children: [
850
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
851
+ /* @__PURE__ */ jsx(
852
+ Button,
853
+ {
854
+ variant: "outline",
855
+ size: "sm",
856
+ onClick: () => setPageNumber((p) => Math.max(1, p - 1)),
857
+ disabled: pageNumber <= 1 || isLoading,
858
+ children: /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" })
859
+ }
860
+ ),
861
+ /* @__PURE__ */ jsx("span", { className: "text-sm min-w-[100px] text-center", children: isLoading ? "Loading..." : `Page ${pageNumber} of ${numPages}` }),
862
+ /* @__PURE__ */ jsx(
863
+ Button,
864
+ {
865
+ variant: "outline",
866
+ size: "sm",
867
+ onClick: () => setPageNumber((p) => Math.min(numPages, p + 1)),
868
+ disabled: pageNumber >= numPages || isLoading,
869
+ children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
870
+ }
871
+ )
872
+ ] }),
873
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
874
+ /* @__PURE__ */ jsx(
875
+ Button,
876
+ {
877
+ variant: "outline",
878
+ size: "sm",
879
+ onClick: () => setScale((s) => Math.max(0.5, s - 0.25)),
880
+ disabled: scale <= 0.5 || isLoading,
881
+ children: /* @__PURE__ */ jsx(ZoomOut, { className: "h-4 w-4" })
882
+ }
883
+ ),
884
+ /* @__PURE__ */ jsxs("span", { className: "text-sm w-16 text-center", children: [
885
+ Math.round(scale * 100),
886
+ "%"
887
+ ] }),
888
+ /* @__PURE__ */ jsx(
889
+ Button,
890
+ {
891
+ variant: "outline",
892
+ size: "sm",
893
+ onClick: () => setScale((s) => Math.min(2, s + 0.25)),
894
+ disabled: scale >= 2 || isLoading,
895
+ children: /* @__PURE__ */ jsx(ZoomIn, { className: "h-4 w-4" })
896
+ }
897
+ )
898
+ ] })
899
+ ] }),
900
+ /* @__PURE__ */ jsx("div", { className: "overflow-auto flex justify-center p-4 bg-muted/30 min-h-[400px]", children: /* @__PURE__ */ jsx(
901
+ Document,
902
+ {
903
+ file: url,
904
+ onLoadSuccess: onDocumentLoadSuccess,
905
+ onLoadError: onDocumentLoadError,
906
+ loading: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-16", children: /* @__PURE__ */ jsx(Loader2, { className: "h-8 w-8 animate-spin text-muted-foreground" }) }),
907
+ error: /* @__PURE__ */ jsx("div", { className: "text-center py-16 text-destructive", children: "Failed to load PDF. Please try downloading the file instead." }),
908
+ children: /* @__PURE__ */ jsx(
909
+ Page,
910
+ {
911
+ pageNumber,
912
+ scale,
913
+ loading: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-16", children: /* @__PURE__ */ jsx(Loader2, { className: "h-6 w-6 animate-spin text-muted-foreground" }) })
914
+ }
915
+ )
916
+ }
917
+ ) })
918
+ ] });
919
+ };
828
920
  var AlertDocuments = ({ alertId, documents }) => {
829
921
  const [isUploading, setIsUploading] = useState(false);
830
922
  const [showUploadDialog, setShowUploadDialog] = useState(false);
@@ -832,6 +924,14 @@ var AlertDocuments = ({ alertId, documents }) => {
832
924
  const [documentName, setDocumentName] = useState("");
833
925
  const [description, setDescription] = useState("");
834
926
  const [documentType, setDocumentType] = useState("");
927
+ const [viewingDocument, setViewingDocument] = useState(null);
928
+ const isPdfType = (name) => name.toLowerCase().endsWith(".pdf");
929
+ const handleDownload = (doc) => {
930
+ if (doc.url) {
931
+ window.open(doc.url, "_blank");
932
+ }
933
+ toast({ title: "Download", description: `Downloading ${doc.name}` });
934
+ };
835
935
  const handleFileSelect = (e) => {
836
936
  const file = e.target.files?.[0];
837
937
  if (!file) return;
@@ -1082,7 +1182,7 @@ var AlertDocuments = ({ alertId, documents }) => {
1082
1182
  variant: "ghost",
1083
1183
  size: "sm",
1084
1184
  className: "h-8 w-8 p-0",
1085
- onClick: () => toast({ title: "Preview", description: `Viewing ${doc.name}` }),
1185
+ onClick: () => setViewingDocument(doc),
1086
1186
  children: /* @__PURE__ */ jsx(Eye, { className: "h-4 w-4" })
1087
1187
  }
1088
1188
  ),
@@ -1112,14 +1212,68 @@ var AlertDocuments = ({ alertId, documents }) => {
1112
1212
  },
1113
1213
  doc.id
1114
1214
  )) })
1115
- ] })
1215
+ ] }),
1216
+ viewingDocument && createPortal(
1217
+ /* @__PURE__ */ jsxs("div", { className: "fixed inset-0 z-[100] flex items-center justify-center p-4", children: [
1218
+ /* @__PURE__ */ jsx(
1219
+ "div",
1220
+ {
1221
+ className: "fixed inset-0 bg-background/80 backdrop-blur-sm",
1222
+ onClick: () => setViewingDocument(null)
1223
+ }
1224
+ ),
1225
+ /* @__PURE__ */ jsxs("div", { className: "relative bg-card border rounded-lg shadow-lg max-w-4xl w-full max-h-[90vh] overflow-hidden z-[101]", children: [
1226
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between p-4 border-b", children: [
1227
+ /* @__PURE__ */ jsxs("div", { children: [
1228
+ /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold", children: viewingDocument.name }),
1229
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: viewingDocument.type })
1230
+ ] }),
1231
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
1232
+ /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", onClick: () => handleDownload(viewingDocument), children: [
1233
+ /* @__PURE__ */ jsx(Download, { className: "h-4 w-4 mr-2" }),
1234
+ " Download"
1235
+ ] }),
1236
+ /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", className: "h-8 w-8 p-0", onClick: () => setViewingDocument(null), children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }) })
1237
+ ] })
1238
+ ] }),
1239
+ /* @__PURE__ */ jsx("div", { className: "p-4 overflow-auto max-h-[calc(90vh-120px)]", children: isImageType(viewingDocument.name) && viewingDocument.url ? /* @__PURE__ */ jsx(
1240
+ "img",
1241
+ {
1242
+ src: viewingDocument.url,
1243
+ alt: viewingDocument.name,
1244
+ className: "max-w-full h-auto mx-auto rounded-lg"
1245
+ }
1246
+ ) : isPdfType(viewingDocument.name) && viewingDocument.url ? /* @__PURE__ */ jsx(
1247
+ PDFViewer,
1248
+ {
1249
+ url: viewingDocument.url,
1250
+ className: "w-full h-[70vh] rounded-lg border overflow-hidden"
1251
+ }
1252
+ ) : /* @__PURE__ */ jsxs("div", { className: "text-center py-12", children: [
1253
+ /* @__PURE__ */ jsx(FileText, { className: "h-16 w-16 mx-auto mb-4 text-muted-foreground" }),
1254
+ /* @__PURE__ */ jsx("p", { className: "text-lg font-medium", children: viewingDocument.name }),
1255
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-2", children: "Preview not available for this file type" }),
1256
+ viewingDocument.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground mt-4", children: viewingDocument.description }),
1257
+ /* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground mt-4", children: [
1258
+ "Size: ",
1259
+ viewingDocument.size,
1260
+ " \u2022 Uploaded by ",
1261
+ viewingDocument.uploadedBy,
1262
+ " \u2022 ",
1263
+ new Date(viewingDocument.uploadedAt).toLocaleDateString()
1264
+ ] })
1265
+ ] }) })
1266
+ ] })
1267
+ ] }),
1268
+ document.body
1269
+ )
1116
1270
  ] });
1117
1271
  };
1118
1272
  var InfoField = ({ label, value, layout = "vertical", className }) => {
1119
1273
  if (layout === "horizontal") {
1120
1274
  return /* @__PURE__ */ jsxs("div", { className: `flex items-start gap-3 ${className || ""}`, children: [
1121
1275
  label && /* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-muted-foreground flex-shrink-0 max-w-[50%]", children: label }),
1122
- /* @__PURE__ */ jsx("div", { className: "text-sm text-foreground flex-1 min-w-0 break-words", children: value })
1276
+ /* @__PURE__ */ jsx("div", { className: "text-sm text-foreground flex-1 min-w-0 break-all overflow-hidden", children: value })
1123
1277
  ] });
1124
1278
  }
1125
1279
  if (layout === "compact") {
@@ -1655,6 +1809,22 @@ var ASSIGNEE_OPTIONS = [
1655
1809
  { value: "approverdev", label: "approverdev" },
1656
1810
  { value: "Unassigned", label: "Unassigned" }
1657
1811
  ];
1812
+ var BUSINESS_STATUS_OPTIONS = [
1813
+ { value: "active", label: "Active" },
1814
+ { value: "inactive", label: "Inactive" },
1815
+ { value: "suspended", label: "Suspended" }
1816
+ ];
1817
+ var BUSINESS_ENTITY_TYPE_OPTIONS = [
1818
+ { value: "SOLE_PROPRIETOR", label: "Sole Proprietor" },
1819
+ { value: "LIMITED_LIABILITY_COMPANY", label: "Limited Liability Company (LLC)" },
1820
+ { value: "CORPORATION", label: "S or C Corporation" },
1821
+ { value: "GENERAL_PARTNERSHIP", label: "General Partnership" },
1822
+ { value: "LIMITED_LIABILITY_PARTNERSHIP", label: "Limited Liability Partnership" },
1823
+ { value: "NON_PROFIT", label: "Non-Profit Corporation" },
1824
+ { value: "GOVERNMENT_ORGANIZATION", label: "Government Organization" },
1825
+ { value: "PUBLICLY_TRADED_COMPANY", label: "Publicly Traded Company" },
1826
+ { value: "TRUSTS", label: "Trusts" }
1827
+ ];
1658
1828
 
1659
1829
  // src/lib/utils/alert-utils.ts
1660
1830
  var getTypeBadgeVariant = (type) => {
@@ -1833,6 +2003,7 @@ var FormProvider = ({
1833
2003
  };
1834
2004
  var FormInput = ({
1835
2005
  name,
2006
+ type,
1836
2007
  ...props
1837
2008
  }) => {
1838
2009
  const { control, formState } = useFormContext();
@@ -1842,11 +2013,21 @@ var FormInput = ({
1842
2013
  {
1843
2014
  name,
1844
2015
  control,
1845
- render: ({ field }) => /* @__PURE__ */ jsx(
2016
+ render: ({ field: { onChange, value, ...restField } }) => /* @__PURE__ */ jsx(
1846
2017
  EnhancedInput,
1847
2018
  {
1848
2019
  ...props,
1849
- ...field,
2020
+ ...restField,
2021
+ type,
2022
+ value: value ?? (type === "number" ? "" : ""),
2023
+ onChange: (e) => {
2024
+ if (type === "number") {
2025
+ const val = e.target.value;
2026
+ onChange(val === "" ? void 0 : parseFloat(val));
2027
+ } else {
2028
+ onChange(e.target.value);
2029
+ }
2030
+ },
1850
2031
  error
1851
2032
  }
1852
2033
  )
@@ -3302,35 +3483,25 @@ z.object({
3302
3483
  intermediaryFI: intermediaryFISchema.optional()
3303
3484
  });
3304
3485
  var businessProfileSchema = z.object({
3305
- // Required fields
3306
- name: z.string().min(1, "Business name is required"),
3307
- productId: z.number().min(1, "Product ID is required"),
3308
- businessIdType: z.string().min(1, "ID Number type is required"),
3309
- // EIN, SSN, TIN, OTHER_ID
3310
- idNumber: z.string().min(1, "ID Number is required"),
3311
- // Optional fields
3486
+ // All fields optional for flexible updates
3487
+ name: z.string().optional(),
3488
+ productId: z.number().optional(),
3489
+ businessIdType: z.string().optional(),
3490
+ idNumber: z.string().optional(),
3312
3491
  dba: z.string().optional(),
3313
3492
  businessEntityType: z.string().optional(),
3314
- // Company type
3315
3493
  incorporationState: z.string().optional(),
3316
3494
  formationDate: z.string().optional(),
3317
3495
  website: z.string().optional(),
3318
3496
  achCompanyId: z.string().optional(),
3319
- // Optional fields with pattern validation
3320
- mcc: z.string().regex(/^\d{4}$/, "MCC must be 4 digits").optional().or(z.literal("")),
3321
- naics: z.string().regex(/^\d{6}$/, "NAICS must be 6 digits").optional().or(z.literal("")),
3322
- mobilePhone: z.string().regex(
3323
- /^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/im,
3324
- "Invalid phone number format"
3325
- ).optional().or(z.literal("")),
3326
- // Contact person information (optional)
3497
+ mcc: z.string().optional(),
3498
+ naics: z.string().optional(),
3499
+ mobilePhone: z.string().optional(),
3327
3500
  contactPersonFirstName: z.string().optional(),
3328
3501
  contactPersonLastName: z.string().optional(),
3329
3502
  contactPersonEmail: z.string().optional(),
3330
3503
  contactPersonPhone: z.string().optional(),
3331
- // Address (optional)
3332
3504
  address: addressSchema.optional(),
3333
- // Submitted by object (optional)
3334
3505
  submittedBy: z.object({
3335
3506
  contactPersonEmail: z.string().optional(),
3336
3507
  contactPersonFirstName: z.string().optional(),
@@ -3391,7 +3562,14 @@ var BusinessProfileCard = ({
3391
3562
  isEditing,
3392
3563
  onToggleEdit,
3393
3564
  className,
3394
- hideActions
3565
+ hideActions,
3566
+ onProductIdClick,
3567
+ onRevealIdNumber,
3568
+ isIdNumberRevealed,
3569
+ onToggleIdNumberVisibility,
3570
+ isLoadingIdNumber,
3571
+ revealedIdNumber,
3572
+ businessEntityTypeOptions = []
3395
3573
  }) => {
3396
3574
  const [showResultDialog, setShowResultDialog] = useState(false);
3397
3575
  const form = useFormWithEditState({
@@ -3426,17 +3604,7 @@ var BusinessProfileCard = ({
3426
3604
  name: "businessEntityType",
3427
3605
  label: "Business Entity Type",
3428
3606
  placeholder: "Select business type",
3429
- options: [
3430
- { value: "SOLE_PROPRIETOR", label: "Sole Proprietor" },
3431
- { value: "LIMITED_LIABILITY_COMPANY", label: "Limited Liability Company (LLC)" },
3432
- { value: "CORPORATION", label: "S or C Corporation" },
3433
- { value: "GENERAL_PARTNERSHIP", label: "General Partnership" },
3434
- { value: "LIMITED_LIABILITY_PARTNERSHIP", label: "Limited Liability Partnership" },
3435
- { value: "NON_PROFIT", label: "Non-Profit Corporation" },
3436
- { value: "GOVERNMENT_ORGANIZATION", label: "Government Organization" },
3437
- { value: "PUBLICLY_TRADED_COMPANY", label: "Publicly Traded Company" },
3438
- { value: "TRUSTS", label: "Trusts" }
3439
- ]
3607
+ options: businessEntityTypeOptions
3440
3608
  }
3441
3609
  ),
3442
3610
  /* @__PURE__ */ jsx(
@@ -3635,7 +3803,26 @@ var BusinessProfileCard = ({
3635
3803
  ] }),
3636
3804
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
3637
3805
  /* @__PURE__ */ jsx(InfoField, { label: "Business Entity Type", value: formValues?.businessEntityType || "-", layout: "horizontal" }),
3638
- /* @__PURE__ */ jsx(InfoField, { label: "ID Number", value: formValues?.idNumber || "-", layout: "horizontal" })
3806
+ /* @__PURE__ */ jsx(
3807
+ InfoField,
3808
+ {
3809
+ label: "ID Number",
3810
+ value: onToggleIdNumberVisibility ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
3811
+ isLoadingIdNumber ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin text-muted-foreground" }) : /* @__PURE__ */ jsx("span", { children: isIdNumberRevealed && revealedIdNumber ? revealedIdNumber : "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" }),
3812
+ /* @__PURE__ */ jsx(
3813
+ "button",
3814
+ {
3815
+ type: "button",
3816
+ onClick: onToggleIdNumberVisibility,
3817
+ className: "text-muted-foreground hover:text-foreground transition-colors",
3818
+ disabled: isLoadingIdNumber,
3819
+ children: isIdNumberRevealed ? /* @__PURE__ */ jsx(Eye, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(EyeOff, { className: "h-4 w-4" })
3820
+ }
3821
+ )
3822
+ ] }) : formValues?.idNumber || "-",
3823
+ layout: "horizontal"
3824
+ }
3825
+ )
3639
3826
  ] }),
3640
3827
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
3641
3828
  /* @__PURE__ */ jsx(InfoField, { label: "Formation Date", value: formValues?.formationDate || "-", layout: "horizontal" }),
@@ -3672,7 +3859,22 @@ var BusinessProfileCard = ({
3672
3859
  ] }),
3673
3860
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
3674
3861
  /* @__PURE__ */ jsx(InfoField, { label: "ACH Company ID", value: formValues?.achCompanyId || "-", layout: "horizontal" }),
3675
- /* @__PURE__ */ jsx(InfoField, { label: "Product ID", value: formValues?.productId?.toString() || "-", layout: "horizontal" })
3862
+ /* @__PURE__ */ jsx(
3863
+ InfoField,
3864
+ {
3865
+ label: "Product ID",
3866
+ value: formValues?.productId && onProductIdClick ? /* @__PURE__ */ jsx(
3867
+ "button",
3868
+ {
3869
+ type: "button",
3870
+ onClick: () => onProductIdClick(formValues.productId),
3871
+ className: "text-primary hover:underline font-medium",
3872
+ children: formValues.productId
3873
+ }
3874
+ ) : formValues?.productId?.toString() || "-",
3875
+ layout: "horizontal"
3876
+ }
3877
+ )
3676
3878
  ] }),
3677
3879
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
3678
3880
  /* @__PURE__ */ jsx(
@@ -4237,7 +4439,7 @@ var PageLayout = React15.forwardRef(
4237
4439
  });
4238
4440
  };
4239
4441
  return /* @__PURE__ */ jsxs("div", { ref, className: "flex flex-col h-screen bg-gradient-subtle", children: [
4240
- /* @__PURE__ */ jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsx("div", { className: cn("container mx-auto px-4 py-6", maxWidthClasses[maxWidth]), children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4", children: [
4442
+ /* @__PURE__ */ jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsx("div", { className: cn("container mx-auto px-4 py-4", maxWidthClasses[maxWidth]), children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4", children: [
4241
4443
  /* @__PURE__ */ jsxs("div", { className: "flex-1 min-h-[2.5rem]", children: [
4242
4444
  /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold text-foreground", children: title }),
4243
4445
  description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: description })
@@ -4462,21 +4664,19 @@ function DatePicker({
4462
4664
  return picker;
4463
4665
  }
4464
4666
  var uboSchema = z.object({
4465
- legalFirstName: z.string().min(1, "Legal first name is required"),
4466
- legalLastName: z.string().min(1, "Legal last name is required"),
4467
- email: z.string().email("Invalid email address"),
4468
- title: z.string().min(1, "Title is required"),
4469
- ownershipPercentage: z.number().min(0).max(100, "Must be between 0 and 100"),
4470
- idNumber: z.string().min(1, "ID number is required"),
4471
- ssn: z.string().min(1, "SSN is required"),
4472
- dateOfBirth: z.date({
4473
- message: "Date of birth is required"
4474
- }),
4475
- street: z.string().min(1, "Street is required"),
4667
+ legalFirstName: z.string().optional(),
4668
+ legalLastName: z.string().optional(),
4669
+ email: z.string().optional(),
4670
+ title: z.string().optional(),
4671
+ ownershipPercentage: z.number().min(0, "Must be at least 0%").max(100, "Must be at most 100%").optional(),
4672
+ idNumber: z.string().optional(),
4673
+ ssn: z.string().optional(),
4674
+ dateOfBirth: z.date().optional(),
4675
+ street: z.string().optional(),
4476
4676
  apartment: z.string().optional(),
4477
- city: z.string().min(1, "City is required"),
4478
- state: z.string().min(1, "State is required"),
4479
- country: z.string().min(1, "Country is required")
4677
+ city: z.string().optional(),
4678
+ state: z.string().optional(),
4679
+ country: z.string().optional()
4480
4680
  });
4481
4681
  var titleOptions = [
4482
4682
  { value: "CEO", label: "CEO" },
@@ -4660,18 +4860,24 @@ var AddUBODialog = ({ open, onOpenChange, onSubmit }) => {
4660
4860
  ] }) })
4661
4861
  ] }) });
4662
4862
  };
4663
- var UBOCard = ({ ubos, onUBOClick }) => {
4863
+ var UBOCard = ({ ubos, onUBOClick, onRemoveUBO }) => {
4664
4864
  const [isDialogOpen, setIsDialogOpen] = useState(false);
4665
4865
  const handleAddUBO = (data) => {
4666
4866
  console.log("New UBO data:", data);
4667
4867
  toast$1.success("UBO added successfully");
4668
4868
  };
4869
+ const handleRemoveUBO = (uboId, uboName) => {
4870
+ if (onRemoveUBO) {
4871
+ onRemoveUBO(uboId);
4872
+ toast$1.success(`${uboName} removed from UBOs`);
4873
+ }
4874
+ };
4669
4875
  const columns3 = [
4670
4876
  {
4671
4877
  key: "name",
4672
4878
  title: "Name",
4673
4879
  sortable: true,
4674
- width: "40%",
4880
+ width: "35%",
4675
4881
  render: (value, row) => /* @__PURE__ */ jsx(
4676
4882
  "button",
4677
4883
  {
@@ -4685,15 +4891,34 @@ var UBOCard = ({ ubos, onUBOClick }) => {
4685
4891
  key: "title",
4686
4892
  title: "Title",
4687
4893
  sortable: true,
4688
- width: "40%"
4894
+ width: "35%"
4689
4895
  },
4690
4896
  {
4691
4897
  key: "ownershipPercentage",
4692
4898
  title: "Ownership %",
4693
4899
  sortable: true,
4694
- width: "20%",
4900
+ width: "15%",
4695
4901
  align: "right",
4696
4902
  render: (value) => `${value}%`
4903
+ },
4904
+ {
4905
+ key: "actions",
4906
+ title: "",
4907
+ width: "15%",
4908
+ align: "right",
4909
+ render: (_, row) => /* @__PURE__ */ jsx(
4910
+ Button,
4911
+ {
4912
+ variant: "ghost",
4913
+ size: "sm",
4914
+ onClick: (e) => {
4915
+ e.stopPropagation();
4916
+ handleRemoveUBO(row.id, row.name);
4917
+ },
4918
+ className: "text-destructive hover:text-destructive hover:bg-destructive/10",
4919
+ children: /* @__PURE__ */ jsx(Trash2, { className: "h-4 w-4" })
4920
+ }
4921
+ )
4697
4922
  }
4698
4923
  ];
4699
4924
  return /* @__PURE__ */ jsxs(Card, { children: [
@@ -4827,6 +5052,14 @@ var BusinessDocuments = ({ businessId, documents, onDocumentUpload }) => {
4827
5052
  const [documentName, setDocumentName] = useState("");
4828
5053
  const [description, setDescription] = useState("");
4829
5054
  const [documentType, setDocumentType] = useState("");
5055
+ const [viewingDocument, setViewingDocument] = useState(null);
5056
+ const isPdfType = (name) => name.toLowerCase().endsWith(".pdf");
5057
+ const handleDownload = (doc) => {
5058
+ if (doc.url) {
5059
+ window.open(doc.url, "_blank");
5060
+ }
5061
+ toast({ title: "Download", description: `Downloading ${doc.name}` });
5062
+ };
4830
5063
  const handleFileSelect = (e) => {
4831
5064
  const file = e.target.files?.[0];
4832
5065
  if (!file) return;
@@ -5084,7 +5317,7 @@ var BusinessDocuments = ({ businessId, documents, onDocumentUpload }) => {
5084
5317
  variant: "ghost",
5085
5318
  size: "sm",
5086
5319
  className: "h-8 w-8 p-0",
5087
- onClick: () => toast({ title: "Preview", description: `Viewing ${doc.name}` }),
5320
+ onClick: () => setViewingDocument(doc),
5088
5321
  children: /* @__PURE__ */ jsx(Eye, { className: "h-4 w-4" })
5089
5322
  }
5090
5323
  ),
@@ -5113,7 +5346,61 @@ var BusinessDocuments = ({ businessId, documents, onDocumentUpload }) => {
5113
5346
  ]
5114
5347
  },
5115
5348
  doc.id
5116
- )) })
5349
+ )) }),
5350
+ viewingDocument && createPortal(
5351
+ /* @__PURE__ */ jsxs("div", { className: "fixed inset-0 z-[100] flex items-center justify-center p-4", children: [
5352
+ /* @__PURE__ */ jsx(
5353
+ "div",
5354
+ {
5355
+ className: "fixed inset-0 bg-background/80 backdrop-blur-sm",
5356
+ onClick: () => setViewingDocument(null)
5357
+ }
5358
+ ),
5359
+ /* @__PURE__ */ jsxs("div", { className: "relative bg-card border rounded-lg shadow-lg max-w-4xl w-full max-h-[90vh] overflow-hidden z-[101]", children: [
5360
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between p-4 border-b", children: [
5361
+ /* @__PURE__ */ jsxs("div", { children: [
5362
+ /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold", children: viewingDocument.name }),
5363
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: viewingDocument.type })
5364
+ ] }),
5365
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
5366
+ /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", onClick: () => handleDownload(viewingDocument), children: [
5367
+ /* @__PURE__ */ jsx(Download, { className: "h-4 w-4 mr-2" }),
5368
+ " Download"
5369
+ ] }),
5370
+ /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", className: "h-8 w-8 p-0", onClick: () => setViewingDocument(null), children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }) })
5371
+ ] })
5372
+ ] }),
5373
+ /* @__PURE__ */ jsx("div", { className: "p-4 overflow-auto max-h-[calc(90vh-120px)]", children: isImageType(viewingDocument.name) && viewingDocument.url ? /* @__PURE__ */ jsx(
5374
+ "img",
5375
+ {
5376
+ src: viewingDocument.url,
5377
+ alt: viewingDocument.name,
5378
+ className: "max-w-full h-auto mx-auto rounded-lg"
5379
+ }
5380
+ ) : isPdfType(viewingDocument.name) && viewingDocument.url ? /* @__PURE__ */ jsx(
5381
+ PDFViewer,
5382
+ {
5383
+ url: viewingDocument.url,
5384
+ className: "w-full h-[70vh] rounded-lg border overflow-hidden"
5385
+ }
5386
+ ) : /* @__PURE__ */ jsxs("div", { className: "text-center py-12", children: [
5387
+ /* @__PURE__ */ jsx(FileText, { className: "h-16 w-16 mx-auto mb-4 text-muted-foreground" }),
5388
+ /* @__PURE__ */ jsx("p", { className: "text-lg font-medium", children: viewingDocument.name }),
5389
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-2", children: "Preview not available for this file type" }),
5390
+ viewingDocument.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground mt-4", children: viewingDocument.description }),
5391
+ /* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground mt-4", children: [
5392
+ "Size: ",
5393
+ viewingDocument.size,
5394
+ " \u2022 Uploaded by ",
5395
+ viewingDocument.uploadedBy,
5396
+ " \u2022 ",
5397
+ new Date(viewingDocument.uploadedAt).toLocaleDateString()
5398
+ ] })
5399
+ ] }) })
5400
+ ] })
5401
+ ] }),
5402
+ document.body
5403
+ )
5117
5404
  ] })
5118
5405
  ] });
5119
5406
  };
@@ -5148,6 +5435,8 @@ var BusinessDetailView = ({
5148
5435
  businessAccounts,
5149
5436
  currentStatus,
5150
5437
  isEditingProfile,
5438
+ statusOptions,
5439
+ businessEntityTypeOptions,
5151
5440
  onStatusChange,
5152
5441
  onProfileDataChange,
5153
5442
  onToggleProfileEdit,
@@ -5155,7 +5444,14 @@ var BusinessDetailView = ({
5155
5444
  onNavigateToCounterparty,
5156
5445
  onAddAccount,
5157
5446
  onUBOClick,
5158
- onDocumentUpload
5447
+ onRemoveUBO,
5448
+ onDocumentUpload,
5449
+ onRevealIdNumber,
5450
+ isIdNumberRevealed,
5451
+ onToggleIdNumberVisibility,
5452
+ isLoadingIdNumber,
5453
+ revealedIdNumber,
5454
+ onProductIdClick
5159
5455
  }) => {
5160
5456
  const [showAddAccountDialog, setShowAddAccountDialog] = useState(false);
5161
5457
  const handleAddAccount = (data) => {
@@ -5171,11 +5467,7 @@ var BusinessDetailView = ({
5171
5467
  {
5172
5468
  label: "",
5173
5469
  value: currentStatus,
5174
- options: [
5175
- { value: "active", label: "Active" },
5176
- { value: "inactive", label: "Inactive" },
5177
- { value: "suspended", label: "Suspended" }
5178
- ],
5470
+ options: statusOptions,
5179
5471
  onChange: onStatusChange,
5180
5472
  renderValue: (value) => /* @__PURE__ */ jsx(StatusBadge, { status: value.toUpperCase() }),
5181
5473
  className: "inline-block"
@@ -5210,10 +5502,17 @@ var BusinessDetailView = ({
5210
5502
  identityVerification,
5211
5503
  isEditing: isEditingProfile,
5212
5504
  onToggleEdit: onToggleProfileEdit,
5213
- onDataChange: onProfileDataChange
5505
+ onDataChange: onProfileDataChange,
5506
+ onProductIdClick,
5507
+ onRevealIdNumber,
5508
+ isIdNumberRevealed,
5509
+ onToggleIdNumberVisibility,
5510
+ isLoadingIdNumber,
5511
+ revealedIdNumber,
5512
+ businessEntityTypeOptions
5214
5513
  }
5215
5514
  ),
5216
- /* @__PURE__ */ jsx(UBOCard, { ubos: businessUBOs, onUBOClick }),
5515
+ /* @__PURE__ */ jsx(UBOCard, { ubos: businessUBOs, onUBOClick, onRemoveUBO }),
5217
5516
  /* @__PURE__ */ jsxs(Card, { children: [
5218
5517
  /* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
5219
5518
  /* @__PURE__ */ jsx(CardTitle, { children: "External Accounts" }),
@@ -7022,7 +7321,7 @@ var BankingDetailsCard = ({ isEditing, onToggleEdit, className }) => {
7022
7321
  ] }) : /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon", onClick: onToggleEdit, className: "text-primary hover:text-primary/80 hover:bg-primary/10", children: /* @__PURE__ */ jsx(Edit, { className: "h-4 w-4" }) }) }),
7023
7322
  children: /* @__PURE__ */ jsx("div", { className: "space-y-3", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-2", children: [
7024
7323
  /* @__PURE__ */ jsx(InfoField, { label: "Primary Bank", value: "JPMorgan Chase", layout: "horizontal" }),
7025
- /* @__PURE__ */ jsx(InfoField, { label: "Account Number", value: "****-****-****-1234", layout: "horizontal" }),
7324
+ /* @__PURE__ */ jsx(InfoField, { label: "Account Number", value: "1234567890121234", layout: "horizontal" }),
7026
7325
  /* @__PURE__ */ jsx(InfoField, { label: "Routing Number", value: "021000021", layout: "horizontal" }),
7027
7326
  /* @__PURE__ */ jsx(InfoField, { label: "Account Type", value: "Business Checking", layout: "horizontal" })
7028
7327
  ] }) })
@@ -8234,28 +8533,52 @@ var StatementView = ({
8234
8533
  ] });
8235
8534
  };
8236
8535
  var ACHDetailsSection = ({ data }) => {
8237
- const formatCurrency5 = (value) => {
8238
- return new Intl.NumberFormat("en-US", {
8239
- style: "currency",
8240
- currency: "USD",
8241
- minimumFractionDigits: 2
8242
- }).format(value);
8536
+ const [copiedField, setCopiedField] = useState(null);
8537
+ const handleCopy = (value, field) => {
8538
+ navigator.clipboard.writeText(value);
8539
+ setCopiedField(field);
8540
+ setTimeout(() => setCopiedField(null), 2e3);
8243
8541
  };
8244
- return /* @__PURE__ */ jsxs(FormCard, { title: "ACH Transfer Details", children: [
8542
+ return /* @__PURE__ */ jsxs(FormCard, { title: "ACH Details", children: [
8245
8543
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-x-8 gap-y-4", children: [
8246
- /* @__PURE__ */ jsx(InfoField, { label: "Type", value: data.type, layout: "horizontal" }),
8247
8544
  /* @__PURE__ */ jsx(InfoField, { label: "Originator Name", value: data.originatorName, layout: "horizontal" }),
8248
- /* @__PURE__ */ jsx(InfoField, { label: "Originator Account Number", value: data.originatorAccountNumber, layout: "horizontal" }),
8249
8545
  /* @__PURE__ */ jsx(InfoField, { label: "Receiver Name", value: data.receiverName, layout: "horizontal" }),
8250
- /* @__PURE__ */ jsx(InfoField, { label: "Receiver Account Number", value: data.receiverAccountNumber, layout: "horizontal" }),
8251
- /* @__PURE__ */ jsx(InfoField, { label: "Receiver Routing Number", value: data.receiverRoutingNumber, layout: "horizontal" }),
8252
- /* @__PURE__ */ jsx(InfoField, { label: "Amount", value: formatCurrency5(data.amount), layout: "horizontal" }),
8546
+ /* @__PURE__ */ jsx(InfoField, { label: "Originator RTN", value: data.originatorRtn, layout: "horizontal" }),
8547
+ /* @__PURE__ */ jsx(InfoField, { label: "Receiver RTN", value: data.receiverRtn, layout: "horizontal" }),
8548
+ /* @__PURE__ */ jsx(InfoField, { label: "Originator ID", value: data.originatorId, layout: "horizontal" }),
8549
+ /* @__PURE__ */ jsx(InfoField, { label: "Receiver Account", value: data.receiverAccount, layout: "horizontal" }),
8253
8550
  /* @__PURE__ */ jsx(InfoField, { label: "SEC Code", value: data.secCode, layout: "horizontal" }),
8254
- /* @__PURE__ */ jsx(InfoField, { label: "Company Entry Description", value: data.companyEntryDescription, layout: "horizontal" }),
8255
- data.companyDiscretionaryData && /* @__PURE__ */ jsx(InfoField, { label: "Company Discretionary Data", value: data.companyDiscretionaryData, layout: "horizontal" }),
8256
- data.individualIdNumber && /* @__PURE__ */ jsx(InfoField, { label: "Individual ID Number", value: data.individualIdNumber, layout: "horizontal" }),
8257
- data.individualName && /* @__PURE__ */ jsx(InfoField, { label: "Individual Name", value: data.individualName, layout: "horizontal" }),
8258
- /* @__PURE__ */ jsx(InfoField, { label: "Trace Number", value: data.traceNumber, layout: "horizontal" })
8551
+ /* @__PURE__ */ jsx(InfoField, { label: "Account Type", value: data.accountType || "-", layout: "horizontal" }),
8552
+ /* @__PURE__ */ jsx(InfoField, { label: "Effective Date", value: data.effectiveDate || "-", layout: "horizontal" }),
8553
+ /* @__PURE__ */ jsx(InfoField, { label: "Service", value: data.service || "-", layout: "horizontal" }),
8554
+ /* @__PURE__ */ jsx(
8555
+ InfoField,
8556
+ {
8557
+ label: "Trace Number",
8558
+ value: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2", children: [
8559
+ /* @__PURE__ */ jsx("span", { className: "break-all", children: data.traceNumber }),
8560
+ /* @__PURE__ */ jsx(
8561
+ "button",
8562
+ {
8563
+ type: "button",
8564
+ onClick: () => handleCopy(data.traceNumber, "traceNumber"),
8565
+ className: "text-muted-foreground hover:text-foreground transition-colors flex-shrink-0",
8566
+ children: copiedField === "traceNumber" ? /* @__PURE__ */ jsx(Check, { className: "h-3.5 w-3.5 text-success" }) : /* @__PURE__ */ jsx(Copy, { className: "h-3.5 w-3.5" })
8567
+ }
8568
+ )
8569
+ ] }),
8570
+ layout: "horizontal"
8571
+ }
8572
+ ),
8573
+ /* @__PURE__ */ jsx(InfoField, { label: "Corrected Data", value: data.correctedData || "-", layout: "horizontal" }),
8574
+ /* @__PURE__ */ jsx(InfoField, { label: "Return Code", value: data.returnCode || "-", layout: "horizontal" }),
8575
+ /* @__PURE__ */ jsx(InfoField, { label: "Change Code", value: data.changeCode || "-", layout: "horizontal" }),
8576
+ /* @__PURE__ */ jsx(InfoField, { label: "Return Reason", value: data.returnReason || "-", layout: "horizontal" }),
8577
+ /* @__PURE__ */ jsx(InfoField, { label: "Change Reason", value: data.changeReason || "-", layout: "horizontal" }),
8578
+ /* @__PURE__ */ jsx(InfoField, { label: "Returned At", value: data.returnedAt || "-", layout: "horizontal" }),
8579
+ /* @__PURE__ */ jsx(InfoField, { label: "NOC At", value: data.nocAt || "-", layout: "horizontal" }),
8580
+ /* @__PURE__ */ jsx(InfoField, { label: "Addenda", value: data.addenda || "-", layout: "horizontal" }),
8581
+ /* @__PURE__ */ jsx(InfoField, { label: "IAT Addenda", value: data.iatAddenda || "-", layout: "horizontal" })
8259
8582
  ] }),
8260
8583
  data.raw && /* @__PURE__ */ jsx(CollapsibleRawSection, { data: data.raw })
8261
8584
  ] });
@@ -8281,6 +8604,7 @@ var CollapsibleRawSection = ({ data }) => {
8281
8604
  var WireDetailsSection = ({ data, onIMADChange }) => {
8282
8605
  const [isEditingImad, setIsEditingImad] = useState(false);
8283
8606
  const [imadValue, setImadValue] = useState(data.imad || "");
8607
+ const [copied, setCopied] = useState(null);
8284
8608
  const inputRef = useRef(null);
8285
8609
  useEffect(() => {
8286
8610
  if (isEditingImad && inputRef.current) {
@@ -8304,85 +8628,118 @@ var WireDetailsSection = ({ data, onIMADChange }) => {
8304
8628
  handleImadCancel();
8305
8629
  }
8306
8630
  };
8307
- return /* @__PURE__ */ jsxs(FormCard, { title: "Wire Transfer Details", children: [
8308
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-x-8 gap-y-4", children: [
8309
- /* @__PURE__ */ jsx(InfoField, { label: "Type", value: data.type, layout: "horizontal" }),
8310
- /* @__PURE__ */ jsx(
8311
- InfoField,
8312
- {
8313
- label: "IMAD",
8314
- value: isEditingImad ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
8315
- /* @__PURE__ */ jsx(
8316
- "input",
8317
- {
8318
- ref: inputRef,
8319
- value: imadValue,
8320
- onChange: (e) => setImadValue(e.target.value),
8321
- onKeyDown: handleKeyDown,
8322
- className: "h-7 text-sm px-2 border border-border rounded-md bg-background focus:outline-none focus:ring-1 focus:ring-primary"
8323
- }
8324
- ),
8325
- /* @__PURE__ */ jsx(
8326
- Button,
8327
- {
8328
- variant: "ghost",
8329
- size: "icon",
8330
- className: "h-7 w-7",
8331
- onClick: handleImadSave,
8332
- children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4 text-success" })
8333
- }
8334
- ),
8335
- /* @__PURE__ */ jsx(
8336
- Button,
8337
- {
8338
- variant: "ghost",
8339
- size: "icon",
8340
- className: "h-7 w-7",
8341
- onClick: handleImadCancel,
8342
- children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4 text-muted-foreground" })
8343
- }
8344
- )
8345
- ] }) : data.imad ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
8346
- /* @__PURE__ */ jsx("span", { className: "text-sm", children: data.imad }),
8347
- onIMADChange && /* @__PURE__ */ jsx(
8348
- Button,
8349
- {
8350
- variant: "ghost",
8351
- size: "icon",
8352
- className: "h-6 w-6",
8353
- onClick: () => setIsEditingImad(true),
8354
- children: /* @__PURE__ */ jsx(Pencil, { className: "h-3 w-3 text-muted-foreground" })
8355
- }
8356
- )
8357
- ] }) : onIMADChange ? /* @__PURE__ */ jsx(
8358
- Button,
8359
- {
8360
- variant: "link",
8361
- className: "h-auto p-0 text-sm",
8362
- onClick: () => setIsEditingImad(true),
8363
- children: "Add IMAD"
8364
- }
8365
- ) : /* @__PURE__ */ jsx("span", { className: "text-sm", children: "-" }),
8366
- layout: "horizontal"
8367
- }
8368
- ),
8369
- /* @__PURE__ */ jsx(InfoField, { label: "Originator Name", value: data.originatorName, layout: "horizontal" }),
8370
- /* @__PURE__ */ jsx(InfoField, { label: "Originator Account Number", value: data.originatorAccountNumber, layout: "horizontal" }),
8371
- /* @__PURE__ */ jsx(InfoField, { label: "Beneficiary Name", value: data.beneficiaryName, layout: "horizontal" }),
8372
- /* @__PURE__ */ jsx(InfoField, { label: "Beneficiary Account Number", value: data.beneficiaryAccountNumber, layout: "horizontal" }),
8373
- /* @__PURE__ */ jsx(InfoField, { label: "Beneficiary FI Name", value: data.beneficiaryFIName, layout: "horizontal" }),
8374
- /* @__PURE__ */ jsx(InfoField, { label: "Beneficiary FI Routing Number", value: data.beneficiaryFIRoutingNumber, layout: "horizontal" }),
8375
- /* @__PURE__ */ jsx(InfoField, { label: "Originator FI Name", value: data.originatorFIName, layout: "horizontal" }),
8376
- /* @__PURE__ */ jsx(InfoField, { label: "Originator FI Routing Number", value: data.originatorFIRoutingNumber, layout: "horizontal" }),
8377
- /* @__PURE__ */ jsx(InfoField, { label: "Originator to Beneficiary Info", value: data.originatorToBeneficiaryInfo || "-", layout: "horizontal" }),
8378
- /* @__PURE__ */ jsx(InfoField, { label: "File Handle", value: data.fileHandle || "-", layout: "horizontal" }),
8379
- data.intermediaryFIName && /* @__PURE__ */ jsxs(Fragment, { children: [
8380
- /* @__PURE__ */ jsx(InfoField, { label: "Intermediary FI Name", value: data.intermediaryFIName, layout: "horizontal" }),
8381
- data.intermediaryFIRoutingNumber && /* @__PURE__ */ jsx(InfoField, { label: "Intermediary FI Routing Number", value: data.intermediaryFIRoutingNumber, layout: "horizontal" })
8382
- ] })
8383
- ] }),
8384
- data.raw && /* @__PURE__ */ jsx(CollapsibleRawSection2, { data: data.raw })
8385
- ] });
8631
+ const handleCopy = (value, field) => {
8632
+ navigator.clipboard.writeText(value);
8633
+ setCopied(field);
8634
+ setTimeout(() => setCopied(null), 2e3);
8635
+ };
8636
+ const omadFieldValue = data.omad ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
8637
+ /* @__PURE__ */ jsx("span", { className: "text-sm", children: data.omad }),
8638
+ /* @__PURE__ */ jsx(
8639
+ Button,
8640
+ {
8641
+ variant: "ghost",
8642
+ size: "icon",
8643
+ className: "h-6 w-6",
8644
+ onClick: () => handleCopy(data.omad, "omad"),
8645
+ children: copied === "omad" ? /* @__PURE__ */ jsx(Check, { className: "h-3 w-3 text-success" }) : /* @__PURE__ */ jsx(Copy, { className: "h-3 w-3 text-muted-foreground" })
8646
+ }
8647
+ )
8648
+ ] }) : /* @__PURE__ */ jsx("span", { className: "text-sm", children: "-" });
8649
+ const imadFieldValue = isEditingImad ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
8650
+ /* @__PURE__ */ jsx(
8651
+ "input",
8652
+ {
8653
+ ref: inputRef,
8654
+ value: imadValue,
8655
+ onChange: (e) => setImadValue(e.target.value),
8656
+ onKeyDown: handleKeyDown,
8657
+ className: "h-7 text-sm px-2 border border-border rounded-md bg-background focus:outline-none focus:ring-1 focus:ring-primary"
8658
+ }
8659
+ ),
8660
+ /* @__PURE__ */ jsx(
8661
+ Button,
8662
+ {
8663
+ variant: "ghost",
8664
+ size: "icon",
8665
+ className: "h-7 w-7",
8666
+ onClick: handleImadSave,
8667
+ children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4 text-success" })
8668
+ }
8669
+ ),
8670
+ /* @__PURE__ */ jsx(
8671
+ Button,
8672
+ {
8673
+ variant: "ghost",
8674
+ size: "icon",
8675
+ className: "h-7 w-7",
8676
+ onClick: handleImadCancel,
8677
+ children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4 text-muted-foreground" })
8678
+ }
8679
+ )
8680
+ ] }) : data.imad ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
8681
+ /* @__PURE__ */ jsx("span", { className: "text-sm", children: data.imad }),
8682
+ /* @__PURE__ */ jsx(
8683
+ Button,
8684
+ {
8685
+ variant: "ghost",
8686
+ size: "icon",
8687
+ className: "h-6 w-6",
8688
+ onClick: () => handleCopy(data.imad, "imad"),
8689
+ children: copied === "imad" ? /* @__PURE__ */ jsx(Check, { className: "h-3 w-3 text-success" }) : /* @__PURE__ */ jsx(Copy, { className: "h-3 w-3 text-muted-foreground" })
8690
+ }
8691
+ ),
8692
+ onIMADChange && /* @__PURE__ */ jsx(
8693
+ Button,
8694
+ {
8695
+ variant: "ghost",
8696
+ size: "icon",
8697
+ className: "h-6 w-6",
8698
+ onClick: () => setIsEditingImad(true),
8699
+ children: /* @__PURE__ */ jsx(Pencil, { className: "h-3 w-3 text-muted-foreground" })
8700
+ }
8701
+ )
8702
+ ] }) : onIMADChange ? /* @__PURE__ */ jsx(
8703
+ Button,
8704
+ {
8705
+ variant: "link",
8706
+ className: "h-auto p-0 text-sm",
8707
+ onClick: () => setIsEditingImad(true),
8708
+ children: "Add IMAD"
8709
+ }
8710
+ ) : /* @__PURE__ */ jsx("span", { className: "text-sm", children: "-" });
8711
+ return /* @__PURE__ */ jsxs(
8712
+ FormCard,
8713
+ {
8714
+ title: "Wire Transfer Details",
8715
+ titleBadge: /* @__PURE__ */ jsx(Badge, { variant: data.type === "INTERNATIONAL" ? "outline" : "secondary", children: data.type === "INTERNATIONAL" ? "International" : "Domestic" }),
8716
+ children: [
8717
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-x-8 gap-y-4", children: [
8718
+ /* @__PURE__ */ jsx(InfoField, { label: "IMAD", value: imadFieldValue, layout: "horizontal" }),
8719
+ /* @__PURE__ */ jsx(InfoField, { label: "OMAD", value: omadFieldValue, layout: "horizontal" }),
8720
+ /* @__PURE__ */ jsx(InfoField, { label: "Originator", value: data.originatorName, layout: "horizontal" }),
8721
+ /* @__PURE__ */ jsx(InfoField, { label: "Beneficiary", value: data.beneficiaryName, layout: "horizontal" }),
8722
+ /* @__PURE__ */ jsx(InfoField, { label: "Originator Account", value: data.originatorAccountNumber, layout: "horizontal" }),
8723
+ /* @__PURE__ */ jsx(InfoField, { label: "Beneficiary Account", value: data.beneficiaryAccountNumber, layout: "horizontal" }),
8724
+ /* @__PURE__ */ jsx(InfoField, { label: "Originator FI", value: data.originatorFIName, layout: "horizontal" }),
8725
+ /* @__PURE__ */ jsx(InfoField, { label: "Beneficiary FI", value: data.beneficiaryFIName, layout: "horizontal" }),
8726
+ /* @__PURE__ */ jsx(InfoField, { label: "Originator FI ID", value: data.originatorFIId, layout: "horizontal" }),
8727
+ /* @__PURE__ */ jsx(InfoField, { label: "Beneficiary FI ID", value: data.beneficiaryFIId, layout: "horizontal" }),
8728
+ /* @__PURE__ */ jsx(InfoField, { label: "Return Code", value: data.returnCode || "-", layout: "horizontal" }),
8729
+ /* @__PURE__ */ jsx(InfoField, { label: "Return Reason", value: data.returnReason || "-", layout: "horizontal" })
8730
+ ] }),
8731
+ data.originatorToBeneficiaryInfo && /* @__PURE__ */ jsx("div", { className: "mt-4", children: /* @__PURE__ */ jsx(
8732
+ InfoField,
8733
+ {
8734
+ label: "Originator to Beneficiary Info",
8735
+ value: data.originatorToBeneficiaryInfo,
8736
+ layout: "horizontal"
8737
+ }
8738
+ ) }),
8739
+ data.raw && /* @__PURE__ */ jsx(CollapsibleRawSection2, { data: data.raw })
8740
+ ]
8741
+ }
8742
+ );
8386
8743
  };
8387
8744
  var CollapsibleRawSection2 = ({ data }) => {
8388
8745
  const [isExpanded, setIsExpanded] = useState(false);
@@ -9156,7 +9513,6 @@ var TransactionHistoryFiltersSheet = ({
9156
9513
  transactionTypes = [],
9157
9514
  transactionStatuses = [],
9158
9515
  processingStatuses = [],
9159
- directions = [],
9160
9516
  products = []
9161
9517
  } = filterOptions2;
9162
9518
  const [localFilters, setLocalFilters] = useState(filters);
@@ -9196,56 +9552,16 @@ var TransactionHistoryFiltersSheet = ({
9196
9552
  /* @__PURE__ */ jsxs(SheetContent, { side: "right", className: "w-full sm:max-w-xl overflow-y-auto", children: [
9197
9553
  /* @__PURE__ */ jsx(SheetHeader, { children: /* @__PURE__ */ jsx(SheetTitle, { children: "Transaction Filters" }) }),
9198
9554
  /* @__PURE__ */ jsxs("div", { className: "space-y-6 py-6", children: [
9199
- /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
9200
- /* @__PURE__ */ jsx("h3", { className: "text-sm font-medium text-muted-foreground", children: "Options" }),
9201
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
9202
- /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
9203
- /* @__PURE__ */ jsx(
9204
- Checkbox,
9205
- {
9206
- id: "showAchNoc",
9207
- checked: localFilters.showAchNoc || false,
9208
- onCheckedChange: (checked) => handleLocalFilterChange("showAchNoc", checked === true)
9209
- }
9210
- ),
9211
- /* @__PURE__ */ jsx(Label, { htmlFor: "showAchNoc", className: "text-sm font-normal", children: "Show ACH NOC" })
9212
- ] }),
9213
- /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
9214
- /* @__PURE__ */ jsx(
9215
- Checkbox,
9216
- {
9217
- id: "isInbound",
9218
- checked: localFilters.isInbound || false,
9219
- onCheckedChange: (checked) => handleLocalFilterChange("isInbound", checked === true)
9220
- }
9221
- ),
9222
- /* @__PURE__ */ jsx(Label, { htmlFor: "isInbound", className: "text-sm font-normal", children: "Is Inbound" })
9223
- ] }),
9224
- /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
9225
- /* @__PURE__ */ jsx(
9226
- Checkbox,
9227
- {
9228
- id: "excludeWire",
9229
- checked: localFilters.excludeWire || false,
9230
- onCheckedChange: (checked) => handleLocalFilterChange("excludeWire", checked === true)
9231
- }
9232
- ),
9233
- /* @__PURE__ */ jsx(Label, { htmlFor: "excludeWire", className: "text-sm font-normal", children: "Exclude Wire" })
9234
- ] }),
9235
- /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
9236
- /* @__PURE__ */ jsx(
9237
- Checkbox,
9238
- {
9239
- id: "excludeAch",
9240
- checked: localFilters.excludeAch || false,
9241
- onCheckedChange: (checked) => handleLocalFilterChange("excludeAch", checked === true)
9242
- }
9243
- ),
9244
- /* @__PURE__ */ jsx(Label, { htmlFor: "excludeAch", className: "text-sm font-normal", children: "Exclude ACH" })
9245
- ] })
9246
- ] })
9247
- ] }),
9248
9555
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
9556
+ /* @__PURE__ */ jsx(
9557
+ EnhancedInput,
9558
+ {
9559
+ label: "Payment ID",
9560
+ value: localFilters.paymentId || "",
9561
+ onChange: (e) => handleLocalFilterChange("paymentId", e.target.value),
9562
+ placeholder: "Enter payment ID"
9563
+ }
9564
+ ),
9249
9565
  /* @__PURE__ */ jsx(
9250
9566
  EnhancedInput,
9251
9567
  {
@@ -9254,11 +9570,23 @@ var TransactionHistoryFiltersSheet = ({
9254
9570
  onChange: (e) => handleLocalFilterChange("accountNumber", e.target.value),
9255
9571
  placeholder: "Enter account number"
9256
9572
  }
9573
+ )
9574
+ ] }),
9575
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
9576
+ /* @__PURE__ */ jsx(
9577
+ EnhancedMultiSelect,
9578
+ {
9579
+ label: "Transaction Type",
9580
+ value: localFilters.transactionType || [],
9581
+ onValueChange: (value) => handleLocalFilterChange("transactionType", value),
9582
+ placeholder: "Select types",
9583
+ options: transactionTypes
9584
+ }
9257
9585
  ),
9258
9586
  /* @__PURE__ */ jsx(
9259
9587
  EnhancedSelect,
9260
9588
  {
9261
- label: "Product ID",
9589
+ label: "Product",
9262
9590
  value: localFilters.productId || "",
9263
9591
  onValueChange: (value) => handleLocalFilterChange("productId", value),
9264
9592
  placeholder: "Select product",
@@ -9268,118 +9596,26 @@ var TransactionHistoryFiltersSheet = ({
9268
9596
  ] }),
9269
9597
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
9270
9598
  /* @__PURE__ */ jsx(
9271
- EnhancedInput,
9599
+ EnhancedMultiSelect,
9272
9600
  {
9273
- label: "Customer ID",
9274
- value: localFilters.customerId || "",
9275
- onChange: (e) => handleLocalFilterChange("customerId", e.target.value),
9276
- placeholder: "Enter customer ID"
9601
+ label: "Transaction Status",
9602
+ value: localFilters.transactionStatus || [],
9603
+ onValueChange: (value) => handleLocalFilterChange("transactionStatus", value),
9604
+ placeholder: "Select statuses",
9605
+ options: transactionStatuses
9277
9606
  }
9278
9607
  ),
9279
9608
  /* @__PURE__ */ jsx(
9280
- EnhancedInput,
9609
+ EnhancedMultiSelect,
9281
9610
  {
9282
- label: "Counterparty ID",
9283
- value: localFilters.counterpartyId || "",
9284
- onChange: (e) => handleLocalFilterChange("counterpartyId", e.target.value),
9285
- placeholder: "Enter counterparty ID"
9611
+ label: "Processing Status",
9612
+ value: localFilters.processingStatus || [],
9613
+ onValueChange: (value) => handleLocalFilterChange("processingStatus", value),
9614
+ placeholder: "Select statuses",
9615
+ options: processingStatuses
9286
9616
  }
9287
9617
  )
9288
9618
  ] }),
9289
- /* @__PURE__ */ jsx(
9290
- EnhancedInput,
9291
- {
9292
- label: "Settlement File Name",
9293
- value: localFilters.settlementFileName || "",
9294
- onChange: (e) => handleLocalFilterChange("settlementFileName", e.target.value),
9295
- placeholder: "Enter settlement file name"
9296
- }
9297
- ),
9298
- /* @__PURE__ */ jsx(
9299
- EnhancedInput,
9300
- {
9301
- label: "Original File Name",
9302
- value: localFilters.originalFileName || "",
9303
- onChange: (e) => handleLocalFilterChange("originalFileName", e.target.value),
9304
- placeholder: "Enter original file name"
9305
- }
9306
- ),
9307
- /* @__PURE__ */ jsx(
9308
- EnhancedInput,
9309
- {
9310
- label: "Requester IP Address",
9311
- value: localFilters.requesterIpAddress || "",
9312
- onChange: (e) => handleLocalFilterChange("requesterIpAddress", e.target.value),
9313
- placeholder: "Enter IP address"
9314
- }
9315
- ),
9316
- /* @__PURE__ */ jsx(
9317
- EnhancedInput,
9318
- {
9319
- label: "Requester Username",
9320
- value: localFilters.requesterUsername || "",
9321
- onChange: (e) => handleLocalFilterChange("requesterUsername", e.target.value),
9322
- placeholder: "Enter username"
9323
- }
9324
- ),
9325
- /* @__PURE__ */ jsx(
9326
- EnhancedInput,
9327
- {
9328
- label: "Wire File Handle",
9329
- value: localFilters.wireFileHandle || "",
9330
- onChange: (e) => handleLocalFilterChange("wireFileHandle", e.target.value),
9331
- placeholder: "Enter wire file handle"
9332
- }
9333
- ),
9334
- /* @__PURE__ */ jsx(
9335
- EnhancedInput,
9336
- {
9337
- label: "Payment ID",
9338
- value: localFilters.paymentId || "",
9339
- onChange: (e) => handleLocalFilterChange("paymentId", e.target.value),
9340
- placeholder: "Enter payment ID"
9341
- }
9342
- ),
9343
- /* @__PURE__ */ jsx(
9344
- EnhancedMultiSelect,
9345
- {
9346
- label: "Transaction Type",
9347
- value: localFilters.transactionType || [],
9348
- onValueChange: (value) => handleLocalFilterChange("transactionType", value),
9349
- placeholder: "Select transaction types",
9350
- options: transactionTypes
9351
- }
9352
- ),
9353
- /* @__PURE__ */ jsx(
9354
- EnhancedMultiSelect,
9355
- {
9356
- label: "Transaction Status",
9357
- value: localFilters.transactionStatus || [],
9358
- onValueChange: (value) => handleLocalFilterChange("transactionStatus", value),
9359
- placeholder: "Select transaction statuses",
9360
- options: transactionStatuses
9361
- }
9362
- ),
9363
- /* @__PURE__ */ jsx(
9364
- EnhancedMultiSelect,
9365
- {
9366
- label: "Processing Status",
9367
- value: localFilters.processingStatus || [],
9368
- onValueChange: (value) => handleLocalFilterChange("processingStatus", value),
9369
- placeholder: "Select processing statuses",
9370
- options: processingStatuses
9371
- }
9372
- ),
9373
- /* @__PURE__ */ jsx(
9374
- EnhancedSelect,
9375
- {
9376
- label: "Direction",
9377
- value: localFilters.direction || "",
9378
- onValueChange: (value) => handleLocalFilterChange("direction", value),
9379
- placeholder: "Select direction",
9380
- options: directions
9381
- }
9382
- ),
9383
9619
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
9384
9620
  /* @__PURE__ */ jsx(
9385
9621
  CurrencyInput,
@@ -9400,7 +9636,7 @@ var TransactionHistoryFiltersSheet = ({
9400
9636
  ] }),
9401
9637
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
9402
9638
  /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
9403
- /* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Begin Date" }),
9639
+ /* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Update Date Start" }),
9404
9640
  /* @__PURE__ */ jsx(
9405
9641
  DatePicker,
9406
9642
  {
@@ -9413,7 +9649,7 @@ var TransactionHistoryFiltersSheet = ({
9413
9649
  )
9414
9650
  ] }),
9415
9651
  /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
9416
- /* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "End Date" }),
9652
+ /* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Update Date End" }),
9417
9653
  /* @__PURE__ */ jsx(
9418
9654
  DatePicker,
9419
9655
  {
@@ -9453,6 +9689,46 @@ var TransactionHistoryFiltersSheet = ({
9453
9689
  }
9454
9690
  )
9455
9691
  ] })
9692
+ ] }),
9693
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
9694
+ /* @__PURE__ */ jsx(
9695
+ EnhancedInput,
9696
+ {
9697
+ label: "Customer ID",
9698
+ value: localFilters.customerId || "",
9699
+ onChange: (e) => handleLocalFilterChange("customerId", e.target.value),
9700
+ placeholder: "Enter customer ID"
9701
+ }
9702
+ ),
9703
+ /* @__PURE__ */ jsx(
9704
+ EnhancedInput,
9705
+ {
9706
+ label: "Counterparty ID",
9707
+ value: localFilters.counterpartyId || "",
9708
+ onChange: (e) => handleLocalFilterChange("counterpartyId", e.target.value),
9709
+ placeholder: "Enter counterparty ID"
9710
+ }
9711
+ )
9712
+ ] }),
9713
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
9714
+ /* @__PURE__ */ jsx(
9715
+ EnhancedInput,
9716
+ {
9717
+ label: "Settlement File Name",
9718
+ value: localFilters.settlementFileName || "",
9719
+ onChange: (e) => handleLocalFilterChange("settlementFileName", e.target.value),
9720
+ placeholder: "Enter file name"
9721
+ }
9722
+ ),
9723
+ /* @__PURE__ */ jsx(
9724
+ EnhancedInput,
9725
+ {
9726
+ label: "Processing File Name",
9727
+ value: localFilters.originalFileName || "",
9728
+ onChange: (e) => handleLocalFilterChange("originalFileName", e.target.value),
9729
+ placeholder: "Enter file name"
9730
+ }
9731
+ )
9456
9732
  ] })
9457
9733
  ] }),
9458
9734
  /* @__PURE__ */ jsxs(SheetFooter, { className: "flex gap-2", children: [
@@ -9579,6 +9855,7 @@ var TransactionDetailView = ({
9579
9855
  onOFACClick,
9580
9856
  onProductClick,
9581
9857
  onAlertClick,
9858
+ onLinkedPaymentClick,
9582
9859
  onIMADChange,
9583
9860
  isLoading,
9584
9861
  error,
@@ -9652,12 +9929,12 @@ var TransactionDetailView = ({
9652
9929
  InfoField,
9653
9930
  {
9654
9931
  label: "Account Number",
9655
- value: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
9932
+ value: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2", children: [
9656
9933
  /* @__PURE__ */ jsx(
9657
9934
  Button,
9658
9935
  {
9659
9936
  variant: "link",
9660
- className: "h-auto p-0 text-sm",
9937
+ className: "h-auto p-0 text-sm whitespace-normal break-all text-left",
9661
9938
  onClick: () => onAccountClick(transaction.accountNumber),
9662
9939
  children: transaction.accountNumber
9663
9940
  }
@@ -9667,7 +9944,7 @@ var TransactionDetailView = ({
9667
9944
  {
9668
9945
  type: "button",
9669
9946
  onClick: () => handleCopy(transaction.accountNumber, "accountNumber"),
9670
- className: "text-muted-foreground hover:text-foreground transition-colors",
9947
+ className: "text-muted-foreground hover:text-foreground transition-colors flex-shrink-0",
9671
9948
  children: copiedField === "accountNumber" ? /* @__PURE__ */ jsx(Check, { className: "h-3.5 w-3.5 text-success" }) : /* @__PURE__ */ jsx(Copy, { className: "h-3.5 w-3.5" })
9672
9949
  }
9673
9950
  )
@@ -9709,6 +9986,22 @@ var TransactionDetailView = ({
9709
9986
  }
9710
9987
  ),
9711
9988
  /* @__PURE__ */ jsx(InfoField, { label: "Post Date", value: transaction.created.split(" ")[0], layout: "horizontal" }),
9989
+ /* @__PURE__ */ jsx(
9990
+ InfoField,
9991
+ {
9992
+ label: "Product ID",
9993
+ value: transaction.productId ? /* @__PURE__ */ jsx(
9994
+ Button,
9995
+ {
9996
+ variant: "link",
9997
+ className: "h-auto p-0 text-sm",
9998
+ onClick: () => onProductClick(transaction.productId),
9999
+ children: transaction.productId
10000
+ }
10001
+ ) : "-",
10002
+ layout: "horizontal"
10003
+ }
10004
+ ),
9712
10005
  /* @__PURE__ */ jsx(
9713
10006
  InfoField,
9714
10007
  {
@@ -9725,20 +10018,37 @@ var TransactionDetailView = ({
9725
10018
  layout: "horizontal"
9726
10019
  }
9727
10020
  ),
9728
- /* @__PURE__ */ jsx(InfoField, { label: "Original Filename", value: transaction.originalFilename || "-", layout: "horizontal" }),
9729
- /* @__PURE__ */ jsx(InfoField, { label: "Loaded From File", value: transaction.loadedFromFile || "-", layout: "horizontal" }),
10021
+ /* @__PURE__ */ jsx(
10022
+ InfoField,
10023
+ {
10024
+ label: "Alerts",
10025
+ value: transaction.alerts && transaction.alerts.length > 0 ? /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: transaction.alerts.map((alertId, index) => /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center", children: [
10026
+ /* @__PURE__ */ jsx(
10027
+ Button,
10028
+ {
10029
+ variant: "link",
10030
+ className: "h-auto p-0 text-sm",
10031
+ onClick: () => onAlertClick?.(alertId),
10032
+ children: alertId
10033
+ }
10034
+ ),
10035
+ index < transaction.alerts.length - 1 && /* @__PURE__ */ jsx("span", { className: "mr-1", children: "," })
10036
+ ] }, alertId)) }) : "-",
10037
+ layout: "horizontal"
10038
+ }
10039
+ ),
9730
10040
  /* @__PURE__ */ jsx(
9731
10041
  InfoField,
9732
10042
  {
9733
10043
  label: "Payment ID",
9734
- value: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
9735
- /* @__PURE__ */ jsx("span", { children: transaction.id }),
10044
+ value: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2", children: [
10045
+ /* @__PURE__ */ jsx("span", { className: "break-all", children: transaction.id }),
9736
10046
  /* @__PURE__ */ jsx(
9737
10047
  "button",
9738
10048
  {
9739
10049
  type: "button",
9740
10050
  onClick: () => handleCopy(transaction.id, "paymentId"),
9741
- className: "text-muted-foreground hover:text-foreground transition-colors",
10051
+ className: "text-muted-foreground hover:text-foreground transition-colors flex-shrink-0",
9742
10052
  children: copiedField === "paymentId" ? /* @__PURE__ */ jsx(Check, { className: "h-3.5 w-3.5 text-success" }) : /* @__PURE__ */ jsx(Copy, { className: "h-3.5 w-3.5" })
9743
10053
  }
9744
10054
  )
@@ -9746,50 +10056,30 @@ var TransactionDetailView = ({
9746
10056
  layout: "horizontal"
9747
10057
  }
9748
10058
  ),
9749
- /* @__PURE__ */ jsx(InfoField, { label: "Linked Payment ID", value: transaction.linkedPaymentId || "-", layout: "horizontal" }),
9750
- /* @__PURE__ */ jsx(InfoField, { label: "Pending until Date", value: transaction.pendingUntilDate || "-", layout: "horizontal" }),
9751
- /* @__PURE__ */ jsx(InfoField, { label: "Further Credit To", value: transaction.furtherCreditTo || "-", layout: "horizontal" }),
9752
- /* @__PURE__ */ jsx(InfoField, { label: "Balance Available Date", value: transaction.balanceAvailableDate || "-", layout: "horizontal" }),
9753
10059
  /* @__PURE__ */ jsx(InfoField, { label: "Requester Username", value: transaction.requesterUsername || "-", layout: "horizontal" }),
9754
- /* @__PURE__ */ jsx(InfoField, { label: "Requester IP Address", value: transaction.requesterIpAddress || "-", layout: "horizontal" }),
9755
- /* @__PURE__ */ jsx(InfoField, { label: "Settlement Filename", value: transaction.settlementFilename || "-", layout: "horizontal" }),
9756
- /* @__PURE__ */ jsx(InfoField, { label: "Duplicate of Payment ID", value: transaction.duplicateOfPaymentId || "-", layout: "horizontal" }),
9757
10060
  /* @__PURE__ */ jsx(
9758
10061
  InfoField,
9759
10062
  {
9760
- label: "Product ID",
9761
- value: transaction.productId ? /* @__PURE__ */ jsx(
10063
+ label: "Linked Payment ID",
10064
+ value: transaction.linkedPaymentId ? /* @__PURE__ */ jsx(
9762
10065
  Button,
9763
10066
  {
9764
10067
  variant: "link",
9765
- className: "h-auto p-0 text-sm",
9766
- onClick: () => onProductClick(transaction.productId),
9767
- children: transaction.productId
10068
+ className: "h-auto p-0 text-sm whitespace-normal break-all text-left",
10069
+ onClick: () => onLinkedPaymentClick?.(transaction.linkedPaymentId),
10070
+ children: transaction.linkedPaymentId
9768
10071
  }
9769
10072
  ) : "-",
9770
10073
  layout: "horizontal"
9771
10074
  }
9772
10075
  ),
9773
- /* @__PURE__ */ jsx(InfoField, { label: "Returned In File", value: transaction.returnedInFile || "-", layout: "horizontal" }),
9774
- /* @__PURE__ */ jsx(
9775
- InfoField,
9776
- {
9777
- label: "Alerts",
9778
- value: transaction.alerts && transaction.alerts.length > 0 ? /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: transaction.alerts.map((alertId, index) => /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center", children: [
9779
- /* @__PURE__ */ jsx(
9780
- Button,
9781
- {
9782
- variant: "link",
9783
- className: "h-auto p-0 text-sm",
9784
- onClick: () => onAlertClick?.(alertId),
9785
- children: alertId
9786
- }
9787
- ),
9788
- index < transaction.alerts.length - 1 && /* @__PURE__ */ jsx("span", { className: "mr-1", children: "," })
9789
- ] }, alertId)) }) : "-",
9790
- layout: "horizontal"
9791
- }
9792
- )
10076
+ /* @__PURE__ */ jsx(InfoField, { label: "Requester IP Address", value: transaction.requesterIpAddress || "-", layout: "horizontal" }),
10077
+ /* @__PURE__ */ jsx(InfoField, { label: "Pending until Date", value: transaction.pendingUntilDate || "-", layout: "horizontal" }),
10078
+ /* @__PURE__ */ jsx(InfoField, { label: "Further Credit To", value: transaction.furtherCreditTo || "-", layout: "horizontal" }),
10079
+ /* @__PURE__ */ jsx(InfoField, { label: "Balance Available Date", value: transaction.balanceAvailableDate || "-", layout: "horizontal" }),
10080
+ /* @__PURE__ */ jsx(InfoField, { label: "Settlement Filename", value: transaction.settlementFilename || "-", layout: "horizontal" }),
10081
+ /* @__PURE__ */ jsx(InfoField, { label: "Original Filename", value: transaction.originalFilename || "-", layout: "horizontal" }),
10082
+ /* @__PURE__ */ jsx(InfoField, { label: "Loaded From File", value: transaction.loadedFromFile || "-", layout: "horizontal" })
9793
10083
  ] }) }),
9794
10084
  isACHTransfer && transaction.achDetails && /* @__PURE__ */ jsx(ACHDetailsSection, { data: transaction.achDetails }),
9795
10085
  isWireTransfer && transaction.wireDetails && /* @__PURE__ */ jsx(WireDetailsSection, { data: transaction.wireDetails, onIMADChange })
@@ -12663,7 +12953,8 @@ var mockBusinessDocuments = {
12663
12953
  description: "Official certificate of incorporation from Delaware",
12664
12954
  size: "2.3 MB",
12665
12955
  uploadedBy: "John Smith",
12666
- uploadedAt: "2024-01-10T10:30:00Z"
12956
+ uploadedAt: "2024-01-10T10:30:00Z",
12957
+ url: "/sample-documents/sample.pdf"
12667
12958
  },
12668
12959
  {
12669
12960
  id: "doc-002",
@@ -12672,7 +12963,8 @@ var mockBusinessDocuments = {
12672
12963
  description: "IRS EIN verification letter",
12673
12964
  size: "1.1 MB",
12674
12965
  uploadedBy: "Sarah Johnson",
12675
- uploadedAt: "2024-01-12T14:20:00Z"
12966
+ uploadedAt: "2024-01-12T14:20:00Z",
12967
+ url: "/sample-documents/sample.pdf"
12676
12968
  },
12677
12969
  {
12678
12970
  id: "doc-003",
@@ -12681,7 +12973,8 @@ var mockBusinessDocuments = {
12681
12973
  description: "Utility bill for business address",
12682
12974
  size: "0.8 MB",
12683
12975
  uploadedBy: "John Smith",
12684
- uploadedAt: "2024-01-15T09:15:00Z"
12976
+ uploadedAt: "2024-01-15T09:15:00Z",
12977
+ url: "/sample-documents/sample.pdf"
12685
12978
  },
12686
12979
  {
12687
12980
  id: "doc-004",
@@ -12690,7 +12983,8 @@ var mockBusinessDocuments = {
12690
12983
  description: "Company operating agreement and bylaws",
12691
12984
  size: "3.5 MB",
12692
12985
  uploadedBy: "Legal Team",
12693
- uploadedAt: "2024-01-08T16:45:00Z"
12986
+ uploadedAt: "2024-01-08T16:45:00Z",
12987
+ url: "/sample-documents/sample.pdf"
12694
12988
  }
12695
12989
  ],
12696
12990
  "8112489": [
@@ -12700,7 +12994,8 @@ var mockBusinessDocuments = {
12700
12994
  type: "BUSINESS_LICENSE",
12701
12995
  size: "1.5 MB",
12702
12996
  uploadedBy: "Emily Davis",
12703
- uploadedAt: "2024-01-05T11:00:00Z"
12997
+ uploadedAt: "2024-01-05T11:00:00Z",
12998
+ url: "/sample-documents/sample.pdf"
12704
12999
  }
12705
13000
  ]
12706
13001
  };
@@ -12837,9 +13132,11 @@ var mockBusinessProfiles = {
12837
13132
  var BusinessDetail = () => {
12838
13133
  const { id } = useParams();
12839
13134
  const navigate = useNavigate();
13135
+ const [isLoading, setIsLoading] = useState(true);
13136
+ const [error, setError] = useState(null);
12840
13137
  const business = mockBusinessesList.find((b) => b.id === id);
12841
13138
  const identityVerification = id ? mockIdentityVerifications[id] : void 0;
12842
- const businessUBOs = id ? mockBusinessUBOs[id] || [] : [];
13139
+ const initialUBOs = id ? mockBusinessUBOs[id] || [] : [];
12843
13140
  const initialDocuments = id ? mockBusinessDocuments[id] || [] : [];
12844
13141
  const businessAccounts = id ? mockBusinessAccounts[id] || [] : [];
12845
13142
  const initialProfile = id ? mockBusinessProfiles[id] : void 0;
@@ -12848,7 +13145,24 @@ var BusinessDetail = () => {
12848
13145
  const [businessProfile, setBusinessProfile] = useState(
12849
13146
  initialProfile
12850
13147
  );
13148
+ const [businessUBOs, setBusinessUBOs] = useState(initialUBOs);
13149
+ const [isIdNumberRevealed, setIsIdNumberRevealed] = useState(false);
13150
+ const [revealedIdNumber, setRevealedIdNumber] = useState(null);
13151
+ const [isLoadingIdNumber, setIsLoadingIdNumber] = useState(false);
12851
13152
  const [businessDocuments, setBusinessDocuments] = useState(initialDocuments);
13153
+ const loadData = () => {
13154
+ setIsLoading(true);
13155
+ setError(null);
13156
+ setTimeout(() => {
13157
+ if (!business) {
13158
+ setError("Business not found");
13159
+ }
13160
+ setIsLoading(false);
13161
+ }, 500);
13162
+ };
13163
+ useEffect(() => {
13164
+ loadData();
13165
+ }, [id]);
12852
13166
  const handleStatusChange = (newStatus) => {
12853
13167
  setCurrentStatus(newStatus);
12854
13168
  };
@@ -12871,6 +13185,34 @@ var BusinessDetail = () => {
12871
13185
  const handleUBOClick = (customerId) => {
12872
13186
  navigate(`/customer/${customerId}`);
12873
13187
  };
13188
+ const handleRemoveUBO = (uboId) => {
13189
+ setBusinessUBOs((prev) => prev.filter((ubo) => ubo.id !== uboId));
13190
+ console.log("UBO removed:", uboId);
13191
+ };
13192
+ const handleProductIdClick = (productId) => {
13193
+ navigate(`/products/${productId}`);
13194
+ };
13195
+ const handleRevealIdNumber = async () => {
13196
+ await new Promise((resolve) => setTimeout(resolve, 800));
13197
+ return businessProfile?.idNumber || "123-45-6789";
13198
+ };
13199
+ const handleToggleIdNumberVisibility = async () => {
13200
+ if (isIdNumberRevealed) {
13201
+ setIsIdNumberRevealed(false);
13202
+ setRevealedIdNumber(null);
13203
+ } else {
13204
+ setIsLoadingIdNumber(true);
13205
+ try {
13206
+ const decryptedId = await handleRevealIdNumber();
13207
+ setRevealedIdNumber(decryptedId);
13208
+ setIsIdNumberRevealed(true);
13209
+ } catch (error2) {
13210
+ console.error("Failed to reveal ID number:", error2);
13211
+ } finally {
13212
+ setIsLoadingIdNumber(false);
13213
+ }
13214
+ }
13215
+ };
12874
13216
  const handleDocumentUpload = async (file, metadata) => {
12875
13217
  await new Promise((resolve) => setTimeout(resolve, 1e3));
12876
13218
  const newDocument = {
@@ -12885,10 +13227,23 @@ var BusinessDetail = () => {
12885
13227
  setBusinessDocuments((prev) => [...prev, newDocument]);
12886
13228
  console.log("Document uploaded:", { file, metadata, newDocument });
12887
13229
  };
12888
- if (!business) {
12889
- return /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-8", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
12890
- /* @__PURE__ */ jsx("h1", { className: "text-2xl font-bold mb-2", children: "Business Not Found" }),
12891
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mb-4", children: "The business could not be found." })
13230
+ const handleRetry = () => {
13231
+ loadData();
13232
+ };
13233
+ if (isLoading) {
13234
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center min-h-[400px] gap-3", children: [
13235
+ /* @__PURE__ */ jsx(Loader2, { className: "h-8 w-8 animate-spin text-muted-foreground" }),
13236
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "Loading..." })
13237
+ ] });
13238
+ }
13239
+ if (error || !business) {
13240
+ return /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-8", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center min-h-[400px] gap-4", children: [
13241
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-destructive", children: [
13242
+ /* @__PURE__ */ jsx(AlertCircle, { className: "h-5 w-5" }),
13243
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: error || "Business not found" })
13244
+ ] }),
13245
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "The business could not be loaded." }),
13246
+ /* @__PURE__ */ jsx(Button, { variant: "outline", onClick: handleRetry, children: "Retry" })
12892
13247
  ] }) });
12893
13248
  }
12894
13249
  return /* @__PURE__ */ jsx(
@@ -12902,6 +13257,8 @@ var BusinessDetail = () => {
12902
13257
  businessAccounts,
12903
13258
  currentStatus,
12904
13259
  isEditingProfile,
13260
+ statusOptions: BUSINESS_STATUS_OPTIONS,
13261
+ businessEntityTypeOptions: BUSINESS_ENTITY_TYPE_OPTIONS,
12905
13262
  onStatusChange: handleStatusChange,
12906
13263
  onProfileDataChange: handleProfileDataChange,
12907
13264
  onToggleProfileEdit: handleToggleProfileEdit,
@@ -12909,7 +13266,14 @@ var BusinessDetail = () => {
12909
13266
  onNavigateToCounterparty: handleNavigateToCounterparty,
12910
13267
  onAddAccount: handleAddAccount,
12911
13268
  onUBOClick: handleUBOClick,
12912
- onDocumentUpload: handleDocumentUpload
13269
+ onRemoveUBO: handleRemoveUBO,
13270
+ onDocumentUpload: handleDocumentUpload,
13271
+ onProductIdClick: handleProductIdClick,
13272
+ onRevealIdNumber: handleRevealIdNumber,
13273
+ isIdNumberRevealed,
13274
+ onToggleIdNumberVisibility: handleToggleIdNumberVisibility,
13275
+ isLoadingIdNumber,
13276
+ revealedIdNumber
12913
13277
  }
12914
13278
  );
12915
13279
  };
@@ -14800,7 +15164,7 @@ function Statement() {
14800
15164
  // src/lib/mock-data/transaction-data.ts
14801
15165
  var mockTransactions = [
14802
15166
  {
14803
- id: "1",
15167
+ id: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
14804
15168
  created: "2025-10-01 00:16",
14805
15169
  accountNumber: "126713605718",
14806
15170
  amount: 34539.18,
@@ -14815,22 +15179,22 @@ var mockTransactions = [
14815
15179
  ofacId: "18323208",
14816
15180
  productId: "130",
14817
15181
  loadedFromFile: "iso21130757012764355B7.xml.126534273Q299",
15182
+ linkedPaymentId: "b2c3d4e5-f6a7-8901-bcde-f23456789012",
14818
15183
  requesterUsername: "admin@riseworks.com",
14819
15184
  requesterIpAddress: "192.168.1.100",
14820
15185
  achDetails: {
14821
- type: "ACH Credit",
14822
15186
  originatorName: "Rise Works Inc",
14823
- originatorAccountNumber: "126713605718",
15187
+ originatorRtn: "021000021",
15188
+ originatorId: "1234567890",
14824
15189
  receiverName: "VEDANT JAYESHKUMAR PATI",
14825
- receiverAccountNumber: "9876543210",
14826
- receiverRoutingNumber: "021000021",
14827
- amount: 7293.32,
15190
+ receiverRtn: "021000021",
15191
+ receiverAccount: "9876543210",
14828
15192
  secCode: "CCD",
14829
- companyEntryDescription: "PAYROLL",
14830
- companyDiscretionaryData: "4NnuJKyD9a8LUmkm",
14831
- individualIdNumber: "1234567890",
14832
- individualName: "VEDANT JAYESHKUMAR PATI",
15193
+ accountType: "Checking",
15194
+ effectiveDate: "2025-10-01",
15195
+ service: "Same Day",
14833
15196
  traceNumber: "021000021234567",
15197
+ addenda: "PAYROLL - 4NnuJKyD9a8LUmkm",
14834
15198
  raw: {
14835
15199
  recordType: "6",
14836
15200
  transactionCode: "22",
@@ -14862,7 +15226,7 @@ var mockTransactions = [
14862
15226
  }
14863
15227
  },
14864
15228
  {
14865
- id: "2",
15229
+ id: "b2c3d4e5-f6a7-8901-bcde-f23456789012",
14866
15230
  created: "2025-10-01 00:09",
14867
15231
  accountNumber: "899606565333",
14868
15232
  amount: 0.5,
@@ -14891,25 +15255,18 @@ var mockTransactions = [
14891
15255
  settlementFilename: "settlement_20250930.csv",
14892
15256
  alerts: ["OFAC Review Pending"],
14893
15257
  wireDetails: {
14894
- type: "Domestic Wire",
15258
+ type: "DOMESTIC",
15259
+ imad: "20250930MMQFMP030000123",
15260
+ omad: "20250930MMQFMP030000124",
14895
15261
  originatorName: "Tech Solutions LLC",
14896
15262
  originatorAccountNumber: "445821903456",
14897
- originatorAddress: "123 Tech Street, San Francisco, CA 94105",
15263
+ originatorFIName: "Wells Fargo Bank",
15264
+ originatorFIId: "121000248",
14898
15265
  beneficiaryName: "Global Suppliers Inc",
14899
15266
  beneficiaryAccountNumber: "998877665544",
14900
- beneficiaryAddress: "456 Supply Avenue, New York, NY 10001",
14901
15267
  beneficiaryFIName: "Chase Bank",
14902
- beneficiaryFIRoutingNumber: "021000021",
14903
- beneficiaryFIAddress: "270 Park Avenue, New York, NY 10017",
14904
- originatorFIName: "Wells Fargo Bank",
15268
+ beneficiaryFIId: "021000021",
14905
15269
  originatorToBeneficiaryInfo: "Invoice Payment for INV-2024-089 - Equipment Purchase",
14906
- fileHandle: "WR20250930-0001234",
14907
- originatorFIRoutingNumber: "121000248",
14908
- originatorFIAddress: "420 Montgomery Street, San Francisco, CA 94104",
14909
- intermediaryFIName: "Bank of America",
14910
- intermediaryFIRoutingNumber: "026009593",
14911
- intermediaryFIAddress: "100 Federal Street, Boston, MA 02110",
14912
- imad: "20250930MMQFMP030000123",
14913
15270
  raw: {
14914
15271
  fiToFICstmrCdtTrf: {
14915
15272
  grpHdr: {
@@ -14939,127 +15296,11 @@ var mockTransactions = [
14939
15296
  intrBkSttlmAmt: { value: 38, ccy: "USD" },
14940
15297
  intrBkSttlmDt: { year: 2025, month: 7, day: 3 },
14941
15298
  instdAmt: { value: 11, ccy: "USD" },
14942
- chrgBr: "SHAR",
14943
- instgAgt: {
14944
- finInstnId: {
14945
- clrSysMmbId: {
14946
- clrSysId: { cd: "USABA" },
14947
- mmbId: "321177573"
14948
- }
14949
- }
14950
- },
14951
- instdAgt: {
14952
- finInstnId: {
14953
- clrSysMmbId: {
14954
- clrSysId: { cd: "USABA" },
14955
- mmbId: "121182881"
14956
- }
14957
- }
14958
- },
14959
- dbtr: {
14960
- nm: "Sarah Escobar",
14961
- pstlAdr: {
14962
- strtNm: "12345 Kaiser lane",
14963
- bldgNb: "E425",
14964
- pstCd: "12345",
14965
- twnNm: "COSTA MESA",
14966
- ctrySubDvsn: "CA",
14967
- ctry: "US"
14968
- }
14969
- },
14970
- dbtrAcct: {
14971
- id: { othr: { id: "12345678910" } }
14972
- },
14973
- dbtrAgt: {
14974
- finInstnId: {
14975
- clrSysMmbId: {
14976
- clrSysId: { cd: "USABA" },
14977
- mmbId: "321177573"
14978
- },
14979
- nm: "NORTH BAY CREDIT UNION",
14980
- pstlAdr: {
14981
- strtNm: "397 Aviation Blvd",
14982
- pstCd: "95403",
14983
- twnNm: "Santa Rosa",
14984
- ctrySubDvsn: "CA",
14985
- ctry: "US"
14986
- }
14987
- }
14988
- },
14989
- cdtrAgt: {
14990
- finInstnId: {
14991
- clrSysMmbId: {
14992
- clrSysId: { cd: "USABA" },
14993
- mmbId: "121182881"
14994
- },
14995
- nm: "NORTH BAY CREDIT UNION",
14996
- pstlAdr: {
14997
- strtNm: "397 Aviation Blvd",
14998
- pstCd: "12345",
14999
- twnNm: "Santa Rosa",
15000
- ctrySubDvsn: "CA",
15001
- ctry: "US"
15002
- }
15003
- }
15004
- },
15005
- cdtr: {
15006
- nm: "Jake from Braid LLC",
15007
- pstlAdr: {
15008
- strtNm: "12345 Test Lane",
15009
- pstCd: "12345",
15010
- twnNm: "Newport Beach",
15011
- ctrySubDvsn: "TX",
15012
- ctry: "US"
15013
- }
15014
- },
15015
- cdtrAcct: {
15016
- id: { othr: { id: "9988957447" } }
15017
- },
15018
- purp: { prtry: "Test wire #1" },
15019
- rmtInf: { ustrd: ["Test wire #1"] }
15299
+ chrgBr: "SHAR"
15020
15300
  }
15021
15301
  ]
15022
15302
  },
15023
- appHdr: {
15024
- fr: {
15025
- fiId: {
15026
- finInstnId: {
15027
- clrSysMmbId: { mmbId: "021151080" }
15028
- }
15029
- }
15030
- },
15031
- to: {
15032
- fiId: {
15033
- finInstnId: {
15034
- clrSysMmbId: { mmbId: "321177573" }
15035
- }
15036
- }
15037
- },
15038
- bizMsgIdr: "20250703QMGFNP6700018807031250FT01",
15039
- msgDefIdr: "pacs.008.001.08",
15040
- bizSvc: "TEST",
15041
- mktPrctc: {
15042
- regy: "www2.swift.com/mystandards/#/group/Federal_Reserve_Financial_Services/Fedwire_Funds_Service",
15043
- id: "frb.fedwire.01"
15044
- },
15045
- creDt: {
15046
- dateTime: {
15047
- date: { year: 2025, month: 7, day: 3 },
15048
- time: { hour: 12, minute: 50, second: 30, nano: 22e7 }
15049
- },
15050
- offset: { totalSeconds: -14400 }
15051
- },
15052
- bizPrcgDt: {
15053
- dateTime: {
15054
- date: { year: 2025, month: 7, day: 3 },
15055
- time: { hour: 12, minute: 50, second: 30, nano: 114e6 }
15056
- },
15057
- offset: { totalSeconds: -14400 }
15058
- },
15059
- namespace: "urn:iso:std:iso:20022:tech:xsd:head.001.001.03"
15060
- },
15061
15303
  type: "MX",
15062
- "@xmlns": "urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08",
15063
15304
  identifier: "pacs.008.001.08"
15064
15305
  }
15065
15306
  }
@@ -15106,19 +15347,17 @@ var mockTransactions = [
15106
15347
  updated: "2025-09-30 20:15",
15107
15348
  isInbound: false,
15108
15349
  wireDetails: {
15109
- type: "Domestic Wire",
15350
+ type: "DOMESTIC",
15351
+ imad: "20250930MMQFMP030000125",
15352
+ omad: "20250930MMQFMP030000126",
15110
15353
  originatorName: "Real Estate Holdings",
15111
15354
  originatorAccountNumber: "998877665544",
15112
- originatorAddress: "789 Property Lane, Chicago, IL 60601",
15355
+ originatorFIName: "Fifth Third Bank",
15356
+ originatorFIId: "042000314",
15113
15357
  beneficiaryName: "Property Management LLC",
15114
15358
  beneficiaryAccountNumber: "112233445566",
15115
- beneficiaryAddress: "321 Management Blvd, Chicago, IL 60602",
15116
15359
  beneficiaryFIName: "US Bank",
15117
- beneficiaryFIRoutingNumber: "091000019",
15118
- beneficiaryFIAddress: "800 Nicollet Mall, Minneapolis, MN 55402",
15119
- originatorFIName: "Fifth Third Bank",
15120
- originatorFIRoutingNumber: "042000314",
15121
- originatorFIAddress: "38 Fountain Square Plaza, Cincinnati, OH 45263"
15360
+ beneficiaryFIId: "091000019"
15122
15361
  }
15123
15362
  },
15124
15363
  {
@@ -15163,11 +15402,17 @@ var mockTransactions = [
15163
15402
  updated: "2025-09-30 14:45",
15164
15403
  isInbound: true,
15165
15404
  achDetails: {
15405
+ originatorName: "Sunrise Ventures LLC",
15406
+ originatorRtn: "091000019",
15407
+ originatorId: "1234567890",
15408
+ receiverName: "Michael Chen",
15409
+ receiverRtn: "091000019",
15410
+ receiverAccount: "112233445566",
15166
15411
  secCode: "CCD",
15167
- traceNumber: "091000019876543",
15168
- companyName: "Sunrise Ventures LLC",
15169
- companyId: "1234567890",
15170
- effectiveDate: "2025-09-30"
15412
+ accountType: "Checking",
15413
+ effectiveDate: "2025-09-30",
15414
+ service: "Standard",
15415
+ traceNumber: "091000019876543"
15171
15416
  }
15172
15417
  },
15173
15418
  {
@@ -15184,11 +15429,17 @@ var mockTransactions = [
15184
15429
  updated: "2025-09-30 12:45",
15185
15430
  isInbound: false,
15186
15431
  achDetails: {
15432
+ originatorName: "Metro Services Inc",
15433
+ originatorRtn: "091000019",
15434
+ originatorId: "9876543210",
15435
+ receiverName: "Jennifer Lopez",
15436
+ receiverRtn: "091000019",
15437
+ receiverAccount: "998877665544",
15187
15438
  secCode: "PPD",
15188
- traceNumber: "091000019876544",
15189
- companyName: "Metro Services Inc",
15190
- companyId: "9876543210",
15191
- effectiveDate: "2025-10-01"
15439
+ accountType: "Checking",
15440
+ effectiveDate: "2025-10-01",
15441
+ service: "Standard",
15442
+ traceNumber: "091000019876544"
15192
15443
  }
15193
15444
  },
15194
15445
  {
@@ -15205,16 +15456,17 @@ var mockTransactions = [
15205
15456
  updated: "2025-09-30 11:30",
15206
15457
  isInbound: true,
15207
15458
  wireDetails: {
15208
- beneficiaryName: "Acme Holdings Ltd",
15209
- beneficiaryAccountNumber: "****7890",
15210
- beneficiaryBankName: "Deutsche Bank",
15211
- beneficiaryBankSwift: "DEUTDEFF",
15212
- originatorName: "Global Partners AG",
15213
- originatorAccountNumber: "****4321",
15214
- originatorBankName: "UBS Switzerland",
15215
- originatorBankSwift: "UBSWCHZH",
15459
+ type: "INTERNATIONAL",
15216
15460
  imad: "20250930MMQFMP030000987",
15217
- omad: "20250930MMQFMP030000988"
15461
+ omad: "20250930MMQFMP030000988",
15462
+ originatorName: "Global Partners AG",
15463
+ originatorAccountNumber: "998877664321",
15464
+ originatorFIName: "UBS Switzerland",
15465
+ originatorFIId: "UBSWCHZH",
15466
+ beneficiaryName: "Acme Holdings Ltd",
15467
+ beneficiaryAccountNumber: "556677887890",
15468
+ beneficiaryFIName: "Deutsche Bank",
15469
+ beneficiaryFIId: "DEUTDEFF"
15218
15470
  }
15219
15471
  },
15220
15472
  {
@@ -15231,16 +15483,17 @@ var mockTransactions = [
15231
15483
  updated: "2025-09-30 10:00",
15232
15484
  isInbound: false,
15233
15485
  wireDetails: {
15234
- beneficiaryName: "Tokyo Industries Co Ltd",
15235
- beneficiaryAccountNumber: "****2468",
15236
- beneficiaryBankName: "MUFG Bank",
15237
- beneficiaryBankSwift: "BOABORJP",
15238
- originatorName: "US Tech Corp",
15239
- originatorAccountNumber: "****1357",
15240
- originatorBankName: "Chase Bank",
15241
- originatorBankSwift: "CHASUS33",
15486
+ type: "INTERNATIONAL",
15242
15487
  imad: "20250930MMQFMP030000989",
15243
- omad: "20250930MMQFMP030000990"
15488
+ omad: "20250930MMQFMP030000990",
15489
+ originatorName: "US Tech Corp",
15490
+ originatorAccountNumber: "445566771357",
15491
+ originatorFIName: "Chase Bank",
15492
+ originatorFIId: "CHASUS33",
15493
+ beneficiaryName: "Tokyo Industries Co Ltd",
15494
+ beneficiaryAccountNumber: "112233442468",
15495
+ beneficiaryFIName: "MUFG Bank",
15496
+ beneficiaryFIId: "BOABORJP"
15244
15497
  }
15245
15498
  },
15246
15499
  {
@@ -15257,13 +15510,20 @@ var mockTransactions = [
15257
15510
  updated: "2025-09-30 08:45",
15258
15511
  isInbound: false,
15259
15512
  achDetails: {
15513
+ originatorName: "Quick Loans LLC",
15514
+ originatorRtn: "091000019",
15515
+ originatorId: "5678901234",
15516
+ receiverName: "David Brown",
15517
+ receiverRtn: "091000019",
15518
+ receiverAccount: "334455667788",
15260
15519
  secCode: "PPD",
15261
- traceNumber: "091000019876545",
15262
- companyName: "Quick Loans LLC",
15263
- companyId: "5678901234",
15520
+ accountType: "Checking",
15264
15521
  effectiveDate: "2025-09-30",
15522
+ service: "Standard",
15523
+ traceNumber: "091000019876545",
15265
15524
  returnCode: "R01",
15266
- returnReason: "Insufficient Funds"
15525
+ returnReason: "Insufficient Funds",
15526
+ returnedAt: "2025-09-30 08:45"
15267
15527
  }
15268
15528
  },
15269
15529
  {
@@ -15281,11 +15541,11 @@ var mockTransactions = [
15281
15541
  isInbound: true,
15282
15542
  wireDetails: {
15283
15543
  beneficiaryName: "Main Street Holdings",
15284
- beneficiaryAccountNumber: "****9876",
15544
+ beneficiaryAccountNumber: "223344559876",
15285
15545
  beneficiaryBankName: "Wells Fargo",
15286
15546
  beneficiaryBankSwift: "WFBIUS6S",
15287
15547
  originatorName: "National Corp",
15288
- originatorAccountNumber: "****5432",
15548
+ originatorAccountNumber: "667788995432",
15289
15549
  originatorBankName: "Bank of America",
15290
15550
  originatorBankSwift: "BOFAUS3N",
15291
15551
  imad: "20250929MMQFMP030000991",
@@ -15363,11 +15623,11 @@ var mockTransactions = [
15363
15623
  isInbound: true,
15364
15624
  wireDetails: {
15365
15625
  beneficiaryName: "American Import Co",
15366
- beneficiaryAccountNumber: "****3698",
15626
+ beneficiaryAccountNumber: "889900113698",
15367
15627
  beneficiaryBankName: "Citibank",
15368
15628
  beneficiaryBankSwift: "CITIUS33",
15369
15629
  originatorName: "European Trade Ltd",
15370
- originatorAccountNumber: "****7412",
15630
+ originatorAccountNumber: "334455667412",
15371
15631
  originatorBankName: "Barclays UK",
15372
15632
  originatorBankSwift: "BABORJPJ",
15373
15633
  imad: "20250929MMQFMP030000993",
@@ -16251,6 +16511,9 @@ var TransactionDetail = () => {
16251
16511
  const handleAlertClick = useCallback((alertId) => {
16252
16512
  navigate(`/alerts/${alertId}`);
16253
16513
  }, [navigate]);
16514
+ const handleLinkedPaymentClick = useCallback((paymentId) => {
16515
+ navigate(`/transactions/${paymentId}`);
16516
+ }, [navigate]);
16254
16517
  const handleIMADChange = useCallback((newImad) => {
16255
16518
  console.log("IMAD changed to:", newImad);
16256
16519
  }, []);
@@ -16283,6 +16546,7 @@ var TransactionDetail = () => {
16283
16546
  onOFACClick: handleOFACClick,
16284
16547
  onProductClick: handleProductClick,
16285
16548
  onAlertClick: handleAlertClick,
16549
+ onLinkedPaymentClick: handleLinkedPaymentClick,
16286
16550
  onIMADChange: handleIMADChange,
16287
16551
  isLoading,
16288
16552
  error,