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.cjs CHANGED
@@ -9,6 +9,9 @@ var lucideReact = require('lucide-react');
9
9
  var reactDom = require('react-dom');
10
10
  var reactSlot = require('@radix-ui/react-slot');
11
11
  var SelectPrimitive = require('@radix-ui/react-select');
12
+ var reactPdf = require('react-pdf');
13
+ require('react-pdf/dist/Page/AnnotationLayer.css');
14
+ require('react-pdf/dist/Page/TextLayer.css');
12
15
  var reactRouterDom = require('react-router-dom');
13
16
  var ScrollAreaPrimitive = require('@radix-ui/react-scroll-area');
14
17
  var DialogPrimitive = require('@radix-ui/react-dialog');
@@ -255,7 +258,7 @@ var CardFooter = React15__namespace.forwardRef(
255
258
  );
256
259
  CardFooter.displayName = "CardFooter";
257
260
  var FormCard = React15__namespace.forwardRef(
258
- ({ title, description, children, headerActions, className, variant = "default", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
261
+ ({ title, titleBadge, description, children, headerActions, className, variant = "default", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
259
262
  Card,
260
263
  {
261
264
  ref,
@@ -270,7 +273,10 @@ var FormCard = React15__namespace.forwardRef(
270
273
  direction: headerActions ? "row" : "column",
271
274
  size: "sm",
272
275
  children: [
273
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1", children: /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { size: "md", children: title }) }),
276
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
277
+ /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { size: "md", children: title }),
278
+ titleBadge
279
+ ] }) }),
274
280
  headerActions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: headerActions })
275
281
  ]
276
282
  }
@@ -857,6 +863,92 @@ var EnhancedInput = React15__namespace.forwardRef(
857
863
  }
858
864
  );
859
865
  EnhancedInput.displayName = "EnhancedInput";
866
+ reactPdf.pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${reactPdf.pdfjs.version}/build/pdf.worker.min.mjs`;
867
+ var PDFViewer = ({ url, className }) => {
868
+ const [numPages, setNumPages] = React15.useState(0);
869
+ const [pageNumber, setPageNumber] = React15.useState(1);
870
+ const [scale, setScale] = React15.useState(1);
871
+ const [isLoading, setIsLoading] = React15.useState(true);
872
+ const onDocumentLoadSuccess = ({ numPages: numPages2 }) => {
873
+ setNumPages(numPages2);
874
+ setPageNumber(1);
875
+ setIsLoading(false);
876
+ };
877
+ const onDocumentLoadError = () => {
878
+ setIsLoading(false);
879
+ };
880
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, children: [
881
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-3 border-b bg-muted/50", children: [
882
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
883
+ /* @__PURE__ */ jsxRuntime.jsx(
884
+ Button,
885
+ {
886
+ variant: "outline",
887
+ size: "sm",
888
+ onClick: () => setPageNumber((p) => Math.max(1, p - 1)),
889
+ disabled: pageNumber <= 1 || isLoading,
890
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "h-4 w-4" })
891
+ }
892
+ ),
893
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm min-w-[100px] text-center", children: isLoading ? "Loading..." : `Page ${pageNumber} of ${numPages}` }),
894
+ /* @__PURE__ */ jsxRuntime.jsx(
895
+ Button,
896
+ {
897
+ variant: "outline",
898
+ size: "sm",
899
+ onClick: () => setPageNumber((p) => Math.min(numPages, p + 1)),
900
+ disabled: pageNumber >= numPages || isLoading,
901
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-4 w-4" })
902
+ }
903
+ )
904
+ ] }),
905
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
906
+ /* @__PURE__ */ jsxRuntime.jsx(
907
+ Button,
908
+ {
909
+ variant: "outline",
910
+ size: "sm",
911
+ onClick: () => setScale((s) => Math.max(0.5, s - 0.25)),
912
+ disabled: scale <= 0.5 || isLoading,
913
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ZoomOut, { className: "h-4 w-4" })
914
+ }
915
+ ),
916
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm w-16 text-center", children: [
917
+ Math.round(scale * 100),
918
+ "%"
919
+ ] }),
920
+ /* @__PURE__ */ jsxRuntime.jsx(
921
+ Button,
922
+ {
923
+ variant: "outline",
924
+ size: "sm",
925
+ onClick: () => setScale((s) => Math.min(2, s + 0.25)),
926
+ disabled: scale >= 2 || isLoading,
927
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ZoomIn, { className: "h-4 w-4" })
928
+ }
929
+ )
930
+ ] })
931
+ ] }),
932
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-auto flex justify-center p-4 bg-muted/30 min-h-[400px]", children: /* @__PURE__ */ jsxRuntime.jsx(
933
+ reactPdf.Document,
934
+ {
935
+ file: url,
936
+ onLoadSuccess: onDocumentLoadSuccess,
937
+ onLoadError: onDocumentLoadError,
938
+ loading: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center py-16", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-8 w-8 animate-spin text-muted-foreground" }) }),
939
+ error: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center py-16 text-destructive", children: "Failed to load PDF. Please try downloading the file instead." }),
940
+ children: /* @__PURE__ */ jsxRuntime.jsx(
941
+ reactPdf.Page,
942
+ {
943
+ pageNumber,
944
+ scale,
945
+ loading: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center py-16", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-6 w-6 animate-spin text-muted-foreground" }) })
946
+ }
947
+ )
948
+ }
949
+ ) })
950
+ ] });
951
+ };
860
952
  var AlertDocuments = ({ alertId, documents }) => {
861
953
  const [isUploading, setIsUploading] = React15.useState(false);
862
954
  const [showUploadDialog, setShowUploadDialog] = React15.useState(false);
@@ -864,6 +956,14 @@ var AlertDocuments = ({ alertId, documents }) => {
864
956
  const [documentName, setDocumentName] = React15.useState("");
865
957
  const [description, setDescription] = React15.useState("");
866
958
  const [documentType, setDocumentType] = React15.useState("");
959
+ const [viewingDocument, setViewingDocument] = React15.useState(null);
960
+ const isPdfType = (name) => name.toLowerCase().endsWith(".pdf");
961
+ const handleDownload = (doc) => {
962
+ if (doc.url) {
963
+ window.open(doc.url, "_blank");
964
+ }
965
+ toast({ title: "Download", description: `Downloading ${doc.name}` });
966
+ };
867
967
  const handleFileSelect = (e) => {
868
968
  const file = e.target.files?.[0];
869
969
  if (!file) return;
@@ -1114,7 +1214,7 @@ var AlertDocuments = ({ alertId, documents }) => {
1114
1214
  variant: "ghost",
1115
1215
  size: "sm",
1116
1216
  className: "h-8 w-8 p-0",
1117
- onClick: () => toast({ title: "Preview", description: `Viewing ${doc.name}` }),
1217
+ onClick: () => setViewingDocument(doc),
1118
1218
  children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, { className: "h-4 w-4" })
1119
1219
  }
1120
1220
  ),
@@ -1144,14 +1244,68 @@ var AlertDocuments = ({ alertId, documents }) => {
1144
1244
  },
1145
1245
  doc.id
1146
1246
  )) })
1147
- ] })
1247
+ ] }),
1248
+ viewingDocument && reactDom.createPortal(
1249
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "fixed inset-0 z-[100] flex items-center justify-center p-4", children: [
1250
+ /* @__PURE__ */ jsxRuntime.jsx(
1251
+ "div",
1252
+ {
1253
+ className: "fixed inset-0 bg-background/80 backdrop-blur-sm",
1254
+ onClick: () => setViewingDocument(null)
1255
+ }
1256
+ ),
1257
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative bg-card border rounded-lg shadow-lg max-w-4xl w-full max-h-[90vh] overflow-hidden z-[101]", children: [
1258
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-4 border-b", children: [
1259
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1260
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold", children: viewingDocument.name }),
1261
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: viewingDocument.type })
1262
+ ] }),
1263
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
1264
+ /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "sm", onClick: () => handleDownload(viewingDocument), children: [
1265
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Download, { className: "h-4 w-4 mr-2" }),
1266
+ " Download"
1267
+ ] }),
1268
+ /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", className: "h-8 w-8 p-0", onClick: () => setViewingDocument(null), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }) })
1269
+ ] })
1270
+ ] }),
1271
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 overflow-auto max-h-[calc(90vh-120px)]", children: isImageType(viewingDocument.name) && viewingDocument.url ? /* @__PURE__ */ jsxRuntime.jsx(
1272
+ "img",
1273
+ {
1274
+ src: viewingDocument.url,
1275
+ alt: viewingDocument.name,
1276
+ className: "max-w-full h-auto mx-auto rounded-lg"
1277
+ }
1278
+ ) : isPdfType(viewingDocument.name) && viewingDocument.url ? /* @__PURE__ */ jsxRuntime.jsx(
1279
+ PDFViewer,
1280
+ {
1281
+ url: viewingDocument.url,
1282
+ className: "w-full h-[70vh] rounded-lg border overflow-hidden"
1283
+ }
1284
+ ) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center py-12", children: [
1285
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { className: "h-16 w-16 mx-auto mb-4 text-muted-foreground" }),
1286
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg font-medium", children: viewingDocument.name }),
1287
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mt-2", children: "Preview not available for this file type" }),
1288
+ viewingDocument.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground mt-4", children: viewingDocument.description }),
1289
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground mt-4", children: [
1290
+ "Size: ",
1291
+ viewingDocument.size,
1292
+ " \u2022 Uploaded by ",
1293
+ viewingDocument.uploadedBy,
1294
+ " \u2022 ",
1295
+ new Date(viewingDocument.uploadedAt).toLocaleDateString()
1296
+ ] })
1297
+ ] }) })
1298
+ ] })
1299
+ ] }),
1300
+ document.body
1301
+ )
1148
1302
  ] });
1149
1303
  };
1150
1304
  var InfoField = ({ label, value, layout = "vertical", className }) => {
1151
1305
  if (layout === "horizontal") {
1152
1306
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex items-start gap-3 ${className || ""}`, children: [
1153
1307
  label && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-muted-foreground flex-shrink-0 max-w-[50%]", children: label }),
1154
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-foreground flex-1 min-w-0 break-words", children: value })
1308
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-foreground flex-1 min-w-0 break-all overflow-hidden", children: value })
1155
1309
  ] });
1156
1310
  }
1157
1311
  if (layout === "compact") {
@@ -1687,6 +1841,22 @@ var ASSIGNEE_OPTIONS = [
1687
1841
  { value: "approverdev", label: "approverdev" },
1688
1842
  { value: "Unassigned", label: "Unassigned" }
1689
1843
  ];
1844
+ var BUSINESS_STATUS_OPTIONS = [
1845
+ { value: "active", label: "Active" },
1846
+ { value: "inactive", label: "Inactive" },
1847
+ { value: "suspended", label: "Suspended" }
1848
+ ];
1849
+ var BUSINESS_ENTITY_TYPE_OPTIONS = [
1850
+ { value: "SOLE_PROPRIETOR", label: "Sole Proprietor" },
1851
+ { value: "LIMITED_LIABILITY_COMPANY", label: "Limited Liability Company (LLC)" },
1852
+ { value: "CORPORATION", label: "S or C Corporation" },
1853
+ { value: "GENERAL_PARTNERSHIP", label: "General Partnership" },
1854
+ { value: "LIMITED_LIABILITY_PARTNERSHIP", label: "Limited Liability Partnership" },
1855
+ { value: "NON_PROFIT", label: "Non-Profit Corporation" },
1856
+ { value: "GOVERNMENT_ORGANIZATION", label: "Government Organization" },
1857
+ { value: "PUBLICLY_TRADED_COMPANY", label: "Publicly Traded Company" },
1858
+ { value: "TRUSTS", label: "Trusts" }
1859
+ ];
1690
1860
 
1691
1861
  // src/lib/utils/alert-utils.ts
1692
1862
  var getTypeBadgeVariant = (type) => {
@@ -1865,6 +2035,7 @@ var FormProvider = ({
1865
2035
  };
1866
2036
  var FormInput = ({
1867
2037
  name,
2038
+ type,
1868
2039
  ...props
1869
2040
  }) => {
1870
2041
  const { control, formState } = reactHookForm.useFormContext();
@@ -1874,11 +2045,21 @@ var FormInput = ({
1874
2045
  {
1875
2046
  name,
1876
2047
  control,
1877
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx(
2048
+ render: ({ field: { onChange, value, ...restField } }) => /* @__PURE__ */ jsxRuntime.jsx(
1878
2049
  EnhancedInput,
1879
2050
  {
1880
2051
  ...props,
1881
- ...field,
2052
+ ...restField,
2053
+ type,
2054
+ value: value ?? (type === "number" ? "" : ""),
2055
+ onChange: (e) => {
2056
+ if (type === "number") {
2057
+ const val = e.target.value;
2058
+ onChange(val === "" ? void 0 : parseFloat(val));
2059
+ } else {
2060
+ onChange(e.target.value);
2061
+ }
2062
+ },
1882
2063
  error
1883
2064
  }
1884
2065
  )
@@ -3334,35 +3515,25 @@ zod.z.object({
3334
3515
  intermediaryFI: intermediaryFISchema.optional()
3335
3516
  });
3336
3517
  var businessProfileSchema = zod.z.object({
3337
- // Required fields
3338
- name: zod.z.string().min(1, "Business name is required"),
3339
- productId: zod.z.number().min(1, "Product ID is required"),
3340
- businessIdType: zod.z.string().min(1, "ID Number type is required"),
3341
- // EIN, SSN, TIN, OTHER_ID
3342
- idNumber: zod.z.string().min(1, "ID Number is required"),
3343
- // Optional fields
3518
+ // All fields optional for flexible updates
3519
+ name: zod.z.string().optional(),
3520
+ productId: zod.z.number().optional(),
3521
+ businessIdType: zod.z.string().optional(),
3522
+ idNumber: zod.z.string().optional(),
3344
3523
  dba: zod.z.string().optional(),
3345
3524
  businessEntityType: zod.z.string().optional(),
3346
- // Company type
3347
3525
  incorporationState: zod.z.string().optional(),
3348
3526
  formationDate: zod.z.string().optional(),
3349
3527
  website: zod.z.string().optional(),
3350
3528
  achCompanyId: zod.z.string().optional(),
3351
- // Optional fields with pattern validation
3352
- mcc: zod.z.string().regex(/^\d{4}$/, "MCC must be 4 digits").optional().or(zod.z.literal("")),
3353
- naics: zod.z.string().regex(/^\d{6}$/, "NAICS must be 6 digits").optional().or(zod.z.literal("")),
3354
- mobilePhone: zod.z.string().regex(
3355
- /^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/im,
3356
- "Invalid phone number format"
3357
- ).optional().or(zod.z.literal("")),
3358
- // Contact person information (optional)
3529
+ mcc: zod.z.string().optional(),
3530
+ naics: zod.z.string().optional(),
3531
+ mobilePhone: zod.z.string().optional(),
3359
3532
  contactPersonFirstName: zod.z.string().optional(),
3360
3533
  contactPersonLastName: zod.z.string().optional(),
3361
3534
  contactPersonEmail: zod.z.string().optional(),
3362
3535
  contactPersonPhone: zod.z.string().optional(),
3363
- // Address (optional)
3364
3536
  address: addressSchema.optional(),
3365
- // Submitted by object (optional)
3366
3537
  submittedBy: zod.z.object({
3367
3538
  contactPersonEmail: zod.z.string().optional(),
3368
3539
  contactPersonFirstName: zod.z.string().optional(),
@@ -3423,7 +3594,14 @@ var BusinessProfileCard = ({
3423
3594
  isEditing,
3424
3595
  onToggleEdit,
3425
3596
  className,
3426
- hideActions
3597
+ hideActions,
3598
+ onProductIdClick,
3599
+ onRevealIdNumber,
3600
+ isIdNumberRevealed,
3601
+ onToggleIdNumberVisibility,
3602
+ isLoadingIdNumber,
3603
+ revealedIdNumber,
3604
+ businessEntityTypeOptions = []
3427
3605
  }) => {
3428
3606
  const [showResultDialog, setShowResultDialog] = React15.useState(false);
3429
3607
  const form = useFormWithEditState({
@@ -3458,17 +3636,7 @@ var BusinessProfileCard = ({
3458
3636
  name: "businessEntityType",
3459
3637
  label: "Business Entity Type",
3460
3638
  placeholder: "Select business type",
3461
- options: [
3462
- { value: "SOLE_PROPRIETOR", label: "Sole Proprietor" },
3463
- { value: "LIMITED_LIABILITY_COMPANY", label: "Limited Liability Company (LLC)" },
3464
- { value: "CORPORATION", label: "S or C Corporation" },
3465
- { value: "GENERAL_PARTNERSHIP", label: "General Partnership" },
3466
- { value: "LIMITED_LIABILITY_PARTNERSHIP", label: "Limited Liability Partnership" },
3467
- { value: "NON_PROFIT", label: "Non-Profit Corporation" },
3468
- { value: "GOVERNMENT_ORGANIZATION", label: "Government Organization" },
3469
- { value: "PUBLICLY_TRADED_COMPANY", label: "Publicly Traded Company" },
3470
- { value: "TRUSTS", label: "Trusts" }
3471
- ]
3639
+ options: businessEntityTypeOptions
3472
3640
  }
3473
3641
  ),
3474
3642
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -3667,7 +3835,26 @@ var BusinessProfileCard = ({
3667
3835
  ] }),
3668
3836
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
3669
3837
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Business Entity Type", value: formValues?.businessEntityType || "-", layout: "horizontal" }),
3670
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ID Number", value: formValues?.idNumber || "-", layout: "horizontal" })
3838
+ /* @__PURE__ */ jsxRuntime.jsx(
3839
+ InfoField,
3840
+ {
3841
+ label: "ID Number",
3842
+ value: onToggleIdNumberVisibility ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
3843
+ isLoadingIdNumber ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-4 w-4 animate-spin text-muted-foreground" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { children: isIdNumberRevealed && revealedIdNumber ? revealedIdNumber : "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" }),
3844
+ /* @__PURE__ */ jsxRuntime.jsx(
3845
+ "button",
3846
+ {
3847
+ type: "button",
3848
+ onClick: onToggleIdNumberVisibility,
3849
+ className: "text-muted-foreground hover:text-foreground transition-colors",
3850
+ disabled: isLoadingIdNumber,
3851
+ children: isIdNumberRevealed ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, { className: "h-4 w-4" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.EyeOff, { className: "h-4 w-4" })
3852
+ }
3853
+ )
3854
+ ] }) : formValues?.idNumber || "-",
3855
+ layout: "horizontal"
3856
+ }
3857
+ )
3671
3858
  ] }),
3672
3859
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
3673
3860
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Formation Date", value: formValues?.formationDate || "-", layout: "horizontal" }),
@@ -3704,7 +3891,22 @@ var BusinessProfileCard = ({
3704
3891
  ] }),
3705
3892
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
3706
3893
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ACH Company ID", value: formValues?.achCompanyId || "-", layout: "horizontal" }),
3707
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Product ID", value: formValues?.productId?.toString() || "-", layout: "horizontal" })
3894
+ /* @__PURE__ */ jsxRuntime.jsx(
3895
+ InfoField,
3896
+ {
3897
+ label: "Product ID",
3898
+ value: formValues?.productId && onProductIdClick ? /* @__PURE__ */ jsxRuntime.jsx(
3899
+ "button",
3900
+ {
3901
+ type: "button",
3902
+ onClick: () => onProductIdClick(formValues.productId),
3903
+ className: "text-primary hover:underline font-medium",
3904
+ children: formValues.productId
3905
+ }
3906
+ ) : formValues?.productId?.toString() || "-",
3907
+ layout: "horizontal"
3908
+ }
3909
+ )
3708
3910
  ] }),
3709
3911
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
3710
3912
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -4269,7 +4471,7 @@ var PageLayout = React15__namespace.forwardRef(
4269
4471
  });
4270
4472
  };
4271
4473
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: "flex flex-col h-screen bg-gradient-subtle", children: [
4272
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("container mx-auto px-4 py-6", maxWidthClasses[maxWidth]), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-4", children: [
4474
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("container mx-auto px-4 py-4", maxWidthClasses[maxWidth]), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-4", children: [
4273
4475
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-h-[2.5rem]", children: [
4274
4476
  /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-bold text-foreground", children: title }),
4275
4477
  description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground", children: description })
@@ -4494,21 +4696,19 @@ function DatePicker({
4494
4696
  return picker;
4495
4697
  }
4496
4698
  var uboSchema = zod.z.object({
4497
- legalFirstName: zod.z.string().min(1, "Legal first name is required"),
4498
- legalLastName: zod.z.string().min(1, "Legal last name is required"),
4499
- email: zod.z.string().email("Invalid email address"),
4500
- title: zod.z.string().min(1, "Title is required"),
4501
- ownershipPercentage: zod.z.number().min(0).max(100, "Must be between 0 and 100"),
4502
- idNumber: zod.z.string().min(1, "ID number is required"),
4503
- ssn: zod.z.string().min(1, "SSN is required"),
4504
- dateOfBirth: zod.z.date({
4505
- message: "Date of birth is required"
4506
- }),
4507
- street: zod.z.string().min(1, "Street is required"),
4699
+ legalFirstName: zod.z.string().optional(),
4700
+ legalLastName: zod.z.string().optional(),
4701
+ email: zod.z.string().optional(),
4702
+ title: zod.z.string().optional(),
4703
+ ownershipPercentage: zod.z.number().min(0, "Must be at least 0%").max(100, "Must be at most 100%").optional(),
4704
+ idNumber: zod.z.string().optional(),
4705
+ ssn: zod.z.string().optional(),
4706
+ dateOfBirth: zod.z.date().optional(),
4707
+ street: zod.z.string().optional(),
4508
4708
  apartment: zod.z.string().optional(),
4509
- city: zod.z.string().min(1, "City is required"),
4510
- state: zod.z.string().min(1, "State is required"),
4511
- country: zod.z.string().min(1, "Country is required")
4709
+ city: zod.z.string().optional(),
4710
+ state: zod.z.string().optional(),
4711
+ country: zod.z.string().optional()
4512
4712
  });
4513
4713
  var titleOptions = [
4514
4714
  { value: "CEO", label: "CEO" },
@@ -4692,18 +4892,24 @@ var AddUBODialog = ({ open, onOpenChange, onSubmit }) => {
4692
4892
  ] }) })
4693
4893
  ] }) });
4694
4894
  };
4695
- var UBOCard = ({ ubos, onUBOClick }) => {
4895
+ var UBOCard = ({ ubos, onUBOClick, onRemoveUBO }) => {
4696
4896
  const [isDialogOpen, setIsDialogOpen] = React15.useState(false);
4697
4897
  const handleAddUBO = (data) => {
4698
4898
  console.log("New UBO data:", data);
4699
4899
  sonner.toast.success("UBO added successfully");
4700
4900
  };
4901
+ const handleRemoveUBO = (uboId, uboName) => {
4902
+ if (onRemoveUBO) {
4903
+ onRemoveUBO(uboId);
4904
+ sonner.toast.success(`${uboName} removed from UBOs`);
4905
+ }
4906
+ };
4701
4907
  const columns3 = [
4702
4908
  {
4703
4909
  key: "name",
4704
4910
  title: "Name",
4705
4911
  sortable: true,
4706
- width: "40%",
4912
+ width: "35%",
4707
4913
  render: (value, row) => /* @__PURE__ */ jsxRuntime.jsx(
4708
4914
  "button",
4709
4915
  {
@@ -4717,15 +4923,34 @@ var UBOCard = ({ ubos, onUBOClick }) => {
4717
4923
  key: "title",
4718
4924
  title: "Title",
4719
4925
  sortable: true,
4720
- width: "40%"
4926
+ width: "35%"
4721
4927
  },
4722
4928
  {
4723
4929
  key: "ownershipPercentage",
4724
4930
  title: "Ownership %",
4725
4931
  sortable: true,
4726
- width: "20%",
4932
+ width: "15%",
4727
4933
  align: "right",
4728
4934
  render: (value) => `${value}%`
4935
+ },
4936
+ {
4937
+ key: "actions",
4938
+ title: "",
4939
+ width: "15%",
4940
+ align: "right",
4941
+ render: (_, row) => /* @__PURE__ */ jsxRuntime.jsx(
4942
+ Button,
4943
+ {
4944
+ variant: "ghost",
4945
+ size: "sm",
4946
+ onClick: (e) => {
4947
+ e.stopPropagation();
4948
+ handleRemoveUBO(row.id, row.name);
4949
+ },
4950
+ className: "text-destructive hover:text-destructive hover:bg-destructive/10",
4951
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { className: "h-4 w-4" })
4952
+ }
4953
+ )
4729
4954
  }
4730
4955
  ];
4731
4956
  return /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
@@ -4859,6 +5084,14 @@ var BusinessDocuments = ({ businessId, documents, onDocumentUpload }) => {
4859
5084
  const [documentName, setDocumentName] = React15.useState("");
4860
5085
  const [description, setDescription] = React15.useState("");
4861
5086
  const [documentType, setDocumentType] = React15.useState("");
5087
+ const [viewingDocument, setViewingDocument] = React15.useState(null);
5088
+ const isPdfType = (name) => name.toLowerCase().endsWith(".pdf");
5089
+ const handleDownload = (doc) => {
5090
+ if (doc.url) {
5091
+ window.open(doc.url, "_blank");
5092
+ }
5093
+ toast({ title: "Download", description: `Downloading ${doc.name}` });
5094
+ };
4862
5095
  const handleFileSelect = (e) => {
4863
5096
  const file = e.target.files?.[0];
4864
5097
  if (!file) return;
@@ -5116,7 +5349,7 @@ var BusinessDocuments = ({ businessId, documents, onDocumentUpload }) => {
5116
5349
  variant: "ghost",
5117
5350
  size: "sm",
5118
5351
  className: "h-8 w-8 p-0",
5119
- onClick: () => toast({ title: "Preview", description: `Viewing ${doc.name}` }),
5352
+ onClick: () => setViewingDocument(doc),
5120
5353
  children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, { className: "h-4 w-4" })
5121
5354
  }
5122
5355
  ),
@@ -5145,7 +5378,61 @@ var BusinessDocuments = ({ businessId, documents, onDocumentUpload }) => {
5145
5378
  ]
5146
5379
  },
5147
5380
  doc.id
5148
- )) })
5381
+ )) }),
5382
+ viewingDocument && reactDom.createPortal(
5383
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "fixed inset-0 z-[100] flex items-center justify-center p-4", children: [
5384
+ /* @__PURE__ */ jsxRuntime.jsx(
5385
+ "div",
5386
+ {
5387
+ className: "fixed inset-0 bg-background/80 backdrop-blur-sm",
5388
+ onClick: () => setViewingDocument(null)
5389
+ }
5390
+ ),
5391
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative bg-card border rounded-lg shadow-lg max-w-4xl w-full max-h-[90vh] overflow-hidden z-[101]", children: [
5392
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-4 border-b", children: [
5393
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
5394
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold", children: viewingDocument.name }),
5395
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: viewingDocument.type })
5396
+ ] }),
5397
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
5398
+ /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "sm", onClick: () => handleDownload(viewingDocument), children: [
5399
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Download, { className: "h-4 w-4 mr-2" }),
5400
+ " Download"
5401
+ ] }),
5402
+ /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", className: "h-8 w-8 p-0", onClick: () => setViewingDocument(null), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }) })
5403
+ ] })
5404
+ ] }),
5405
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 overflow-auto max-h-[calc(90vh-120px)]", children: isImageType(viewingDocument.name) && viewingDocument.url ? /* @__PURE__ */ jsxRuntime.jsx(
5406
+ "img",
5407
+ {
5408
+ src: viewingDocument.url,
5409
+ alt: viewingDocument.name,
5410
+ className: "max-w-full h-auto mx-auto rounded-lg"
5411
+ }
5412
+ ) : isPdfType(viewingDocument.name) && viewingDocument.url ? /* @__PURE__ */ jsxRuntime.jsx(
5413
+ PDFViewer,
5414
+ {
5415
+ url: viewingDocument.url,
5416
+ className: "w-full h-[70vh] rounded-lg border overflow-hidden"
5417
+ }
5418
+ ) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center py-12", children: [
5419
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { className: "h-16 w-16 mx-auto mb-4 text-muted-foreground" }),
5420
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg font-medium", children: viewingDocument.name }),
5421
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mt-2", children: "Preview not available for this file type" }),
5422
+ viewingDocument.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground mt-4", children: viewingDocument.description }),
5423
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground mt-4", children: [
5424
+ "Size: ",
5425
+ viewingDocument.size,
5426
+ " \u2022 Uploaded by ",
5427
+ viewingDocument.uploadedBy,
5428
+ " \u2022 ",
5429
+ new Date(viewingDocument.uploadedAt).toLocaleDateString()
5430
+ ] })
5431
+ ] }) })
5432
+ ] })
5433
+ ] }),
5434
+ document.body
5435
+ )
5149
5436
  ] })
5150
5437
  ] });
5151
5438
  };
@@ -5180,6 +5467,8 @@ var BusinessDetailView = ({
5180
5467
  businessAccounts,
5181
5468
  currentStatus,
5182
5469
  isEditingProfile,
5470
+ statusOptions,
5471
+ businessEntityTypeOptions,
5183
5472
  onStatusChange,
5184
5473
  onProfileDataChange,
5185
5474
  onToggleProfileEdit,
@@ -5187,7 +5476,14 @@ var BusinessDetailView = ({
5187
5476
  onNavigateToCounterparty,
5188
5477
  onAddAccount,
5189
5478
  onUBOClick,
5190
- onDocumentUpload
5479
+ onRemoveUBO,
5480
+ onDocumentUpload,
5481
+ onRevealIdNumber,
5482
+ isIdNumberRevealed,
5483
+ onToggleIdNumberVisibility,
5484
+ isLoadingIdNumber,
5485
+ revealedIdNumber,
5486
+ onProductIdClick
5191
5487
  }) => {
5192
5488
  const [showAddAccountDialog, setShowAddAccountDialog] = React15.useState(false);
5193
5489
  const handleAddAccount = (data) => {
@@ -5203,11 +5499,7 @@ var BusinessDetailView = ({
5203
5499
  {
5204
5500
  label: "",
5205
5501
  value: currentStatus,
5206
- options: [
5207
- { value: "active", label: "Active" },
5208
- { value: "inactive", label: "Inactive" },
5209
- { value: "suspended", label: "Suspended" }
5210
- ],
5502
+ options: statusOptions,
5211
5503
  onChange: onStatusChange,
5212
5504
  renderValue: (value) => /* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status: value.toUpperCase() }),
5213
5505
  className: "inline-block"
@@ -5242,10 +5534,17 @@ var BusinessDetailView = ({
5242
5534
  identityVerification,
5243
5535
  isEditing: isEditingProfile,
5244
5536
  onToggleEdit: onToggleProfileEdit,
5245
- onDataChange: onProfileDataChange
5537
+ onDataChange: onProfileDataChange,
5538
+ onProductIdClick,
5539
+ onRevealIdNumber,
5540
+ isIdNumberRevealed,
5541
+ onToggleIdNumberVisibility,
5542
+ isLoadingIdNumber,
5543
+ revealedIdNumber,
5544
+ businessEntityTypeOptions
5246
5545
  }
5247
5546
  ),
5248
- /* @__PURE__ */ jsxRuntime.jsx(UBOCard, { ubos: businessUBOs, onUBOClick }),
5547
+ /* @__PURE__ */ jsxRuntime.jsx(UBOCard, { ubos: businessUBOs, onUBOClick, onRemoveUBO }),
5249
5548
  /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
5250
5549
  /* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
5251
5550
  /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "External Accounts" }),
@@ -7054,7 +7353,7 @@ var BankingDetailsCard = ({ isEditing, onToggleEdit, className }) => {
7054
7353
  ] }) : /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "icon", onClick: onToggleEdit, className: "text-primary hover:text-primary/80 hover:bg-primary/10", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Edit, { className: "h-4 w-4" }) }) }),
7055
7354
  children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-2", children: [
7056
7355
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Primary Bank", value: "JPMorgan Chase", layout: "horizontal" }),
7057
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Account Number", value: "****-****-****-1234", layout: "horizontal" }),
7356
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Account Number", value: "1234567890121234", layout: "horizontal" }),
7058
7357
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Routing Number", value: "021000021", layout: "horizontal" }),
7059
7358
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Account Type", value: "Business Checking", layout: "horizontal" })
7060
7359
  ] }) })
@@ -8266,28 +8565,52 @@ var StatementView = ({
8266
8565
  ] });
8267
8566
  };
8268
8567
  var ACHDetailsSection = ({ data }) => {
8269
- const formatCurrency5 = (value) => {
8270
- return new Intl.NumberFormat("en-US", {
8271
- style: "currency",
8272
- currency: "USD",
8273
- minimumFractionDigits: 2
8274
- }).format(value);
8568
+ const [copiedField, setCopiedField] = React15.useState(null);
8569
+ const handleCopy = (value, field) => {
8570
+ navigator.clipboard.writeText(value);
8571
+ setCopiedField(field);
8572
+ setTimeout(() => setCopiedField(null), 2e3);
8275
8573
  };
8276
- return /* @__PURE__ */ jsxRuntime.jsxs(FormCard, { title: "ACH Transfer Details", children: [
8574
+ return /* @__PURE__ */ jsxRuntime.jsxs(FormCard, { title: "ACH Details", children: [
8277
8575
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-x-8 gap-y-4", children: [
8278
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Type", value: data.type, layout: "horizontal" }),
8279
8576
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Originator Name", value: data.originatorName, layout: "horizontal" }),
8280
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Originator Account Number", value: data.originatorAccountNumber, layout: "horizontal" }),
8281
8577
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Receiver Name", value: data.receiverName, layout: "horizontal" }),
8282
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Receiver Account Number", value: data.receiverAccountNumber, layout: "horizontal" }),
8283
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Receiver Routing Number", value: data.receiverRoutingNumber, layout: "horizontal" }),
8284
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Amount", value: formatCurrency5(data.amount), layout: "horizontal" }),
8578
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Originator RTN", value: data.originatorRtn, layout: "horizontal" }),
8579
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Receiver RTN", value: data.receiverRtn, layout: "horizontal" }),
8580
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Originator ID", value: data.originatorId, layout: "horizontal" }),
8581
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Receiver Account", value: data.receiverAccount, layout: "horizontal" }),
8285
8582
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "SEC Code", value: data.secCode, layout: "horizontal" }),
8286
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Company Entry Description", value: data.companyEntryDescription, layout: "horizontal" }),
8287
- data.companyDiscretionaryData && /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Company Discretionary Data", value: data.companyDiscretionaryData, layout: "horizontal" }),
8288
- data.individualIdNumber && /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Individual ID Number", value: data.individualIdNumber, layout: "horizontal" }),
8289
- data.individualName && /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Individual Name", value: data.individualName, layout: "horizontal" }),
8290
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Trace Number", value: data.traceNumber, layout: "horizontal" })
8583
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Account Type", value: data.accountType || "-", layout: "horizontal" }),
8584
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Effective Date", value: data.effectiveDate || "-", layout: "horizontal" }),
8585
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Service", value: data.service || "-", layout: "horizontal" }),
8586
+ /* @__PURE__ */ jsxRuntime.jsx(
8587
+ InfoField,
8588
+ {
8589
+ label: "Trace Number",
8590
+ value: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2", children: [
8591
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "break-all", children: data.traceNumber }),
8592
+ /* @__PURE__ */ jsxRuntime.jsx(
8593
+ "button",
8594
+ {
8595
+ type: "button",
8596
+ onClick: () => handleCopy(data.traceNumber, "traceNumber"),
8597
+ className: "text-muted-foreground hover:text-foreground transition-colors flex-shrink-0",
8598
+ children: copiedField === "traceNumber" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-3.5 w-3.5 text-success" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "h-3.5 w-3.5" })
8599
+ }
8600
+ )
8601
+ ] }),
8602
+ layout: "horizontal"
8603
+ }
8604
+ ),
8605
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Corrected Data", value: data.correctedData || "-", layout: "horizontal" }),
8606
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Return Code", value: data.returnCode || "-", layout: "horizontal" }),
8607
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Change Code", value: data.changeCode || "-", layout: "horizontal" }),
8608
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Return Reason", value: data.returnReason || "-", layout: "horizontal" }),
8609
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Change Reason", value: data.changeReason || "-", layout: "horizontal" }),
8610
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Returned At", value: data.returnedAt || "-", layout: "horizontal" }),
8611
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "NOC At", value: data.nocAt || "-", layout: "horizontal" }),
8612
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Addenda", value: data.addenda || "-", layout: "horizontal" }),
8613
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "IAT Addenda", value: data.iatAddenda || "-", layout: "horizontal" })
8291
8614
  ] }),
8292
8615
  data.raw && /* @__PURE__ */ jsxRuntime.jsx(CollapsibleRawSection, { data: data.raw })
8293
8616
  ] });
@@ -8313,6 +8636,7 @@ var CollapsibleRawSection = ({ data }) => {
8313
8636
  var WireDetailsSection = ({ data, onIMADChange }) => {
8314
8637
  const [isEditingImad, setIsEditingImad] = React15.useState(false);
8315
8638
  const [imadValue, setImadValue] = React15.useState(data.imad || "");
8639
+ const [copied, setCopied] = React15.useState(null);
8316
8640
  const inputRef = React15.useRef(null);
8317
8641
  React15.useEffect(() => {
8318
8642
  if (isEditingImad && inputRef.current) {
@@ -8336,85 +8660,118 @@ var WireDetailsSection = ({ data, onIMADChange }) => {
8336
8660
  handleImadCancel();
8337
8661
  }
8338
8662
  };
8339
- return /* @__PURE__ */ jsxRuntime.jsxs(FormCard, { title: "Wire Transfer Details", children: [
8340
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-x-8 gap-y-4", children: [
8341
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Type", value: data.type, layout: "horizontal" }),
8342
- /* @__PURE__ */ jsxRuntime.jsx(
8343
- InfoField,
8344
- {
8345
- label: "IMAD",
8346
- value: isEditingImad ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
8347
- /* @__PURE__ */ jsxRuntime.jsx(
8348
- "input",
8349
- {
8350
- ref: inputRef,
8351
- value: imadValue,
8352
- onChange: (e) => setImadValue(e.target.value),
8353
- onKeyDown: handleKeyDown,
8354
- className: "h-7 text-sm px-2 border border-border rounded-md bg-background focus:outline-none focus:ring-1 focus:ring-primary"
8355
- }
8356
- ),
8357
- /* @__PURE__ */ jsxRuntime.jsx(
8358
- Button,
8359
- {
8360
- variant: "ghost",
8361
- size: "icon",
8362
- className: "h-7 w-7",
8363
- onClick: handleImadSave,
8364
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4 text-success" })
8365
- }
8366
- ),
8367
- /* @__PURE__ */ jsxRuntime.jsx(
8368
- Button,
8369
- {
8370
- variant: "ghost",
8371
- size: "icon",
8372
- className: "h-7 w-7",
8373
- onClick: handleImadCancel,
8374
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4 text-muted-foreground" })
8375
- }
8376
- )
8377
- ] }) : data.imad ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
8378
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: data.imad }),
8379
- onIMADChange && /* @__PURE__ */ jsxRuntime.jsx(
8380
- Button,
8381
- {
8382
- variant: "ghost",
8383
- size: "icon",
8384
- className: "h-6 w-6",
8385
- onClick: () => setIsEditingImad(true),
8386
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Pencil, { className: "h-3 w-3 text-muted-foreground" })
8387
- }
8388
- )
8389
- ] }) : onIMADChange ? /* @__PURE__ */ jsxRuntime.jsx(
8390
- Button,
8391
- {
8392
- variant: "link",
8393
- className: "h-auto p-0 text-sm",
8394
- onClick: () => setIsEditingImad(true),
8395
- children: "Add IMAD"
8396
- }
8397
- ) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: "-" }),
8398
- layout: "horizontal"
8399
- }
8400
- ),
8401
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Originator Name", value: data.originatorName, layout: "horizontal" }),
8402
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Originator Account Number", value: data.originatorAccountNumber, layout: "horizontal" }),
8403
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Beneficiary Name", value: data.beneficiaryName, layout: "horizontal" }),
8404
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Beneficiary Account Number", value: data.beneficiaryAccountNumber, layout: "horizontal" }),
8405
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Beneficiary FI Name", value: data.beneficiaryFIName, layout: "horizontal" }),
8406
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Beneficiary FI Routing Number", value: data.beneficiaryFIRoutingNumber, layout: "horizontal" }),
8407
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Originator FI Name", value: data.originatorFIName, layout: "horizontal" }),
8408
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Originator FI Routing Number", value: data.originatorFIRoutingNumber, layout: "horizontal" }),
8409
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Originator to Beneficiary Info", value: data.originatorToBeneficiaryInfo || "-", layout: "horizontal" }),
8410
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "File Handle", value: data.fileHandle || "-", layout: "horizontal" }),
8411
- data.intermediaryFIName && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
8412
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Intermediary FI Name", value: data.intermediaryFIName, layout: "horizontal" }),
8413
- data.intermediaryFIRoutingNumber && /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Intermediary FI Routing Number", value: data.intermediaryFIRoutingNumber, layout: "horizontal" })
8414
- ] })
8415
- ] }),
8416
- data.raw && /* @__PURE__ */ jsxRuntime.jsx(CollapsibleRawSection2, { data: data.raw })
8417
- ] });
8663
+ const handleCopy = (value, field) => {
8664
+ navigator.clipboard.writeText(value);
8665
+ setCopied(field);
8666
+ setTimeout(() => setCopied(null), 2e3);
8667
+ };
8668
+ const omadFieldValue = data.omad ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
8669
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: data.omad }),
8670
+ /* @__PURE__ */ jsxRuntime.jsx(
8671
+ Button,
8672
+ {
8673
+ variant: "ghost",
8674
+ size: "icon",
8675
+ className: "h-6 w-6",
8676
+ onClick: () => handleCopy(data.omad, "omad"),
8677
+ children: copied === "omad" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-3 w-3 text-success" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "h-3 w-3 text-muted-foreground" })
8678
+ }
8679
+ )
8680
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: "-" });
8681
+ const imadFieldValue = isEditingImad ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
8682
+ /* @__PURE__ */ jsxRuntime.jsx(
8683
+ "input",
8684
+ {
8685
+ ref: inputRef,
8686
+ value: imadValue,
8687
+ onChange: (e) => setImadValue(e.target.value),
8688
+ onKeyDown: handleKeyDown,
8689
+ className: "h-7 text-sm px-2 border border-border rounded-md bg-background focus:outline-none focus:ring-1 focus:ring-primary"
8690
+ }
8691
+ ),
8692
+ /* @__PURE__ */ jsxRuntime.jsx(
8693
+ Button,
8694
+ {
8695
+ variant: "ghost",
8696
+ size: "icon",
8697
+ className: "h-7 w-7",
8698
+ onClick: handleImadSave,
8699
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4 text-success" })
8700
+ }
8701
+ ),
8702
+ /* @__PURE__ */ jsxRuntime.jsx(
8703
+ Button,
8704
+ {
8705
+ variant: "ghost",
8706
+ size: "icon",
8707
+ className: "h-7 w-7",
8708
+ onClick: handleImadCancel,
8709
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4 text-muted-foreground" })
8710
+ }
8711
+ )
8712
+ ] }) : data.imad ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
8713
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: data.imad }),
8714
+ /* @__PURE__ */ jsxRuntime.jsx(
8715
+ Button,
8716
+ {
8717
+ variant: "ghost",
8718
+ size: "icon",
8719
+ className: "h-6 w-6",
8720
+ onClick: () => handleCopy(data.imad, "imad"),
8721
+ children: copied === "imad" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-3 w-3 text-success" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "h-3 w-3 text-muted-foreground" })
8722
+ }
8723
+ ),
8724
+ onIMADChange && /* @__PURE__ */ jsxRuntime.jsx(
8725
+ Button,
8726
+ {
8727
+ variant: "ghost",
8728
+ size: "icon",
8729
+ className: "h-6 w-6",
8730
+ onClick: () => setIsEditingImad(true),
8731
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Pencil, { className: "h-3 w-3 text-muted-foreground" })
8732
+ }
8733
+ )
8734
+ ] }) : onIMADChange ? /* @__PURE__ */ jsxRuntime.jsx(
8735
+ Button,
8736
+ {
8737
+ variant: "link",
8738
+ className: "h-auto p-0 text-sm",
8739
+ onClick: () => setIsEditingImad(true),
8740
+ children: "Add IMAD"
8741
+ }
8742
+ ) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: "-" });
8743
+ return /* @__PURE__ */ jsxRuntime.jsxs(
8744
+ FormCard,
8745
+ {
8746
+ title: "Wire Transfer Details",
8747
+ titleBadge: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: data.type === "INTERNATIONAL" ? "outline" : "secondary", children: data.type === "INTERNATIONAL" ? "International" : "Domestic" }),
8748
+ children: [
8749
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-x-8 gap-y-4", children: [
8750
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "IMAD", value: imadFieldValue, layout: "horizontal" }),
8751
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "OMAD", value: omadFieldValue, layout: "horizontal" }),
8752
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Originator", value: data.originatorName, layout: "horizontal" }),
8753
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Beneficiary", value: data.beneficiaryName, layout: "horizontal" }),
8754
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Originator Account", value: data.originatorAccountNumber, layout: "horizontal" }),
8755
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Beneficiary Account", value: data.beneficiaryAccountNumber, layout: "horizontal" }),
8756
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Originator FI", value: data.originatorFIName, layout: "horizontal" }),
8757
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Beneficiary FI", value: data.beneficiaryFIName, layout: "horizontal" }),
8758
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Originator FI ID", value: data.originatorFIId, layout: "horizontal" }),
8759
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Beneficiary FI ID", value: data.beneficiaryFIId, layout: "horizontal" }),
8760
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Return Code", value: data.returnCode || "-", layout: "horizontal" }),
8761
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Return Reason", value: data.returnReason || "-", layout: "horizontal" })
8762
+ ] }),
8763
+ data.originatorToBeneficiaryInfo && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4", children: /* @__PURE__ */ jsxRuntime.jsx(
8764
+ InfoField,
8765
+ {
8766
+ label: "Originator to Beneficiary Info",
8767
+ value: data.originatorToBeneficiaryInfo,
8768
+ layout: "horizontal"
8769
+ }
8770
+ ) }),
8771
+ data.raw && /* @__PURE__ */ jsxRuntime.jsx(CollapsibleRawSection2, { data: data.raw })
8772
+ ]
8773
+ }
8774
+ );
8418
8775
  };
8419
8776
  var CollapsibleRawSection2 = ({ data }) => {
8420
8777
  const [isExpanded, setIsExpanded] = React15.useState(false);
@@ -9188,7 +9545,6 @@ var TransactionHistoryFiltersSheet = ({
9188
9545
  transactionTypes = [],
9189
9546
  transactionStatuses = [],
9190
9547
  processingStatuses = [],
9191
- directions = [],
9192
9548
  products = []
9193
9549
  } = filterOptions2;
9194
9550
  const [localFilters, setLocalFilters] = React15.useState(filters);
@@ -9228,56 +9584,16 @@ var TransactionHistoryFiltersSheet = ({
9228
9584
  /* @__PURE__ */ jsxRuntime.jsxs(SheetContent, { side: "right", className: "w-full sm:max-w-xl overflow-y-auto", children: [
9229
9585
  /* @__PURE__ */ jsxRuntime.jsx(SheetHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { children: "Transaction Filters" }) }),
9230
9586
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6 py-6", children: [
9231
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
9232
- /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-medium text-muted-foreground", children: "Options" }),
9233
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
9234
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2", children: [
9235
- /* @__PURE__ */ jsxRuntime.jsx(
9236
- Checkbox,
9237
- {
9238
- id: "showAchNoc",
9239
- checked: localFilters.showAchNoc || false,
9240
- onCheckedChange: (checked) => handleLocalFilterChange("showAchNoc", checked === true)
9241
- }
9242
- ),
9243
- /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "showAchNoc", className: "text-sm font-normal", children: "Show ACH NOC" })
9244
- ] }),
9245
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2", children: [
9246
- /* @__PURE__ */ jsxRuntime.jsx(
9247
- Checkbox,
9248
- {
9249
- id: "isInbound",
9250
- checked: localFilters.isInbound || false,
9251
- onCheckedChange: (checked) => handleLocalFilterChange("isInbound", checked === true)
9252
- }
9253
- ),
9254
- /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "isInbound", className: "text-sm font-normal", children: "Is Inbound" })
9255
- ] }),
9256
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2", children: [
9257
- /* @__PURE__ */ jsxRuntime.jsx(
9258
- Checkbox,
9259
- {
9260
- id: "excludeWire",
9261
- checked: localFilters.excludeWire || false,
9262
- onCheckedChange: (checked) => handleLocalFilterChange("excludeWire", checked === true)
9263
- }
9264
- ),
9265
- /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "excludeWire", className: "text-sm font-normal", children: "Exclude Wire" })
9266
- ] }),
9267
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2", children: [
9268
- /* @__PURE__ */ jsxRuntime.jsx(
9269
- Checkbox,
9270
- {
9271
- id: "excludeAch",
9272
- checked: localFilters.excludeAch || false,
9273
- onCheckedChange: (checked) => handleLocalFilterChange("excludeAch", checked === true)
9274
- }
9275
- ),
9276
- /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "excludeAch", className: "text-sm font-normal", children: "Exclude ACH" })
9277
- ] })
9278
- ] })
9279
- ] }),
9280
9587
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
9588
+ /* @__PURE__ */ jsxRuntime.jsx(
9589
+ EnhancedInput,
9590
+ {
9591
+ label: "Payment ID",
9592
+ value: localFilters.paymentId || "",
9593
+ onChange: (e) => handleLocalFilterChange("paymentId", e.target.value),
9594
+ placeholder: "Enter payment ID"
9595
+ }
9596
+ ),
9281
9597
  /* @__PURE__ */ jsxRuntime.jsx(
9282
9598
  EnhancedInput,
9283
9599
  {
@@ -9286,11 +9602,23 @@ var TransactionHistoryFiltersSheet = ({
9286
9602
  onChange: (e) => handleLocalFilterChange("accountNumber", e.target.value),
9287
9603
  placeholder: "Enter account number"
9288
9604
  }
9605
+ )
9606
+ ] }),
9607
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
9608
+ /* @__PURE__ */ jsxRuntime.jsx(
9609
+ EnhancedMultiSelect,
9610
+ {
9611
+ label: "Transaction Type",
9612
+ value: localFilters.transactionType || [],
9613
+ onValueChange: (value) => handleLocalFilterChange("transactionType", value),
9614
+ placeholder: "Select types",
9615
+ options: transactionTypes
9616
+ }
9289
9617
  ),
9290
9618
  /* @__PURE__ */ jsxRuntime.jsx(
9291
9619
  EnhancedSelect,
9292
9620
  {
9293
- label: "Product ID",
9621
+ label: "Product",
9294
9622
  value: localFilters.productId || "",
9295
9623
  onValueChange: (value) => handleLocalFilterChange("productId", value),
9296
9624
  placeholder: "Select product",
@@ -9300,118 +9628,26 @@ var TransactionHistoryFiltersSheet = ({
9300
9628
  ] }),
9301
9629
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
9302
9630
  /* @__PURE__ */ jsxRuntime.jsx(
9303
- EnhancedInput,
9631
+ EnhancedMultiSelect,
9304
9632
  {
9305
- label: "Customer ID",
9306
- value: localFilters.customerId || "",
9307
- onChange: (e) => handleLocalFilterChange("customerId", e.target.value),
9308
- placeholder: "Enter customer ID"
9633
+ label: "Transaction Status",
9634
+ value: localFilters.transactionStatus || [],
9635
+ onValueChange: (value) => handleLocalFilterChange("transactionStatus", value),
9636
+ placeholder: "Select statuses",
9637
+ options: transactionStatuses
9309
9638
  }
9310
9639
  ),
9311
9640
  /* @__PURE__ */ jsxRuntime.jsx(
9312
- EnhancedInput,
9641
+ EnhancedMultiSelect,
9313
9642
  {
9314
- label: "Counterparty ID",
9315
- value: localFilters.counterpartyId || "",
9316
- onChange: (e) => handleLocalFilterChange("counterpartyId", e.target.value),
9317
- placeholder: "Enter counterparty ID"
9643
+ label: "Processing Status",
9644
+ value: localFilters.processingStatus || [],
9645
+ onValueChange: (value) => handleLocalFilterChange("processingStatus", value),
9646
+ placeholder: "Select statuses",
9647
+ options: processingStatuses
9318
9648
  }
9319
9649
  )
9320
9650
  ] }),
9321
- /* @__PURE__ */ jsxRuntime.jsx(
9322
- EnhancedInput,
9323
- {
9324
- label: "Settlement File Name",
9325
- value: localFilters.settlementFileName || "",
9326
- onChange: (e) => handleLocalFilterChange("settlementFileName", e.target.value),
9327
- placeholder: "Enter settlement file name"
9328
- }
9329
- ),
9330
- /* @__PURE__ */ jsxRuntime.jsx(
9331
- EnhancedInput,
9332
- {
9333
- label: "Original File Name",
9334
- value: localFilters.originalFileName || "",
9335
- onChange: (e) => handleLocalFilterChange("originalFileName", e.target.value),
9336
- placeholder: "Enter original file name"
9337
- }
9338
- ),
9339
- /* @__PURE__ */ jsxRuntime.jsx(
9340
- EnhancedInput,
9341
- {
9342
- label: "Requester IP Address",
9343
- value: localFilters.requesterIpAddress || "",
9344
- onChange: (e) => handleLocalFilterChange("requesterIpAddress", e.target.value),
9345
- placeholder: "Enter IP address"
9346
- }
9347
- ),
9348
- /* @__PURE__ */ jsxRuntime.jsx(
9349
- EnhancedInput,
9350
- {
9351
- label: "Requester Username",
9352
- value: localFilters.requesterUsername || "",
9353
- onChange: (e) => handleLocalFilterChange("requesterUsername", e.target.value),
9354
- placeholder: "Enter username"
9355
- }
9356
- ),
9357
- /* @__PURE__ */ jsxRuntime.jsx(
9358
- EnhancedInput,
9359
- {
9360
- label: "Wire File Handle",
9361
- value: localFilters.wireFileHandle || "",
9362
- onChange: (e) => handleLocalFilterChange("wireFileHandle", e.target.value),
9363
- placeholder: "Enter wire file handle"
9364
- }
9365
- ),
9366
- /* @__PURE__ */ jsxRuntime.jsx(
9367
- EnhancedInput,
9368
- {
9369
- label: "Payment ID",
9370
- value: localFilters.paymentId || "",
9371
- onChange: (e) => handleLocalFilterChange("paymentId", e.target.value),
9372
- placeholder: "Enter payment ID"
9373
- }
9374
- ),
9375
- /* @__PURE__ */ jsxRuntime.jsx(
9376
- EnhancedMultiSelect,
9377
- {
9378
- label: "Transaction Type",
9379
- value: localFilters.transactionType || [],
9380
- onValueChange: (value) => handleLocalFilterChange("transactionType", value),
9381
- placeholder: "Select transaction types",
9382
- options: transactionTypes
9383
- }
9384
- ),
9385
- /* @__PURE__ */ jsxRuntime.jsx(
9386
- EnhancedMultiSelect,
9387
- {
9388
- label: "Transaction Status",
9389
- value: localFilters.transactionStatus || [],
9390
- onValueChange: (value) => handleLocalFilterChange("transactionStatus", value),
9391
- placeholder: "Select transaction statuses",
9392
- options: transactionStatuses
9393
- }
9394
- ),
9395
- /* @__PURE__ */ jsxRuntime.jsx(
9396
- EnhancedMultiSelect,
9397
- {
9398
- label: "Processing Status",
9399
- value: localFilters.processingStatus || [],
9400
- onValueChange: (value) => handleLocalFilterChange("processingStatus", value),
9401
- placeholder: "Select processing statuses",
9402
- options: processingStatuses
9403
- }
9404
- ),
9405
- /* @__PURE__ */ jsxRuntime.jsx(
9406
- EnhancedSelect,
9407
- {
9408
- label: "Direction",
9409
- value: localFilters.direction || "",
9410
- onValueChange: (value) => handleLocalFilterChange("direction", value),
9411
- placeholder: "Select direction",
9412
- options: directions
9413
- }
9414
- ),
9415
9651
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
9416
9652
  /* @__PURE__ */ jsxRuntime.jsx(
9417
9653
  CurrencyInput,
@@ -9432,7 +9668,7 @@ var TransactionHistoryFiltersSheet = ({
9432
9668
  ] }),
9433
9669
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
9434
9670
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
9435
- /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "Begin Date" }),
9671
+ /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "Update Date Start" }),
9436
9672
  /* @__PURE__ */ jsxRuntime.jsx(
9437
9673
  DatePicker,
9438
9674
  {
@@ -9445,7 +9681,7 @@ var TransactionHistoryFiltersSheet = ({
9445
9681
  )
9446
9682
  ] }),
9447
9683
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
9448
- /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "End Date" }),
9684
+ /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "Update Date End" }),
9449
9685
  /* @__PURE__ */ jsxRuntime.jsx(
9450
9686
  DatePicker,
9451
9687
  {
@@ -9485,6 +9721,46 @@ var TransactionHistoryFiltersSheet = ({
9485
9721
  }
9486
9722
  )
9487
9723
  ] })
9724
+ ] }),
9725
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
9726
+ /* @__PURE__ */ jsxRuntime.jsx(
9727
+ EnhancedInput,
9728
+ {
9729
+ label: "Customer ID",
9730
+ value: localFilters.customerId || "",
9731
+ onChange: (e) => handleLocalFilterChange("customerId", e.target.value),
9732
+ placeholder: "Enter customer ID"
9733
+ }
9734
+ ),
9735
+ /* @__PURE__ */ jsxRuntime.jsx(
9736
+ EnhancedInput,
9737
+ {
9738
+ label: "Counterparty ID",
9739
+ value: localFilters.counterpartyId || "",
9740
+ onChange: (e) => handleLocalFilterChange("counterpartyId", e.target.value),
9741
+ placeholder: "Enter counterparty ID"
9742
+ }
9743
+ )
9744
+ ] }),
9745
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
9746
+ /* @__PURE__ */ jsxRuntime.jsx(
9747
+ EnhancedInput,
9748
+ {
9749
+ label: "Settlement File Name",
9750
+ value: localFilters.settlementFileName || "",
9751
+ onChange: (e) => handleLocalFilterChange("settlementFileName", e.target.value),
9752
+ placeholder: "Enter file name"
9753
+ }
9754
+ ),
9755
+ /* @__PURE__ */ jsxRuntime.jsx(
9756
+ EnhancedInput,
9757
+ {
9758
+ label: "Processing File Name",
9759
+ value: localFilters.originalFileName || "",
9760
+ onChange: (e) => handleLocalFilterChange("originalFileName", e.target.value),
9761
+ placeholder: "Enter file name"
9762
+ }
9763
+ )
9488
9764
  ] })
9489
9765
  ] }),
9490
9766
  /* @__PURE__ */ jsxRuntime.jsxs(SheetFooter, { className: "flex gap-2", children: [
@@ -9611,6 +9887,7 @@ var TransactionDetailView = ({
9611
9887
  onOFACClick,
9612
9888
  onProductClick,
9613
9889
  onAlertClick,
9890
+ onLinkedPaymentClick,
9614
9891
  onIMADChange,
9615
9892
  isLoading,
9616
9893
  error,
@@ -9684,12 +9961,12 @@ var TransactionDetailView = ({
9684
9961
  InfoField,
9685
9962
  {
9686
9963
  label: "Account Number",
9687
- value: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
9964
+ value: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2", children: [
9688
9965
  /* @__PURE__ */ jsxRuntime.jsx(
9689
9966
  Button,
9690
9967
  {
9691
9968
  variant: "link",
9692
- className: "h-auto p-0 text-sm",
9969
+ className: "h-auto p-0 text-sm whitespace-normal break-all text-left",
9693
9970
  onClick: () => onAccountClick(transaction.accountNumber),
9694
9971
  children: transaction.accountNumber
9695
9972
  }
@@ -9699,7 +9976,7 @@ var TransactionDetailView = ({
9699
9976
  {
9700
9977
  type: "button",
9701
9978
  onClick: () => handleCopy(transaction.accountNumber, "accountNumber"),
9702
- className: "text-muted-foreground hover:text-foreground transition-colors",
9979
+ className: "text-muted-foreground hover:text-foreground transition-colors flex-shrink-0",
9703
9980
  children: copiedField === "accountNumber" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-3.5 w-3.5 text-success" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "h-3.5 w-3.5" })
9704
9981
  }
9705
9982
  )
@@ -9741,6 +10018,22 @@ var TransactionDetailView = ({
9741
10018
  }
9742
10019
  ),
9743
10020
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Post Date", value: transaction.created.split(" ")[0], layout: "horizontal" }),
10021
+ /* @__PURE__ */ jsxRuntime.jsx(
10022
+ InfoField,
10023
+ {
10024
+ label: "Product ID",
10025
+ value: transaction.productId ? /* @__PURE__ */ jsxRuntime.jsx(
10026
+ Button,
10027
+ {
10028
+ variant: "link",
10029
+ className: "h-auto p-0 text-sm",
10030
+ onClick: () => onProductClick(transaction.productId),
10031
+ children: transaction.productId
10032
+ }
10033
+ ) : "-",
10034
+ layout: "horizontal"
10035
+ }
10036
+ ),
9744
10037
  /* @__PURE__ */ jsxRuntime.jsx(
9745
10038
  InfoField,
9746
10039
  {
@@ -9757,20 +10050,37 @@ var TransactionDetailView = ({
9757
10050
  layout: "horizontal"
9758
10051
  }
9759
10052
  ),
9760
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Original Filename", value: transaction.originalFilename || "-", layout: "horizontal" }),
9761
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Loaded From File", value: transaction.loadedFromFile || "-", layout: "horizontal" }),
10053
+ /* @__PURE__ */ jsxRuntime.jsx(
10054
+ InfoField,
10055
+ {
10056
+ label: "Alerts",
10057
+ value: transaction.alerts && transaction.alerts.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: transaction.alerts.map((alertId, index) => /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center", children: [
10058
+ /* @__PURE__ */ jsxRuntime.jsx(
10059
+ Button,
10060
+ {
10061
+ variant: "link",
10062
+ className: "h-auto p-0 text-sm",
10063
+ onClick: () => onAlertClick?.(alertId),
10064
+ children: alertId
10065
+ }
10066
+ ),
10067
+ index < transaction.alerts.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mr-1", children: "," })
10068
+ ] }, alertId)) }) : "-",
10069
+ layout: "horizontal"
10070
+ }
10071
+ ),
9762
10072
  /* @__PURE__ */ jsxRuntime.jsx(
9763
10073
  InfoField,
9764
10074
  {
9765
10075
  label: "Payment ID",
9766
- value: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
9767
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: transaction.id }),
10076
+ value: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2", children: [
10077
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "break-all", children: transaction.id }),
9768
10078
  /* @__PURE__ */ jsxRuntime.jsx(
9769
10079
  "button",
9770
10080
  {
9771
10081
  type: "button",
9772
10082
  onClick: () => handleCopy(transaction.id, "paymentId"),
9773
- className: "text-muted-foreground hover:text-foreground transition-colors",
10083
+ className: "text-muted-foreground hover:text-foreground transition-colors flex-shrink-0",
9774
10084
  children: copiedField === "paymentId" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-3.5 w-3.5 text-success" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "h-3.5 w-3.5" })
9775
10085
  }
9776
10086
  )
@@ -9778,50 +10088,30 @@ var TransactionDetailView = ({
9778
10088
  layout: "horizontal"
9779
10089
  }
9780
10090
  ),
9781
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Linked Payment ID", value: transaction.linkedPaymentId || "-", layout: "horizontal" }),
9782
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Pending until Date", value: transaction.pendingUntilDate || "-", layout: "horizontal" }),
9783
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Further Credit To", value: transaction.furtherCreditTo || "-", layout: "horizontal" }),
9784
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Balance Available Date", value: transaction.balanceAvailableDate || "-", layout: "horizontal" }),
9785
10091
  /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Requester Username", value: transaction.requesterUsername || "-", layout: "horizontal" }),
9786
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Requester IP Address", value: transaction.requesterIpAddress || "-", layout: "horizontal" }),
9787
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Settlement Filename", value: transaction.settlementFilename || "-", layout: "horizontal" }),
9788
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Duplicate of Payment ID", value: transaction.duplicateOfPaymentId || "-", layout: "horizontal" }),
9789
10092
  /* @__PURE__ */ jsxRuntime.jsx(
9790
10093
  InfoField,
9791
10094
  {
9792
- label: "Product ID",
9793
- value: transaction.productId ? /* @__PURE__ */ jsxRuntime.jsx(
10095
+ label: "Linked Payment ID",
10096
+ value: transaction.linkedPaymentId ? /* @__PURE__ */ jsxRuntime.jsx(
9794
10097
  Button,
9795
10098
  {
9796
10099
  variant: "link",
9797
- className: "h-auto p-0 text-sm",
9798
- onClick: () => onProductClick(transaction.productId),
9799
- children: transaction.productId
10100
+ className: "h-auto p-0 text-sm whitespace-normal break-all text-left",
10101
+ onClick: () => onLinkedPaymentClick?.(transaction.linkedPaymentId),
10102
+ children: transaction.linkedPaymentId
9800
10103
  }
9801
10104
  ) : "-",
9802
10105
  layout: "horizontal"
9803
10106
  }
9804
10107
  ),
9805
- /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Returned In File", value: transaction.returnedInFile || "-", layout: "horizontal" }),
9806
- /* @__PURE__ */ jsxRuntime.jsx(
9807
- InfoField,
9808
- {
9809
- label: "Alerts",
9810
- value: transaction.alerts && transaction.alerts.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: transaction.alerts.map((alertId, index) => /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center", children: [
9811
- /* @__PURE__ */ jsxRuntime.jsx(
9812
- Button,
9813
- {
9814
- variant: "link",
9815
- className: "h-auto p-0 text-sm",
9816
- onClick: () => onAlertClick?.(alertId),
9817
- children: alertId
9818
- }
9819
- ),
9820
- index < transaction.alerts.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mr-1", children: "," })
9821
- ] }, alertId)) }) : "-",
9822
- layout: "horizontal"
9823
- }
9824
- )
10108
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Requester IP Address", value: transaction.requesterIpAddress || "-", layout: "horizontal" }),
10109
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Pending until Date", value: transaction.pendingUntilDate || "-", layout: "horizontal" }),
10110
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Further Credit To", value: transaction.furtherCreditTo || "-", layout: "horizontal" }),
10111
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Balance Available Date", value: transaction.balanceAvailableDate || "-", layout: "horizontal" }),
10112
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Settlement Filename", value: transaction.settlementFilename || "-", layout: "horizontal" }),
10113
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Original Filename", value: transaction.originalFilename || "-", layout: "horizontal" }),
10114
+ /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Loaded From File", value: transaction.loadedFromFile || "-", layout: "horizontal" })
9825
10115
  ] }) }),
9826
10116
  isACHTransfer && transaction.achDetails && /* @__PURE__ */ jsxRuntime.jsx(ACHDetailsSection, { data: transaction.achDetails }),
9827
10117
  isWireTransfer && transaction.wireDetails && /* @__PURE__ */ jsxRuntime.jsx(WireDetailsSection, { data: transaction.wireDetails, onIMADChange })
@@ -12695,7 +12985,8 @@ var mockBusinessDocuments = {
12695
12985
  description: "Official certificate of incorporation from Delaware",
12696
12986
  size: "2.3 MB",
12697
12987
  uploadedBy: "John Smith",
12698
- uploadedAt: "2024-01-10T10:30:00Z"
12988
+ uploadedAt: "2024-01-10T10:30:00Z",
12989
+ url: "/sample-documents/sample.pdf"
12699
12990
  },
12700
12991
  {
12701
12992
  id: "doc-002",
@@ -12704,7 +12995,8 @@ var mockBusinessDocuments = {
12704
12995
  description: "IRS EIN verification letter",
12705
12996
  size: "1.1 MB",
12706
12997
  uploadedBy: "Sarah Johnson",
12707
- uploadedAt: "2024-01-12T14:20:00Z"
12998
+ uploadedAt: "2024-01-12T14:20:00Z",
12999
+ url: "/sample-documents/sample.pdf"
12708
13000
  },
12709
13001
  {
12710
13002
  id: "doc-003",
@@ -12713,7 +13005,8 @@ var mockBusinessDocuments = {
12713
13005
  description: "Utility bill for business address",
12714
13006
  size: "0.8 MB",
12715
13007
  uploadedBy: "John Smith",
12716
- uploadedAt: "2024-01-15T09:15:00Z"
13008
+ uploadedAt: "2024-01-15T09:15:00Z",
13009
+ url: "/sample-documents/sample.pdf"
12717
13010
  },
12718
13011
  {
12719
13012
  id: "doc-004",
@@ -12722,7 +13015,8 @@ var mockBusinessDocuments = {
12722
13015
  description: "Company operating agreement and bylaws",
12723
13016
  size: "3.5 MB",
12724
13017
  uploadedBy: "Legal Team",
12725
- uploadedAt: "2024-01-08T16:45:00Z"
13018
+ uploadedAt: "2024-01-08T16:45:00Z",
13019
+ url: "/sample-documents/sample.pdf"
12726
13020
  }
12727
13021
  ],
12728
13022
  "8112489": [
@@ -12732,7 +13026,8 @@ var mockBusinessDocuments = {
12732
13026
  type: "BUSINESS_LICENSE",
12733
13027
  size: "1.5 MB",
12734
13028
  uploadedBy: "Emily Davis",
12735
- uploadedAt: "2024-01-05T11:00:00Z"
13029
+ uploadedAt: "2024-01-05T11:00:00Z",
13030
+ url: "/sample-documents/sample.pdf"
12736
13031
  }
12737
13032
  ]
12738
13033
  };
@@ -12869,9 +13164,11 @@ var mockBusinessProfiles = {
12869
13164
  var BusinessDetail = () => {
12870
13165
  const { id } = reactRouterDom.useParams();
12871
13166
  const navigate = reactRouterDom.useNavigate();
13167
+ const [isLoading, setIsLoading] = React15.useState(true);
13168
+ const [error, setError] = React15.useState(null);
12872
13169
  const business = mockBusinessesList.find((b) => b.id === id);
12873
13170
  const identityVerification = id ? mockIdentityVerifications[id] : void 0;
12874
- const businessUBOs = id ? mockBusinessUBOs[id] || [] : [];
13171
+ const initialUBOs = id ? mockBusinessUBOs[id] || [] : [];
12875
13172
  const initialDocuments = id ? mockBusinessDocuments[id] || [] : [];
12876
13173
  const businessAccounts = id ? mockBusinessAccounts[id] || [] : [];
12877
13174
  const initialProfile = id ? mockBusinessProfiles[id] : void 0;
@@ -12880,7 +13177,24 @@ var BusinessDetail = () => {
12880
13177
  const [businessProfile, setBusinessProfile] = React15.useState(
12881
13178
  initialProfile
12882
13179
  );
13180
+ const [businessUBOs, setBusinessUBOs] = React15.useState(initialUBOs);
13181
+ const [isIdNumberRevealed, setIsIdNumberRevealed] = React15.useState(false);
13182
+ const [revealedIdNumber, setRevealedIdNumber] = React15.useState(null);
13183
+ const [isLoadingIdNumber, setIsLoadingIdNumber] = React15.useState(false);
12883
13184
  const [businessDocuments, setBusinessDocuments] = React15.useState(initialDocuments);
13185
+ const loadData = () => {
13186
+ setIsLoading(true);
13187
+ setError(null);
13188
+ setTimeout(() => {
13189
+ if (!business) {
13190
+ setError("Business not found");
13191
+ }
13192
+ setIsLoading(false);
13193
+ }, 500);
13194
+ };
13195
+ React15.useEffect(() => {
13196
+ loadData();
13197
+ }, [id]);
12884
13198
  const handleStatusChange = (newStatus) => {
12885
13199
  setCurrentStatus(newStatus);
12886
13200
  };
@@ -12903,6 +13217,34 @@ var BusinessDetail = () => {
12903
13217
  const handleUBOClick = (customerId) => {
12904
13218
  navigate(`/customer/${customerId}`);
12905
13219
  };
13220
+ const handleRemoveUBO = (uboId) => {
13221
+ setBusinessUBOs((prev) => prev.filter((ubo) => ubo.id !== uboId));
13222
+ console.log("UBO removed:", uboId);
13223
+ };
13224
+ const handleProductIdClick = (productId) => {
13225
+ navigate(`/products/${productId}`);
13226
+ };
13227
+ const handleRevealIdNumber = async () => {
13228
+ await new Promise((resolve) => setTimeout(resolve, 800));
13229
+ return businessProfile?.idNumber || "123-45-6789";
13230
+ };
13231
+ const handleToggleIdNumberVisibility = async () => {
13232
+ if (isIdNumberRevealed) {
13233
+ setIsIdNumberRevealed(false);
13234
+ setRevealedIdNumber(null);
13235
+ } else {
13236
+ setIsLoadingIdNumber(true);
13237
+ try {
13238
+ const decryptedId = await handleRevealIdNumber();
13239
+ setRevealedIdNumber(decryptedId);
13240
+ setIsIdNumberRevealed(true);
13241
+ } catch (error2) {
13242
+ console.error("Failed to reveal ID number:", error2);
13243
+ } finally {
13244
+ setIsLoadingIdNumber(false);
13245
+ }
13246
+ }
13247
+ };
12906
13248
  const handleDocumentUpload = async (file, metadata) => {
12907
13249
  await new Promise((resolve) => setTimeout(resolve, 1e3));
12908
13250
  const newDocument = {
@@ -12917,10 +13259,23 @@ var BusinessDetail = () => {
12917
13259
  setBusinessDocuments((prev) => [...prev, newDocument]);
12918
13260
  console.log("Document uploaded:", { file, metadata, newDocument });
12919
13261
  };
12920
- if (!business) {
12921
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container mx-auto px-4 py-8", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
12922
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-2xl font-bold mb-2", children: "Business Not Found" }),
12923
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mb-4", children: "The business could not be found." })
13262
+ const handleRetry = () => {
13263
+ loadData();
13264
+ };
13265
+ if (isLoading) {
13266
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center min-h-[400px] gap-3", children: [
13267
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-8 w-8 animate-spin text-muted-foreground" }),
13268
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground", children: "Loading..." })
13269
+ ] });
13270
+ }
13271
+ if (error || !business) {
13272
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container mx-auto px-4 py-8", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center min-h-[400px] gap-4", children: [
13273
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-destructive", children: [
13274
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircle, { className: "h-5 w-5" }),
13275
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: error || "Business not found" })
13276
+ ] }),
13277
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground", children: "The business could not be loaded." }),
13278
+ /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", onClick: handleRetry, children: "Retry" })
12924
13279
  ] }) });
12925
13280
  }
12926
13281
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -12934,6 +13289,8 @@ var BusinessDetail = () => {
12934
13289
  businessAccounts,
12935
13290
  currentStatus,
12936
13291
  isEditingProfile,
13292
+ statusOptions: BUSINESS_STATUS_OPTIONS,
13293
+ businessEntityTypeOptions: BUSINESS_ENTITY_TYPE_OPTIONS,
12937
13294
  onStatusChange: handleStatusChange,
12938
13295
  onProfileDataChange: handleProfileDataChange,
12939
13296
  onToggleProfileEdit: handleToggleProfileEdit,
@@ -12941,7 +13298,14 @@ var BusinessDetail = () => {
12941
13298
  onNavigateToCounterparty: handleNavigateToCounterparty,
12942
13299
  onAddAccount: handleAddAccount,
12943
13300
  onUBOClick: handleUBOClick,
12944
- onDocumentUpload: handleDocumentUpload
13301
+ onRemoveUBO: handleRemoveUBO,
13302
+ onDocumentUpload: handleDocumentUpload,
13303
+ onProductIdClick: handleProductIdClick,
13304
+ onRevealIdNumber: handleRevealIdNumber,
13305
+ isIdNumberRevealed,
13306
+ onToggleIdNumberVisibility: handleToggleIdNumberVisibility,
13307
+ isLoadingIdNumber,
13308
+ revealedIdNumber
12945
13309
  }
12946
13310
  );
12947
13311
  };
@@ -14832,7 +15196,7 @@ function Statement() {
14832
15196
  // src/lib/mock-data/transaction-data.ts
14833
15197
  var mockTransactions = [
14834
15198
  {
14835
- id: "1",
15199
+ id: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
14836
15200
  created: "2025-10-01 00:16",
14837
15201
  accountNumber: "126713605718",
14838
15202
  amount: 34539.18,
@@ -14847,22 +15211,22 @@ var mockTransactions = [
14847
15211
  ofacId: "18323208",
14848
15212
  productId: "130",
14849
15213
  loadedFromFile: "iso21130757012764355B7.xml.126534273Q299",
15214
+ linkedPaymentId: "b2c3d4e5-f6a7-8901-bcde-f23456789012",
14850
15215
  requesterUsername: "admin@riseworks.com",
14851
15216
  requesterIpAddress: "192.168.1.100",
14852
15217
  achDetails: {
14853
- type: "ACH Credit",
14854
15218
  originatorName: "Rise Works Inc",
14855
- originatorAccountNumber: "126713605718",
15219
+ originatorRtn: "021000021",
15220
+ originatorId: "1234567890",
14856
15221
  receiverName: "VEDANT JAYESHKUMAR PATI",
14857
- receiverAccountNumber: "9876543210",
14858
- receiverRoutingNumber: "021000021",
14859
- amount: 7293.32,
15222
+ receiverRtn: "021000021",
15223
+ receiverAccount: "9876543210",
14860
15224
  secCode: "CCD",
14861
- companyEntryDescription: "PAYROLL",
14862
- companyDiscretionaryData: "4NnuJKyD9a8LUmkm",
14863
- individualIdNumber: "1234567890",
14864
- individualName: "VEDANT JAYESHKUMAR PATI",
15225
+ accountType: "Checking",
15226
+ effectiveDate: "2025-10-01",
15227
+ service: "Same Day",
14865
15228
  traceNumber: "021000021234567",
15229
+ addenda: "PAYROLL - 4NnuJKyD9a8LUmkm",
14866
15230
  raw: {
14867
15231
  recordType: "6",
14868
15232
  transactionCode: "22",
@@ -14894,7 +15258,7 @@ var mockTransactions = [
14894
15258
  }
14895
15259
  },
14896
15260
  {
14897
- id: "2",
15261
+ id: "b2c3d4e5-f6a7-8901-bcde-f23456789012",
14898
15262
  created: "2025-10-01 00:09",
14899
15263
  accountNumber: "899606565333",
14900
15264
  amount: 0.5,
@@ -14923,25 +15287,18 @@ var mockTransactions = [
14923
15287
  settlementFilename: "settlement_20250930.csv",
14924
15288
  alerts: ["OFAC Review Pending"],
14925
15289
  wireDetails: {
14926
- type: "Domestic Wire",
15290
+ type: "DOMESTIC",
15291
+ imad: "20250930MMQFMP030000123",
15292
+ omad: "20250930MMQFMP030000124",
14927
15293
  originatorName: "Tech Solutions LLC",
14928
15294
  originatorAccountNumber: "445821903456",
14929
- originatorAddress: "123 Tech Street, San Francisco, CA 94105",
15295
+ originatorFIName: "Wells Fargo Bank",
15296
+ originatorFIId: "121000248",
14930
15297
  beneficiaryName: "Global Suppliers Inc",
14931
15298
  beneficiaryAccountNumber: "998877665544",
14932
- beneficiaryAddress: "456 Supply Avenue, New York, NY 10001",
14933
15299
  beneficiaryFIName: "Chase Bank",
14934
- beneficiaryFIRoutingNumber: "021000021",
14935
- beneficiaryFIAddress: "270 Park Avenue, New York, NY 10017",
14936
- originatorFIName: "Wells Fargo Bank",
15300
+ beneficiaryFIId: "021000021",
14937
15301
  originatorToBeneficiaryInfo: "Invoice Payment for INV-2024-089 - Equipment Purchase",
14938
- fileHandle: "WR20250930-0001234",
14939
- originatorFIRoutingNumber: "121000248",
14940
- originatorFIAddress: "420 Montgomery Street, San Francisco, CA 94104",
14941
- intermediaryFIName: "Bank of America",
14942
- intermediaryFIRoutingNumber: "026009593",
14943
- intermediaryFIAddress: "100 Federal Street, Boston, MA 02110",
14944
- imad: "20250930MMQFMP030000123",
14945
15302
  raw: {
14946
15303
  fiToFICstmrCdtTrf: {
14947
15304
  grpHdr: {
@@ -14971,127 +15328,11 @@ var mockTransactions = [
14971
15328
  intrBkSttlmAmt: { value: 38, ccy: "USD" },
14972
15329
  intrBkSttlmDt: { year: 2025, month: 7, day: 3 },
14973
15330
  instdAmt: { value: 11, ccy: "USD" },
14974
- chrgBr: "SHAR",
14975
- instgAgt: {
14976
- finInstnId: {
14977
- clrSysMmbId: {
14978
- clrSysId: { cd: "USABA" },
14979
- mmbId: "321177573"
14980
- }
14981
- }
14982
- },
14983
- instdAgt: {
14984
- finInstnId: {
14985
- clrSysMmbId: {
14986
- clrSysId: { cd: "USABA" },
14987
- mmbId: "121182881"
14988
- }
14989
- }
14990
- },
14991
- dbtr: {
14992
- nm: "Sarah Escobar",
14993
- pstlAdr: {
14994
- strtNm: "12345 Kaiser lane",
14995
- bldgNb: "E425",
14996
- pstCd: "12345",
14997
- twnNm: "COSTA MESA",
14998
- ctrySubDvsn: "CA",
14999
- ctry: "US"
15000
- }
15001
- },
15002
- dbtrAcct: {
15003
- id: { othr: { id: "12345678910" } }
15004
- },
15005
- dbtrAgt: {
15006
- finInstnId: {
15007
- clrSysMmbId: {
15008
- clrSysId: { cd: "USABA" },
15009
- mmbId: "321177573"
15010
- },
15011
- nm: "NORTH BAY CREDIT UNION",
15012
- pstlAdr: {
15013
- strtNm: "397 Aviation Blvd",
15014
- pstCd: "95403",
15015
- twnNm: "Santa Rosa",
15016
- ctrySubDvsn: "CA",
15017
- ctry: "US"
15018
- }
15019
- }
15020
- },
15021
- cdtrAgt: {
15022
- finInstnId: {
15023
- clrSysMmbId: {
15024
- clrSysId: { cd: "USABA" },
15025
- mmbId: "121182881"
15026
- },
15027
- nm: "NORTH BAY CREDIT UNION",
15028
- pstlAdr: {
15029
- strtNm: "397 Aviation Blvd",
15030
- pstCd: "12345",
15031
- twnNm: "Santa Rosa",
15032
- ctrySubDvsn: "CA",
15033
- ctry: "US"
15034
- }
15035
- }
15036
- },
15037
- cdtr: {
15038
- nm: "Jake from Braid LLC",
15039
- pstlAdr: {
15040
- strtNm: "12345 Test Lane",
15041
- pstCd: "12345",
15042
- twnNm: "Newport Beach",
15043
- ctrySubDvsn: "TX",
15044
- ctry: "US"
15045
- }
15046
- },
15047
- cdtrAcct: {
15048
- id: { othr: { id: "9988957447" } }
15049
- },
15050
- purp: { prtry: "Test wire #1" },
15051
- rmtInf: { ustrd: ["Test wire #1"] }
15331
+ chrgBr: "SHAR"
15052
15332
  }
15053
15333
  ]
15054
15334
  },
15055
- appHdr: {
15056
- fr: {
15057
- fiId: {
15058
- finInstnId: {
15059
- clrSysMmbId: { mmbId: "021151080" }
15060
- }
15061
- }
15062
- },
15063
- to: {
15064
- fiId: {
15065
- finInstnId: {
15066
- clrSysMmbId: { mmbId: "321177573" }
15067
- }
15068
- }
15069
- },
15070
- bizMsgIdr: "20250703QMGFNP6700018807031250FT01",
15071
- msgDefIdr: "pacs.008.001.08",
15072
- bizSvc: "TEST",
15073
- mktPrctc: {
15074
- regy: "www2.swift.com/mystandards/#/group/Federal_Reserve_Financial_Services/Fedwire_Funds_Service",
15075
- id: "frb.fedwire.01"
15076
- },
15077
- creDt: {
15078
- dateTime: {
15079
- date: { year: 2025, month: 7, day: 3 },
15080
- time: { hour: 12, minute: 50, second: 30, nano: 22e7 }
15081
- },
15082
- offset: { totalSeconds: -14400 }
15083
- },
15084
- bizPrcgDt: {
15085
- dateTime: {
15086
- date: { year: 2025, month: 7, day: 3 },
15087
- time: { hour: 12, minute: 50, second: 30, nano: 114e6 }
15088
- },
15089
- offset: { totalSeconds: -14400 }
15090
- },
15091
- namespace: "urn:iso:std:iso:20022:tech:xsd:head.001.001.03"
15092
- },
15093
15335
  type: "MX",
15094
- "@xmlns": "urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08",
15095
15336
  identifier: "pacs.008.001.08"
15096
15337
  }
15097
15338
  }
@@ -15138,19 +15379,17 @@ var mockTransactions = [
15138
15379
  updated: "2025-09-30 20:15",
15139
15380
  isInbound: false,
15140
15381
  wireDetails: {
15141
- type: "Domestic Wire",
15382
+ type: "DOMESTIC",
15383
+ imad: "20250930MMQFMP030000125",
15384
+ omad: "20250930MMQFMP030000126",
15142
15385
  originatorName: "Real Estate Holdings",
15143
15386
  originatorAccountNumber: "998877665544",
15144
- originatorAddress: "789 Property Lane, Chicago, IL 60601",
15387
+ originatorFIName: "Fifth Third Bank",
15388
+ originatorFIId: "042000314",
15145
15389
  beneficiaryName: "Property Management LLC",
15146
15390
  beneficiaryAccountNumber: "112233445566",
15147
- beneficiaryAddress: "321 Management Blvd, Chicago, IL 60602",
15148
15391
  beneficiaryFIName: "US Bank",
15149
- beneficiaryFIRoutingNumber: "091000019",
15150
- beneficiaryFIAddress: "800 Nicollet Mall, Minneapolis, MN 55402",
15151
- originatorFIName: "Fifth Third Bank",
15152
- originatorFIRoutingNumber: "042000314",
15153
- originatorFIAddress: "38 Fountain Square Plaza, Cincinnati, OH 45263"
15392
+ beneficiaryFIId: "091000019"
15154
15393
  }
15155
15394
  },
15156
15395
  {
@@ -15195,11 +15434,17 @@ var mockTransactions = [
15195
15434
  updated: "2025-09-30 14:45",
15196
15435
  isInbound: true,
15197
15436
  achDetails: {
15437
+ originatorName: "Sunrise Ventures LLC",
15438
+ originatorRtn: "091000019",
15439
+ originatorId: "1234567890",
15440
+ receiverName: "Michael Chen",
15441
+ receiverRtn: "091000019",
15442
+ receiverAccount: "112233445566",
15198
15443
  secCode: "CCD",
15199
- traceNumber: "091000019876543",
15200
- companyName: "Sunrise Ventures LLC",
15201
- companyId: "1234567890",
15202
- effectiveDate: "2025-09-30"
15444
+ accountType: "Checking",
15445
+ effectiveDate: "2025-09-30",
15446
+ service: "Standard",
15447
+ traceNumber: "091000019876543"
15203
15448
  }
15204
15449
  },
15205
15450
  {
@@ -15216,11 +15461,17 @@ var mockTransactions = [
15216
15461
  updated: "2025-09-30 12:45",
15217
15462
  isInbound: false,
15218
15463
  achDetails: {
15464
+ originatorName: "Metro Services Inc",
15465
+ originatorRtn: "091000019",
15466
+ originatorId: "9876543210",
15467
+ receiverName: "Jennifer Lopez",
15468
+ receiverRtn: "091000019",
15469
+ receiverAccount: "998877665544",
15219
15470
  secCode: "PPD",
15220
- traceNumber: "091000019876544",
15221
- companyName: "Metro Services Inc",
15222
- companyId: "9876543210",
15223
- effectiveDate: "2025-10-01"
15471
+ accountType: "Checking",
15472
+ effectiveDate: "2025-10-01",
15473
+ service: "Standard",
15474
+ traceNumber: "091000019876544"
15224
15475
  }
15225
15476
  },
15226
15477
  {
@@ -15237,16 +15488,17 @@ var mockTransactions = [
15237
15488
  updated: "2025-09-30 11:30",
15238
15489
  isInbound: true,
15239
15490
  wireDetails: {
15240
- beneficiaryName: "Acme Holdings Ltd",
15241
- beneficiaryAccountNumber: "****7890",
15242
- beneficiaryBankName: "Deutsche Bank",
15243
- beneficiaryBankSwift: "DEUTDEFF",
15244
- originatorName: "Global Partners AG",
15245
- originatorAccountNumber: "****4321",
15246
- originatorBankName: "UBS Switzerland",
15247
- originatorBankSwift: "UBSWCHZH",
15491
+ type: "INTERNATIONAL",
15248
15492
  imad: "20250930MMQFMP030000987",
15249
- omad: "20250930MMQFMP030000988"
15493
+ omad: "20250930MMQFMP030000988",
15494
+ originatorName: "Global Partners AG",
15495
+ originatorAccountNumber: "998877664321",
15496
+ originatorFIName: "UBS Switzerland",
15497
+ originatorFIId: "UBSWCHZH",
15498
+ beneficiaryName: "Acme Holdings Ltd",
15499
+ beneficiaryAccountNumber: "556677887890",
15500
+ beneficiaryFIName: "Deutsche Bank",
15501
+ beneficiaryFIId: "DEUTDEFF"
15250
15502
  }
15251
15503
  },
15252
15504
  {
@@ -15263,16 +15515,17 @@ var mockTransactions = [
15263
15515
  updated: "2025-09-30 10:00",
15264
15516
  isInbound: false,
15265
15517
  wireDetails: {
15266
- beneficiaryName: "Tokyo Industries Co Ltd",
15267
- beneficiaryAccountNumber: "****2468",
15268
- beneficiaryBankName: "MUFG Bank",
15269
- beneficiaryBankSwift: "BOABORJP",
15270
- originatorName: "US Tech Corp",
15271
- originatorAccountNumber: "****1357",
15272
- originatorBankName: "Chase Bank",
15273
- originatorBankSwift: "CHASUS33",
15518
+ type: "INTERNATIONAL",
15274
15519
  imad: "20250930MMQFMP030000989",
15275
- omad: "20250930MMQFMP030000990"
15520
+ omad: "20250930MMQFMP030000990",
15521
+ originatorName: "US Tech Corp",
15522
+ originatorAccountNumber: "445566771357",
15523
+ originatorFIName: "Chase Bank",
15524
+ originatorFIId: "CHASUS33",
15525
+ beneficiaryName: "Tokyo Industries Co Ltd",
15526
+ beneficiaryAccountNumber: "112233442468",
15527
+ beneficiaryFIName: "MUFG Bank",
15528
+ beneficiaryFIId: "BOABORJP"
15276
15529
  }
15277
15530
  },
15278
15531
  {
@@ -15289,13 +15542,20 @@ var mockTransactions = [
15289
15542
  updated: "2025-09-30 08:45",
15290
15543
  isInbound: false,
15291
15544
  achDetails: {
15545
+ originatorName: "Quick Loans LLC",
15546
+ originatorRtn: "091000019",
15547
+ originatorId: "5678901234",
15548
+ receiverName: "David Brown",
15549
+ receiverRtn: "091000019",
15550
+ receiverAccount: "334455667788",
15292
15551
  secCode: "PPD",
15293
- traceNumber: "091000019876545",
15294
- companyName: "Quick Loans LLC",
15295
- companyId: "5678901234",
15552
+ accountType: "Checking",
15296
15553
  effectiveDate: "2025-09-30",
15554
+ service: "Standard",
15555
+ traceNumber: "091000019876545",
15297
15556
  returnCode: "R01",
15298
- returnReason: "Insufficient Funds"
15557
+ returnReason: "Insufficient Funds",
15558
+ returnedAt: "2025-09-30 08:45"
15299
15559
  }
15300
15560
  },
15301
15561
  {
@@ -15313,11 +15573,11 @@ var mockTransactions = [
15313
15573
  isInbound: true,
15314
15574
  wireDetails: {
15315
15575
  beneficiaryName: "Main Street Holdings",
15316
- beneficiaryAccountNumber: "****9876",
15576
+ beneficiaryAccountNumber: "223344559876",
15317
15577
  beneficiaryBankName: "Wells Fargo",
15318
15578
  beneficiaryBankSwift: "WFBIUS6S",
15319
15579
  originatorName: "National Corp",
15320
- originatorAccountNumber: "****5432",
15580
+ originatorAccountNumber: "667788995432",
15321
15581
  originatorBankName: "Bank of America",
15322
15582
  originatorBankSwift: "BOFAUS3N",
15323
15583
  imad: "20250929MMQFMP030000991",
@@ -15395,11 +15655,11 @@ var mockTransactions = [
15395
15655
  isInbound: true,
15396
15656
  wireDetails: {
15397
15657
  beneficiaryName: "American Import Co",
15398
- beneficiaryAccountNumber: "****3698",
15658
+ beneficiaryAccountNumber: "889900113698",
15399
15659
  beneficiaryBankName: "Citibank",
15400
15660
  beneficiaryBankSwift: "CITIUS33",
15401
15661
  originatorName: "European Trade Ltd",
15402
- originatorAccountNumber: "****7412",
15662
+ originatorAccountNumber: "334455667412",
15403
15663
  originatorBankName: "Barclays UK",
15404
15664
  originatorBankSwift: "BABORJPJ",
15405
15665
  imad: "20250929MMQFMP030000993",
@@ -16283,6 +16543,9 @@ var TransactionDetail = () => {
16283
16543
  const handleAlertClick = React15.useCallback((alertId) => {
16284
16544
  navigate(`/alerts/${alertId}`);
16285
16545
  }, [navigate]);
16546
+ const handleLinkedPaymentClick = React15.useCallback((paymentId) => {
16547
+ navigate(`/transactions/${paymentId}`);
16548
+ }, [navigate]);
16286
16549
  const handleIMADChange = React15.useCallback((newImad) => {
16287
16550
  console.log("IMAD changed to:", newImad);
16288
16551
  }, []);
@@ -16315,6 +16578,7 @@ var TransactionDetail = () => {
16315
16578
  onOFACClick: handleOFACClick,
16316
16579
  onProductClick: handleProductClick,
16317
16580
  onAlertClick: handleAlertClick,
16581
+ onLinkedPaymentClick: handleLinkedPaymentClick,
16318
16582
  onIMADChange: handleIMADChange,
16319
16583
  isLoading,
16320
16584
  error,