braid-ui 1.0.38 → 1.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/braid-ui.css +31 -0
- package/dist/css/braid-ui.min.css +1 -1
- package/dist/index.cjs +2474 -1769
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -2
- package/dist/index.d.ts +30 -2
- package/dist/index.js +2476 -1773
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React15 from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { useState, useEffect, useCallback, useMemo } from 'react';
|
|
3
3
|
import { cva } from 'class-variance-authority';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
|
-
import { ChevronDown, ChevronUp, Check, X, PanelLeft, Edit, Home, Globe, CreditCard, Building, MoreVertical, Minus, TrendingDown, TrendingUp,
|
|
7
|
+
import { ChevronDown, ChevronUp, Check, X, PanelLeft, Edit, Home, Globe, CreditCard, Building, MoreVertical, Minus, TrendingDown, TrendingUp, ChevronRight, Eye, Trash2, Plus, MessageSquare, Upload, FileText, Download, Copy, LayoutDashboard, Bell, Briefcase, FileCheck, Receipt, ArrowLeftRight, Users, Building2, Shield, AlertCircle, RefreshCw, Landmark, Search, Repeat, Zap, Box, Settings, BarChart3, Key, ChevronLeft, AlertTriangle, XCircle, CheckCircle, Clock, Ban, Circle, Wallet, Filter, User, Loader2, ArrowDownRight, ArrowUpRight, CheckCircle2, StickyNote, FileUp, RotateCcw, Send, PlayCircle, UserPlus, ChevronsUpDown, UserCheck, CalendarIcon, Package, FileJson, DollarSign } from 'lucide-react';
|
|
8
8
|
import { createPortal } from 'react-dom';
|
|
9
9
|
import { Slot } from '@radix-ui/react-slot';
|
|
10
10
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
@@ -18,14 +18,14 @@ import { z } from 'zod';
|
|
|
18
18
|
import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '@radix-ui/react-collapsible';
|
|
19
19
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
20
20
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
21
|
-
import { format } from 'date-fns';
|
|
21
|
+
import { parseISO, isBefore, startOfDay, isAfter, endOfDay, format } from 'date-fns';
|
|
22
22
|
import { DayPicker } from 'react-day-picker';
|
|
23
23
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
24
|
+
import { Toaster as Toaster$1, toast as toast$1 } from 'sonner';
|
|
24
25
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
25
26
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
26
27
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
27
28
|
import { useTheme } from 'next-themes';
|
|
28
|
-
import { Toaster as Toaster$1, toast as toast$1 } from 'sonner';
|
|
29
29
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
30
30
|
import * as ToastPrimitives from '@radix-ui/react-toast';
|
|
31
31
|
|
|
@@ -524,8 +524,8 @@ var reducer = (state, action) => {
|
|
|
524
524
|
if (toastId) {
|
|
525
525
|
addToRemoveQueue(toastId);
|
|
526
526
|
} else {
|
|
527
|
-
state.toasts.forEach((
|
|
528
|
-
addToRemoveQueue(
|
|
527
|
+
state.toasts.forEach((toast5) => {
|
|
528
|
+
addToRemoveQueue(toast5.id);
|
|
529
529
|
});
|
|
530
530
|
}
|
|
531
531
|
return {
|
|
@@ -3556,24 +3556,26 @@ var BusinessProfileCard = ({
|
|
|
3556
3556
|
}
|
|
3557
3557
|
)
|
|
3558
3558
|
] }),
|
|
3559
|
-
/* @__PURE__ */
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3559
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
3560
|
+
/* @__PURE__ */ jsx(
|
|
3561
|
+
FormInput,
|
|
3562
|
+
{
|
|
3563
|
+
name: "achCompanyId",
|
|
3564
|
+
label: "ACH Company ID",
|
|
3565
|
+
placeholder: "10-digit company ID"
|
|
3566
|
+
}
|
|
3567
|
+
),
|
|
3568
|
+
/* @__PURE__ */ jsx(
|
|
3569
|
+
FormInput,
|
|
3570
|
+
{
|
|
3571
|
+
name: "productId",
|
|
3572
|
+
label: "Product ID",
|
|
3573
|
+
type: "number",
|
|
3574
|
+
placeholder: "Product ID",
|
|
3575
|
+
disabled: true
|
|
3576
|
+
}
|
|
3577
|
+
)
|
|
3578
|
+
] }),
|
|
3577
3579
|
/* @__PURE__ */ jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Contact Person" }),
|
|
3578
3580
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
3579
3581
|
/* @__PURE__ */ jsx(
|
|
@@ -3632,6 +3634,34 @@ var BusinessProfileCard = ({
|
|
|
3632
3634
|
/* @__PURE__ */ jsx(InfoField, { label: "Website", value: formValues?.website || "-", layout: "horizontal" })
|
|
3633
3635
|
] }),
|
|
3634
3636
|
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-4", children: /* @__PURE__ */ jsx(InfoField, { label: "Business Phone", value: formValues?.mobilePhone || "-", layout: "horizontal" }) }),
|
|
3637
|
+
/* @__PURE__ */ jsx(
|
|
3638
|
+
InfoField,
|
|
3639
|
+
{
|
|
3640
|
+
label: "Address",
|
|
3641
|
+
value: formValues?.address ? (() => {
|
|
3642
|
+
const parts = [];
|
|
3643
|
+
if (formValues.address.line1) parts.push(formValues.address.line1);
|
|
3644
|
+
if (formValues.address.line2) parts.push(formValues.address.line2);
|
|
3645
|
+
const cityStateZip = [
|
|
3646
|
+
formValues.address.city,
|
|
3647
|
+
formValues.address.state,
|
|
3648
|
+
formValues.address.postalCode
|
|
3649
|
+
].filter(Boolean).join(" ");
|
|
3650
|
+
if (cityStateZip) parts.push(cityStateZip);
|
|
3651
|
+
if (formValues.address.countryCode) parts.push(formValues.address.countryCode);
|
|
3652
|
+
return parts.length > 0 ? parts.join(", ") : "-";
|
|
3653
|
+
})() : "-",
|
|
3654
|
+
layout: "horizontal"
|
|
3655
|
+
}
|
|
3656
|
+
),
|
|
3657
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
3658
|
+
/* @__PURE__ */ jsx(InfoField, { label: "MCC", value: formValues?.mcc || "-", layout: "horizontal" }),
|
|
3659
|
+
/* @__PURE__ */ jsx(InfoField, { label: "NAICS", value: formValues?.naics || "-", layout: "horizontal" })
|
|
3660
|
+
] }),
|
|
3661
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
3662
|
+
/* @__PURE__ */ jsx(InfoField, { label: "ACH Company ID", value: formValues?.achCompanyId || "-", layout: "horizontal" }),
|
|
3663
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Product ID", value: formValues?.productId?.toString() || "-", layout: "horizontal" })
|
|
3664
|
+
] }),
|
|
3635
3665
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
3636
3666
|
/* @__PURE__ */ jsx(
|
|
3637
3667
|
InfoField,
|
|
@@ -3657,32 +3687,6 @@ var BusinessProfileCard = ({
|
|
|
3657
3687
|
}
|
|
3658
3688
|
)
|
|
3659
3689
|
] }),
|
|
3660
|
-
/* @__PURE__ */ jsx(
|
|
3661
|
-
InfoField,
|
|
3662
|
-
{
|
|
3663
|
-
label: "Address",
|
|
3664
|
-
value: formValues?.address ? (() => {
|
|
3665
|
-
const parts = [];
|
|
3666
|
-
if (formValues.address.line1) parts.push(formValues.address.line1);
|
|
3667
|
-
if (formValues.address.line2) parts.push(formValues.address.line2);
|
|
3668
|
-
const cityStateZip = [
|
|
3669
|
-
formValues.address.city,
|
|
3670
|
-
formValues.address.state,
|
|
3671
|
-
formValues.address.postalCode
|
|
3672
|
-
].filter(Boolean).join(" ");
|
|
3673
|
-
if (cityStateZip) parts.push(cityStateZip);
|
|
3674
|
-
if (formValues.address.countryCode) parts.push(formValues.address.countryCode);
|
|
3675
|
-
return parts.length > 0 ? parts.join(", ") : "-";
|
|
3676
|
-
})() : "-",
|
|
3677
|
-
layout: "horizontal"
|
|
3678
|
-
}
|
|
3679
|
-
),
|
|
3680
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
3681
|
-
/* @__PURE__ */ jsx(InfoField, { label: "MCC", value: formValues?.mcc || "-", layout: "horizontal" }),
|
|
3682
|
-
/* @__PURE__ */ jsx(InfoField, { label: "NAICS", value: formValues?.naics || "-", layout: "horizontal" })
|
|
3683
|
-
] }),
|
|
3684
|
-
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-4", children: /* @__PURE__ */ jsx(InfoField, { label: "ACH Company ID", value: formValues?.achCompanyId || "-", layout: "horizontal" }) }),
|
|
3685
|
-
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-4", children: /* @__PURE__ */ jsx(InfoField, { label: "Product ID", value: formValues?.productId?.toString() || "-", layout: "horizontal" }) }),
|
|
3686
3690
|
/* @__PURE__ */ jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Contact Person" }),
|
|
3687
3691
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
3688
3692
|
/* @__PURE__ */ jsx(InfoField, { label: "First Name", value: formValues?.contactPersonFirstName || "-", layout: "horizontal" }),
|
|
@@ -4256,1109 +4260,1970 @@ var PageLayout = React15.forwardRef(
|
|
|
4256
4260
|
}
|
|
4257
4261
|
);
|
|
4258
4262
|
PageLayout.displayName = "PageLayout";
|
|
4259
|
-
var
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
sortable: true,
|
|
4265
|
-
width: "40%",
|
|
4266
|
-
render: (value, row) => /* @__PURE__ */ jsx(
|
|
4267
|
-
"button",
|
|
4268
|
-
{
|
|
4269
|
-
onClick: () => onUBOClick(row.customerId),
|
|
4270
|
-
className: "text-primary hover:underline font-medium text-left",
|
|
4271
|
-
children: value
|
|
4272
|
-
}
|
|
4273
|
-
)
|
|
4274
|
-
},
|
|
4275
|
-
{
|
|
4276
|
-
key: "title",
|
|
4277
|
-
title: "Title",
|
|
4278
|
-
sortable: true,
|
|
4279
|
-
width: "40%"
|
|
4280
|
-
},
|
|
4281
|
-
{
|
|
4282
|
-
key: "ownershipPercentage",
|
|
4283
|
-
title: "Ownership %",
|
|
4284
|
-
sortable: true,
|
|
4285
|
-
width: "20%",
|
|
4286
|
-
align: "right",
|
|
4287
|
-
render: (value) => `${value}%`
|
|
4288
|
-
}
|
|
4289
|
-
];
|
|
4290
|
-
return /* @__PURE__ */ jsxs(Card, { children: [
|
|
4291
|
-
/* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
4292
|
-
/* @__PURE__ */ jsx(CardTitle, { children: "Ultimate Beneficial Owners (UBO)" }),
|
|
4293
|
-
/* @__PURE__ */ jsxs(Button, { size: "sm", variant: "ghost", children: [
|
|
4294
|
-
/* @__PURE__ */ jsx(Plus, { className: "h-4 w-4 mr-1" }),
|
|
4295
|
-
"Add UBO"
|
|
4296
|
-
] })
|
|
4297
|
-
] }),
|
|
4298
|
-
/* @__PURE__ */ jsx(CardContent, { children: ubos.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
4299
|
-
/* @__PURE__ */ jsx(Users, { className: "h-5 w-5 opacity-50" }),
|
|
4300
|
-
/* @__PURE__ */ jsx("p", { children: "No UBOs recorded" })
|
|
4301
|
-
] }) : /* @__PURE__ */ jsx(
|
|
4302
|
-
DataTable,
|
|
4263
|
+
var FormField = React15.forwardRef(
|
|
4264
|
+
({ label, description, error, required, children, className, layout = "vertical" }, ref) => {
|
|
4265
|
+
const isHorizontal = layout === "horizontal";
|
|
4266
|
+
return /* @__PURE__ */ jsxs(
|
|
4267
|
+
"div",
|
|
4303
4268
|
{
|
|
4304
|
-
|
|
4305
|
-
|
|
4269
|
+
ref,
|
|
4270
|
+
className: cn(
|
|
4271
|
+
"space-y-2",
|
|
4272
|
+
isHorizontal && "grid grid-cols-1 md:grid-cols-3 gap-4 items-start space-y-0",
|
|
4273
|
+
className
|
|
4274
|
+
),
|
|
4275
|
+
children: [
|
|
4276
|
+
label && /* @__PURE__ */ jsxs("div", { className: cn("space-y-1", isHorizontal && "pt-2"), children: [
|
|
4277
|
+
/* @__PURE__ */ jsxs("label", { className: "text-sm font-medium text-foreground", children: [
|
|
4278
|
+
label,
|
|
4279
|
+
required && /* @__PURE__ */ jsx("span", { className: "text-destructive ml-1", children: "*" })
|
|
4280
|
+
] }),
|
|
4281
|
+
description && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: description })
|
|
4282
|
+
] }),
|
|
4283
|
+
/* @__PURE__ */ jsxs("div", { className: cn(isHorizontal && "md:col-span-2"), children: [
|
|
4284
|
+
children,
|
|
4285
|
+
error && /* @__PURE__ */ jsx("p", { className: "text-xs text-destructive mt-1", children: error })
|
|
4286
|
+
] })
|
|
4287
|
+
]
|
|
4306
4288
|
}
|
|
4307
|
-
)
|
|
4308
|
-
|
|
4289
|
+
);
|
|
4290
|
+
}
|
|
4291
|
+
);
|
|
4292
|
+
FormField.displayName = "FormField";
|
|
4293
|
+
var spacingClasses = {
|
|
4294
|
+
sm: "space-y-3",
|
|
4295
|
+
md: "space-y-4",
|
|
4296
|
+
lg: "space-y-6"
|
|
4309
4297
|
};
|
|
4310
|
-
var
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4298
|
+
var gridClasses = {
|
|
4299
|
+
1: "grid-cols-1",
|
|
4300
|
+
2: "grid-cols-1 md:grid-cols-2",
|
|
4301
|
+
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
|
|
4302
|
+
4: "grid-cols-1 md:grid-cols-2 lg:grid-cols-4"
|
|
4303
|
+
};
|
|
4304
|
+
var FormSection = React15.forwardRef(
|
|
4305
|
+
({
|
|
4306
|
+
title,
|
|
4307
|
+
description,
|
|
4308
|
+
children,
|
|
4309
|
+
className,
|
|
4310
|
+
spacing: spacing2 = "md",
|
|
4311
|
+
layout = "vertical",
|
|
4312
|
+
columns: columns3 = 2
|
|
4313
|
+
}, ref) => {
|
|
4314
|
+
return /* @__PURE__ */ jsxs("div", { ref, className: cn("space-y-4", className), children: [
|
|
4315
|
+
(title || description) && /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
4316
|
+
title && /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold text-foreground", children: title }),
|
|
4317
|
+
description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: description })
|
|
4318
|
+
] }),
|
|
4319
|
+
/* @__PURE__ */ jsx("div", { className: cn(
|
|
4320
|
+
layout === "grid" ? `grid gap-4 ${gridClasses[columns3]}` : spacingClasses[spacing2]
|
|
4321
|
+
), children })
|
|
4322
|
+
] });
|
|
4323
|
+
}
|
|
4324
|
+
);
|
|
4325
|
+
FormSection.displayName = "FormSection";
|
|
4326
|
+
function Calendar({
|
|
4327
|
+
className,
|
|
4328
|
+
classNames,
|
|
4329
|
+
showOutsideDays = true,
|
|
4330
|
+
...props
|
|
4331
|
+
}) {
|
|
4332
|
+
return /* @__PURE__ */ jsx(
|
|
4333
|
+
DayPicker,
|
|
4334
|
+
{
|
|
4335
|
+
showOutsideDays,
|
|
4336
|
+
className: cn("p-3 pointer-events-auto", className),
|
|
4337
|
+
classNames: {
|
|
4338
|
+
months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
|
|
4339
|
+
month: "space-y-4",
|
|
4340
|
+
caption: "flex justify-center pt-1 relative items-center",
|
|
4341
|
+
caption_label: "text-sm font-medium",
|
|
4342
|
+
nav: "space-x-1 flex items-center",
|
|
4343
|
+
button_previous: "absolute left-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
|
|
4344
|
+
button_next: "absolute right-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
|
|
4345
|
+
month_grid: "w-full border-collapse space-y-1",
|
|
4346
|
+
weekdays: "flex",
|
|
4347
|
+
weekday: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
|
|
4348
|
+
week: "flex w-full mt-2",
|
|
4349
|
+
day: "h-9 w-9 text-center text-sm p-0 relative hover:bg-accent hover:text-accent-foreground rounded-md",
|
|
4350
|
+
day_button: cn(
|
|
4351
|
+
buttonVariants({ variant: "ghost" }),
|
|
4352
|
+
"h-9 w-9 p-0 font-normal"
|
|
4353
|
+
),
|
|
4354
|
+
selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground",
|
|
4355
|
+
today: "bg-accent text-accent-foreground",
|
|
4356
|
+
outside: "text-muted-foreground opacity-50",
|
|
4357
|
+
disabled: "text-muted-foreground opacity-50",
|
|
4358
|
+
hidden: "invisible",
|
|
4359
|
+
...classNames
|
|
4360
|
+
},
|
|
4361
|
+
...props
|
|
4331
4362
|
}
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4363
|
+
);
|
|
4364
|
+
}
|
|
4365
|
+
Calendar.displayName = "Calendar";
|
|
4366
|
+
var Popover = PopoverPrimitive.Root;
|
|
4367
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
4368
|
+
var PopoverContent = React15.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
4369
|
+
PopoverPrimitive.Content,
|
|
4370
|
+
{
|
|
4371
|
+
ref,
|
|
4372
|
+
align,
|
|
4373
|
+
sideOffset,
|
|
4374
|
+
className: cn(
|
|
4375
|
+
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
4376
|
+
className
|
|
4377
|
+
),
|
|
4378
|
+
...props
|
|
4379
|
+
}
|
|
4380
|
+
) }));
|
|
4381
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
4382
|
+
function DatePicker({
|
|
4383
|
+
date,
|
|
4384
|
+
onDateChange,
|
|
4385
|
+
placeholder = "Pick a date",
|
|
4386
|
+
disabled = false,
|
|
4387
|
+
className,
|
|
4388
|
+
buttonClassName,
|
|
4389
|
+
calendarClassName,
|
|
4390
|
+
align = "start",
|
|
4391
|
+
disabledDates,
|
|
4392
|
+
label,
|
|
4393
|
+
wrapperClassName
|
|
4394
|
+
}) {
|
|
4395
|
+
const [open, setOpen] = React15.useState(false);
|
|
4396
|
+
const handleSelect = (selectedDate) => {
|
|
4397
|
+
onDateChange?.(selectedDate);
|
|
4398
|
+
setOpen(false);
|
|
4399
|
+
};
|
|
4400
|
+
const picker = /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
4401
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
4402
|
+
Button,
|
|
4403
|
+
{
|
|
4404
|
+
variant: "outline",
|
|
4405
|
+
disabled,
|
|
4406
|
+
className: cn(
|
|
4407
|
+
"justify-start text-left font-normal",
|
|
4408
|
+
!date && "text-muted-foreground",
|
|
4409
|
+
buttonClassName
|
|
4410
|
+
),
|
|
4411
|
+
children: [
|
|
4412
|
+
/* @__PURE__ */ jsx(CalendarIcon, { className: "mr-2 h-4 w-4" }),
|
|
4413
|
+
date ? format(date, "MM/dd/yyyy") : placeholder
|
|
4414
|
+
]
|
|
4415
|
+
}
|
|
4416
|
+
) }),
|
|
4417
|
+
/* @__PURE__ */ jsx(PopoverContent, { className: cn("w-auto p-0", className), align, children: /* @__PURE__ */ jsx(
|
|
4418
|
+
Calendar,
|
|
4419
|
+
{
|
|
4420
|
+
mode: "single",
|
|
4421
|
+
selected: date,
|
|
4422
|
+
onSelect: handleSelect,
|
|
4423
|
+
disabled: disabledDates,
|
|
4424
|
+
initialFocus: true,
|
|
4425
|
+
className: cn("pointer-events-auto", calendarClassName)
|
|
4426
|
+
}
|
|
4427
|
+
) })
|
|
4428
|
+
] });
|
|
4429
|
+
if (label) {
|
|
4430
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("space-y-2", wrapperClassName), children: [
|
|
4431
|
+
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: label }),
|
|
4432
|
+
picker
|
|
4433
|
+
] });
|
|
4434
|
+
}
|
|
4435
|
+
return picker;
|
|
4436
|
+
}
|
|
4437
|
+
var uboSchema = z.object({
|
|
4438
|
+
legalFirstName: z.string().min(1, "Legal first name is required"),
|
|
4439
|
+
legalLastName: z.string().min(1, "Legal last name is required"),
|
|
4440
|
+
email: z.string().email("Invalid email address"),
|
|
4441
|
+
title: z.string().min(1, "Title is required"),
|
|
4442
|
+
ownershipPercentage: z.number().min(0).max(100, "Must be between 0 and 100"),
|
|
4443
|
+
idNumber: z.string().min(1, "ID number is required"),
|
|
4444
|
+
ssn: z.string().min(1, "SSN is required"),
|
|
4445
|
+
dateOfBirth: z.date({
|
|
4446
|
+
message: "Date of birth is required"
|
|
4447
|
+
}),
|
|
4448
|
+
street: z.string().min(1, "Street is required"),
|
|
4449
|
+
apartment: z.string().optional(),
|
|
4450
|
+
city: z.string().min(1, "City is required"),
|
|
4451
|
+
state: z.string().min(1, "State is required"),
|
|
4452
|
+
country: z.string().min(1, "Country is required")
|
|
4453
|
+
});
|
|
4454
|
+
var titleOptions = [
|
|
4455
|
+
{ value: "CEO", label: "CEO" },
|
|
4456
|
+
{ value: "CFO", label: "CFO" },
|
|
4457
|
+
{ value: "CTO", label: "CTO" },
|
|
4458
|
+
{ value: "COO", label: "COO" },
|
|
4459
|
+
{ value: "President", label: "President" },
|
|
4460
|
+
{ value: "Vice President", label: "Vice President" },
|
|
4461
|
+
{ value: "Director", label: "Director" },
|
|
4462
|
+
{ value: "Manager", label: "Manager" },
|
|
4463
|
+
{ value: "Board Member", label: "Board Member" },
|
|
4464
|
+
{ value: "Partner", label: "Partner" },
|
|
4465
|
+
{ value: "Other", label: "Other" }
|
|
4466
|
+
];
|
|
4467
|
+
var AddUBODialog = ({ open, onOpenChange, onSubmit }) => {
|
|
4468
|
+
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
4469
|
+
const form = useForm({
|
|
4470
|
+
resolver: zodResolver(uboSchema),
|
|
4471
|
+
defaultValues: {
|
|
4472
|
+
legalFirstName: "",
|
|
4473
|
+
legalLastName: "",
|
|
4474
|
+
email: "",
|
|
4475
|
+
title: "",
|
|
4476
|
+
ownershipPercentage: 0,
|
|
4477
|
+
idNumber: "",
|
|
4478
|
+
ssn: "",
|
|
4479
|
+
street: "",
|
|
4480
|
+
apartment: "",
|
|
4481
|
+
city: "",
|
|
4482
|
+
state: "",
|
|
4483
|
+
country: "US"
|
|
4484
|
+
}
|
|
4485
|
+
});
|
|
4486
|
+
const handleSubmit = async (data) => {
|
|
4487
|
+
setIsSubmitting(true);
|
|
4488
|
+
try {
|
|
4489
|
+
await onSubmit(data);
|
|
4490
|
+
form.reset();
|
|
4491
|
+
onOpenChange(false);
|
|
4492
|
+
} catch (error) {
|
|
4493
|
+
console.error("Error adding UBO:", error);
|
|
4351
4494
|
} finally {
|
|
4352
|
-
|
|
4495
|
+
setIsSubmitting(false);
|
|
4353
4496
|
}
|
|
4354
4497
|
};
|
|
4355
|
-
const
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
setDescription("");
|
|
4359
|
-
setDocumentType("");
|
|
4360
|
-
const fileInput = document.getElementById("file-upload");
|
|
4361
|
-
if (fileInput) fileInput.value = "";
|
|
4362
|
-
};
|
|
4363
|
-
const handleCancelUpload = () => {
|
|
4364
|
-
setShowUploadDialog(false);
|
|
4365
|
-
resetForm();
|
|
4366
|
-
};
|
|
4367
|
-
const isImageType = (name) => {
|
|
4368
|
-
const imageExtensions = [".jpg", ".jpeg", ".png", ".gif", ".webp", ".bmp"];
|
|
4369
|
-
return imageExtensions.some((ext) => name.toLowerCase().endsWith(ext));
|
|
4370
|
-
};
|
|
4371
|
-
const getFileIcon = (type) => {
|
|
4372
|
-
return /* @__PURE__ */ jsx(FileText, { className: "h-5 w-5" });
|
|
4373
|
-
};
|
|
4374
|
-
const getFileTypeColor = (type) => {
|
|
4375
|
-
switch (type.toUpperCase()) {
|
|
4376
|
-
case "PDF":
|
|
4377
|
-
return "text-red-500";
|
|
4378
|
-
case "DOCX":
|
|
4379
|
-
case "DOC":
|
|
4380
|
-
return "text-blue-500";
|
|
4381
|
-
case "XLSX":
|
|
4382
|
-
case "XLS":
|
|
4383
|
-
return "text-green-500";
|
|
4384
|
-
case "JPG":
|
|
4385
|
-
case "JPEG":
|
|
4386
|
-
case "PNG":
|
|
4387
|
-
return "text-purple-500";
|
|
4388
|
-
default:
|
|
4389
|
-
return "text-muted-foreground";
|
|
4390
|
-
}
|
|
4498
|
+
const handleCancel = () => {
|
|
4499
|
+
form.reset();
|
|
4500
|
+
onOpenChange(false);
|
|
4391
4501
|
};
|
|
4392
|
-
|
|
4393
|
-
{
|
|
4394
|
-
{
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4502
|
+
return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(DialogContent, { className: "max-w-3xl max-h-[90vh] overflow-y-auto", children: [
|
|
4503
|
+
/* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { children: "Add Ultimate Beneficial Owner" }) }),
|
|
4504
|
+
/* @__PURE__ */ jsx(FormProvider$1, { ...form, children: /* @__PURE__ */ jsxs("form", { onSubmit: form.handleSubmit(handleSubmit), className: "space-y-6", children: [
|
|
4505
|
+
/* @__PURE__ */ jsxs(FormSection, { layout: "grid", columns: 2, spacing: "md", children: [
|
|
4506
|
+
/* @__PURE__ */ jsx(
|
|
4507
|
+
FormInput,
|
|
4508
|
+
{
|
|
4509
|
+
name: "legalFirstName",
|
|
4510
|
+
label: "Legal first name",
|
|
4511
|
+
placeholder: "Enter first name"
|
|
4512
|
+
}
|
|
4513
|
+
),
|
|
4514
|
+
/* @__PURE__ */ jsx(
|
|
4515
|
+
FormInput,
|
|
4516
|
+
{
|
|
4517
|
+
name: "legalLastName",
|
|
4518
|
+
label: "Legal last name",
|
|
4519
|
+
placeholder: "Enter last name"
|
|
4520
|
+
}
|
|
4521
|
+
)
|
|
4522
|
+
] }),
|
|
4523
|
+
/* @__PURE__ */ jsx(FormSection, { layout: "vertical", spacing: "md", children: /* @__PURE__ */ jsx(
|
|
4524
|
+
FormInput,
|
|
4406
4525
|
{
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
children: [
|
|
4412
|
-
/* @__PURE__ */ jsx(Upload, { className: "h-4 w-4" }),
|
|
4413
|
-
"Upload"
|
|
4414
|
-
]
|
|
4526
|
+
name: "email",
|
|
4527
|
+
label: "Email",
|
|
4528
|
+
type: "email",
|
|
4529
|
+
placeholder: "Enter email address"
|
|
4415
4530
|
}
|
|
4416
|
-
)
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4531
|
+
) }),
|
|
4532
|
+
/* @__PURE__ */ jsxs(FormSection, { layout: "grid", columns: 2, spacing: "md", children: [
|
|
4533
|
+
/* @__PURE__ */ jsx(
|
|
4534
|
+
FormSelect,
|
|
4535
|
+
{
|
|
4536
|
+
name: "title",
|
|
4537
|
+
label: "Title",
|
|
4538
|
+
placeholder: "Select title",
|
|
4539
|
+
options: titleOptions
|
|
4540
|
+
}
|
|
4541
|
+
),
|
|
4542
|
+
/* @__PURE__ */ jsx(
|
|
4543
|
+
FormInput,
|
|
4544
|
+
{
|
|
4545
|
+
name: "ownershipPercentage",
|
|
4546
|
+
label: "Ownership %",
|
|
4547
|
+
type: "number",
|
|
4548
|
+
placeholder: "Enter ownership percentage"
|
|
4549
|
+
}
|
|
4550
|
+
)
|
|
4551
|
+
] }),
|
|
4552
|
+
/* @__PURE__ */ jsxs(FormSection, { layout: "grid", columns: 2, spacing: "md", children: [
|
|
4553
|
+
/* @__PURE__ */ jsx(
|
|
4554
|
+
FormInput,
|
|
4555
|
+
{
|
|
4556
|
+
name: "idNumber",
|
|
4557
|
+
label: "ID Number",
|
|
4558
|
+
placeholder: "Enter ID number"
|
|
4559
|
+
}
|
|
4560
|
+
),
|
|
4561
|
+
/* @__PURE__ */ jsx(
|
|
4562
|
+
FormInput,
|
|
4563
|
+
{
|
|
4564
|
+
name: "ssn",
|
|
4565
|
+
label: "SSN",
|
|
4566
|
+
placeholder: "Enter SSN"
|
|
4567
|
+
}
|
|
4568
|
+
)
|
|
4569
|
+
] }),
|
|
4570
|
+
/* @__PURE__ */ jsx(FormSection, { layout: "vertical", spacing: "md", children: /* @__PURE__ */ jsx(FormField, { label: "Date of birth", children: /* @__PURE__ */ jsx(
|
|
4571
|
+
Controller,
|
|
4572
|
+
{
|
|
4573
|
+
name: "dateOfBirth",
|
|
4574
|
+
control: form.control,
|
|
4575
|
+
render: ({ field }) => /* @__PURE__ */ jsx(
|
|
4576
|
+
DatePicker,
|
|
4577
|
+
{
|
|
4578
|
+
date: field.value,
|
|
4579
|
+
onDateChange: field.onChange,
|
|
4580
|
+
placeholder: "MM/DD/YYYY"
|
|
4581
|
+
}
|
|
4582
|
+
)
|
|
4583
|
+
}
|
|
4584
|
+
) }) }),
|
|
4585
|
+
/* @__PURE__ */ jsxs(FormSection, { title: "Address Details", layout: "vertical", spacing: "md", children: [
|
|
4586
|
+
/* @__PURE__ */ jsx(
|
|
4587
|
+
FormInput,
|
|
4588
|
+
{
|
|
4589
|
+
name: "street",
|
|
4590
|
+
label: "Street",
|
|
4591
|
+
placeholder: "Enter street address"
|
|
4592
|
+
}
|
|
4593
|
+
),
|
|
4594
|
+
/* @__PURE__ */ jsx(
|
|
4595
|
+
FormInput,
|
|
4596
|
+
{
|
|
4597
|
+
name: "apartment",
|
|
4598
|
+
label: "Apartment, suite, or floor",
|
|
4599
|
+
placeholder: "Enter apartment, suite, or floor (optional)"
|
|
4600
|
+
}
|
|
4601
|
+
),
|
|
4602
|
+
/* @__PURE__ */ jsxs(FormSection, { layout: "grid", columns: 2, spacing: "md", children: [
|
|
4421
4603
|
/* @__PURE__ */ jsx(
|
|
4422
|
-
|
|
4604
|
+
FormInput,
|
|
4423
4605
|
{
|
|
4424
|
-
|
|
4425
|
-
|
|
4606
|
+
name: "city",
|
|
4607
|
+
label: "City",
|
|
4608
|
+
placeholder: "Enter city"
|
|
4426
4609
|
}
|
|
4427
4610
|
),
|
|
4428
|
-
/* @__PURE__ */
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
className: "h-8 w-8 p-0",
|
|
4437
|
-
onClick: handleCancelUpload,
|
|
4438
|
-
children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
|
|
4439
|
-
}
|
|
4440
|
-
)
|
|
4441
|
-
] }),
|
|
4442
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
4443
|
-
/* @__PURE__ */ jsxs("div", { className: "border-2 border-dashed rounded-lg p-6 text-center hover:border-primary/50 transition-colors", children: [
|
|
4444
|
-
/* @__PURE__ */ jsx(
|
|
4445
|
-
"input",
|
|
4446
|
-
{
|
|
4447
|
-
type: "file",
|
|
4448
|
-
id: "file-upload-dialog",
|
|
4449
|
-
className: "hidden",
|
|
4450
|
-
onChange: handleFileSelect,
|
|
4451
|
-
disabled: isUploading
|
|
4452
|
-
}
|
|
4453
|
-
),
|
|
4454
|
-
/* @__PURE__ */ jsxs(
|
|
4455
|
-
"label",
|
|
4456
|
-
{
|
|
4457
|
-
htmlFor: "file-upload-dialog",
|
|
4458
|
-
className: cn(
|
|
4459
|
-
"cursor-pointer flex flex-col items-center gap-2",
|
|
4460
|
-
isUploading && "opacity-50 cursor-not-allowed"
|
|
4461
|
-
),
|
|
4462
|
-
children: [
|
|
4463
|
-
/* @__PURE__ */ jsx(Upload, { className: "h-8 w-8 text-muted-foreground" }),
|
|
4464
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
4465
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-foreground", children: selectedFile ? "Change file" : "Click to upload or drag and drop" }),
|
|
4466
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-1", children: "PDF, DOC, DOCX, JPG, PNG up to 10MB" })
|
|
4467
|
-
] })
|
|
4468
|
-
]
|
|
4469
|
-
}
|
|
4470
|
-
)
|
|
4471
|
-
] }),
|
|
4472
|
-
selectedFile && /* @__PURE__ */ jsxs("div", { className: "p-3 bg-muted/50 rounded-lg", children: [
|
|
4473
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Selected file:" }),
|
|
4474
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: selectedFile.name }),
|
|
4475
|
-
/* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
4476
|
-
(selectedFile.size / 1024 / 1024).toFixed(2),
|
|
4477
|
-
" MB"
|
|
4478
|
-
] })
|
|
4479
|
-
] }),
|
|
4480
|
-
/* @__PURE__ */ jsx(
|
|
4481
|
-
EnhancedInput,
|
|
4482
|
-
{
|
|
4483
|
-
label: "Document name",
|
|
4484
|
-
value: documentName,
|
|
4485
|
-
onChange: (e) => setDocumentName(e.target.value),
|
|
4486
|
-
placeholder: "Enter document name"
|
|
4487
|
-
}
|
|
4488
|
-
),
|
|
4489
|
-
/* @__PURE__ */ jsx(
|
|
4490
|
-
EnhancedTextarea,
|
|
4491
|
-
{
|
|
4492
|
-
label: "Description",
|
|
4493
|
-
value: description,
|
|
4494
|
-
onChange: (e) => setDescription(e.target.value),
|
|
4495
|
-
placeholder: "Enter document description (optional)",
|
|
4496
|
-
rows: 3
|
|
4497
|
-
}
|
|
4498
|
-
),
|
|
4499
|
-
/* @__PURE__ */ jsx(
|
|
4500
|
-
EnhancedSelect,
|
|
4501
|
-
{
|
|
4502
|
-
label: "Document type",
|
|
4503
|
-
value: documentType,
|
|
4504
|
-
onValueChange: setDocumentType,
|
|
4505
|
-
placeholder: "Select document type",
|
|
4506
|
-
options: documentTypeOptions
|
|
4507
|
-
}
|
|
4508
|
-
)
|
|
4509
|
-
] }),
|
|
4510
|
-
/* @__PURE__ */ jsxs("div", { className: "flex gap-3 mt-6", children: [
|
|
4511
|
-
/* @__PURE__ */ jsx(
|
|
4512
|
-
Button,
|
|
4513
|
-
{
|
|
4514
|
-
variant: "outline",
|
|
4515
|
-
onClick: handleCancelUpload,
|
|
4516
|
-
disabled: isUploading,
|
|
4517
|
-
className: "flex-1",
|
|
4518
|
-
children: "Cancel"
|
|
4519
|
-
}
|
|
4520
|
-
),
|
|
4521
|
-
/* @__PURE__ */ jsx(
|
|
4522
|
-
Button,
|
|
4523
|
-
{
|
|
4524
|
-
onClick: handleUploadSubmit,
|
|
4525
|
-
disabled: isUploading,
|
|
4526
|
-
className: "flex-1",
|
|
4527
|
-
children: isUploading ? "Uploading..." : "Upload"
|
|
4528
|
-
}
|
|
4529
|
-
)
|
|
4530
|
-
] })
|
|
4531
|
-
] })
|
|
4611
|
+
/* @__PURE__ */ jsx(
|
|
4612
|
+
FormInput,
|
|
4613
|
+
{
|
|
4614
|
+
name: "state",
|
|
4615
|
+
label: "State",
|
|
4616
|
+
placeholder: "Enter state"
|
|
4617
|
+
}
|
|
4618
|
+
)
|
|
4532
4619
|
] }),
|
|
4533
|
-
document.body
|
|
4534
|
-
),
|
|
4535
|
-
documents.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
4536
|
-
/* @__PURE__ */ jsx(FileText, { className: "h-5 w-5 opacity-50" }),
|
|
4537
|
-
/* @__PURE__ */ jsx("p", { children: "No documents uploaded yet" })
|
|
4538
|
-
] }) : /* @__PURE__ */ jsx("div", { className: "space-y-2", children: documents.map((doc) => /* @__PURE__ */ jsxs(
|
|
4539
|
-
"div",
|
|
4540
|
-
{
|
|
4541
|
-
className: "border rounded-lg hover:bg-muted/30 transition-colors overflow-hidden",
|
|
4542
|
-
children: [
|
|
4543
|
-
isImageType(doc.name) && doc.url && /* @__PURE__ */ jsx("div", { className: "w-full bg-muted/50", children: /* @__PURE__ */ jsx(
|
|
4544
|
-
"img",
|
|
4545
|
-
{
|
|
4546
|
-
src: doc.url,
|
|
4547
|
-
alt: doc.name,
|
|
4548
|
-
className: "w-full h-48 object-cover"
|
|
4549
|
-
}
|
|
4550
|
-
) }),
|
|
4551
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between p-3", children: [
|
|
4552
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
4553
|
-
!isImageType(doc.name) && /* @__PURE__ */ jsx("div", { className: cn(getFileTypeColor(doc.type)), children: getFileIcon(doc.type) }),
|
|
4554
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
4555
|
-
/* @__PURE__ */ jsx("h4", { className: "font-medium text-sm truncate", children: doc.name }),
|
|
4556
|
-
/* @__PURE__ */ jsx("span", { className: cn("text-xs px-2 py-0.5 rounded-full bg-muted inline-block mt-1", getFileTypeColor(doc.type)), children: doc.type }),
|
|
4557
|
-
doc.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground mt-1", children: doc.description }),
|
|
4558
|
-
/* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground mt-1", children: [
|
|
4559
|
-
doc.size,
|
|
4560
|
-
" \u2022 Uploaded by ",
|
|
4561
|
-
doc.uploadedBy,
|
|
4562
|
-
" \u2022 ",
|
|
4563
|
-
new Date(doc.uploadedAt).toLocaleDateString()
|
|
4564
|
-
] })
|
|
4565
|
-
] })
|
|
4566
|
-
] }),
|
|
4567
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
4568
|
-
/* @__PURE__ */ jsx(
|
|
4569
|
-
Button,
|
|
4570
|
-
{
|
|
4571
|
-
variant: "ghost",
|
|
4572
|
-
size: "sm",
|
|
4573
|
-
className: "h-8 w-8 p-0",
|
|
4574
|
-
onClick: () => toast({ title: "Preview", description: `Viewing ${doc.name}` }),
|
|
4575
|
-
children: /* @__PURE__ */ jsx(Eye, { className: "h-4 w-4" })
|
|
4576
|
-
}
|
|
4577
|
-
),
|
|
4578
|
-
/* @__PURE__ */ jsx(
|
|
4579
|
-
Button,
|
|
4580
|
-
{
|
|
4581
|
-
variant: "ghost",
|
|
4582
|
-
size: "sm",
|
|
4583
|
-
className: "h-8 w-8 p-0",
|
|
4584
|
-
onClick: () => toast({ title: "Download", description: `Downloading ${doc.name}` }),
|
|
4585
|
-
children: /* @__PURE__ */ jsx(Download, { className: "h-4 w-4" })
|
|
4586
|
-
}
|
|
4587
|
-
),
|
|
4588
|
-
/* @__PURE__ */ jsx(
|
|
4589
|
-
Button,
|
|
4590
|
-
{
|
|
4591
|
-
variant: "ghost",
|
|
4592
|
-
size: "sm",
|
|
4593
|
-
className: "h-8 w-8 p-0 text-muted-foreground hover:text-foreground",
|
|
4594
|
-
onClick: () => toast({ title: "Delete", description: `Deleted ${doc.name}` }),
|
|
4595
|
-
children: /* @__PURE__ */ jsx(Trash2, { className: "h-4 w-4" })
|
|
4596
|
-
}
|
|
4597
|
-
)
|
|
4598
|
-
] })
|
|
4599
|
-
] })
|
|
4600
|
-
]
|
|
4601
|
-
},
|
|
4602
|
-
doc.id
|
|
4603
|
-
)) })
|
|
4604
|
-
] })
|
|
4605
|
-
] });
|
|
4606
|
-
};
|
|
4607
|
-
var accountColumns = [
|
|
4608
|
-
{
|
|
4609
|
-
key: "number",
|
|
4610
|
-
title: "Account Number",
|
|
4611
|
-
sortable: true,
|
|
4612
|
-
width: "40%"
|
|
4613
|
-
},
|
|
4614
|
-
{
|
|
4615
|
-
key: "routingNumber",
|
|
4616
|
-
title: "Routing Number",
|
|
4617
|
-
sortable: true,
|
|
4618
|
-
width: "40%"
|
|
4619
|
-
},
|
|
4620
|
-
{
|
|
4621
|
-
key: "type",
|
|
4622
|
-
title: "Account Type",
|
|
4623
|
-
sortable: true,
|
|
4624
|
-
width: "20%",
|
|
4625
|
-
align: "right",
|
|
4626
|
-
render: (value) => /* @__PURE__ */ jsx("span", { className: "capitalize", children: value })
|
|
4627
|
-
}
|
|
4628
|
-
];
|
|
4629
|
-
var BusinessDetailView = ({
|
|
4630
|
-
business,
|
|
4631
|
-
businessProfile,
|
|
4632
|
-
identityVerification,
|
|
4633
|
-
businessUBOs,
|
|
4634
|
-
businessDocuments,
|
|
4635
|
-
businessAccounts,
|
|
4636
|
-
currentStatus,
|
|
4637
|
-
isEditingProfile,
|
|
4638
|
-
onStatusChange,
|
|
4639
|
-
onProfileDataChange,
|
|
4640
|
-
onToggleProfileEdit,
|
|
4641
|
-
onNavigateToAccounts,
|
|
4642
|
-
onNavigateToCounterparty,
|
|
4643
|
-
onAddAccount,
|
|
4644
|
-
onUBOClick,
|
|
4645
|
-
onDocumentUpload
|
|
4646
|
-
}) => {
|
|
4647
|
-
return /* @__PURE__ */ jsx(
|
|
4648
|
-
PageLayout,
|
|
4649
|
-
{
|
|
4650
|
-
title: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
4651
|
-
/* @__PURE__ */ jsx("span", { children: business.businessName }),
|
|
4652
4620
|
/* @__PURE__ */ jsx(
|
|
4653
|
-
|
|
4621
|
+
FormInput,
|
|
4654
4622
|
{
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
{ value: "active", label: "Active" },
|
|
4659
|
-
{ value: "inactive", label: "Inactive" },
|
|
4660
|
-
{ value: "suspended", label: "Suspended" }
|
|
4661
|
-
],
|
|
4662
|
-
onChange: onStatusChange,
|
|
4663
|
-
renderValue: (value) => /* @__PURE__ */ jsx(StatusBadge, { status: value.toUpperCase() }),
|
|
4664
|
-
className: "inline-block"
|
|
4623
|
+
name: "country",
|
|
4624
|
+
label: "Country",
|
|
4625
|
+
placeholder: "Enter country"
|
|
4665
4626
|
}
|
|
4666
|
-
)
|
|
4667
|
-
/* @__PURE__ */ jsx(CIPStatusBadge, { status: business.cipStatus }),
|
|
4668
|
-
/* @__PURE__ */ jsx(EntityTypeBadge, { type: business.type }),
|
|
4669
|
-
/* @__PURE__ */ jsx(SubTypeBadge, { subType: business.subType })
|
|
4627
|
+
)
|
|
4670
4628
|
] }),
|
|
4671
|
-
|
|
4672
|
-
{
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4629
|
+
/* @__PURE__ */ jsxs(DialogFooter, { children: [
|
|
4630
|
+
/* @__PURE__ */ jsx(Button, { type: "button", variant: "outline", onClick: handleCancel, children: "Cancel" }),
|
|
4631
|
+
/* @__PURE__ */ jsx(Button, { type: "submit", disabled: isSubmitting, children: isSubmitting ? "Adding..." : "Add UBO" })
|
|
4632
|
+
] })
|
|
4633
|
+
] }) })
|
|
4634
|
+
] }) });
|
|
4635
|
+
};
|
|
4636
|
+
var UBOCard = ({ ubos, onUBOClick }) => {
|
|
4637
|
+
const [isDialogOpen, setIsDialogOpen] = useState(false);
|
|
4638
|
+
const handleAddUBO = (data) => {
|
|
4639
|
+
console.log("New UBO data:", data);
|
|
4640
|
+
toast$1.success("UBO added successfully");
|
|
4641
|
+
};
|
|
4642
|
+
const columns3 = [
|
|
4643
|
+
{
|
|
4644
|
+
key: "name",
|
|
4645
|
+
title: "Name",
|
|
4646
|
+
sortable: true,
|
|
4647
|
+
width: "40%",
|
|
4648
|
+
render: (value, row) => /* @__PURE__ */ jsx(
|
|
4649
|
+
"button",
|
|
4678
4650
|
{
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
icon: Users
|
|
4651
|
+
onClick: () => onUBOClick(row.customerId),
|
|
4652
|
+
className: "text-primary hover:underline font-medium text-left",
|
|
4653
|
+
children: value
|
|
4683
4654
|
}
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-4", children: [
|
|
4687
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-4", children: [
|
|
4688
|
-
/* @__PURE__ */ jsx(
|
|
4689
|
-
BusinessProfileCard,
|
|
4690
|
-
{
|
|
4691
|
-
data: businessProfile,
|
|
4692
|
-
identityVerification,
|
|
4693
|
-
isEditing: isEditingProfile,
|
|
4694
|
-
onToggleEdit: onToggleProfileEdit,
|
|
4695
|
-
onDataChange: onProfileDataChange
|
|
4696
|
-
}
|
|
4697
|
-
),
|
|
4698
|
-
/* @__PURE__ */ jsx(UBOCard, { ubos: businessUBOs, onUBOClick }),
|
|
4699
|
-
/* @__PURE__ */ jsxs(Card, { children: [
|
|
4700
|
-
/* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
4701
|
-
/* @__PURE__ */ jsx(CardTitle, { children: "External Accounts" }),
|
|
4702
|
-
/* @__PURE__ */ jsxs(Button, { size: "sm", variant: "ghost", onClick: onAddAccount, children: [
|
|
4703
|
-
/* @__PURE__ */ jsx(Plus, { className: "h-4 w-4 mr-1" }),
|
|
4704
|
-
"Account"
|
|
4705
|
-
] })
|
|
4706
|
-
] }),
|
|
4707
|
-
/* @__PURE__ */ jsx(CardContent, { children: businessAccounts.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
4708
|
-
/* @__PURE__ */ jsx(Wallet, { className: "h-5 w-5 opacity-50" }),
|
|
4709
|
-
/* @__PURE__ */ jsx("p", { children: "No external accounts found" })
|
|
4710
|
-
] }) : /* @__PURE__ */ jsx(
|
|
4711
|
-
DataTable,
|
|
4712
|
-
{
|
|
4713
|
-
columns: accountColumns,
|
|
4714
|
-
data: businessAccounts
|
|
4715
|
-
}
|
|
4716
|
-
) })
|
|
4717
|
-
] }),
|
|
4718
|
-
/* @__PURE__ */ jsx(
|
|
4719
|
-
BusinessDocuments,
|
|
4720
|
-
{
|
|
4721
|
-
businessId: business.id,
|
|
4722
|
-
documents: businessDocuments,
|
|
4723
|
-
onDocumentUpload
|
|
4724
|
-
}
|
|
4725
|
-
)
|
|
4726
|
-
] }),
|
|
4727
|
-
/* @__PURE__ */ jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsx(BusinessStatusCard, { isEditing: false, onToggleEdit: () => {
|
|
4728
|
-
} }) })
|
|
4729
|
-
] })
|
|
4730
|
-
}
|
|
4731
|
-
);
|
|
4732
|
-
};
|
|
4733
|
-
function Calendar({
|
|
4734
|
-
className,
|
|
4735
|
-
classNames,
|
|
4736
|
-
showOutsideDays = true,
|
|
4737
|
-
...props
|
|
4738
|
-
}) {
|
|
4739
|
-
return /* @__PURE__ */ jsx(
|
|
4740
|
-
DayPicker,
|
|
4655
|
+
)
|
|
4656
|
+
},
|
|
4741
4657
|
{
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
weekday: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
|
|
4755
|
-
week: "flex w-full mt-2",
|
|
4756
|
-
day: "h-9 w-9 text-center text-sm p-0 relative hover:bg-accent hover:text-accent-foreground rounded-md",
|
|
4757
|
-
day_button: cn(
|
|
4758
|
-
buttonVariants({ variant: "ghost" }),
|
|
4759
|
-
"h-9 w-9 p-0 font-normal"
|
|
4760
|
-
),
|
|
4761
|
-
selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground",
|
|
4762
|
-
today: "bg-accent text-accent-foreground",
|
|
4763
|
-
outside: "text-muted-foreground opacity-50",
|
|
4764
|
-
disabled: "text-muted-foreground opacity-50",
|
|
4765
|
-
hidden: "invisible",
|
|
4766
|
-
...classNames
|
|
4767
|
-
},
|
|
4768
|
-
...props
|
|
4658
|
+
key: "title",
|
|
4659
|
+
title: "Title",
|
|
4660
|
+
sortable: true,
|
|
4661
|
+
width: "40%"
|
|
4662
|
+
},
|
|
4663
|
+
{
|
|
4664
|
+
key: "ownershipPercentage",
|
|
4665
|
+
title: "Ownership %",
|
|
4666
|
+
sortable: true,
|
|
4667
|
+
width: "20%",
|
|
4668
|
+
align: "right",
|
|
4669
|
+
render: (value) => `${value}%`
|
|
4769
4670
|
}
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
),
|
|
4785
|
-
...props
|
|
4786
|
-
}
|
|
4787
|
-
) }));
|
|
4788
|
-
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
4789
|
-
function DatePicker({
|
|
4790
|
-
date,
|
|
4791
|
-
onDateChange,
|
|
4792
|
-
placeholder = "Pick a date",
|
|
4793
|
-
disabled = false,
|
|
4794
|
-
className,
|
|
4795
|
-
buttonClassName,
|
|
4796
|
-
calendarClassName,
|
|
4797
|
-
align = "start",
|
|
4798
|
-
disabledDates,
|
|
4799
|
-
label,
|
|
4800
|
-
wrapperClassName
|
|
4801
|
-
}) {
|
|
4802
|
-
const [open, setOpen] = React15.useState(false);
|
|
4803
|
-
const handleSelect = (selectedDate) => {
|
|
4804
|
-
onDateChange?.(selectedDate);
|
|
4805
|
-
setOpen(false);
|
|
4806
|
-
};
|
|
4807
|
-
const picker = /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
4808
|
-
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
4809
|
-
Button,
|
|
4671
|
+
];
|
|
4672
|
+
return /* @__PURE__ */ jsxs(Card, { children: [
|
|
4673
|
+
/* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
4674
|
+
/* @__PURE__ */ jsx(CardTitle, { children: "Ultimate Beneficial Owners (UBO)" }),
|
|
4675
|
+
/* @__PURE__ */ jsxs(Button, { size: "sm", variant: "ghost", onClick: () => setIsDialogOpen(true), children: [
|
|
4676
|
+
/* @__PURE__ */ jsx(Plus, { className: "h-4 w-4 mr-1" }),
|
|
4677
|
+
"Add UBO"
|
|
4678
|
+
] })
|
|
4679
|
+
] }),
|
|
4680
|
+
/* @__PURE__ */ jsx(CardContent, { children: ubos.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
4681
|
+
/* @__PURE__ */ jsx(Users, { className: "h-5 w-5 opacity-50" }),
|
|
4682
|
+
/* @__PURE__ */ jsx("p", { children: "No UBOs recorded" })
|
|
4683
|
+
] }) : /* @__PURE__ */ jsx(
|
|
4684
|
+
DataTable,
|
|
4810
4685
|
{
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
className: cn(
|
|
4814
|
-
"justify-start text-left font-normal",
|
|
4815
|
-
!date && "text-muted-foreground",
|
|
4816
|
-
buttonClassName
|
|
4817
|
-
),
|
|
4818
|
-
children: [
|
|
4819
|
-
/* @__PURE__ */ jsx(CalendarIcon, { className: "mr-2 h-4 w-4" }),
|
|
4820
|
-
date ? format(date, "MM/dd/yyyy") : placeholder
|
|
4821
|
-
]
|
|
4686
|
+
columns: columns3,
|
|
4687
|
+
data: ubos
|
|
4822
4688
|
}
|
|
4823
4689
|
) }),
|
|
4824
|
-
/* @__PURE__ */ jsx(
|
|
4825
|
-
|
|
4690
|
+
/* @__PURE__ */ jsx(
|
|
4691
|
+
AddUBODialog,
|
|
4826
4692
|
{
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
disabled: disabledDates,
|
|
4831
|
-
initialFocus: true,
|
|
4832
|
-
className: cn("pointer-events-auto", calendarClassName)
|
|
4693
|
+
open: isDialogOpen,
|
|
4694
|
+
onOpenChange: setIsDialogOpen,
|
|
4695
|
+
onSubmit: handleAddUBO
|
|
4833
4696
|
}
|
|
4834
|
-
)
|
|
4697
|
+
)
|
|
4835
4698
|
] });
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4699
|
+
};
|
|
4700
|
+
var accountSchema = z.object({
|
|
4701
|
+
accountName: z.string().min(1, "Account name is required"),
|
|
4702
|
+
accountType: z.string().min(1, "Account type is required"),
|
|
4703
|
+
fundingFromAccount: z.string().optional(),
|
|
4704
|
+
sweepToAccount: z.string().optional()
|
|
4705
|
+
});
|
|
4706
|
+
var AddAccountDialog = ({
|
|
4707
|
+
open,
|
|
4708
|
+
onOpenChange,
|
|
4709
|
+
onSubmit,
|
|
4710
|
+
existingAccounts = []
|
|
4848
4711
|
}) => {
|
|
4849
|
-
const [
|
|
4850
|
-
const
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
};
|
|
4871
|
-
setLocalFilters(resetFilters);
|
|
4872
|
-
onResetFilters();
|
|
4873
|
-
setOpen(false);
|
|
4712
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
4713
|
+
const form = useForm({
|
|
4714
|
+
resolver: zodResolver(accountSchema),
|
|
4715
|
+
defaultValues: {
|
|
4716
|
+
accountName: "",
|
|
4717
|
+
accountType: void 0,
|
|
4718
|
+
fundingFromAccount: "",
|
|
4719
|
+
sweepToAccount: ""
|
|
4720
|
+
}
|
|
4721
|
+
});
|
|
4722
|
+
const handleSubmit = async (data) => {
|
|
4723
|
+
setIsLoading(true);
|
|
4724
|
+
try {
|
|
4725
|
+
await onSubmit?.(data);
|
|
4726
|
+
form.reset();
|
|
4727
|
+
onOpenChange(false);
|
|
4728
|
+
} catch (error) {
|
|
4729
|
+
console.error("Error creating account:", error);
|
|
4730
|
+
} finally {
|
|
4731
|
+
setIsLoading(false);
|
|
4732
|
+
}
|
|
4874
4733
|
};
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
/* @__PURE__ */
|
|
4881
|
-
|
|
4882
|
-
/* @__PURE__ */ jsxs(
|
|
4734
|
+
existingAccounts.map((acc) => ({
|
|
4735
|
+
value: acc.id,
|
|
4736
|
+
label: `${acc.number}${acc.type ? ` (${acc.type})` : ""}`
|
|
4737
|
+
}));
|
|
4738
|
+
return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(DialogContent, { className: "sm:max-w-[600px] max-h-[90vh] overflow-y-auto", children: [
|
|
4739
|
+
/* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { children: "Add Account" }) }),
|
|
4740
|
+
/* @__PURE__ */ jsx(FormProvider, { form, children: /* @__PURE__ */ jsxs("form", { onSubmit: form.handleSubmit(handleSubmit), className: "space-y-4", children: [
|
|
4741
|
+
/* @__PURE__ */ jsxs(FormSection, { spacing: "md", children: [
|
|
4883
4742
|
/* @__PURE__ */ jsx(
|
|
4884
|
-
|
|
4743
|
+
FormInput,
|
|
4885
4744
|
{
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4745
|
+
name: "accountName",
|
|
4746
|
+
label: "Account Name",
|
|
4747
|
+
placeholder: "Enter account name",
|
|
4748
|
+
required: true
|
|
4890
4749
|
}
|
|
4891
4750
|
),
|
|
4892
4751
|
/* @__PURE__ */ jsx(
|
|
4893
|
-
|
|
4752
|
+
FormSelect,
|
|
4894
4753
|
{
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4754
|
+
name: "accountType",
|
|
4755
|
+
label: "Account Type",
|
|
4756
|
+
placeholder: "Select account type",
|
|
4757
|
+
options: [
|
|
4758
|
+
{ value: "CHECKING", label: "Checking" },
|
|
4759
|
+
{ value: "SAVINGS", label: "Savings" }
|
|
4760
|
+
]
|
|
4899
4761
|
}
|
|
4900
4762
|
),
|
|
4901
4763
|
/* @__PURE__ */ jsx(
|
|
4902
|
-
|
|
4764
|
+
FormInput,
|
|
4903
4765
|
{
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
placeholder: "Select status",
|
|
4908
|
-
options: [
|
|
4909
|
-
{ value: "ACTIVE", label: "Active" },
|
|
4910
|
-
{ value: "INACTIVE", label: "Inactive" },
|
|
4911
|
-
{ value: "BLOCKED", label: "Blocked" },
|
|
4912
|
-
{ value: "PENDING_APPROVAL", label: "Pending Approval" },
|
|
4913
|
-
{ value: "PENDING", label: "Pending" },
|
|
4914
|
-
{ value: "INITIALIZED", label: "Initialized" },
|
|
4915
|
-
{ value: "PENDING_UNBLOCKED", label: "Pending Unblocked" }
|
|
4916
|
-
]
|
|
4917
|
-
}
|
|
4918
|
-
),
|
|
4919
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
4920
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
4921
|
-
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Created Date Start" }),
|
|
4922
|
-
/* @__PURE__ */ jsx(
|
|
4923
|
-
DatePicker,
|
|
4924
|
-
{
|
|
4925
|
-
date: localFilters.createdDateStart,
|
|
4926
|
-
onDateChange: (date) => handleLocalFilterChange("createdDateStart", date),
|
|
4927
|
-
placeholder: "MM/DD/YYYY",
|
|
4928
|
-
buttonClassName: "w-full",
|
|
4929
|
-
className: "bg-background z-50"
|
|
4930
|
-
}
|
|
4931
|
-
)
|
|
4932
|
-
] }),
|
|
4933
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
4934
|
-
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Created Date End" }),
|
|
4935
|
-
/* @__PURE__ */ jsx(
|
|
4936
|
-
DatePicker,
|
|
4937
|
-
{
|
|
4938
|
-
date: localFilters.createdDateEnd,
|
|
4939
|
-
onDateChange: (date) => handleLocalFilterChange("createdDateEnd", date),
|
|
4940
|
-
placeholder: "MM/DD/YYYY",
|
|
4941
|
-
buttonClassName: "w-full",
|
|
4942
|
-
className: "bg-background z-50"
|
|
4943
|
-
}
|
|
4944
|
-
)
|
|
4945
|
-
] })
|
|
4946
|
-
] })
|
|
4947
|
-
] }),
|
|
4948
|
-
/* @__PURE__ */ jsxs(SheetFooter, { className: "gap-2", children: [
|
|
4949
|
-
/* @__PURE__ */ jsx(Button, { variant: "outline", onClick: handleResetFilters, children: "Reset Filters" }),
|
|
4950
|
-
/* @__PURE__ */ jsx(Button, { onClick: handleApplyFilters, children: "Apply Filters" })
|
|
4951
|
-
] })
|
|
4952
|
-
] })
|
|
4953
|
-
] });
|
|
4954
|
-
};
|
|
4955
|
-
var BusinessForm = ({
|
|
4956
|
-
form,
|
|
4957
|
-
businessType,
|
|
4958
|
-
onBusinessTypeChange,
|
|
4959
|
-
onSubmit
|
|
4960
|
-
}) => {
|
|
4961
|
-
return /* @__PURE__ */ jsx(FormProvider, { form, children: /* @__PURE__ */ jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "space-y-6", children: [
|
|
4962
|
-
/* @__PURE__ */ jsxs(Card, { className: "p-6", children: [
|
|
4963
|
-
/* @__PURE__ */ jsx("div", { className: "border-b border-border pb-4 mb-6", children: /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Business Information" }) }),
|
|
4964
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
|
|
4965
|
-
/* @__PURE__ */ jsx(
|
|
4966
|
-
FormInput,
|
|
4967
|
-
{
|
|
4968
|
-
name: "name",
|
|
4969
|
-
label: "Business Name",
|
|
4970
|
-
placeholder: "Enter business name",
|
|
4971
|
-
required: true
|
|
4972
|
-
}
|
|
4973
|
-
),
|
|
4974
|
-
/* @__PURE__ */ jsx(
|
|
4975
|
-
FormInput,
|
|
4976
|
-
{
|
|
4977
|
-
name: "productId",
|
|
4978
|
-
label: "Product ID",
|
|
4979
|
-
placeholder: "Enter product ID",
|
|
4980
|
-
type: "number",
|
|
4981
|
-
required: true
|
|
4982
|
-
}
|
|
4983
|
-
),
|
|
4984
|
-
/* @__PURE__ */ jsx(
|
|
4985
|
-
FormSelect,
|
|
4986
|
-
{
|
|
4987
|
-
name: "businessIdType",
|
|
4988
|
-
label: "ID Number Type",
|
|
4989
|
-
placeholder: "Select ID type",
|
|
4990
|
-
options: [
|
|
4991
|
-
{ value: "EIN", label: "EIN" },
|
|
4992
|
-
{ value: "SSN", label: "SSN" },
|
|
4993
|
-
{ value: "TIN", label: "TIN" },
|
|
4994
|
-
{ value: "OTHER_ID", label: "Other ID" }
|
|
4995
|
-
]
|
|
4996
|
-
}
|
|
4997
|
-
),
|
|
4998
|
-
/* @__PURE__ */ jsx(
|
|
4999
|
-
FormInput,
|
|
5000
|
-
{
|
|
5001
|
-
name: "idNumber",
|
|
5002
|
-
label: "ID Number",
|
|
5003
|
-
placeholder: "Enter ID number",
|
|
5004
|
-
required: true
|
|
5005
|
-
}
|
|
5006
|
-
),
|
|
5007
|
-
/* @__PURE__ */ jsx(
|
|
5008
|
-
FormInput,
|
|
5009
|
-
{
|
|
5010
|
-
name: "dba",
|
|
5011
|
-
label: "DBA Name",
|
|
5012
|
-
placeholder: "Enter DBA name",
|
|
5013
|
-
hint: "Doing Business As name"
|
|
5014
|
-
}
|
|
5015
|
-
),
|
|
5016
|
-
/* @__PURE__ */ jsx(
|
|
5017
|
-
FormSelect,
|
|
5018
|
-
{
|
|
5019
|
-
name: "businessEntityType",
|
|
5020
|
-
label: "Business Entity Type",
|
|
5021
|
-
placeholder: "Select business type",
|
|
5022
|
-
options: [
|
|
5023
|
-
{ value: "SOLE_PROPRIETOR", label: "Sole Proprietor" },
|
|
5024
|
-
{ value: "LIMITED_LIABILITY_COMPANY", label: "Limited Liability Company (LLC)" },
|
|
5025
|
-
{ value: "CORPORATION", label: "S or C Corporation" },
|
|
5026
|
-
{ value: "GENERAL_PARTNERSHIP", label: "General Partnership" },
|
|
5027
|
-
{ value: "LIMITED_LIABILITY_PARTNERSHIP", label: "Limited Liability Partnership" },
|
|
5028
|
-
{ value: "NON_PROFIT", label: "Non-Profit Corporation" },
|
|
5029
|
-
{ value: "GOVERNMENT_ORGANIZATION", label: "Government Organization" },
|
|
5030
|
-
{ value: "PUBLICLY_TRADED_COMPANY", label: "Publicly Traded Company" },
|
|
5031
|
-
{ value: "TRUSTS", label: "Trusts" }
|
|
5032
|
-
]
|
|
5033
|
-
}
|
|
5034
|
-
),
|
|
5035
|
-
/* @__PURE__ */ jsx(
|
|
5036
|
-
FormInput,
|
|
5037
|
-
{
|
|
5038
|
-
name: "incorporationState",
|
|
5039
|
-
label: "Incorporation State",
|
|
5040
|
-
placeholder: "Enter state"
|
|
5041
|
-
}
|
|
5042
|
-
),
|
|
5043
|
-
/* @__PURE__ */ jsx(
|
|
5044
|
-
FormInput,
|
|
5045
|
-
{
|
|
5046
|
-
name: "formationDate",
|
|
5047
|
-
label: "Formation Date",
|
|
5048
|
-
placeholder: "YYYY-MM-DD",
|
|
5049
|
-
type: "date"
|
|
5050
|
-
}
|
|
5051
|
-
),
|
|
5052
|
-
/* @__PURE__ */ jsx(
|
|
5053
|
-
FormInput,
|
|
5054
|
-
{
|
|
5055
|
-
name: "website",
|
|
5056
|
-
label: "Website",
|
|
5057
|
-
placeholder: "https://www.business.com"
|
|
5058
|
-
}
|
|
5059
|
-
),
|
|
5060
|
-
/* @__PURE__ */ jsx(
|
|
5061
|
-
FormInput,
|
|
5062
|
-
{
|
|
5063
|
-
name: "mobilePhone",
|
|
5064
|
-
label: "Mobile Phone",
|
|
5065
|
-
placeholder: "+1 (555) 123-4567",
|
|
5066
|
-
hint: "Format: +1 (555) 123-4567"
|
|
5067
|
-
}
|
|
5068
|
-
),
|
|
5069
|
-
/* @__PURE__ */ jsx(
|
|
5070
|
-
FormInput,
|
|
5071
|
-
{
|
|
5072
|
-
name: "mcc",
|
|
5073
|
-
label: "MCC",
|
|
5074
|
-
placeholder: "1234",
|
|
5075
|
-
hint: "4-digit Merchant Category Code"
|
|
5076
|
-
}
|
|
5077
|
-
),
|
|
5078
|
-
/* @__PURE__ */ jsx(
|
|
5079
|
-
FormInput,
|
|
5080
|
-
{
|
|
5081
|
-
name: "naics",
|
|
5082
|
-
label: "NAICS",
|
|
5083
|
-
placeholder: "123456",
|
|
5084
|
-
hint: "6-digit industry classification"
|
|
4766
|
+
name: "fundingFromAccount",
|
|
4767
|
+
label: "Funding from Account",
|
|
4768
|
+
placeholder: "Enter funding account"
|
|
5085
4769
|
}
|
|
5086
4770
|
),
|
|
5087
4771
|
/* @__PURE__ */ jsx(
|
|
5088
4772
|
FormInput,
|
|
5089
4773
|
{
|
|
5090
|
-
name: "
|
|
5091
|
-
label: "
|
|
5092
|
-
placeholder: "Enter
|
|
4774
|
+
name: "sweepToAccount",
|
|
4775
|
+
label: "Sweep to Account",
|
|
4776
|
+
placeholder: "Enter sweep account"
|
|
5093
4777
|
}
|
|
5094
4778
|
)
|
|
5095
|
-
] })
|
|
5096
|
-
|
|
5097
|
-
/* @__PURE__ */ jsxs(Card, { className: "p-6", children: [
|
|
5098
|
-
/* @__PURE__ */ jsx("div", { className: "border-b border-border pb-4 mb-6", children: /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Business Address" }) }),
|
|
5099
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
|
|
5100
|
-
/* @__PURE__ */ jsx(
|
|
5101
|
-
FormInput,
|
|
5102
|
-
{
|
|
5103
|
-
name: "address.line1",
|
|
5104
|
-
label: "Street Address",
|
|
5105
|
-
placeholder: "Enter street address"
|
|
5106
|
-
}
|
|
5107
|
-
),
|
|
5108
|
-
/* @__PURE__ */ jsx(
|
|
5109
|
-
FormInput,
|
|
5110
|
-
{
|
|
5111
|
-
name: "address.line2",
|
|
5112
|
-
label: "Apartment/Suite",
|
|
5113
|
-
placeholder: "Enter apartment or suite number"
|
|
5114
|
-
}
|
|
5115
|
-
),
|
|
5116
|
-
/* @__PURE__ */ jsx(
|
|
5117
|
-
FormInput,
|
|
5118
|
-
{
|
|
5119
|
-
name: "address.city",
|
|
5120
|
-
label: "City",
|
|
5121
|
-
placeholder: "Enter city"
|
|
5122
|
-
}
|
|
5123
|
-
),
|
|
5124
|
-
/* @__PURE__ */ jsx(
|
|
5125
|
-
FormInput,
|
|
5126
|
-
{
|
|
5127
|
-
name: "address.state",
|
|
5128
|
-
label: "State",
|
|
5129
|
-
placeholder: "Enter state"
|
|
5130
|
-
}
|
|
5131
|
-
),
|
|
5132
|
-
/* @__PURE__ */ jsx(
|
|
5133
|
-
FormInput,
|
|
5134
|
-
{
|
|
5135
|
-
name: "address.postalCode",
|
|
5136
|
-
label: "Postal Code",
|
|
5137
|
-
placeholder: "12345"
|
|
5138
|
-
}
|
|
5139
|
-
),
|
|
4779
|
+
] }),
|
|
4780
|
+
/* @__PURE__ */ jsxs(DialogFooter, { children: [
|
|
5140
4781
|
/* @__PURE__ */ jsx(
|
|
5141
|
-
|
|
4782
|
+
Button,
|
|
5142
4783
|
{
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
4784
|
+
type: "button",
|
|
4785
|
+
variant: "outline",
|
|
4786
|
+
onClick: () => onOpenChange(false),
|
|
4787
|
+
disabled: isLoading,
|
|
4788
|
+
children: "Cancel"
|
|
5147
4789
|
}
|
|
5148
4790
|
),
|
|
5149
|
-
/* @__PURE__ */ jsx(
|
|
5150
|
-
FormInput,
|
|
5151
|
-
{
|
|
5152
|
-
name: "address.type",
|
|
5153
|
-
label: "Address Type",
|
|
5154
|
-
placeholder: "e.g., MAILING"
|
|
5155
|
-
}
|
|
5156
|
-
)
|
|
4791
|
+
/* @__PURE__ */ jsx(Button, { type: "submit", disabled: isLoading, children: isLoading ? "Creating..." : "Create Account" })
|
|
5157
4792
|
] })
|
|
5158
|
-
] })
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
4793
|
+
] }) })
|
|
4794
|
+
] }) });
|
|
4795
|
+
};
|
|
4796
|
+
var BusinessDocuments = ({ businessId, documents, onDocumentUpload }) => {
|
|
4797
|
+
const [isUploading, setIsUploading] = useState(false);
|
|
4798
|
+
const [showUploadDialog, setShowUploadDialog] = useState(false);
|
|
4799
|
+
const [selectedFile, setSelectedFile] = useState(null);
|
|
4800
|
+
const [documentName, setDocumentName] = useState("");
|
|
4801
|
+
const [description, setDescription] = useState("");
|
|
4802
|
+
const [documentType, setDocumentType] = useState("");
|
|
4803
|
+
const handleFileSelect = (e) => {
|
|
4804
|
+
const file = e.target.files?.[0];
|
|
4805
|
+
if (!file) return;
|
|
4806
|
+
setSelectedFile(file);
|
|
4807
|
+
setDocumentName(file.name);
|
|
4808
|
+
};
|
|
4809
|
+
const handleUploadSubmit = async () => {
|
|
4810
|
+
if (!selectedFile || !documentName || !documentType) {
|
|
4811
|
+
toast({
|
|
4812
|
+
title: "Missing Information",
|
|
4813
|
+
description: "Please fill in all required fields",
|
|
4814
|
+
variant: "destructive"
|
|
4815
|
+
});
|
|
4816
|
+
return;
|
|
4817
|
+
}
|
|
4818
|
+
setIsUploading(true);
|
|
4819
|
+
try {
|
|
4820
|
+
await onDocumentUpload(selectedFile, {
|
|
4821
|
+
name: documentName,
|
|
4822
|
+
description,
|
|
4823
|
+
type: documentType
|
|
4824
|
+
});
|
|
4825
|
+
toast({
|
|
4826
|
+
title: "Upload Successful",
|
|
4827
|
+
description: `${documentName} uploaded successfully`
|
|
4828
|
+
});
|
|
4829
|
+
setShowUploadDialog(false);
|
|
4830
|
+
resetForm();
|
|
4831
|
+
} catch (error) {
|
|
4832
|
+
toast({
|
|
4833
|
+
title: "Upload Failed",
|
|
4834
|
+
description: "Failed to upload document. Please try again.",
|
|
4835
|
+
variant: "destructive"
|
|
4836
|
+
});
|
|
4837
|
+
} finally {
|
|
4838
|
+
setIsUploading(false);
|
|
4839
|
+
}
|
|
4840
|
+
};
|
|
4841
|
+
const resetForm = () => {
|
|
4842
|
+
setSelectedFile(null);
|
|
4843
|
+
setDocumentName("");
|
|
4844
|
+
setDescription("");
|
|
4845
|
+
setDocumentType("");
|
|
4846
|
+
const fileInput = document.getElementById("file-upload");
|
|
4847
|
+
if (fileInput) fileInput.value = "";
|
|
4848
|
+
};
|
|
4849
|
+
const handleCancelUpload = () => {
|
|
4850
|
+
setShowUploadDialog(false);
|
|
4851
|
+
resetForm();
|
|
4852
|
+
};
|
|
4853
|
+
const isImageType = (name) => {
|
|
4854
|
+
const imageExtensions = [".jpg", ".jpeg", ".png", ".gif", ".webp", ".bmp"];
|
|
4855
|
+
return imageExtensions.some((ext) => name.toLowerCase().endsWith(ext));
|
|
4856
|
+
};
|
|
4857
|
+
const getFileIcon = (type) => {
|
|
4858
|
+
return /* @__PURE__ */ jsx(FileText, { className: "h-5 w-5" });
|
|
4859
|
+
};
|
|
4860
|
+
const getFileTypeColor = (type) => {
|
|
4861
|
+
switch (type.toUpperCase()) {
|
|
4862
|
+
case "PDF":
|
|
4863
|
+
return "text-red-500";
|
|
4864
|
+
case "DOCX":
|
|
4865
|
+
case "DOC":
|
|
4866
|
+
return "text-blue-500";
|
|
4867
|
+
case "XLSX":
|
|
4868
|
+
case "XLS":
|
|
4869
|
+
return "text-green-500";
|
|
4870
|
+
case "JPG":
|
|
4871
|
+
case "JPEG":
|
|
4872
|
+
case "PNG":
|
|
4873
|
+
return "text-purple-500";
|
|
4874
|
+
default:
|
|
4875
|
+
return "text-muted-foreground";
|
|
4876
|
+
}
|
|
4877
|
+
};
|
|
4878
|
+
const documentTypeOptions = [
|
|
4879
|
+
{ value: "BUSINESS_LICENSE", label: "Business License" },
|
|
4880
|
+
{ value: "TAX_DOCUMENT", label: "Tax Document" },
|
|
4881
|
+
{ value: "PROOF_OF_ADDRESS", label: "Proof of Address" },
|
|
4882
|
+
{ value: "BANK_STATEMENT", label: "Bank Statement" },
|
|
4883
|
+
{ value: "INCORPORATION_DOCS", label: "Incorporation Documents" },
|
|
4884
|
+
{ value: "OPERATING_AGREEMENT", label: "Operating Agreement" },
|
|
4885
|
+
{ value: "OTHER", label: "Other" }
|
|
4886
|
+
];
|
|
4887
|
+
return /* @__PURE__ */ jsxs(Card, { children: [
|
|
4888
|
+
/* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
4889
|
+
/* @__PURE__ */ jsx(CardTitle, { children: "Documents" }),
|
|
4890
|
+
/* @__PURE__ */ jsxs(
|
|
4891
|
+
Button,
|
|
4892
|
+
{
|
|
4893
|
+
onClick: () => setShowUploadDialog(true),
|
|
4894
|
+
size: "sm",
|
|
4895
|
+
variant: "ghost",
|
|
4896
|
+
className: "gap-2",
|
|
4897
|
+
children: [
|
|
4898
|
+
/* @__PURE__ */ jsx(Upload, { className: "h-4 w-4" }),
|
|
4899
|
+
"Upload"
|
|
4900
|
+
]
|
|
4901
|
+
}
|
|
4902
|
+
)
|
|
4903
|
+
] }),
|
|
4904
|
+
/* @__PURE__ */ jsxs(CardContent, { children: [
|
|
4905
|
+
showUploadDialog && createPortal(
|
|
4906
|
+
/* @__PURE__ */ jsxs("div", { className: "fixed inset-0 z-[100] flex items-center justify-center p-4", children: [
|
|
4907
|
+
/* @__PURE__ */ jsx(
|
|
4908
|
+
"div",
|
|
4909
|
+
{
|
|
4910
|
+
className: "fixed inset-0 bg-background/80 backdrop-blur-sm",
|
|
4911
|
+
onClick: handleCancelUpload
|
|
4912
|
+
}
|
|
4913
|
+
),
|
|
4914
|
+
/* @__PURE__ */ jsxs("div", { className: "relative bg-card border rounded-lg shadow-lg max-w-lg w-full p-6 z-[101]", children: [
|
|
4915
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-6", children: [
|
|
4916
|
+
/* @__PURE__ */ jsx("h2", { className: "text-2xl font-bold", children: "Upload Document" }),
|
|
4917
|
+
/* @__PURE__ */ jsx(
|
|
4918
|
+
Button,
|
|
4919
|
+
{
|
|
4920
|
+
variant: "ghost",
|
|
4921
|
+
size: "sm",
|
|
4922
|
+
className: "h-8 w-8 p-0",
|
|
4923
|
+
onClick: handleCancelUpload,
|
|
4924
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
|
|
4925
|
+
}
|
|
4926
|
+
)
|
|
4927
|
+
] }),
|
|
4928
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
4929
|
+
/* @__PURE__ */ jsxs("div", { className: "border-2 border-dashed rounded-lg p-6 text-center hover:border-primary/50 transition-colors", children: [
|
|
4930
|
+
/* @__PURE__ */ jsx(
|
|
4931
|
+
"input",
|
|
4932
|
+
{
|
|
4933
|
+
type: "file",
|
|
4934
|
+
id: "file-upload-dialog",
|
|
4935
|
+
className: "hidden",
|
|
4936
|
+
onChange: handleFileSelect,
|
|
4937
|
+
disabled: isUploading
|
|
4938
|
+
}
|
|
4939
|
+
),
|
|
4940
|
+
/* @__PURE__ */ jsxs(
|
|
4941
|
+
"label",
|
|
4942
|
+
{
|
|
4943
|
+
htmlFor: "file-upload-dialog",
|
|
4944
|
+
className: cn(
|
|
4945
|
+
"cursor-pointer flex flex-col items-center gap-2",
|
|
4946
|
+
isUploading && "opacity-50 cursor-not-allowed"
|
|
4947
|
+
),
|
|
4948
|
+
children: [
|
|
4949
|
+
/* @__PURE__ */ jsx(Upload, { className: "h-8 w-8 text-muted-foreground" }),
|
|
4950
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
4951
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-foreground", children: selectedFile ? "Change file" : "Click to upload or drag and drop" }),
|
|
4952
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-1", children: "PDF, DOC, DOCX, JPG, PNG up to 10MB" })
|
|
4953
|
+
] })
|
|
4954
|
+
]
|
|
4955
|
+
}
|
|
4956
|
+
)
|
|
4957
|
+
] }),
|
|
4958
|
+
selectedFile && /* @__PURE__ */ jsxs("div", { className: "p-3 bg-muted/50 rounded-lg", children: [
|
|
4959
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Selected file:" }),
|
|
4960
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: selectedFile.name }),
|
|
4961
|
+
/* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
4962
|
+
(selectedFile.size / 1024 / 1024).toFixed(2),
|
|
4963
|
+
" MB"
|
|
4964
|
+
] })
|
|
4965
|
+
] }),
|
|
4966
|
+
/* @__PURE__ */ jsx(
|
|
4967
|
+
EnhancedInput,
|
|
4968
|
+
{
|
|
4969
|
+
label: "Document name",
|
|
4970
|
+
value: documentName,
|
|
4971
|
+
onChange: (e) => setDocumentName(e.target.value),
|
|
4972
|
+
placeholder: "Enter document name"
|
|
4973
|
+
}
|
|
4974
|
+
),
|
|
4975
|
+
/* @__PURE__ */ jsx(
|
|
4976
|
+
EnhancedTextarea,
|
|
4977
|
+
{
|
|
4978
|
+
label: "Description",
|
|
4979
|
+
value: description,
|
|
4980
|
+
onChange: (e) => setDescription(e.target.value),
|
|
4981
|
+
placeholder: "Enter document description (optional)",
|
|
4982
|
+
rows: 3
|
|
4983
|
+
}
|
|
4984
|
+
),
|
|
4985
|
+
/* @__PURE__ */ jsx(
|
|
4986
|
+
EnhancedSelect,
|
|
4987
|
+
{
|
|
4988
|
+
label: "Document type",
|
|
4989
|
+
value: documentType,
|
|
4990
|
+
onValueChange: setDocumentType,
|
|
4991
|
+
placeholder: "Select document type",
|
|
4992
|
+
options: documentTypeOptions
|
|
4993
|
+
}
|
|
4994
|
+
)
|
|
4995
|
+
] }),
|
|
4996
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-3 mt-6", children: [
|
|
4997
|
+
/* @__PURE__ */ jsx(
|
|
4998
|
+
Button,
|
|
4999
|
+
{
|
|
5000
|
+
variant: "outline",
|
|
5001
|
+
onClick: handleCancelUpload,
|
|
5002
|
+
disabled: isUploading,
|
|
5003
|
+
className: "flex-1",
|
|
5004
|
+
children: "Cancel"
|
|
5005
|
+
}
|
|
5006
|
+
),
|
|
5007
|
+
/* @__PURE__ */ jsx(
|
|
5008
|
+
Button,
|
|
5009
|
+
{
|
|
5010
|
+
onClick: handleUploadSubmit,
|
|
5011
|
+
disabled: isUploading,
|
|
5012
|
+
className: "flex-1",
|
|
5013
|
+
children: isUploading ? "Uploading..." : "Upload"
|
|
5014
|
+
}
|
|
5015
|
+
)
|
|
5016
|
+
] })
|
|
5017
|
+
] })
|
|
5018
|
+
] }),
|
|
5019
|
+
document.body
|
|
5020
|
+
),
|
|
5021
|
+
documents.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
5022
|
+
/* @__PURE__ */ jsx(FileText, { className: "h-5 w-5 opacity-50" }),
|
|
5023
|
+
/* @__PURE__ */ jsx("p", { children: "No documents uploaded yet" })
|
|
5024
|
+
] }) : /* @__PURE__ */ jsx("div", { className: "space-y-2", children: documents.map((doc) => /* @__PURE__ */ jsxs(
|
|
5025
|
+
"div",
|
|
5026
|
+
{
|
|
5027
|
+
className: "border rounded-lg hover:bg-muted/30 transition-colors overflow-hidden",
|
|
5028
|
+
children: [
|
|
5029
|
+
isImageType(doc.name) && doc.url && /* @__PURE__ */ jsx("div", { className: "w-full bg-muted/50", children: /* @__PURE__ */ jsx(
|
|
5030
|
+
"img",
|
|
5031
|
+
{
|
|
5032
|
+
src: doc.url,
|
|
5033
|
+
alt: doc.name,
|
|
5034
|
+
className: "w-full h-48 object-cover"
|
|
5035
|
+
}
|
|
5036
|
+
) }),
|
|
5037
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between p-3", children: [
|
|
5038
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
5039
|
+
!isImageType(doc.name) && /* @__PURE__ */ jsx("div", { className: cn(getFileTypeColor(doc.type)), children: getFileIcon(doc.type) }),
|
|
5040
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
5041
|
+
/* @__PURE__ */ jsx("h4", { className: "font-medium text-sm truncate", children: doc.name }),
|
|
5042
|
+
/* @__PURE__ */ jsx("span", { className: cn("text-xs px-2 py-0.5 rounded-full bg-muted inline-block mt-1", getFileTypeColor(doc.type)), children: doc.type }),
|
|
5043
|
+
doc.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground mt-1", children: doc.description }),
|
|
5044
|
+
/* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground mt-1", children: [
|
|
5045
|
+
doc.size,
|
|
5046
|
+
" \u2022 Uploaded by ",
|
|
5047
|
+
doc.uploadedBy,
|
|
5048
|
+
" \u2022 ",
|
|
5049
|
+
new Date(doc.uploadedAt).toLocaleDateString()
|
|
5050
|
+
] })
|
|
5051
|
+
] })
|
|
5052
|
+
] }),
|
|
5053
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
5054
|
+
/* @__PURE__ */ jsx(
|
|
5055
|
+
Button,
|
|
5056
|
+
{
|
|
5057
|
+
variant: "ghost",
|
|
5058
|
+
size: "sm",
|
|
5059
|
+
className: "h-8 w-8 p-0",
|
|
5060
|
+
onClick: () => toast({ title: "Preview", description: `Viewing ${doc.name}` }),
|
|
5061
|
+
children: /* @__PURE__ */ jsx(Eye, { className: "h-4 w-4" })
|
|
5062
|
+
}
|
|
5063
|
+
),
|
|
5064
|
+
/* @__PURE__ */ jsx(
|
|
5065
|
+
Button,
|
|
5066
|
+
{
|
|
5067
|
+
variant: "ghost",
|
|
5068
|
+
size: "sm",
|
|
5069
|
+
className: "h-8 w-8 p-0",
|
|
5070
|
+
onClick: () => toast({ title: "Download", description: `Downloading ${doc.name}` }),
|
|
5071
|
+
children: /* @__PURE__ */ jsx(Download, { className: "h-4 w-4" })
|
|
5072
|
+
}
|
|
5073
|
+
),
|
|
5074
|
+
/* @__PURE__ */ jsx(
|
|
5075
|
+
Button,
|
|
5076
|
+
{
|
|
5077
|
+
variant: "ghost",
|
|
5078
|
+
size: "sm",
|
|
5079
|
+
className: "h-8 w-8 p-0 text-muted-foreground hover:text-foreground",
|
|
5080
|
+
onClick: () => toast({ title: "Delete", description: `Deleted ${doc.name}` }),
|
|
5081
|
+
children: /* @__PURE__ */ jsx(Trash2, { className: "h-4 w-4" })
|
|
5082
|
+
}
|
|
5083
|
+
)
|
|
5084
|
+
] })
|
|
5085
|
+
] })
|
|
5086
|
+
]
|
|
5087
|
+
},
|
|
5088
|
+
doc.id
|
|
5089
|
+
)) })
|
|
5090
|
+
] })
|
|
5091
|
+
] });
|
|
5092
|
+
};
|
|
5093
|
+
var accountColumns = [
|
|
5094
|
+
{
|
|
5095
|
+
key: "number",
|
|
5096
|
+
title: "Account Number",
|
|
5097
|
+
sortable: true,
|
|
5098
|
+
width: "40%"
|
|
5099
|
+
},
|
|
5100
|
+
{
|
|
5101
|
+
key: "routingNumber",
|
|
5102
|
+
title: "Routing Number",
|
|
5103
|
+
sortable: true,
|
|
5104
|
+
width: "40%"
|
|
5105
|
+
},
|
|
5106
|
+
{
|
|
5107
|
+
key: "type",
|
|
5108
|
+
title: "Account Type",
|
|
5109
|
+
sortable: true,
|
|
5110
|
+
width: "20%",
|
|
5111
|
+
align: "right",
|
|
5112
|
+
render: (value) => /* @__PURE__ */ jsx("span", { className: "capitalize", children: value })
|
|
5113
|
+
}
|
|
5114
|
+
];
|
|
5115
|
+
var BusinessDetailView = ({
|
|
5116
|
+
business,
|
|
5117
|
+
businessProfile,
|
|
5118
|
+
identityVerification,
|
|
5119
|
+
businessUBOs,
|
|
5120
|
+
businessDocuments,
|
|
5121
|
+
businessAccounts,
|
|
5122
|
+
currentStatus,
|
|
5123
|
+
isEditingProfile,
|
|
5124
|
+
onStatusChange,
|
|
5125
|
+
onProfileDataChange,
|
|
5126
|
+
onToggleProfileEdit,
|
|
5127
|
+
onNavigateToAccounts,
|
|
5128
|
+
onNavigateToCounterparty,
|
|
5129
|
+
onAddAccount,
|
|
5130
|
+
onUBOClick,
|
|
5131
|
+
onDocumentUpload
|
|
5132
|
+
}) => {
|
|
5133
|
+
const [showAddAccountDialog, setShowAddAccountDialog] = useState(false);
|
|
5134
|
+
const handleAddAccount = (data) => {
|
|
5135
|
+
console.log("New account data:", data);
|
|
5136
|
+
};
|
|
5137
|
+
return /* @__PURE__ */ jsxs(
|
|
5138
|
+
PageLayout,
|
|
5139
|
+
{
|
|
5140
|
+
title: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
5141
|
+
/* @__PURE__ */ jsx("span", { children: business.businessName }),
|
|
5142
|
+
/* @__PURE__ */ jsx(
|
|
5143
|
+
EditableInfoField,
|
|
5144
|
+
{
|
|
5145
|
+
label: "",
|
|
5146
|
+
value: currentStatus,
|
|
5147
|
+
options: [
|
|
5148
|
+
{ value: "active", label: "Active" },
|
|
5149
|
+
{ value: "inactive", label: "Inactive" },
|
|
5150
|
+
{ value: "suspended", label: "Suspended" }
|
|
5151
|
+
],
|
|
5152
|
+
onChange: onStatusChange,
|
|
5153
|
+
renderValue: (value) => /* @__PURE__ */ jsx(StatusBadge, { status: value.toUpperCase() }),
|
|
5154
|
+
className: "inline-block"
|
|
5155
|
+
}
|
|
5156
|
+
),
|
|
5157
|
+
/* @__PURE__ */ jsx(CIPStatusBadge, { status: business.cipStatus }),
|
|
5158
|
+
/* @__PURE__ */ jsx(EntityTypeBadge, { type: business.type }),
|
|
5159
|
+
/* @__PURE__ */ jsx(SubTypeBadge, { subType: business.subType })
|
|
5160
|
+
] }),
|
|
5161
|
+
actions: [
|
|
5162
|
+
{
|
|
5163
|
+
label: "Account",
|
|
5164
|
+
variant: "outline",
|
|
5165
|
+
onClick: onNavigateToAccounts,
|
|
5166
|
+
icon: Wallet
|
|
5167
|
+
},
|
|
5168
|
+
{
|
|
5169
|
+
label: "Counterparty",
|
|
5170
|
+
variant: "outline",
|
|
5171
|
+
onClick: onNavigateToCounterparty,
|
|
5172
|
+
icon: Users
|
|
5173
|
+
}
|
|
5174
|
+
],
|
|
5175
|
+
maxWidth: "full",
|
|
5176
|
+
children: [
|
|
5177
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-4", children: [
|
|
5178
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-4", children: [
|
|
5179
|
+
/* @__PURE__ */ jsx(
|
|
5180
|
+
BusinessProfileCard,
|
|
5181
|
+
{
|
|
5182
|
+
data: businessProfile,
|
|
5183
|
+
identityVerification,
|
|
5184
|
+
isEditing: isEditingProfile,
|
|
5185
|
+
onToggleEdit: onToggleProfileEdit,
|
|
5186
|
+
onDataChange: onProfileDataChange
|
|
5187
|
+
}
|
|
5188
|
+
),
|
|
5189
|
+
/* @__PURE__ */ jsx(UBOCard, { ubos: businessUBOs, onUBOClick }),
|
|
5190
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
5191
|
+
/* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
5192
|
+
/* @__PURE__ */ jsx(CardTitle, { children: "External Accounts" }),
|
|
5193
|
+
/* @__PURE__ */ jsxs(Button, { size: "sm", variant: "ghost", onClick: () => setShowAddAccountDialog(true), children: [
|
|
5194
|
+
/* @__PURE__ */ jsx(Plus, { className: "h-4 w-4 mr-1" }),
|
|
5195
|
+
"Account"
|
|
5196
|
+
] })
|
|
5197
|
+
] }),
|
|
5198
|
+
/* @__PURE__ */ jsx(CardContent, { children: businessAccounts.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
5199
|
+
/* @__PURE__ */ jsx(Wallet, { className: "h-5 w-5 opacity-50" }),
|
|
5200
|
+
/* @__PURE__ */ jsx("p", { children: "No external accounts found" })
|
|
5201
|
+
] }) : /* @__PURE__ */ jsx(
|
|
5202
|
+
DataTable,
|
|
5203
|
+
{
|
|
5204
|
+
columns: accountColumns,
|
|
5205
|
+
data: businessAccounts
|
|
5206
|
+
}
|
|
5207
|
+
) })
|
|
5208
|
+
] }),
|
|
5209
|
+
/* @__PURE__ */ jsx(
|
|
5210
|
+
BusinessDocuments,
|
|
5211
|
+
{
|
|
5212
|
+
businessId: business.id,
|
|
5213
|
+
documents: businessDocuments,
|
|
5214
|
+
onDocumentUpload
|
|
5215
|
+
}
|
|
5216
|
+
)
|
|
5217
|
+
] }),
|
|
5218
|
+
/* @__PURE__ */ jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsx(BusinessStatusCard, { isEditing: false, onToggleEdit: () => {
|
|
5219
|
+
} }) })
|
|
5220
|
+
] }),
|
|
5221
|
+
/* @__PURE__ */ jsx(
|
|
5222
|
+
AddAccountDialog,
|
|
5223
|
+
{
|
|
5224
|
+
open: showAddAccountDialog,
|
|
5225
|
+
onOpenChange: setShowAddAccountDialog,
|
|
5226
|
+
onSubmit: handleAddAccount,
|
|
5227
|
+
existingAccounts: businessAccounts
|
|
5228
|
+
}
|
|
5229
|
+
)
|
|
5230
|
+
]
|
|
5231
|
+
}
|
|
5232
|
+
);
|
|
5233
|
+
};
|
|
5234
|
+
var BusinessFiltersSheet = ({
|
|
5235
|
+
filters,
|
|
5236
|
+
onFilterChange,
|
|
5237
|
+
onResetFilters
|
|
5238
|
+
}) => {
|
|
5239
|
+
const [localFilters, setLocalFilters] = useState(filters);
|
|
5240
|
+
const [open, setOpen] = useState(false);
|
|
5241
|
+
useEffect(() => {
|
|
5242
|
+
setLocalFilters(filters);
|
|
5243
|
+
}, [filters]);
|
|
5244
|
+
const handleLocalFilterChange = (field, value) => {
|
|
5245
|
+
setLocalFilters((prev) => ({ ...prev, [field]: value }));
|
|
5246
|
+
};
|
|
5247
|
+
const handleApplyFilters = () => {
|
|
5248
|
+
Object.entries(localFilters).forEach(([key, value]) => {
|
|
5249
|
+
onFilterChange(key, value);
|
|
5250
|
+
});
|
|
5251
|
+
setOpen(false);
|
|
5252
|
+
};
|
|
5253
|
+
const handleResetFilters = () => {
|
|
5254
|
+
const resetFilters = {
|
|
5255
|
+
name: "",
|
|
5256
|
+
productName: "",
|
|
5257
|
+
status: "",
|
|
5258
|
+
createdDateStart: void 0,
|
|
5259
|
+
createdDateEnd: void 0
|
|
5260
|
+
};
|
|
5261
|
+
setLocalFilters(resetFilters);
|
|
5262
|
+
onResetFilters();
|
|
5263
|
+
setOpen(false);
|
|
5264
|
+
};
|
|
5265
|
+
return /* @__PURE__ */ jsxs(Sheet, { open, onOpenChange: setOpen, children: [
|
|
5266
|
+
/* @__PURE__ */ jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", className: "gap-2", children: [
|
|
5267
|
+
/* @__PURE__ */ jsx(Filter, { className: "h-4 w-4" }),
|
|
5268
|
+
"Filters"
|
|
5269
|
+
] }) }),
|
|
5270
|
+
/* @__PURE__ */ jsxs(SheetContent, { side: "right", className: "w-full sm:max-w-xl overflow-y-auto", children: [
|
|
5271
|
+
/* @__PURE__ */ jsx(SheetHeader, { children: /* @__PURE__ */ jsx(SheetTitle, { children: "Business Filters" }) }),
|
|
5272
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-6 py-6", children: [
|
|
5273
|
+
/* @__PURE__ */ jsx(
|
|
5274
|
+
EnhancedInput,
|
|
5275
|
+
{
|
|
5276
|
+
label: "Name",
|
|
5277
|
+
value: localFilters.name,
|
|
5278
|
+
onChange: (e) => handleLocalFilterChange("name", e.target.value),
|
|
5279
|
+
placeholder: "Enter business name"
|
|
5280
|
+
}
|
|
5281
|
+
),
|
|
5282
|
+
/* @__PURE__ */ jsx(
|
|
5283
|
+
EnhancedInput,
|
|
5284
|
+
{
|
|
5285
|
+
label: "Product Name",
|
|
5286
|
+
value: localFilters.productName,
|
|
5287
|
+
onChange: (e) => handleLocalFilterChange("productName", e.target.value),
|
|
5288
|
+
placeholder: "Enter product name"
|
|
5289
|
+
}
|
|
5290
|
+
),
|
|
5291
|
+
/* @__PURE__ */ jsx(
|
|
5292
|
+
EnhancedSelect,
|
|
5293
|
+
{
|
|
5294
|
+
label: "Status",
|
|
5295
|
+
value: localFilters.status,
|
|
5296
|
+
onValueChange: (value) => handleLocalFilterChange("status", value),
|
|
5297
|
+
placeholder: "Select status",
|
|
5298
|
+
options: [
|
|
5299
|
+
{ value: "ACTIVE", label: "Active" },
|
|
5300
|
+
{ value: "INACTIVE", label: "Inactive" },
|
|
5301
|
+
{ value: "BLOCKED", label: "Blocked" },
|
|
5302
|
+
{ value: "PENDING_APPROVAL", label: "Pending Approval" },
|
|
5303
|
+
{ value: "PENDING", label: "Pending" },
|
|
5304
|
+
{ value: "INITIALIZED", label: "Initialized" },
|
|
5305
|
+
{ value: "PENDING_UNBLOCKED", label: "Pending Unblocked" }
|
|
5306
|
+
]
|
|
5307
|
+
}
|
|
5308
|
+
),
|
|
5309
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5310
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
5311
|
+
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Created Date Start" }),
|
|
5312
|
+
/* @__PURE__ */ jsx(
|
|
5313
|
+
DatePicker,
|
|
5314
|
+
{
|
|
5315
|
+
date: localFilters.createdDateStart,
|
|
5316
|
+
onDateChange: (date) => handleLocalFilterChange("createdDateStart", date),
|
|
5317
|
+
placeholder: "MM/DD/YYYY",
|
|
5318
|
+
buttonClassName: "w-full",
|
|
5319
|
+
className: "bg-background z-50"
|
|
5320
|
+
}
|
|
5321
|
+
)
|
|
5322
|
+
] }),
|
|
5323
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
5324
|
+
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Created Date End" }),
|
|
5325
|
+
/* @__PURE__ */ jsx(
|
|
5326
|
+
DatePicker,
|
|
5327
|
+
{
|
|
5328
|
+
date: localFilters.createdDateEnd,
|
|
5329
|
+
onDateChange: (date) => handleLocalFilterChange("createdDateEnd", date),
|
|
5330
|
+
placeholder: "MM/DD/YYYY",
|
|
5331
|
+
buttonClassName: "w-full",
|
|
5332
|
+
className: "bg-background z-50"
|
|
5333
|
+
}
|
|
5334
|
+
)
|
|
5335
|
+
] })
|
|
5336
|
+
] })
|
|
5337
|
+
] }),
|
|
5338
|
+
/* @__PURE__ */ jsxs(SheetFooter, { className: "gap-2", children: [
|
|
5339
|
+
/* @__PURE__ */ jsx(Button, { variant: "outline", onClick: handleResetFilters, children: "Reset Filters" }),
|
|
5340
|
+
/* @__PURE__ */ jsx(Button, { onClick: handleApplyFilters, children: "Apply Filters" })
|
|
5341
|
+
] })
|
|
5342
|
+
] })
|
|
5343
|
+
] });
|
|
5344
|
+
};
|
|
5345
|
+
var BusinessForm = ({
|
|
5346
|
+
form,
|
|
5347
|
+
businessType,
|
|
5348
|
+
onBusinessTypeChange,
|
|
5349
|
+
onSubmit
|
|
5350
|
+
}) => {
|
|
5351
|
+
return /* @__PURE__ */ jsx(FormProvider, { form, children: /* @__PURE__ */ jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "space-y-6", children: [
|
|
5352
|
+
/* @__PURE__ */ jsxs(Card, { className: "p-6", children: [
|
|
5353
|
+
/* @__PURE__ */ jsx("div", { className: "border-b border-border pb-4 mb-6", children: /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Business Information" }) }),
|
|
5354
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
|
|
5355
|
+
/* @__PURE__ */ jsx(
|
|
5356
|
+
FormInput,
|
|
5357
|
+
{
|
|
5358
|
+
name: "name",
|
|
5359
|
+
label: "Business Name",
|
|
5360
|
+
placeholder: "Enter business name",
|
|
5361
|
+
required: true
|
|
5362
|
+
}
|
|
5363
|
+
),
|
|
5364
|
+
/* @__PURE__ */ jsx(
|
|
5365
|
+
FormInput,
|
|
5366
|
+
{
|
|
5367
|
+
name: "productId",
|
|
5368
|
+
label: "Product ID",
|
|
5369
|
+
placeholder: "Enter product ID",
|
|
5370
|
+
type: "number",
|
|
5371
|
+
required: true
|
|
5372
|
+
}
|
|
5373
|
+
),
|
|
5374
|
+
/* @__PURE__ */ jsx(
|
|
5375
|
+
FormSelect,
|
|
5376
|
+
{
|
|
5377
|
+
name: "businessIdType",
|
|
5378
|
+
label: "ID Number Type",
|
|
5379
|
+
placeholder: "Select ID type",
|
|
5380
|
+
options: [
|
|
5381
|
+
{ value: "EIN", label: "EIN" },
|
|
5382
|
+
{ value: "SSN", label: "SSN" },
|
|
5383
|
+
{ value: "TIN", label: "TIN" },
|
|
5384
|
+
{ value: "OTHER_ID", label: "Other ID" }
|
|
5385
|
+
]
|
|
5386
|
+
}
|
|
5387
|
+
),
|
|
5388
|
+
/* @__PURE__ */ jsx(
|
|
5389
|
+
FormInput,
|
|
5390
|
+
{
|
|
5391
|
+
name: "idNumber",
|
|
5392
|
+
label: "ID Number",
|
|
5393
|
+
placeholder: "Enter ID number",
|
|
5394
|
+
required: true
|
|
5395
|
+
}
|
|
5396
|
+
),
|
|
5397
|
+
/* @__PURE__ */ jsx(
|
|
5398
|
+
FormInput,
|
|
5399
|
+
{
|
|
5400
|
+
name: "dba",
|
|
5401
|
+
label: "DBA Name",
|
|
5402
|
+
placeholder: "Enter DBA name",
|
|
5403
|
+
hint: "Doing Business As name"
|
|
5404
|
+
}
|
|
5405
|
+
),
|
|
5406
|
+
/* @__PURE__ */ jsx(
|
|
5407
|
+
FormSelect,
|
|
5408
|
+
{
|
|
5409
|
+
name: "businessEntityType",
|
|
5410
|
+
label: "Business Entity Type",
|
|
5411
|
+
placeholder: "Select business type",
|
|
5412
|
+
options: [
|
|
5413
|
+
{ value: "SOLE_PROPRIETOR", label: "Sole Proprietor" },
|
|
5414
|
+
{ value: "LIMITED_LIABILITY_COMPANY", label: "Limited Liability Company (LLC)" },
|
|
5415
|
+
{ value: "CORPORATION", label: "S or C Corporation" },
|
|
5416
|
+
{ value: "GENERAL_PARTNERSHIP", label: "General Partnership" },
|
|
5417
|
+
{ value: "LIMITED_LIABILITY_PARTNERSHIP", label: "Limited Liability Partnership" },
|
|
5418
|
+
{ value: "NON_PROFIT", label: "Non-Profit Corporation" },
|
|
5419
|
+
{ value: "GOVERNMENT_ORGANIZATION", label: "Government Organization" },
|
|
5420
|
+
{ value: "PUBLICLY_TRADED_COMPANY", label: "Publicly Traded Company" },
|
|
5421
|
+
{ value: "TRUSTS", label: "Trusts" }
|
|
5422
|
+
]
|
|
5423
|
+
}
|
|
5424
|
+
),
|
|
5425
|
+
/* @__PURE__ */ jsx(
|
|
5426
|
+
FormInput,
|
|
5427
|
+
{
|
|
5428
|
+
name: "incorporationState",
|
|
5429
|
+
label: "Incorporation State",
|
|
5430
|
+
placeholder: "Enter state"
|
|
5431
|
+
}
|
|
5432
|
+
),
|
|
5433
|
+
/* @__PURE__ */ jsx(
|
|
5434
|
+
FormInput,
|
|
5435
|
+
{
|
|
5436
|
+
name: "formationDate",
|
|
5437
|
+
label: "Formation Date",
|
|
5438
|
+
placeholder: "YYYY-MM-DD",
|
|
5439
|
+
type: "date"
|
|
5440
|
+
}
|
|
5441
|
+
),
|
|
5442
|
+
/* @__PURE__ */ jsx(
|
|
5443
|
+
FormInput,
|
|
5444
|
+
{
|
|
5445
|
+
name: "website",
|
|
5446
|
+
label: "Website",
|
|
5447
|
+
placeholder: "https://www.business.com"
|
|
5448
|
+
}
|
|
5449
|
+
),
|
|
5450
|
+
/* @__PURE__ */ jsx(
|
|
5451
|
+
FormInput,
|
|
5452
|
+
{
|
|
5453
|
+
name: "mobilePhone",
|
|
5454
|
+
label: "Mobile Phone",
|
|
5455
|
+
placeholder: "+1 (555) 123-4567",
|
|
5456
|
+
hint: "Format: +1 (555) 123-4567"
|
|
5457
|
+
}
|
|
5458
|
+
),
|
|
5459
|
+
/* @__PURE__ */ jsx(
|
|
5460
|
+
FormInput,
|
|
5461
|
+
{
|
|
5462
|
+
name: "mcc",
|
|
5463
|
+
label: "MCC",
|
|
5464
|
+
placeholder: "1234",
|
|
5465
|
+
hint: "4-digit Merchant Category Code"
|
|
5466
|
+
}
|
|
5467
|
+
),
|
|
5468
|
+
/* @__PURE__ */ jsx(
|
|
5469
|
+
FormInput,
|
|
5470
|
+
{
|
|
5471
|
+
name: "naics",
|
|
5472
|
+
label: "NAICS",
|
|
5473
|
+
placeholder: "123456",
|
|
5474
|
+
hint: "6-digit industry classification"
|
|
5475
|
+
}
|
|
5476
|
+
),
|
|
5477
|
+
/* @__PURE__ */ jsx(
|
|
5478
|
+
FormInput,
|
|
5479
|
+
{
|
|
5480
|
+
name: "achCompanyId",
|
|
5481
|
+
label: "ACH Company ID",
|
|
5482
|
+
placeholder: "Enter ACH company ID"
|
|
5483
|
+
}
|
|
5484
|
+
)
|
|
5485
|
+
] })
|
|
5486
|
+
] }),
|
|
5487
|
+
/* @__PURE__ */ jsxs(Card, { className: "p-6", children: [
|
|
5488
|
+
/* @__PURE__ */ jsx("div", { className: "border-b border-border pb-4 mb-6", children: /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Business Address" }) }),
|
|
5489
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
|
|
5490
|
+
/* @__PURE__ */ jsx(
|
|
5491
|
+
FormInput,
|
|
5492
|
+
{
|
|
5493
|
+
name: "address.line1",
|
|
5494
|
+
label: "Street Address",
|
|
5495
|
+
placeholder: "Enter street address"
|
|
5496
|
+
}
|
|
5497
|
+
),
|
|
5498
|
+
/* @__PURE__ */ jsx(
|
|
5499
|
+
FormInput,
|
|
5500
|
+
{
|
|
5501
|
+
name: "address.line2",
|
|
5502
|
+
label: "Apartment/Suite",
|
|
5503
|
+
placeholder: "Enter apartment or suite number"
|
|
5504
|
+
}
|
|
5505
|
+
),
|
|
5506
|
+
/* @__PURE__ */ jsx(
|
|
5507
|
+
FormInput,
|
|
5508
|
+
{
|
|
5509
|
+
name: "address.city",
|
|
5510
|
+
label: "City",
|
|
5511
|
+
placeholder: "Enter city"
|
|
5512
|
+
}
|
|
5513
|
+
),
|
|
5514
|
+
/* @__PURE__ */ jsx(
|
|
5515
|
+
FormInput,
|
|
5516
|
+
{
|
|
5517
|
+
name: "address.state",
|
|
5518
|
+
label: "State",
|
|
5519
|
+
placeholder: "Enter state"
|
|
5520
|
+
}
|
|
5521
|
+
),
|
|
5522
|
+
/* @__PURE__ */ jsx(
|
|
5523
|
+
FormInput,
|
|
5524
|
+
{
|
|
5525
|
+
name: "address.postalCode",
|
|
5526
|
+
label: "Postal Code",
|
|
5527
|
+
placeholder: "12345"
|
|
5528
|
+
}
|
|
5529
|
+
),
|
|
5530
|
+
/* @__PURE__ */ jsx(
|
|
5531
|
+
FormInput,
|
|
5532
|
+
{
|
|
5533
|
+
name: "address.countryCode",
|
|
5534
|
+
label: "Country Code",
|
|
5535
|
+
placeholder: "e.g., US",
|
|
5536
|
+
required: true
|
|
5537
|
+
}
|
|
5538
|
+
),
|
|
5539
|
+
/* @__PURE__ */ jsx(
|
|
5540
|
+
FormInput,
|
|
5541
|
+
{
|
|
5542
|
+
name: "address.type",
|
|
5543
|
+
label: "Address Type",
|
|
5544
|
+
placeholder: "e.g., MAILING"
|
|
5545
|
+
}
|
|
5546
|
+
)
|
|
5547
|
+
] })
|
|
5548
|
+
] }),
|
|
5549
|
+
/* @__PURE__ */ jsxs(Card, { className: "p-6", children: [
|
|
5550
|
+
/* @__PURE__ */ jsx("div", { className: "border-b border-border pb-4 mb-6", children: /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Contact Information" }) }),
|
|
5551
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
|
|
5552
|
+
/* @__PURE__ */ jsx(
|
|
5553
|
+
FormInput,
|
|
5554
|
+
{
|
|
5555
|
+
name: "contactPersonFirstName",
|
|
5556
|
+
label: "Contact First Name",
|
|
5557
|
+
placeholder: "Enter first name"
|
|
5558
|
+
}
|
|
5559
|
+
),
|
|
5560
|
+
/* @__PURE__ */ jsx(
|
|
5561
|
+
FormInput,
|
|
5562
|
+
{
|
|
5563
|
+
name: "contactPersonLastName",
|
|
5564
|
+
label: "Contact Last Name",
|
|
5565
|
+
placeholder: "Enter last name"
|
|
5566
|
+
}
|
|
5567
|
+
),
|
|
5568
|
+
/* @__PURE__ */ jsx(
|
|
5569
|
+
FormInput,
|
|
5570
|
+
{
|
|
5571
|
+
name: "contactPersonEmail",
|
|
5572
|
+
label: "Contact Email",
|
|
5573
|
+
placeholder: "contact@business.com",
|
|
5574
|
+
type: "email"
|
|
5575
|
+
}
|
|
5576
|
+
),
|
|
5577
|
+
/* @__PURE__ */ jsx(
|
|
5578
|
+
FormInput,
|
|
5579
|
+
{
|
|
5580
|
+
name: "contactPersonPhone",
|
|
5191
5581
|
label: "Contact Phone",
|
|
5192
5582
|
placeholder: "+1 (555) 123-4567"
|
|
5193
5583
|
}
|
|
5194
|
-
)
|
|
5584
|
+
)
|
|
5585
|
+
] })
|
|
5586
|
+
] })
|
|
5587
|
+
] }) });
|
|
5588
|
+
};
|
|
5589
|
+
var CreateBusinessView = ({
|
|
5590
|
+
form,
|
|
5591
|
+
businessType,
|
|
5592
|
+
onBusinessTypeChange,
|
|
5593
|
+
onSubmit,
|
|
5594
|
+
onCancel
|
|
5595
|
+
}) => {
|
|
5596
|
+
return /* @__PURE__ */ jsx(
|
|
5597
|
+
PageLayout,
|
|
5598
|
+
{
|
|
5599
|
+
title: "Create Business",
|
|
5600
|
+
actions: [
|
|
5601
|
+
{ label: "Cancel", variant: "outline", onClick: onCancel },
|
|
5602
|
+
{ label: "Create Business", variant: "default", onClick: form.handleSubmit(onSubmit) }
|
|
5603
|
+
],
|
|
5604
|
+
children: /* @__PURE__ */ jsx(
|
|
5605
|
+
BusinessForm,
|
|
5606
|
+
{
|
|
5607
|
+
form,
|
|
5608
|
+
businessType,
|
|
5609
|
+
onBusinessTypeChange,
|
|
5610
|
+
onSubmit
|
|
5611
|
+
}
|
|
5612
|
+
)
|
|
5613
|
+
}
|
|
5614
|
+
);
|
|
5615
|
+
};
|
|
5616
|
+
var CounterpartyFiltersSheet = ({
|
|
5617
|
+
filters,
|
|
5618
|
+
onFilterChange,
|
|
5619
|
+
onResetFilters
|
|
5620
|
+
}) => {
|
|
5621
|
+
const [localFilters, setLocalFilters] = useState(filters);
|
|
5622
|
+
const [open, setOpen] = useState(false);
|
|
5623
|
+
useEffect(() => {
|
|
5624
|
+
setLocalFilters(filters);
|
|
5625
|
+
}, [filters]);
|
|
5626
|
+
const handleLocalFilterChange = (field, value) => {
|
|
5627
|
+
setLocalFilters((prev) => ({ ...prev, [field]: value }));
|
|
5628
|
+
};
|
|
5629
|
+
const handleApplyFilters = () => {
|
|
5630
|
+
Object.entries(localFilters).forEach(([key, value]) => {
|
|
5631
|
+
onFilterChange(key, value);
|
|
5632
|
+
});
|
|
5633
|
+
setOpen(false);
|
|
5634
|
+
};
|
|
5635
|
+
const handleResetFilters = () => {
|
|
5636
|
+
const resetFilters = {
|
|
5637
|
+
name: "",
|
|
5638
|
+
type: "",
|
|
5639
|
+
status: "",
|
|
5640
|
+
createdDateStart: void 0,
|
|
5641
|
+
createdDateEnd: void 0
|
|
5642
|
+
};
|
|
5643
|
+
setLocalFilters(resetFilters);
|
|
5644
|
+
onResetFilters();
|
|
5645
|
+
setOpen(false);
|
|
5646
|
+
};
|
|
5647
|
+
return /* @__PURE__ */ jsxs(Sheet, { open, onOpenChange: setOpen, children: [
|
|
5648
|
+
/* @__PURE__ */ jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", className: "gap-2", children: [
|
|
5649
|
+
/* @__PURE__ */ jsx(Filter, { className: "h-4 w-4" }),
|
|
5650
|
+
"Filters"
|
|
5651
|
+
] }) }),
|
|
5652
|
+
/* @__PURE__ */ jsxs(SheetContent, { side: "right", className: "w-full sm:max-w-xl overflow-y-auto", children: [
|
|
5653
|
+
/* @__PURE__ */ jsx(SheetHeader, { children: /* @__PURE__ */ jsx(SheetTitle, { children: "Counterparty Filters" }) }),
|
|
5654
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-6 py-6", children: [
|
|
5655
|
+
/* @__PURE__ */ jsx(
|
|
5656
|
+
EnhancedInput,
|
|
5657
|
+
{
|
|
5658
|
+
label: "Name",
|
|
5659
|
+
value: localFilters.name,
|
|
5660
|
+
onChange: (e) => handleLocalFilterChange("name", e.target.value),
|
|
5661
|
+
placeholder: "Enter counterparty name"
|
|
5662
|
+
}
|
|
5663
|
+
),
|
|
5664
|
+
/* @__PURE__ */ jsx(
|
|
5665
|
+
EnhancedSelect,
|
|
5666
|
+
{
|
|
5667
|
+
label: "Type",
|
|
5668
|
+
value: localFilters.type,
|
|
5669
|
+
onValueChange: (value) => handleLocalFilterChange("type", value),
|
|
5670
|
+
placeholder: "Select type",
|
|
5671
|
+
options: [
|
|
5672
|
+
{ value: "BUSINESS", label: "Business" },
|
|
5673
|
+
{ value: "INDIVIDUAL", label: "Individual" }
|
|
5674
|
+
]
|
|
5675
|
+
}
|
|
5676
|
+
),
|
|
5677
|
+
/* @__PURE__ */ jsx(
|
|
5678
|
+
EnhancedSelect,
|
|
5679
|
+
{
|
|
5680
|
+
label: "Status",
|
|
5681
|
+
value: localFilters.status,
|
|
5682
|
+
onValueChange: (value) => handleLocalFilterChange("status", value),
|
|
5683
|
+
placeholder: "Select status",
|
|
5684
|
+
options: [
|
|
5685
|
+
{ value: "ACTIVE", label: "Active" },
|
|
5686
|
+
{ value: "INACTIVE", label: "Inactive" },
|
|
5687
|
+
{ value: "PENDING", label: "Pending" },
|
|
5688
|
+
{ value: "SUSPENDED", label: "Suspended" }
|
|
5689
|
+
]
|
|
5690
|
+
}
|
|
5691
|
+
),
|
|
5692
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5693
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
5694
|
+
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Created Date Start" }),
|
|
5695
|
+
/* @__PURE__ */ jsx(
|
|
5696
|
+
DatePicker,
|
|
5697
|
+
{
|
|
5698
|
+
date: localFilters.createdDateStart,
|
|
5699
|
+
onDateChange: (date) => handleLocalFilterChange("createdDateStart", date),
|
|
5700
|
+
placeholder: "MM/DD/YYYY",
|
|
5701
|
+
buttonClassName: "w-full",
|
|
5702
|
+
className: "bg-background z-50"
|
|
5703
|
+
}
|
|
5704
|
+
)
|
|
5705
|
+
] }),
|
|
5706
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
5707
|
+
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Created Date End" }),
|
|
5708
|
+
/* @__PURE__ */ jsx(
|
|
5709
|
+
DatePicker,
|
|
5710
|
+
{
|
|
5711
|
+
date: localFilters.createdDateEnd,
|
|
5712
|
+
onDateChange: (date) => handleLocalFilterChange("createdDateEnd", date),
|
|
5713
|
+
placeholder: "MM/DD/YYYY",
|
|
5714
|
+
buttonClassName: "w-full",
|
|
5715
|
+
className: "bg-background z-50"
|
|
5716
|
+
}
|
|
5717
|
+
)
|
|
5718
|
+
] })
|
|
5719
|
+
] })
|
|
5720
|
+
] }),
|
|
5721
|
+
/* @__PURE__ */ jsxs(SheetFooter, { className: "flex gap-2", children: [
|
|
5722
|
+
/* @__PURE__ */ jsx(Button, { variant: "outline", onClick: handleResetFilters, className: "flex-1", children: "Reset Filters" }),
|
|
5723
|
+
/* @__PURE__ */ jsx(Button, { onClick: handleApplyFilters, className: "flex-1", children: "Apply Filters" })
|
|
5724
|
+
] })
|
|
5725
|
+
] })
|
|
5726
|
+
] });
|
|
5727
|
+
};
|
|
5728
|
+
var CounterpartiesView = ({
|
|
5729
|
+
table,
|
|
5730
|
+
filters,
|
|
5731
|
+
onFilterChange,
|
|
5732
|
+
onResetFilters,
|
|
5733
|
+
onCreateCounterparty
|
|
5734
|
+
}) => {
|
|
5735
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-screen bg-gradient-subtle", children: [
|
|
5736
|
+
/* @__PURE__ */ jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-6 max-w-none", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
5737
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold text-foreground", children: "Counterparties" }) }),
|
|
5738
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5739
|
+
/* @__PURE__ */ jsx(
|
|
5740
|
+
CounterpartyFiltersSheet,
|
|
5741
|
+
{
|
|
5742
|
+
filters,
|
|
5743
|
+
onFilterChange,
|
|
5744
|
+
onResetFilters
|
|
5745
|
+
}
|
|
5746
|
+
),
|
|
5747
|
+
/* @__PURE__ */ jsx(Button, { onClick: onCreateCounterparty, children: "Create Counterparty" })
|
|
5195
5748
|
] })
|
|
5749
|
+
] }) }) }),
|
|
5750
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 h-full max-w-none flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "flex-1 mt-4 overflow-auto", children: table }) }) })
|
|
5751
|
+
] });
|
|
5752
|
+
};
|
|
5753
|
+
|
|
5754
|
+
// src/lib/mock-data/counterparty-data.ts
|
|
5755
|
+
var defaultCounterpartyDetail = {
|
|
5756
|
+
email: "contact@acme.com",
|
|
5757
|
+
phone: "+1 (555) 123-4567",
|
|
5758
|
+
dateOfBirth: "1985-03-15",
|
|
5759
|
+
idNumber: "ID-123456789",
|
|
5760
|
+
idType: "product_id",
|
|
5761
|
+
idValue: "PROD-001",
|
|
5762
|
+
address: {
|
|
5763
|
+
line1: "123 Business Ave",
|
|
5764
|
+
line2: "Suite 100",
|
|
5765
|
+
city: "New York",
|
|
5766
|
+
state: "NY",
|
|
5767
|
+
postalCode: "10001",
|
|
5768
|
+
countryCode: "US",
|
|
5769
|
+
type: "MAILING"
|
|
5770
|
+
}
|
|
5771
|
+
};
|
|
5772
|
+
var CounterpartyProfileCard = ({
|
|
5773
|
+
data,
|
|
5774
|
+
onDataChange,
|
|
5775
|
+
isEditing = false,
|
|
5776
|
+
onToggleEdit,
|
|
5777
|
+
hideActions = false,
|
|
5778
|
+
className
|
|
5779
|
+
}) => {
|
|
5780
|
+
const navigate = useNavigate();
|
|
5781
|
+
const form = useFormWithEditState({
|
|
5782
|
+
schema: counterpartyDetailSchema,
|
|
5783
|
+
defaultValues: { ...defaultCounterpartyDetail, ...data },
|
|
5784
|
+
initialEditing: isEditing,
|
|
5785
|
+
onToggleEdit,
|
|
5786
|
+
onSave: onDataChange
|
|
5787
|
+
});
|
|
5788
|
+
const editContent = /* @__PURE__ */ jsx(FormProvider, { form, children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
5789
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
5790
|
+
/* @__PURE__ */ jsx(
|
|
5791
|
+
FormSelect,
|
|
5792
|
+
{
|
|
5793
|
+
name: "idType",
|
|
5794
|
+
label: "Associated with",
|
|
5795
|
+
placeholder: "Select association type",
|
|
5796
|
+
options: [
|
|
5797
|
+
{ value: "product_id", label: "Product ID" },
|
|
5798
|
+
{ value: "business_id", label: "Business ID" },
|
|
5799
|
+
{ value: "individual_id", label: "Individual ID" },
|
|
5800
|
+
{ value: "account_number", label: "Account Number" }
|
|
5801
|
+
]
|
|
5802
|
+
}
|
|
5803
|
+
),
|
|
5804
|
+
/* @__PURE__ */ jsx(
|
|
5805
|
+
FormInput,
|
|
5806
|
+
{
|
|
5807
|
+
name: "idValue",
|
|
5808
|
+
label: form.watch("idType") === "product_id" ? "Product ID" : form.watch("idType") === "business_id" ? "Business ID" : form.watch("idType") === "individual_id" ? "Individual ID" : "Account Number",
|
|
5809
|
+
placeholder: "Enter ID value"
|
|
5810
|
+
}
|
|
5811
|
+
),
|
|
5812
|
+
/* @__PURE__ */ jsx(
|
|
5813
|
+
FormInput,
|
|
5814
|
+
{
|
|
5815
|
+
name: "email",
|
|
5816
|
+
label: "Email",
|
|
5817
|
+
type: "email",
|
|
5818
|
+
placeholder: "Enter email address"
|
|
5819
|
+
}
|
|
5820
|
+
),
|
|
5821
|
+
/* @__PURE__ */ jsx(
|
|
5822
|
+
FormInput,
|
|
5823
|
+
{
|
|
5824
|
+
name: "phone",
|
|
5825
|
+
label: "Phone Number",
|
|
5826
|
+
type: "tel",
|
|
5827
|
+
placeholder: "Enter phone number"
|
|
5828
|
+
}
|
|
5829
|
+
),
|
|
5830
|
+
/* @__PURE__ */ jsx(
|
|
5831
|
+
FormInput,
|
|
5832
|
+
{
|
|
5833
|
+
name: "dateOfBirth",
|
|
5834
|
+
label: "Date of Birth",
|
|
5835
|
+
type: "date",
|
|
5836
|
+
placeholder: "Select date of birth"
|
|
5837
|
+
}
|
|
5838
|
+
),
|
|
5839
|
+
/* @__PURE__ */ jsx(
|
|
5840
|
+
FormInput,
|
|
5841
|
+
{
|
|
5842
|
+
name: "idNumber",
|
|
5843
|
+
label: "ID Number",
|
|
5844
|
+
placeholder: "Enter ID number"
|
|
5845
|
+
}
|
|
5846
|
+
)
|
|
5847
|
+
] }),
|
|
5848
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-4", children: [
|
|
5849
|
+
/* @__PURE__ */ jsx(
|
|
5850
|
+
FormInput,
|
|
5851
|
+
{
|
|
5852
|
+
name: "address.line1",
|
|
5853
|
+
label: "Street Address",
|
|
5854
|
+
placeholder: "Enter street address"
|
|
5855
|
+
}
|
|
5856
|
+
),
|
|
5857
|
+
/* @__PURE__ */ jsx(
|
|
5858
|
+
FormInput,
|
|
5859
|
+
{
|
|
5860
|
+
name: "address.line2",
|
|
5861
|
+
label: "Apartment, suite, or floor",
|
|
5862
|
+
placeholder: "Enter apartment, suite, or floor"
|
|
5863
|
+
}
|
|
5864
|
+
)
|
|
5865
|
+
] }),
|
|
5866
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
5867
|
+
/* @__PURE__ */ jsx(
|
|
5868
|
+
FormInput,
|
|
5869
|
+
{
|
|
5870
|
+
name: "address.city",
|
|
5871
|
+
label: "City",
|
|
5872
|
+
placeholder: "Enter city"
|
|
5873
|
+
}
|
|
5874
|
+
),
|
|
5875
|
+
/* @__PURE__ */ jsx(
|
|
5876
|
+
FormInput,
|
|
5877
|
+
{
|
|
5878
|
+
name: "address.state",
|
|
5879
|
+
label: "State",
|
|
5880
|
+
placeholder: "Enter state"
|
|
5881
|
+
}
|
|
5882
|
+
),
|
|
5883
|
+
/* @__PURE__ */ jsx(
|
|
5884
|
+
FormInput,
|
|
5885
|
+
{
|
|
5886
|
+
name: "address.postalCode",
|
|
5887
|
+
label: "Postal Code",
|
|
5888
|
+
placeholder: "Enter postal code"
|
|
5889
|
+
}
|
|
5890
|
+
),
|
|
5891
|
+
/* @__PURE__ */ jsx(
|
|
5892
|
+
FormInput,
|
|
5893
|
+
{
|
|
5894
|
+
name: "address.countryCode",
|
|
5895
|
+
label: "Country Code",
|
|
5896
|
+
placeholder: "e.g., US"
|
|
5897
|
+
}
|
|
5898
|
+
)
|
|
5196
5899
|
] })
|
|
5197
5900
|
] }) });
|
|
5901
|
+
const formValues = form.watch();
|
|
5902
|
+
const idTypeLabel = formValues?.idType === "product_id" ? "Product ID" : formValues?.idType === "business_id" ? "Business ID" : formValues?.idType === "individual_id" ? "Individual ID" : "Account Number";
|
|
5903
|
+
const getEntityLink = () => {
|
|
5904
|
+
if (!formValues?.idValue) return null;
|
|
5905
|
+
switch (formValues?.idType) {
|
|
5906
|
+
case "business_id":
|
|
5907
|
+
return `/business/${formValues.idValue}`;
|
|
5908
|
+
case "individual_id":
|
|
5909
|
+
return `/individual/${formValues.idValue}`;
|
|
5910
|
+
case "account_number":
|
|
5911
|
+
return `/account/${formValues.idValue}`;
|
|
5912
|
+
default:
|
|
5913
|
+
return null;
|
|
5914
|
+
}
|
|
5915
|
+
};
|
|
5916
|
+
const entityLink = getEntityLink();
|
|
5917
|
+
const viewContent = /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
5918
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5919
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Associated with", value: formValues?.idType === "product_id" ? "Product ID" : formValues?.idType === "business_id" ? "Business ID" : formValues?.idType === "individual_id" ? "Individual ID" : "Account Number", layout: "horizontal" }),
|
|
5920
|
+
/* @__PURE__ */ jsx(
|
|
5921
|
+
InfoField,
|
|
5922
|
+
{
|
|
5923
|
+
label: idTypeLabel,
|
|
5924
|
+
value: entityLink ? /* @__PURE__ */ jsx(
|
|
5925
|
+
"button",
|
|
5926
|
+
{
|
|
5927
|
+
onClick: (e) => {
|
|
5928
|
+
e.preventDefault();
|
|
5929
|
+
navigate(entityLink);
|
|
5930
|
+
},
|
|
5931
|
+
className: "text-primary hover:underline font-medium text-left cursor-pointer",
|
|
5932
|
+
children: formValues?.idValue || "-"
|
|
5933
|
+
}
|
|
5934
|
+
) : formValues?.idValue || "-",
|
|
5935
|
+
layout: "horizontal"
|
|
5936
|
+
}
|
|
5937
|
+
)
|
|
5938
|
+
] }),
|
|
5939
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5940
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Email", value: formValues?.email || "-", layout: "horizontal" }),
|
|
5941
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Phone Number", value: formValues?.phone || "-", layout: "horizontal" })
|
|
5942
|
+
] }),
|
|
5943
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5944
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Date of Birth", value: formValues?.dateOfBirth || "-", layout: "horizontal" }),
|
|
5945
|
+
/* @__PURE__ */ jsx(InfoField, { label: "ID Number", value: formValues?.idNumber || "-", layout: "horizontal" })
|
|
5946
|
+
] }),
|
|
5947
|
+
/* @__PURE__ */ jsx(
|
|
5948
|
+
InfoField,
|
|
5949
|
+
{
|
|
5950
|
+
label: "Address",
|
|
5951
|
+
value: formValues?.address ? `${formValues.address.line1 || ""}${formValues.address.line2 ? ", " + formValues.address.line2 : ""}, ${formValues.address.city || ""}, ${formValues.address.state || ""} ${formValues.address.postalCode || ""}, ${formValues.address.countryCode || ""}` : "-",
|
|
5952
|
+
layout: "horizontal"
|
|
5953
|
+
}
|
|
5954
|
+
)
|
|
5955
|
+
] });
|
|
5956
|
+
return /* @__PURE__ */ jsx(
|
|
5957
|
+
EditableFormCard,
|
|
5958
|
+
{
|
|
5959
|
+
title: "Profile Information",
|
|
5960
|
+
variant: "subtle",
|
|
5961
|
+
className,
|
|
5962
|
+
isEditing: form.isEditing,
|
|
5963
|
+
onToggleEdit: form.handleToggleEdit,
|
|
5964
|
+
onSave: form.handleSave,
|
|
5965
|
+
onCancel: form.handleCancel,
|
|
5966
|
+
hideActions,
|
|
5967
|
+
editContent,
|
|
5968
|
+
viewContent
|
|
5969
|
+
}
|
|
5970
|
+
);
|
|
5198
5971
|
};
|
|
5199
|
-
var
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5972
|
+
var mockCounterpartyTimeline = [
|
|
5973
|
+
{
|
|
5974
|
+
id: "1",
|
|
5975
|
+
action: "Counterparty Created",
|
|
5976
|
+
user: "admin",
|
|
5977
|
+
details: "Initial counterparty setup",
|
|
5978
|
+
status: "Active",
|
|
5979
|
+
timestamp: "2024-01-15 10:30:00"
|
|
5980
|
+
},
|
|
5981
|
+
{
|
|
5982
|
+
id: "2",
|
|
5983
|
+
action: "Profile Updated",
|
|
5984
|
+
user: "admin",
|
|
5985
|
+
details: "Updated counterparty information",
|
|
5986
|
+
timestamp: "2024-01-20 14:22:00"
|
|
5987
|
+
},
|
|
5988
|
+
{
|
|
5989
|
+
id: "3",
|
|
5990
|
+
action: "OFAC Check Completed",
|
|
5991
|
+
user: "System",
|
|
5992
|
+
details: "Automated compliance check",
|
|
5993
|
+
status: "Verified",
|
|
5994
|
+
timestamp: "2024-01-20 14:30:00"
|
|
5995
|
+
}
|
|
5996
|
+
];
|
|
5997
|
+
var CounterpartyStatusCard = ({ isEditing, onToggleEdit, className }) => {
|
|
5998
|
+
const getIcon = (action) => {
|
|
5999
|
+
if (action.includes("Created")) return /* @__PURE__ */ jsx(Circle, { className: "h-4 w-4" });
|
|
6000
|
+
if (action.includes("Assigned")) return /* @__PURE__ */ jsx(UserPlus, { className: "h-4 w-4" });
|
|
6001
|
+
if (action.includes("Updated") || action.includes("Modified") || action.includes("Check")) return /* @__PURE__ */ jsx(Edit, { className: "h-4 w-4" });
|
|
6002
|
+
if (action.includes("Completed") || action.includes("Verified")) return /* @__PURE__ */ jsx(CheckCircle, { className: "h-4 w-4" });
|
|
6003
|
+
return /* @__PURE__ */ jsx(Circle, { className: "h-4 w-4" });
|
|
6004
|
+
};
|
|
6005
|
+
const getStatusColor2 = (status) => {
|
|
6006
|
+
switch (status) {
|
|
6007
|
+
case "Active":
|
|
6008
|
+
case "Verified":
|
|
6009
|
+
return "text-success";
|
|
6010
|
+
case "Pending":
|
|
6011
|
+
return "text-warning";
|
|
6012
|
+
default:
|
|
6013
|
+
return "text-muted-foreground";
|
|
6014
|
+
}
|
|
6015
|
+
};
|
|
5206
6016
|
return /* @__PURE__ */ jsx(
|
|
5207
|
-
|
|
6017
|
+
FormCard,
|
|
5208
6018
|
{
|
|
5209
|
-
title: "
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
{
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
6019
|
+
title: "Timeline",
|
|
6020
|
+
className,
|
|
6021
|
+
children: /* @__PURE__ */ jsx("div", { className: "space-y-3", children: mockCounterpartyTimeline.map((event, index) => /* @__PURE__ */ jsxs("div", { className: "relative pl-6 pb-3", children: [
|
|
6022
|
+
index !== mockCounterpartyTimeline.length - 1 && /* @__PURE__ */ jsx("div", { className: "absolute left-[7px] top-5 bottom-0 w-[2px] bg-border" }),
|
|
6023
|
+
/* @__PURE__ */ jsx("div", { className: cn(
|
|
6024
|
+
"absolute left-0 top-0 flex-none",
|
|
6025
|
+
getStatusColor2(event.status)
|
|
6026
|
+
), children: /* @__PURE__ */ jsx("div", { className: "h-4 w-4", children: getIcon(event.action) }) }),
|
|
6027
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-0.5", children: [
|
|
6028
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-foreground", children: event.action }),
|
|
6029
|
+
/* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
6030
|
+
"by ",
|
|
6031
|
+
event.user
|
|
6032
|
+
] }),
|
|
6033
|
+
event.details && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: event.details }),
|
|
6034
|
+
event.status && /* @__PURE__ */ jsxs("p", { className: cn("text-xs font-medium", getStatusColor2(event.status)), children: [
|
|
6035
|
+
"Status: ",
|
|
6036
|
+
event.status
|
|
6037
|
+
] }),
|
|
6038
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground/70 pt-0.5", children: event.timestamp })
|
|
6039
|
+
] })
|
|
6040
|
+
] }, event.id)) })
|
|
5223
6041
|
}
|
|
5224
6042
|
);
|
|
5225
6043
|
};
|
|
5226
|
-
var
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
6044
|
+
var typeConfig2 = {
|
|
6045
|
+
BUSINESS: {
|
|
6046
|
+
variant: "business",
|
|
6047
|
+
label: "Business",
|
|
6048
|
+
icon: Building2
|
|
6049
|
+
},
|
|
6050
|
+
INDIVIDUAL: {
|
|
6051
|
+
variant: "individual",
|
|
6052
|
+
label: "Individual",
|
|
6053
|
+
icon: User
|
|
6054
|
+
}
|
|
6055
|
+
};
|
|
6056
|
+
var CounterpartyTypeBadge = ({ type, className }) => {
|
|
6057
|
+
const config = typeConfig2[type];
|
|
6058
|
+
if (!config) {
|
|
6059
|
+
return /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className, children: [
|
|
6060
|
+
/* @__PURE__ */ jsx(Building2, { className: "w-3 h-3 mr-1" }),
|
|
6061
|
+
type || "Unknown"
|
|
6062
|
+
] });
|
|
6063
|
+
}
|
|
6064
|
+
const Icon2 = config.icon;
|
|
6065
|
+
return /* @__PURE__ */ jsxs(Badge, { variant: config.variant, className, children: [
|
|
6066
|
+
/* @__PURE__ */ jsx(Icon2, { className: "w-3 h-3 mr-1" }),
|
|
6067
|
+
config.label
|
|
6068
|
+
] });
|
|
6069
|
+
};
|
|
6070
|
+
var PaymentMethodCard = ({
|
|
6071
|
+
type,
|
|
6072
|
+
fiId,
|
|
6073
|
+
accountNumber,
|
|
6074
|
+
bankName,
|
|
6075
|
+
accountType,
|
|
6076
|
+
beneficiaryBankName,
|
|
6077
|
+
correspondentBankId,
|
|
6078
|
+
intermediaryBankId,
|
|
6079
|
+
className
|
|
5230
6080
|
}) => {
|
|
5231
|
-
const
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
|
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
});
|
|
5243
|
-
setOpen(false);
|
|
5244
|
-
};
|
|
5245
|
-
const handleResetFilters = () => {
|
|
5246
|
-
const resetFilters = {
|
|
5247
|
-
name: "",
|
|
5248
|
-
type: "",
|
|
5249
|
-
status: "",
|
|
5250
|
-
createdDateStart: void 0,
|
|
5251
|
-
createdDateEnd: void 0
|
|
5252
|
-
};
|
|
5253
|
-
setLocalFilters(resetFilters);
|
|
5254
|
-
onResetFilters();
|
|
5255
|
-
setOpen(false);
|
|
6081
|
+
const getIcon = () => {
|
|
6082
|
+
switch (type) {
|
|
6083
|
+
case "ACH":
|
|
6084
|
+
return Building2;
|
|
6085
|
+
case "Domestic Wire":
|
|
6086
|
+
return Landmark;
|
|
6087
|
+
case "International Wire":
|
|
6088
|
+
return Globe;
|
|
6089
|
+
default:
|
|
6090
|
+
return Building2;
|
|
6091
|
+
}
|
|
5256
6092
|
};
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
"
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
/* @__PURE__ */ jsx(SheetHeader, { children: /* @__PURE__ */ jsx(SheetTitle, { children: "Counterparty Filters" }) }),
|
|
5264
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-6 py-6", children: [
|
|
5265
|
-
/* @__PURE__ */ jsx(
|
|
5266
|
-
EnhancedInput,
|
|
5267
|
-
{
|
|
5268
|
-
label: "Name",
|
|
5269
|
-
value: localFilters.name,
|
|
5270
|
-
onChange: (e) => handleLocalFilterChange("name", e.target.value),
|
|
5271
|
-
placeholder: "Enter counterparty name"
|
|
5272
|
-
}
|
|
5273
|
-
),
|
|
5274
|
-
/* @__PURE__ */ jsx(
|
|
5275
|
-
EnhancedSelect,
|
|
5276
|
-
{
|
|
5277
|
-
label: "Type",
|
|
5278
|
-
value: localFilters.type,
|
|
5279
|
-
onValueChange: (value) => handleLocalFilterChange("type", value),
|
|
5280
|
-
placeholder: "Select type",
|
|
5281
|
-
options: [
|
|
5282
|
-
{ value: "BUSINESS", label: "Business" },
|
|
5283
|
-
{ value: "INDIVIDUAL", label: "Individual" }
|
|
5284
|
-
]
|
|
5285
|
-
}
|
|
5286
|
-
),
|
|
5287
|
-
/* @__PURE__ */ jsx(
|
|
5288
|
-
EnhancedSelect,
|
|
5289
|
-
{
|
|
5290
|
-
label: "Status",
|
|
5291
|
-
value: localFilters.status,
|
|
5292
|
-
onValueChange: (value) => handleLocalFilterChange("status", value),
|
|
5293
|
-
placeholder: "Select status",
|
|
5294
|
-
options: [
|
|
5295
|
-
{ value: "ACTIVE", label: "Active" },
|
|
5296
|
-
{ value: "INACTIVE", label: "Inactive" },
|
|
5297
|
-
{ value: "PENDING", label: "Pending" },
|
|
5298
|
-
{ value: "SUSPENDED", label: "Suspended" }
|
|
5299
|
-
]
|
|
5300
|
-
}
|
|
5301
|
-
),
|
|
5302
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5303
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
5304
|
-
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Created Date Start" }),
|
|
5305
|
-
/* @__PURE__ */ jsx(
|
|
5306
|
-
DatePicker,
|
|
5307
|
-
{
|
|
5308
|
-
date: localFilters.createdDateStart,
|
|
5309
|
-
onDateChange: (date) => handleLocalFilterChange("createdDateStart", date),
|
|
5310
|
-
placeholder: "MM/DD/YYYY",
|
|
5311
|
-
buttonClassName: "w-full",
|
|
5312
|
-
className: "bg-background z-50"
|
|
5313
|
-
}
|
|
5314
|
-
)
|
|
5315
|
-
] }),
|
|
5316
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
5317
|
-
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Created Date End" }),
|
|
5318
|
-
/* @__PURE__ */ jsx(
|
|
5319
|
-
DatePicker,
|
|
5320
|
-
{
|
|
5321
|
-
date: localFilters.createdDateEnd,
|
|
5322
|
-
onDateChange: (date) => handleLocalFilterChange("createdDateEnd", date),
|
|
5323
|
-
placeholder: "MM/DD/YYYY",
|
|
5324
|
-
buttonClassName: "w-full",
|
|
5325
|
-
className: "bg-background z-50"
|
|
5326
|
-
}
|
|
5327
|
-
)
|
|
5328
|
-
] })
|
|
5329
|
-
] })
|
|
6093
|
+
const Icon2 = getIcon();
|
|
6094
|
+
return /* @__PURE__ */ jsxs(Card, { className: cn("hover:bg-muted/50 transition-colors", className), children: [
|
|
6095
|
+
/* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-start justify-between space-y-0 pb-3", children: [
|
|
6096
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
6097
|
+
/* @__PURE__ */ jsx(Icon2, { className: "h-4 w-4 text-muted-foreground" }),
|
|
6098
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium text-sm", children: type })
|
|
5330
6099
|
] }),
|
|
5331
|
-
/* @__PURE__ */
|
|
5332
|
-
|
|
5333
|
-
|
|
6100
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", className: "h-8 w-8 p-0", children: /* @__PURE__ */ jsx(MoreVertical, { className: "h-4 w-4" }) })
|
|
6101
|
+
] }),
|
|
6102
|
+
/* @__PURE__ */ jsxs(CardContent, { className: "space-y-3", children: [
|
|
6103
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
|
|
6104
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Beneficiary FI ID", value: fiId }),
|
|
6105
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Account Number", value: accountNumber })
|
|
6106
|
+
] }),
|
|
6107
|
+
type === "ACH" && /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
|
|
6108
|
+
bankName && /* @__PURE__ */ jsx(InfoField, { label: "Bank Name", value: bankName }),
|
|
6109
|
+
accountType && /* @__PURE__ */ jsx(InfoField, { label: "Account Type", value: accountType })
|
|
6110
|
+
] }),
|
|
6111
|
+
type === "Domestic Wire" && bankName && /* @__PURE__ */ jsx(InfoField, { label: "Bank Name", value: bankName }),
|
|
6112
|
+
type === "International Wire" && /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
6113
|
+
beneficiaryBankName && /* @__PURE__ */ jsx(InfoField, { label: "Beneficiary Bank Name", value: beneficiaryBankName }),
|
|
6114
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
|
|
6115
|
+
correspondentBankId && /* @__PURE__ */ jsx(InfoField, { label: "Correspondent Bank ID", value: correspondentBankId }),
|
|
6116
|
+
intermediaryBankId && /* @__PURE__ */ jsx(InfoField, { label: "Intermediary Bank ID", value: intermediaryBankId })
|
|
6117
|
+
] })
|
|
5334
6118
|
] })
|
|
5335
6119
|
] })
|
|
5336
6120
|
] });
|
|
5337
6121
|
};
|
|
5338
|
-
var
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
6122
|
+
var typeClasses = {
|
|
6123
|
+
cards: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
|
|
6124
|
+
forms: "grid-cols-1 lg:grid-cols-2",
|
|
6125
|
+
data: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",
|
|
6126
|
+
custom: ""
|
|
6127
|
+
};
|
|
6128
|
+
var gapClasses = {
|
|
6129
|
+
sm: "gap-3",
|
|
6130
|
+
md: "gap-4",
|
|
6131
|
+
lg: "gap-6",
|
|
6132
|
+
xl: "gap-8"
|
|
6133
|
+
};
|
|
6134
|
+
var ResponsiveGrid = React15.forwardRef(
|
|
6135
|
+
({ children, type = "cards", gap = "md", editMode = false, className }, ref) => {
|
|
6136
|
+
const gridClasses2 = editMode ? "grid-cols-1" : typeClasses[type];
|
|
6137
|
+
return /* @__PURE__ */ jsx(
|
|
6138
|
+
"div",
|
|
6139
|
+
{
|
|
6140
|
+
ref,
|
|
6141
|
+
className: cn(
|
|
6142
|
+
"grid",
|
|
6143
|
+
gridClasses2,
|
|
6144
|
+
gapClasses[gap],
|
|
6145
|
+
className
|
|
6146
|
+
),
|
|
6147
|
+
children
|
|
6148
|
+
}
|
|
6149
|
+
);
|
|
6150
|
+
}
|
|
6151
|
+
);
|
|
6152
|
+
ResponsiveGrid.displayName = "ResponsiveGrid";
|
|
6153
|
+
var CounterpartyDetailView = ({
|
|
6154
|
+
counterpartyName,
|
|
6155
|
+
counterpartyType,
|
|
6156
|
+
currentStatus,
|
|
6157
|
+
isEditingProfile,
|
|
6158
|
+
mockPaymentMethods: mockPaymentMethods2,
|
|
6159
|
+
documentsTable,
|
|
6160
|
+
onStatusChange,
|
|
6161
|
+
onToggleProfileEdit,
|
|
6162
|
+
onAddPaymentMethod,
|
|
6163
|
+
onAddDocument
|
|
5344
6164
|
}) => {
|
|
5345
|
-
return /* @__PURE__ */
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-
|
|
6165
|
+
return /* @__PURE__ */ jsx(
|
|
6166
|
+
PageLayout,
|
|
6167
|
+
{
|
|
6168
|
+
title: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
6169
|
+
/* @__PURE__ */ jsx("span", { children: counterpartyName }),
|
|
5349
6170
|
/* @__PURE__ */ jsx(
|
|
5350
|
-
|
|
6171
|
+
EditableInfoField,
|
|
5351
6172
|
{
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
6173
|
+
label: "",
|
|
6174
|
+
value: currentStatus,
|
|
6175
|
+
options: [
|
|
6176
|
+
{ value: "ACTIVE", label: "Active" },
|
|
6177
|
+
{ value: "INACTIVE", label: "Inactive" },
|
|
6178
|
+
{ value: "PENDING", label: "Pending" },
|
|
6179
|
+
{ value: "SUSPENDED", label: "Suspended" }
|
|
6180
|
+
],
|
|
6181
|
+
onChange: onStatusChange,
|
|
6182
|
+
renderValue: (value) => /* @__PURE__ */ jsx(StatusBadge, { status: value }),
|
|
6183
|
+
className: "inline-block"
|
|
5355
6184
|
}
|
|
5356
6185
|
),
|
|
5357
|
-
/* @__PURE__ */ jsx(
|
|
6186
|
+
/* @__PURE__ */ jsx(CounterpartyTypeBadge, { type: counterpartyType })
|
|
6187
|
+
] }),
|
|
6188
|
+
maxWidth: "full",
|
|
6189
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-4", children: [
|
|
6190
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-4", children: [
|
|
6191
|
+
/* @__PURE__ */ jsx(
|
|
6192
|
+
CounterpartyProfileCard,
|
|
6193
|
+
{
|
|
6194
|
+
isEditing: isEditingProfile,
|
|
6195
|
+
onToggleEdit: onToggleProfileEdit
|
|
6196
|
+
}
|
|
6197
|
+
),
|
|
6198
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
6199
|
+
/* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
6200
|
+
/* @__PURE__ */ jsx(CardTitle, { children: "Payment Methods" }),
|
|
6201
|
+
/* @__PURE__ */ jsxs(Button, { size: "sm", variant: "ghost", onClick: onAddPaymentMethod, children: [
|
|
6202
|
+
/* @__PURE__ */ jsx(Plus, { className: "h-4 w-4 mr-1" }),
|
|
6203
|
+
"Method"
|
|
6204
|
+
] })
|
|
6205
|
+
] }),
|
|
6206
|
+
/* @__PURE__ */ jsx(CardContent, { children: mockPaymentMethods2.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
6207
|
+
/* @__PURE__ */ jsx(Wallet, { className: "h-5 w-5 opacity-50" }),
|
|
6208
|
+
/* @__PURE__ */ jsx("p", { children: "No payment methods configured" })
|
|
6209
|
+
] }) : /* @__PURE__ */ jsx(ResponsiveGrid, { type: "forms", gap: "md", children: mockPaymentMethods2.map((method, index) => /* @__PURE__ */ jsx(PaymentMethodCard, { ...method }, index)) }) })
|
|
6210
|
+
] }),
|
|
6211
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
6212
|
+
/* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
6213
|
+
/* @__PURE__ */ jsx(CardTitle, { children: "Documents" }),
|
|
6214
|
+
/* @__PURE__ */ jsxs(Button, { size: "sm", variant: "ghost", onClick: onAddDocument, children: [
|
|
6215
|
+
/* @__PURE__ */ jsx(Plus, { className: "h-4 w-4 mr-1" }),
|
|
6216
|
+
"Document"
|
|
6217
|
+
] })
|
|
6218
|
+
] }),
|
|
6219
|
+
/* @__PURE__ */ jsx(CardContent, { children: documentsTable })
|
|
6220
|
+
] })
|
|
6221
|
+
] }),
|
|
6222
|
+
/* @__PURE__ */ jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsx(CounterpartyStatusCard, { isEditing: false, onToggleEdit: () => {
|
|
6223
|
+
} }) })
|
|
5358
6224
|
] })
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
] });
|
|
6225
|
+
}
|
|
6226
|
+
);
|
|
5362
6227
|
};
|
|
5363
6228
|
|
|
5364
6229
|
// src/lib/mock-data/banking-data.ts
|
|
@@ -5521,37 +6386,6 @@ var ACHBasicInfoCard = ({
|
|
|
5521
6386
|
}
|
|
5522
6387
|
);
|
|
5523
6388
|
};
|
|
5524
|
-
var typeClasses = {
|
|
5525
|
-
cards: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
|
|
5526
|
-
forms: "grid-cols-1 lg:grid-cols-2",
|
|
5527
|
-
data: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",
|
|
5528
|
-
custom: ""
|
|
5529
|
-
};
|
|
5530
|
-
var gapClasses = {
|
|
5531
|
-
sm: "gap-3",
|
|
5532
|
-
md: "gap-4",
|
|
5533
|
-
lg: "gap-6",
|
|
5534
|
-
xl: "gap-8"
|
|
5535
|
-
};
|
|
5536
|
-
var ResponsiveGrid = React15.forwardRef(
|
|
5537
|
-
({ children, type = "cards", gap = "md", editMode = false, className }, ref) => {
|
|
5538
|
-
const gridClasses2 = editMode ? "grid-cols-1" : typeClasses[type];
|
|
5539
|
-
return /* @__PURE__ */ jsx(
|
|
5540
|
-
"div",
|
|
5541
|
-
{
|
|
5542
|
-
ref,
|
|
5543
|
-
className: cn(
|
|
5544
|
-
"grid",
|
|
5545
|
-
gridClasses2,
|
|
5546
|
-
gapClasses[gap],
|
|
5547
|
-
className
|
|
5548
|
-
),
|
|
5549
|
-
children
|
|
5550
|
-
}
|
|
5551
|
-
);
|
|
5552
|
-
}
|
|
5553
|
-
);
|
|
5554
|
-
ResponsiveGrid.displayName = "ResponsiveGrid";
|
|
5555
6389
|
var BankAddressCard = ({
|
|
5556
6390
|
data,
|
|
5557
6391
|
onDataChange,
|
|
@@ -5768,329 +6602,84 @@ var BankingDetailsCard = ({ isEditing, onToggleEdit, className }) => {
|
|
|
5768
6602
|
}
|
|
5769
6603
|
);
|
|
5770
6604
|
};
|
|
5771
|
-
var typeConfig2 = {
|
|
5772
|
-
BUSINESS: {
|
|
5773
|
-
variant: "business",
|
|
5774
|
-
label: "Business",
|
|
5775
|
-
icon: Building2
|
|
5776
|
-
},
|
|
5777
|
-
INDIVIDUAL: {
|
|
5778
|
-
variant: "individual",
|
|
5779
|
-
label: "Individual",
|
|
5780
|
-
icon: User
|
|
5781
|
-
}
|
|
5782
|
-
};
|
|
5783
|
-
var CounterpartyTypeBadge = ({ type, className }) => {
|
|
5784
|
-
const config = typeConfig2[type];
|
|
5785
|
-
if (!config) {
|
|
5786
|
-
return /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className, children: [
|
|
5787
|
-
/* @__PURE__ */ jsx(Building2, { className: "w-3 h-3 mr-1" }),
|
|
5788
|
-
type || "Unknown"
|
|
5789
|
-
] });
|
|
5790
|
-
}
|
|
5791
|
-
const Icon2 = config.icon;
|
|
5792
|
-
return /* @__PURE__ */ jsxs(Badge, { variant: config.variant, className, children: [
|
|
5793
|
-
/* @__PURE__ */ jsx(Icon2, { className: "w-3 h-3 mr-1" }),
|
|
5794
|
-
config.label
|
|
5795
|
-
] });
|
|
5796
|
-
};
|
|
5797
6605
|
var BasicInfoCard = ({ isEditing, onToggleEdit, className, hideActions }) => {
|
|
5798
6606
|
const [name, setName] = useState("John wire hot");
|
|
5799
|
-
const [status, setStatus] = useState("ACTIVE");
|
|
5800
|
-
const editContent = /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
5801
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
5802
|
-
/* @__PURE__ */ jsx(
|
|
5803
|
-
EnhancedInput,
|
|
5804
|
-
{
|
|
5805
|
-
label: "Name",
|
|
5806
|
-
value: name,
|
|
5807
|
-
onChange: (e) => setName(e.target.value),
|
|
5808
|
-
placeholder: "Enter counterparty name"
|
|
5809
|
-
}
|
|
5810
|
-
),
|
|
5811
|
-
/* @__PURE__ */ jsx(
|
|
5812
|
-
EnhancedSelect,
|
|
5813
|
-
{
|
|
5814
|
-
label: "Status",
|
|
5815
|
-
value: status,
|
|
5816
|
-
onValueChange: setStatus,
|
|
5817
|
-
placeholder: "Select status",
|
|
5818
|
-
options: [
|
|
5819
|
-
{ value: "ACTIVE", label: "Active" },
|
|
5820
|
-
{ value: "INACTIVE", label: "Inactive" },
|
|
5821
|
-
{ value: "PENDING", label: "Pending" },
|
|
5822
|
-
{ value: "SUSPENDED", label: "Suspended" }
|
|
5823
|
-
]
|
|
5824
|
-
}
|
|
5825
|
-
)
|
|
5826
|
-
] }),
|
|
5827
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4 pt-4 border-t border-border", children: [
|
|
5828
|
-
/* @__PURE__ */ jsx(InfoField, { label: "ID", value: "5000541", layout: "horizontal" }),
|
|
5829
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Counterparty Type", value: /* @__PURE__ */ jsx(CounterpartyTypeBadge, { type: "BUSINESS" }), layout: "horizontal" }),
|
|
5830
|
-
/* @__PURE__ */ jsx(InfoField, { label: "ID Number", value: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022", layout: "horizontal" }),
|
|
5831
|
-
/* @__PURE__ */ jsx(InfoField, { label: "ID Type", value: "SSN", layout: "horizontal" }),
|
|
5832
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Date of Birth", value: "1985-8-20", layout: "horizontal" }),
|
|
5833
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Created By", value: "admin", layout: "horizontal" }),
|
|
5834
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Created At", value: "2025-07-14", layout: "horizontal" }),
|
|
5835
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Updated By", value: "admin", layout: "horizontal" }),
|
|
5836
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Updated At", value: "2025-07-14", layout: "horizontal" })
|
|
5837
|
-
] }),
|
|
5838
|
-
/* @__PURE__ */ jsxs("div", { className: "pt-3 border-t border-border", children: [
|
|
5839
|
-
/* @__PURE__ */ jsx("h4", { className: "text-sm font-medium text-foreground mb-2", children: "OFAC Details" }),
|
|
5840
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5841
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Last OFAC date", value: "2025-07-14", layout: "horizontal" }),
|
|
5842
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Last OFAC status", value: "Verified", layout: "horizontal" })
|
|
5843
|
-
] })
|
|
5844
|
-
] })
|
|
5845
|
-
] });
|
|
5846
|
-
const viewContent = /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
5847
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5848
|
-
/* @__PURE__ */ jsx(InfoField, { label: "ID", value: "5000541", layout: "horizontal" }),
|
|
5849
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Name", value: name, layout: "horizontal" }),
|
|
5850
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Counterparty Type", value: /* @__PURE__ */ jsx(CounterpartyTypeBadge, { type: "BUSINESS" }), layout: "horizontal" }),
|
|
5851
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Status", value: /* @__PURE__ */ jsx(StatusBadge, { status }), layout: "horizontal" }),
|
|
5852
|
-
/* @__PURE__ */ jsx(InfoField, { label: "ID Number", value: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022", layout: "horizontal" }),
|
|
5853
|
-
/* @__PURE__ */ jsx(InfoField, { label: "ID Type", value: "SSN", layout: "horizontal" }),
|
|
5854
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Date of Birth", value: "1985-8-20", layout: "horizontal" }),
|
|
5855
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Created By", value: "admin", layout: "horizontal" }),
|
|
5856
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Created At", value: "2025-07-14", layout: "horizontal" }),
|
|
5857
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Updated By", value: "admin", layout: "horizontal" }),
|
|
5858
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Updated At", value: "2025-07-14", layout: "horizontal" })
|
|
5859
|
-
] }),
|
|
5860
|
-
/* @__PURE__ */ jsxs("div", { className: "pt-3 border-t border-border", children: [
|
|
5861
|
-
/* @__PURE__ */ jsx("h4", { className: "text-sm font-medium text-foreground mb-2", children: "OFAC Details" }),
|
|
5862
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5863
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Last OFAC date", value: "2025-07-14", layout: "horizontal" }),
|
|
5864
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Last OFAC status", value: "Verified", layout: "horizontal" })
|
|
5865
|
-
] })
|
|
5866
|
-
] })
|
|
5867
|
-
] });
|
|
5868
|
-
return /* @__PURE__ */ jsx(
|
|
5869
|
-
EditableFormCard,
|
|
5870
|
-
{
|
|
5871
|
-
title: "Basic Info",
|
|
5872
|
-
className,
|
|
5873
|
-
isEditing,
|
|
5874
|
-
onToggleEdit,
|
|
5875
|
-
hideActions,
|
|
5876
|
-
editContent,
|
|
5877
|
-
viewContent
|
|
5878
|
-
}
|
|
5879
|
-
);
|
|
5880
|
-
};
|
|
5881
|
-
|
|
5882
|
-
// src/lib/mock-data/counterparty-data.ts
|
|
5883
|
-
var defaultCounterpartyDetail = {
|
|
5884
|
-
email: "contact@acme.com",
|
|
5885
|
-
phone: "+1 (555) 123-4567",
|
|
5886
|
-
dateOfBirth: "1985-03-15",
|
|
5887
|
-
idNumber: "ID-123456789",
|
|
5888
|
-
idType: "product_id",
|
|
5889
|
-
idValue: "PROD-001",
|
|
5890
|
-
address: {
|
|
5891
|
-
line1: "123 Business Ave",
|
|
5892
|
-
line2: "Suite 100",
|
|
5893
|
-
city: "New York",
|
|
5894
|
-
state: "NY",
|
|
5895
|
-
postalCode: "10001",
|
|
5896
|
-
countryCode: "US",
|
|
5897
|
-
type: "MAILING"
|
|
5898
|
-
}
|
|
5899
|
-
};
|
|
5900
|
-
var CounterpartyProfileCard = ({
|
|
5901
|
-
data,
|
|
5902
|
-
onDataChange,
|
|
5903
|
-
isEditing = false,
|
|
5904
|
-
onToggleEdit,
|
|
5905
|
-
hideActions = false,
|
|
5906
|
-
className
|
|
5907
|
-
}) => {
|
|
5908
|
-
const navigate = useNavigate();
|
|
5909
|
-
const form = useFormWithEditState({
|
|
5910
|
-
schema: counterpartyDetailSchema,
|
|
5911
|
-
defaultValues: { ...defaultCounterpartyDetail, ...data },
|
|
5912
|
-
initialEditing: isEditing,
|
|
5913
|
-
onToggleEdit,
|
|
5914
|
-
onSave: onDataChange
|
|
5915
|
-
});
|
|
5916
|
-
const editContent = /* @__PURE__ */ jsx(FormProvider, { form, children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
6607
|
+
const [status, setStatus] = useState("ACTIVE");
|
|
6608
|
+
const editContent = /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
5917
6609
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
5918
6610
|
/* @__PURE__ */ jsx(
|
|
5919
|
-
|
|
5920
|
-
{
|
|
5921
|
-
name: "idType",
|
|
5922
|
-
label: "Associated with",
|
|
5923
|
-
placeholder: "Select association type",
|
|
5924
|
-
options: [
|
|
5925
|
-
{ value: "product_id", label: "Product ID" },
|
|
5926
|
-
{ value: "business_id", label: "Business ID" },
|
|
5927
|
-
{ value: "individual_id", label: "Individual ID" },
|
|
5928
|
-
{ value: "account_number", label: "Account Number" }
|
|
5929
|
-
]
|
|
5930
|
-
}
|
|
5931
|
-
),
|
|
5932
|
-
/* @__PURE__ */ jsx(
|
|
5933
|
-
FormInput,
|
|
5934
|
-
{
|
|
5935
|
-
name: "idValue",
|
|
5936
|
-
label: form.watch("idType") === "product_id" ? "Product ID" : form.watch("idType") === "business_id" ? "Business ID" : form.watch("idType") === "individual_id" ? "Individual ID" : "Account Number",
|
|
5937
|
-
placeholder: "Enter ID value"
|
|
5938
|
-
}
|
|
5939
|
-
),
|
|
5940
|
-
/* @__PURE__ */ jsx(
|
|
5941
|
-
FormInput,
|
|
5942
|
-
{
|
|
5943
|
-
name: "email",
|
|
5944
|
-
label: "Email",
|
|
5945
|
-
type: "email",
|
|
5946
|
-
placeholder: "Enter email address"
|
|
5947
|
-
}
|
|
5948
|
-
),
|
|
5949
|
-
/* @__PURE__ */ jsx(
|
|
5950
|
-
FormInput,
|
|
5951
|
-
{
|
|
5952
|
-
name: "phone",
|
|
5953
|
-
label: "Phone Number",
|
|
5954
|
-
type: "tel",
|
|
5955
|
-
placeholder: "Enter phone number"
|
|
5956
|
-
}
|
|
5957
|
-
),
|
|
5958
|
-
/* @__PURE__ */ jsx(
|
|
5959
|
-
FormInput,
|
|
6611
|
+
EnhancedInput,
|
|
5960
6612
|
{
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
placeholder: "
|
|
6613
|
+
label: "Name",
|
|
6614
|
+
value: name,
|
|
6615
|
+
onChange: (e) => setName(e.target.value),
|
|
6616
|
+
placeholder: "Enter counterparty name"
|
|
5965
6617
|
}
|
|
5966
6618
|
),
|
|
5967
6619
|
/* @__PURE__ */ jsx(
|
|
5968
|
-
|
|
6620
|
+
EnhancedSelect,
|
|
5969
6621
|
{
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
6622
|
+
label: "Status",
|
|
6623
|
+
value: status,
|
|
6624
|
+
onValueChange: setStatus,
|
|
6625
|
+
placeholder: "Select status",
|
|
6626
|
+
options: [
|
|
6627
|
+
{ value: "ACTIVE", label: "Active" },
|
|
6628
|
+
{ value: "INACTIVE", label: "Inactive" },
|
|
6629
|
+
{ value: "PENDING", label: "Pending" },
|
|
6630
|
+
{ value: "SUSPENDED", label: "Suspended" }
|
|
6631
|
+
]
|
|
5973
6632
|
}
|
|
5974
6633
|
)
|
|
5975
6634
|
] }),
|
|
5976
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-
|
|
5977
|
-
/* @__PURE__ */ jsx(
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
),
|
|
5985
|
-
/* @__PURE__ */ jsx(
|
|
5986
|
-
FormInput,
|
|
5987
|
-
{
|
|
5988
|
-
name: "address.line2",
|
|
5989
|
-
label: "Apartment, suite, or floor",
|
|
5990
|
-
placeholder: "Enter apartment, suite, or floor"
|
|
5991
|
-
}
|
|
5992
|
-
)
|
|
6635
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4 pt-4 border-t border-border", children: [
|
|
6636
|
+
/* @__PURE__ */ jsx(InfoField, { label: "ID", value: "5000541", layout: "horizontal" }),
|
|
6637
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Counterparty Type", value: /* @__PURE__ */ jsx(CounterpartyTypeBadge, { type: "BUSINESS" }), layout: "horizontal" }),
|
|
6638
|
+
/* @__PURE__ */ jsx(InfoField, { label: "ID Number", value: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022", layout: "horizontal" }),
|
|
6639
|
+
/* @__PURE__ */ jsx(InfoField, { label: "ID Type", value: "SSN", layout: "horizontal" }),
|
|
6640
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Date of Birth", value: "1985-8-20", layout: "horizontal" }),
|
|
6641
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Created By", value: "admin", layout: "horizontal" }),
|
|
6642
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Created At", value: "2025-07-14", layout: "horizontal" }),
|
|
6643
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Updated By", value: "admin", layout: "horizontal" }),
|
|
6644
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Updated At", value: "2025-07-14", layout: "horizontal" })
|
|
5993
6645
|
] }),
|
|
5994
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
5995
|
-
/* @__PURE__ */ jsx(
|
|
5996
|
-
|
|
5997
|
-
{
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
placeholder: "Enter city"
|
|
6001
|
-
}
|
|
6002
|
-
),
|
|
6003
|
-
/* @__PURE__ */ jsx(
|
|
6004
|
-
FormInput,
|
|
6005
|
-
{
|
|
6006
|
-
name: "address.state",
|
|
6007
|
-
label: "State",
|
|
6008
|
-
placeholder: "Enter state"
|
|
6009
|
-
}
|
|
6010
|
-
),
|
|
6011
|
-
/* @__PURE__ */ jsx(
|
|
6012
|
-
FormInput,
|
|
6013
|
-
{
|
|
6014
|
-
name: "address.postalCode",
|
|
6015
|
-
label: "Postal Code",
|
|
6016
|
-
placeholder: "Enter postal code"
|
|
6017
|
-
}
|
|
6018
|
-
),
|
|
6019
|
-
/* @__PURE__ */ jsx(
|
|
6020
|
-
FormInput,
|
|
6021
|
-
{
|
|
6022
|
-
name: "address.countryCode",
|
|
6023
|
-
label: "Country Code",
|
|
6024
|
-
placeholder: "e.g., US"
|
|
6025
|
-
}
|
|
6026
|
-
)
|
|
6646
|
+
/* @__PURE__ */ jsxs("div", { className: "pt-3 border-t border-border", children: [
|
|
6647
|
+
/* @__PURE__ */ jsx("h4", { className: "text-sm font-medium text-foreground mb-2", children: "OFAC Details" }),
|
|
6648
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
6649
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Last OFAC date", value: "2025-07-14", layout: "horizontal" }),
|
|
6650
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Last OFAC status", value: "Verified", layout: "horizontal" })
|
|
6651
|
+
] })
|
|
6027
6652
|
] })
|
|
6028
|
-
] })
|
|
6029
|
-
const
|
|
6030
|
-
const idTypeLabel = formValues?.idType === "product_id" ? "Product ID" : formValues?.idType === "business_id" ? "Business ID" : formValues?.idType === "individual_id" ? "Individual ID" : "Account Number";
|
|
6031
|
-
const getEntityLink = () => {
|
|
6032
|
-
if (!formValues?.idValue) return null;
|
|
6033
|
-
switch (formValues?.idType) {
|
|
6034
|
-
case "business_id":
|
|
6035
|
-
return `/business/${formValues.idValue}`;
|
|
6036
|
-
case "individual_id":
|
|
6037
|
-
return `/individual/${formValues.idValue}`;
|
|
6038
|
-
case "account_number":
|
|
6039
|
-
return `/account/${formValues.idValue}`;
|
|
6040
|
-
default:
|
|
6041
|
-
return null;
|
|
6042
|
-
}
|
|
6043
|
-
};
|
|
6044
|
-
const entityLink = getEntityLink();
|
|
6045
|
-
const viewContent = /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
6046
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
6047
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Associated with", value: formValues?.idType === "product_id" ? "Product ID" : formValues?.idType === "business_id" ? "Business ID" : formValues?.idType === "individual_id" ? "Individual ID" : "Account Number", layout: "horizontal" }),
|
|
6048
|
-
/* @__PURE__ */ jsx(
|
|
6049
|
-
InfoField,
|
|
6050
|
-
{
|
|
6051
|
-
label: idTypeLabel,
|
|
6052
|
-
value: entityLink ? /* @__PURE__ */ jsx(
|
|
6053
|
-
"button",
|
|
6054
|
-
{
|
|
6055
|
-
onClick: (e) => {
|
|
6056
|
-
e.preventDefault();
|
|
6057
|
-
navigate(entityLink);
|
|
6058
|
-
},
|
|
6059
|
-
className: "text-primary hover:underline font-medium text-left cursor-pointer",
|
|
6060
|
-
children: formValues?.idValue || "-"
|
|
6061
|
-
}
|
|
6062
|
-
) : formValues?.idValue || "-",
|
|
6063
|
-
layout: "horizontal"
|
|
6064
|
-
}
|
|
6065
|
-
)
|
|
6066
|
-
] }),
|
|
6067
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
6068
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Email", value: formValues?.email || "-", layout: "horizontal" }),
|
|
6069
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Phone Number", value: formValues?.phone || "-", layout: "horizontal" })
|
|
6070
|
-
] }),
|
|
6653
|
+
] });
|
|
6654
|
+
const viewContent = /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
6071
6655
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
6072
|
-
/* @__PURE__ */ jsx(InfoField, { label: "
|
|
6073
|
-
/* @__PURE__ */ jsx(InfoField, { label: "
|
|
6656
|
+
/* @__PURE__ */ jsx(InfoField, { label: "ID", value: "5000541", layout: "horizontal" }),
|
|
6657
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Name", value: name, layout: "horizontal" }),
|
|
6658
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Counterparty Type", value: /* @__PURE__ */ jsx(CounterpartyTypeBadge, { type: "BUSINESS" }), layout: "horizontal" }),
|
|
6659
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Status", value: /* @__PURE__ */ jsx(StatusBadge, { status }), layout: "horizontal" }),
|
|
6660
|
+
/* @__PURE__ */ jsx(InfoField, { label: "ID Number", value: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022", layout: "horizontal" }),
|
|
6661
|
+
/* @__PURE__ */ jsx(InfoField, { label: "ID Type", value: "SSN", layout: "horizontal" }),
|
|
6662
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Date of Birth", value: "1985-8-20", layout: "horizontal" }),
|
|
6663
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Created By", value: "admin", layout: "horizontal" }),
|
|
6664
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Created At", value: "2025-07-14", layout: "horizontal" }),
|
|
6665
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Updated By", value: "admin", layout: "horizontal" }),
|
|
6666
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Updated At", value: "2025-07-14", layout: "horizontal" })
|
|
6074
6667
|
] }),
|
|
6075
|
-
/* @__PURE__ */
|
|
6076
|
-
|
|
6077
|
-
{
|
|
6078
|
-
label: "
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
)
|
|
6668
|
+
/* @__PURE__ */ jsxs("div", { className: "pt-3 border-t border-border", children: [
|
|
6669
|
+
/* @__PURE__ */ jsx("h4", { className: "text-sm font-medium text-foreground mb-2", children: "OFAC Details" }),
|
|
6670
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
6671
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Last OFAC date", value: "2025-07-14", layout: "horizontal" }),
|
|
6672
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Last OFAC status", value: "Verified", layout: "horizontal" })
|
|
6673
|
+
] })
|
|
6674
|
+
] })
|
|
6083
6675
|
] });
|
|
6084
6676
|
return /* @__PURE__ */ jsx(
|
|
6085
6677
|
EditableFormCard,
|
|
6086
6678
|
{
|
|
6087
|
-
title: "
|
|
6088
|
-
variant: "subtle",
|
|
6679
|
+
title: "Basic Info",
|
|
6089
6680
|
className,
|
|
6090
|
-
isEditing
|
|
6091
|
-
onToggleEdit
|
|
6092
|
-
onSave: form.handleSave,
|
|
6093
|
-
onCancel: form.handleCancel,
|
|
6681
|
+
isEditing,
|
|
6682
|
+
onToggleEdit,
|
|
6094
6683
|
hideActions,
|
|
6095
6684
|
editContent,
|
|
6096
6685
|
viewContent
|
|
@@ -6449,47 +7038,14 @@ var CounterpartyBasicInfo = ({ onDataChange }) => {
|
|
|
6449
7038
|
EnhancedInput,
|
|
6450
7039
|
{
|
|
6451
7040
|
label: "ID Number",
|
|
6452
|
-
value: formData.idNumber,
|
|
6453
|
-
onChange: (e) => handleInputChange("idNumber", e.target.value),
|
|
6454
|
-
placeholder: "Enter ID number"
|
|
6455
|
-
}
|
|
6456
|
-
)
|
|
6457
|
-
] })
|
|
6458
|
-
] });
|
|
6459
|
-
};
|
|
6460
|
-
var spacingClasses = {
|
|
6461
|
-
sm: "space-y-3",
|
|
6462
|
-
md: "space-y-4",
|
|
6463
|
-
lg: "space-y-6"
|
|
6464
|
-
};
|
|
6465
|
-
var gridClasses = {
|
|
6466
|
-
1: "grid-cols-1",
|
|
6467
|
-
2: "grid-cols-1 md:grid-cols-2",
|
|
6468
|
-
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
|
|
6469
|
-
4: "grid-cols-1 md:grid-cols-2 lg:grid-cols-4"
|
|
6470
|
-
};
|
|
6471
|
-
var FormSection = React15.forwardRef(
|
|
6472
|
-
({
|
|
6473
|
-
title,
|
|
6474
|
-
description,
|
|
6475
|
-
children,
|
|
6476
|
-
className,
|
|
6477
|
-
spacing: spacing2 = "md",
|
|
6478
|
-
layout = "vertical",
|
|
6479
|
-
columns: columns3 = 2
|
|
6480
|
-
}, ref) => {
|
|
6481
|
-
return /* @__PURE__ */ jsxs("div", { ref, className: cn("space-y-4", className), children: [
|
|
6482
|
-
(title || description) && /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
6483
|
-
title && /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold text-foreground", children: title }),
|
|
6484
|
-
description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: description })
|
|
6485
|
-
] }),
|
|
6486
|
-
/* @__PURE__ */ jsx("div", { className: cn(
|
|
6487
|
-
layout === "grid" ? `grid gap-4 ${gridClasses[columns3]}` : spacingClasses[spacing2]
|
|
6488
|
-
), children })
|
|
6489
|
-
] });
|
|
6490
|
-
}
|
|
6491
|
-
);
|
|
6492
|
-
FormSection.displayName = "FormSection";
|
|
7041
|
+
value: formData.idNumber,
|
|
7042
|
+
onChange: (e) => handleInputChange("idNumber", e.target.value),
|
|
7043
|
+
placeholder: "Enter ID number"
|
|
7044
|
+
}
|
|
7045
|
+
)
|
|
7046
|
+
] })
|
|
7047
|
+
] });
|
|
7048
|
+
};
|
|
6493
7049
|
var IntermediaryFI = () => {
|
|
6494
7050
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
6495
7051
|
/* @__PURE__ */ jsxs("div", { className: "border-b border-border pb-4", children: [
|
|
@@ -7956,36 +8512,6 @@ var EntityCard = React15.forwardRef(
|
|
|
7956
8512
|
}
|
|
7957
8513
|
);
|
|
7958
8514
|
EntityCard.displayName = "EntityCard";
|
|
7959
|
-
var FormField = React15.forwardRef(
|
|
7960
|
-
({ label, description, error, required, children, className, layout = "vertical" }, ref) => {
|
|
7961
|
-
const isHorizontal = layout === "horizontal";
|
|
7962
|
-
return /* @__PURE__ */ jsxs(
|
|
7963
|
-
"div",
|
|
7964
|
-
{
|
|
7965
|
-
ref,
|
|
7966
|
-
className: cn(
|
|
7967
|
-
"space-y-2",
|
|
7968
|
-
isHorizontal && "grid grid-cols-1 md:grid-cols-3 gap-4 items-start space-y-0",
|
|
7969
|
-
className
|
|
7970
|
-
),
|
|
7971
|
-
children: [
|
|
7972
|
-
label && /* @__PURE__ */ jsxs("div", { className: cn("space-y-1", isHorizontal && "pt-2"), children: [
|
|
7973
|
-
/* @__PURE__ */ jsxs("label", { className: "text-sm font-medium text-foreground", children: [
|
|
7974
|
-
label,
|
|
7975
|
-
required && /* @__PURE__ */ jsx("span", { className: "text-destructive ml-1", children: "*" })
|
|
7976
|
-
] }),
|
|
7977
|
-
description && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: description })
|
|
7978
|
-
] }),
|
|
7979
|
-
/* @__PURE__ */ jsxs("div", { className: cn(isHorizontal && "md:col-span-2"), children: [
|
|
7980
|
-
children,
|
|
7981
|
-
error && /* @__PURE__ */ jsx("p", { className: "text-xs text-destructive mt-1", children: error })
|
|
7982
|
-
] })
|
|
7983
|
-
]
|
|
7984
|
-
}
|
|
7985
|
-
);
|
|
7986
|
-
}
|
|
7987
|
-
);
|
|
7988
|
-
FormField.displayName = "FormField";
|
|
7989
8515
|
var variantStyles = {
|
|
7990
8516
|
default: "",
|
|
7991
8517
|
success: "border-success/20 bg-success/5",
|
|
@@ -9364,39 +9890,6 @@ var AccountStatusCard = ({ isEditing, onToggleEdit, className }) => {
|
|
|
9364
9890
|
}
|
|
9365
9891
|
);
|
|
9366
9892
|
};
|
|
9367
|
-
var AccountBalanceCard = React15__default.forwardRef(
|
|
9368
|
-
({ balance, availableBalance, accountNumber, accountType, className }, ref) => {
|
|
9369
|
-
return /* @__PURE__ */ jsx(
|
|
9370
|
-
Card,
|
|
9371
|
-
{
|
|
9372
|
-
ref,
|
|
9373
|
-
className: cn(
|
|
9374
|
-
"border-primary/20 bg-gradient-to-br from-primary/5 via-primary/3 to-background",
|
|
9375
|
-
className
|
|
9376
|
-
),
|
|
9377
|
-
children: /* @__PURE__ */ jsx(CardContent, { className: "p-6", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
9378
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
9379
|
-
/* @__PURE__ */ jsx(Wallet, { className: "h-4 w-4 text-primary" }),
|
|
9380
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: accountNumber }),
|
|
9381
|
-
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "\u2022" }),
|
|
9382
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground capitalize", children: accountType })
|
|
9383
|
-
] }),
|
|
9384
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-end gap-8", children: [
|
|
9385
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
9386
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-muted-foreground mb-1", children: "Account Balance" }),
|
|
9387
|
-
/* @__PURE__ */ jsx("p", { className: "text-3xl font-bold text-foreground tracking-tight", children: balance })
|
|
9388
|
-
] }),
|
|
9389
|
-
availableBalance && /* @__PURE__ */ jsxs("div", { children: [
|
|
9390
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-muted-foreground mb-1", children: "Available Balance" }),
|
|
9391
|
-
/* @__PURE__ */ jsx("p", { className: "text-3xl font-bold text-foreground tracking-tight", children: availableBalance })
|
|
9392
|
-
] })
|
|
9393
|
-
] })
|
|
9394
|
-
] }) })
|
|
9395
|
-
}
|
|
9396
|
-
);
|
|
9397
|
-
}
|
|
9398
|
-
);
|
|
9399
|
-
AccountBalanceCard.displayName = "AccountBalanceCard";
|
|
9400
9893
|
var accountInfoSchema = z.object({
|
|
9401
9894
|
accountName: z.string().trim().min(1, "Account name is required").max(100, "Account name must be less than 100 characters"),
|
|
9402
9895
|
canAcceptSweep: z.enum(["Yes", "No"]),
|
|
@@ -9426,7 +9919,7 @@ var AccountDetail = () => {
|
|
|
9426
9919
|
}
|
|
9427
9920
|
const formValues = form.watch();
|
|
9428
9921
|
const customerPath = account.customerType === "business" ? `/business/${account.customerId}` : `/individual/${account.customerId}`;
|
|
9429
|
-
return /* @__PURE__ */
|
|
9922
|
+
return /* @__PURE__ */ jsx(
|
|
9430
9923
|
PageLayout,
|
|
9431
9924
|
{
|
|
9432
9925
|
title: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
@@ -9469,29 +9962,37 @@ var AccountDetail = () => {
|
|
|
9469
9962
|
}
|
|
9470
9963
|
],
|
|
9471
9964
|
maxWidth: "full",
|
|
9472
|
-
children: [
|
|
9473
|
-
/* @__PURE__ */
|
|
9474
|
-
|
|
9475
|
-
|
|
9476
|
-
|
|
9477
|
-
|
|
9478
|
-
|
|
9479
|
-
|
|
9480
|
-
|
|
9481
|
-
|
|
9482
|
-
|
|
9483
|
-
|
|
9484
|
-
|
|
9485
|
-
|
|
9486
|
-
|
|
9487
|
-
|
|
9488
|
-
|
|
9489
|
-
|
|
9490
|
-
|
|
9491
|
-
|
|
9492
|
-
|
|
9493
|
-
|
|
9494
|
-
|
|
9965
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-4", children: [
|
|
9966
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-4", children: [
|
|
9967
|
+
/* @__PURE__ */ jsx(
|
|
9968
|
+
EditableFormCard,
|
|
9969
|
+
{
|
|
9970
|
+
title: "Account Information",
|
|
9971
|
+
variant: "subtle",
|
|
9972
|
+
isEditing: form.isEditing,
|
|
9973
|
+
onToggleEdit: form.handleToggleEdit,
|
|
9974
|
+
onSave: form.handleSave,
|
|
9975
|
+
onCancel: form.handleCancel,
|
|
9976
|
+
viewContent: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9977
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-6 p-6 rounded-lg bg-gradient-to-br from-primary/10 via-primary/5 to-background border border-primary/20", children: [
|
|
9978
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-4", children: [
|
|
9979
|
+
/* @__PURE__ */ jsx(Wallet, { className: "h-4 w-4 text-primary" }),
|
|
9980
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: account.number }),
|
|
9981
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "\u2022" }),
|
|
9982
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground capitalize", children: account.type })
|
|
9983
|
+
] }),
|
|
9984
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-end gap-8", children: [
|
|
9985
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
9986
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-muted-foreground mb-1", children: "Account Balance" }),
|
|
9987
|
+
/* @__PURE__ */ jsx("p", { className: "text-3xl font-bold text-foreground tracking-tight", children: account.balance })
|
|
9988
|
+
] }),
|
|
9989
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
9990
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-muted-foreground mb-1", children: "Available Balance" }),
|
|
9991
|
+
/* @__PURE__ */ jsx("p", { className: "text-3xl font-bold text-foreground tracking-tight", children: account.balance })
|
|
9992
|
+
] })
|
|
9993
|
+
] })
|
|
9994
|
+
] }),
|
|
9995
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
9495
9996
|
/* @__PURE__ */ jsx(
|
|
9496
9997
|
InfoField,
|
|
9497
9998
|
{
|
|
@@ -9555,8 +10056,28 @@ var AccountDetail = () => {
|
|
|
9555
10056
|
value: formValues.sweepAccountNumber || "-"
|
|
9556
10057
|
}
|
|
9557
10058
|
)
|
|
10059
|
+
] })
|
|
10060
|
+
] }),
|
|
10061
|
+
editContent: /* @__PURE__ */ jsx(FormProvider, { form, children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10062
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-6 p-6 rounded-lg bg-gradient-to-br from-primary/10 via-primary/5 to-background border border-primary/20", children: [
|
|
10063
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-4", children: [
|
|
10064
|
+
/* @__PURE__ */ jsx(Wallet, { className: "h-4 w-4 text-primary" }),
|
|
10065
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: account.number }),
|
|
10066
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "\u2022" }),
|
|
10067
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground capitalize", children: account.type })
|
|
10068
|
+
] }),
|
|
10069
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-end gap-8", children: [
|
|
10070
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
10071
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-muted-foreground mb-1", children: "Account Balance" }),
|
|
10072
|
+
/* @__PURE__ */ jsx("p", { className: "text-3xl font-bold text-foreground tracking-tight", children: account.balance })
|
|
10073
|
+
] }),
|
|
10074
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
10075
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-muted-foreground mb-1", children: "Available Balance" }),
|
|
10076
|
+
/* @__PURE__ */ jsx("p", { className: "text-3xl font-bold text-foreground tracking-tight", children: account.balance })
|
|
10077
|
+
] })
|
|
10078
|
+
] })
|
|
9558
10079
|
] }),
|
|
9559
|
-
|
|
10080
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
9560
10081
|
/* @__PURE__ */ jsx(
|
|
9561
10082
|
InfoField,
|
|
9562
10083
|
{
|
|
@@ -9628,18 +10149,18 @@ var AccountDetail = () => {
|
|
|
9628
10149
|
placeholder: "Enter sweep account number"
|
|
9629
10150
|
}
|
|
9630
10151
|
)
|
|
9631
|
-
] })
|
|
9632
|
-
}
|
|
9633
|
-
|
|
9634
|
-
|
|
9635
|
-
|
|
9636
|
-
|
|
9637
|
-
|
|
9638
|
-
] })
|
|
9639
|
-
|
|
9640
|
-
|
|
9641
|
-
|
|
9642
|
-
]
|
|
10152
|
+
] })
|
|
10153
|
+
] }) })
|
|
10154
|
+
}
|
|
10155
|
+
),
|
|
10156
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
10157
|
+
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Fees" }) }),
|
|
10158
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx("div", { className: "text-center py-8 text-muted-foreground", children: /* @__PURE__ */ jsx("p", { children: "Fees information coming soon" }) }) })
|
|
10159
|
+
] })
|
|
10160
|
+
] }),
|
|
10161
|
+
/* @__PURE__ */ jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsx(AccountStatusCard, { isEditing: false, onToggleEdit: () => {
|
|
10162
|
+
} }) })
|
|
10163
|
+
] })
|
|
9643
10164
|
}
|
|
9644
10165
|
);
|
|
9645
10166
|
};
|
|
@@ -10932,161 +11453,37 @@ var Counterparties = () => {
|
|
|
10932
11453
|
{
|
|
10933
11454
|
key: "created",
|
|
10934
11455
|
title: "Created",
|
|
10935
|
-
sortable: true
|
|
10936
|
-
},
|
|
10937
|
-
{
|
|
10938
|
-
key: "modified",
|
|
10939
|
-
title: "Modified",
|
|
10940
|
-
sortable: true
|
|
10941
|
-
}
|
|
10942
|
-
];
|
|
10943
|
-
const table = useMemo(() => /* @__PURE__ */ jsx(
|
|
10944
|
-
DataTable,
|
|
10945
|
-
{
|
|
10946
|
-
columns: columns3,
|
|
10947
|
-
data: sortedCounterparties,
|
|
10948
|
-
sortBy,
|
|
10949
|
-
sortDirection,
|
|
10950
|
-
onSort: handleSort,
|
|
10951
|
-
onRowClick: handleRowClick
|
|
10952
|
-
}
|
|
10953
|
-
), [columns3, sortedCounterparties, sortBy, sortDirection, handleSort, handleRowClick]);
|
|
10954
|
-
return /* @__PURE__ */ jsx(
|
|
10955
|
-
CounterpartiesView,
|
|
10956
|
-
{
|
|
10957
|
-
table,
|
|
10958
|
-
filters,
|
|
10959
|
-
onFilterChange: handleFilterChange,
|
|
10960
|
-
onResetFilters: handleResetFilters,
|
|
10961
|
-
onCreateCounterparty: handleCreateCounterparty
|
|
10962
|
-
}
|
|
10963
|
-
);
|
|
10964
|
-
};
|
|
10965
|
-
var Counterparties_default = Counterparties;
|
|
10966
|
-
var mockCounterpartyTimeline = [
|
|
10967
|
-
{
|
|
10968
|
-
id: "1",
|
|
10969
|
-
action: "Counterparty Created",
|
|
10970
|
-
user: "admin",
|
|
10971
|
-
details: "Initial counterparty setup",
|
|
10972
|
-
status: "Active",
|
|
10973
|
-
timestamp: "2024-01-15 10:30:00"
|
|
10974
|
-
},
|
|
10975
|
-
{
|
|
10976
|
-
id: "2",
|
|
10977
|
-
action: "Profile Updated",
|
|
10978
|
-
user: "admin",
|
|
10979
|
-
details: "Updated counterparty information",
|
|
10980
|
-
timestamp: "2024-01-20 14:22:00"
|
|
10981
|
-
},
|
|
10982
|
-
{
|
|
10983
|
-
id: "3",
|
|
10984
|
-
action: "OFAC Check Completed",
|
|
10985
|
-
user: "System",
|
|
10986
|
-
details: "Automated compliance check",
|
|
10987
|
-
status: "Verified",
|
|
10988
|
-
timestamp: "2024-01-20 14:30:00"
|
|
10989
|
-
}
|
|
10990
|
-
];
|
|
10991
|
-
var CounterpartyStatusCard = ({ isEditing, onToggleEdit, className }) => {
|
|
10992
|
-
const getIcon = (action) => {
|
|
10993
|
-
if (action.includes("Created")) return /* @__PURE__ */ jsx(Circle, { className: "h-4 w-4" });
|
|
10994
|
-
if (action.includes("Assigned")) return /* @__PURE__ */ jsx(UserPlus, { className: "h-4 w-4" });
|
|
10995
|
-
if (action.includes("Updated") || action.includes("Modified") || action.includes("Check")) return /* @__PURE__ */ jsx(Edit, { className: "h-4 w-4" });
|
|
10996
|
-
if (action.includes("Completed") || action.includes("Verified")) return /* @__PURE__ */ jsx(CheckCircle, { className: "h-4 w-4" });
|
|
10997
|
-
return /* @__PURE__ */ jsx(Circle, { className: "h-4 w-4" });
|
|
10998
|
-
};
|
|
10999
|
-
const getStatusColor2 = (status) => {
|
|
11000
|
-
switch (status) {
|
|
11001
|
-
case "Active":
|
|
11002
|
-
case "Verified":
|
|
11003
|
-
return "text-success";
|
|
11004
|
-
case "Pending":
|
|
11005
|
-
return "text-warning";
|
|
11006
|
-
default:
|
|
11007
|
-
return "text-muted-foreground";
|
|
11008
|
-
}
|
|
11009
|
-
};
|
|
11010
|
-
return /* @__PURE__ */ jsx(
|
|
11011
|
-
FormCard,
|
|
11012
|
-
{
|
|
11013
|
-
title: "Timeline",
|
|
11014
|
-
className,
|
|
11015
|
-
children: /* @__PURE__ */ jsx("div", { className: "space-y-3", children: mockCounterpartyTimeline.map((event, index) => /* @__PURE__ */ jsxs("div", { className: "relative pl-6 pb-3", children: [
|
|
11016
|
-
index !== mockCounterpartyTimeline.length - 1 && /* @__PURE__ */ jsx("div", { className: "absolute left-[7px] top-5 bottom-0 w-[2px] bg-border" }),
|
|
11017
|
-
/* @__PURE__ */ jsx("div", { className: cn(
|
|
11018
|
-
"absolute left-0 top-0 flex-none",
|
|
11019
|
-
getStatusColor2(event.status)
|
|
11020
|
-
), children: /* @__PURE__ */ jsx("div", { className: "h-4 w-4", children: getIcon(event.action) }) }),
|
|
11021
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-0.5", children: [
|
|
11022
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-foreground", children: event.action }),
|
|
11023
|
-
/* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
11024
|
-
"by ",
|
|
11025
|
-
event.user
|
|
11026
|
-
] }),
|
|
11027
|
-
event.details && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: event.details }),
|
|
11028
|
-
event.status && /* @__PURE__ */ jsxs("p", { className: cn("text-xs font-medium", getStatusColor2(event.status)), children: [
|
|
11029
|
-
"Status: ",
|
|
11030
|
-
event.status
|
|
11031
|
-
] }),
|
|
11032
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground/70 pt-0.5", children: event.timestamp })
|
|
11033
|
-
] })
|
|
11034
|
-
] }, event.id)) })
|
|
11035
|
-
}
|
|
11036
|
-
);
|
|
11037
|
-
};
|
|
11038
|
-
var PaymentMethodCard = ({
|
|
11039
|
-
type,
|
|
11040
|
-
fiId,
|
|
11041
|
-
accountNumber,
|
|
11042
|
-
bankName,
|
|
11043
|
-
accountType,
|
|
11044
|
-
beneficiaryBankName,
|
|
11045
|
-
correspondentBankId,
|
|
11046
|
-
intermediaryBankId,
|
|
11047
|
-
className
|
|
11048
|
-
}) => {
|
|
11049
|
-
const getIcon = () => {
|
|
11050
|
-
switch (type) {
|
|
11051
|
-
case "ACH":
|
|
11052
|
-
return Building2;
|
|
11053
|
-
case "Domestic Wire":
|
|
11054
|
-
return Landmark;
|
|
11055
|
-
case "International Wire":
|
|
11056
|
-
return Globe;
|
|
11057
|
-
default:
|
|
11058
|
-
return Building2;
|
|
11059
|
-
}
|
|
11060
|
-
};
|
|
11061
|
-
const Icon2 = getIcon();
|
|
11062
|
-
return /* @__PURE__ */ jsxs(Card, { className: cn("hover:bg-muted/50 transition-colors", className), children: [
|
|
11063
|
-
/* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-start justify-between space-y-0 pb-3", children: [
|
|
11064
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
11065
|
-
/* @__PURE__ */ jsx(Icon2, { className: "h-4 w-4 text-muted-foreground" }),
|
|
11066
|
-
/* @__PURE__ */ jsx("span", { className: "font-medium text-sm", children: type })
|
|
11067
|
-
] }),
|
|
11068
|
-
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", className: "h-8 w-8 p-0", children: /* @__PURE__ */ jsx(MoreVertical, { className: "h-4 w-4" }) })
|
|
11069
|
-
] }),
|
|
11070
|
-
/* @__PURE__ */ jsxs(CardContent, { className: "space-y-3", children: [
|
|
11071
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
|
|
11072
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Beneficiary FI ID", value: fiId }),
|
|
11073
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Account Number", value: accountNumber })
|
|
11074
|
-
] }),
|
|
11075
|
-
type === "ACH" && /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
|
|
11076
|
-
bankName && /* @__PURE__ */ jsx(InfoField, { label: "Bank Name", value: bankName }),
|
|
11077
|
-
accountType && /* @__PURE__ */ jsx(InfoField, { label: "Account Type", value: accountType })
|
|
11078
|
-
] }),
|
|
11079
|
-
type === "Domestic Wire" && bankName && /* @__PURE__ */ jsx(InfoField, { label: "Bank Name", value: bankName }),
|
|
11080
|
-
type === "International Wire" && /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
11081
|
-
beneficiaryBankName && /* @__PURE__ */ jsx(InfoField, { label: "Beneficiary Bank Name", value: beneficiaryBankName }),
|
|
11082
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
|
|
11083
|
-
correspondentBankId && /* @__PURE__ */ jsx(InfoField, { label: "Correspondent Bank ID", value: correspondentBankId }),
|
|
11084
|
-
intermediaryBankId && /* @__PURE__ */ jsx(InfoField, { label: "Intermediary Bank ID", value: intermediaryBankId })
|
|
11085
|
-
] })
|
|
11086
|
-
] })
|
|
11087
|
-
] })
|
|
11088
|
-
] });
|
|
11456
|
+
sortable: true
|
|
11457
|
+
},
|
|
11458
|
+
{
|
|
11459
|
+
key: "modified",
|
|
11460
|
+
title: "Modified",
|
|
11461
|
+
sortable: true
|
|
11462
|
+
}
|
|
11463
|
+
];
|
|
11464
|
+
const table = useMemo(() => /* @__PURE__ */ jsx(
|
|
11465
|
+
DataTable,
|
|
11466
|
+
{
|
|
11467
|
+
columns: columns3,
|
|
11468
|
+
data: sortedCounterparties,
|
|
11469
|
+
sortBy,
|
|
11470
|
+
sortDirection,
|
|
11471
|
+
onSort: handleSort,
|
|
11472
|
+
onRowClick: handleRowClick
|
|
11473
|
+
}
|
|
11474
|
+
), [columns3, sortedCounterparties, sortBy, sortDirection, handleSort, handleRowClick]);
|
|
11475
|
+
return /* @__PURE__ */ jsx(
|
|
11476
|
+
CounterpartiesView,
|
|
11477
|
+
{
|
|
11478
|
+
table,
|
|
11479
|
+
filters,
|
|
11480
|
+
onFilterChange: handleFilterChange,
|
|
11481
|
+
onResetFilters: handleResetFilters,
|
|
11482
|
+
onCreateCounterparty: handleCreateCounterparty
|
|
11483
|
+
}
|
|
11484
|
+
);
|
|
11089
11485
|
};
|
|
11486
|
+
var Counterparties_default = Counterparties;
|
|
11090
11487
|
var mockPaymentMethods = [
|
|
11091
11488
|
{
|
|
11092
11489
|
type: "ACH",
|
|
@@ -11145,6 +11542,33 @@ var CounterpartyDetail = () => {
|
|
|
11145
11542
|
render: (value) => /* @__PURE__ */ jsx("span", { className: "capitalize", children: value })
|
|
11146
11543
|
}
|
|
11147
11544
|
];
|
|
11545
|
+
const handleStatusChange = (newStatus) => {
|
|
11546
|
+
setCurrentStatus(newStatus);
|
|
11547
|
+
};
|
|
11548
|
+
const handleToggleProfileEdit = () => {
|
|
11549
|
+
setIsEditingProfile(!isEditingProfile);
|
|
11550
|
+
};
|
|
11551
|
+
const handleAddPaymentMethod = () => {
|
|
11552
|
+
console.log("Add payment method");
|
|
11553
|
+
};
|
|
11554
|
+
const handleAddDocument = () => {
|
|
11555
|
+
console.log("Add document");
|
|
11556
|
+
};
|
|
11557
|
+
const documentsTable = useMemo(() => {
|
|
11558
|
+
if (counterpartyDocuments.length === 0) {
|
|
11559
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
11560
|
+
/* @__PURE__ */ jsx(FileText, { className: "h-5 w-5 opacity-50" }),
|
|
11561
|
+
/* @__PURE__ */ jsx("p", { children: "No documents found" })
|
|
11562
|
+
] });
|
|
11563
|
+
}
|
|
11564
|
+
return /* @__PURE__ */ jsx(
|
|
11565
|
+
DataTable,
|
|
11566
|
+
{
|
|
11567
|
+
columns: documentColumns,
|
|
11568
|
+
data: counterpartyDocuments
|
|
11569
|
+
}
|
|
11570
|
+
);
|
|
11571
|
+
}, [counterpartyDocuments, documentColumns]);
|
|
11148
11572
|
if (!counterparty) {
|
|
11149
11573
|
return /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-8", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
11150
11574
|
/* @__PURE__ */ jsx("h1", { className: "text-2xl font-bold mb-2", children: "Counterparty Not Found" }),
|
|
@@ -11152,74 +11576,18 @@ var CounterpartyDetail = () => {
|
|
|
11152
11576
|
] }) });
|
|
11153
11577
|
}
|
|
11154
11578
|
return /* @__PURE__ */ jsx(
|
|
11155
|
-
|
|
11579
|
+
CounterpartyDetailView,
|
|
11156
11580
|
{
|
|
11157
|
-
|
|
11158
|
-
|
|
11159
|
-
|
|
11160
|
-
|
|
11161
|
-
|
|
11162
|
-
|
|
11163
|
-
|
|
11164
|
-
|
|
11165
|
-
|
|
11166
|
-
|
|
11167
|
-
{ value: "PENDING", label: "Pending" },
|
|
11168
|
-
{ value: "SUSPENDED", label: "Suspended" }
|
|
11169
|
-
],
|
|
11170
|
-
onChange: (newStatus) => setCurrentStatus(newStatus),
|
|
11171
|
-
renderValue: (value) => /* @__PURE__ */ jsx(StatusBadge, { status: value }),
|
|
11172
|
-
className: "inline-block"
|
|
11173
|
-
}
|
|
11174
|
-
),
|
|
11175
|
-
/* @__PURE__ */ jsx(CounterpartyTypeBadge, { type: counterparty.type })
|
|
11176
|
-
] }),
|
|
11177
|
-
maxWidth: "full",
|
|
11178
|
-
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-4", children: [
|
|
11179
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-4", children: [
|
|
11180
|
-
/* @__PURE__ */ jsx(
|
|
11181
|
-
CounterpartyProfileCard,
|
|
11182
|
-
{
|
|
11183
|
-
isEditing: isEditingProfile,
|
|
11184
|
-
onToggleEdit: () => setIsEditingProfile(!isEditingProfile)
|
|
11185
|
-
}
|
|
11186
|
-
),
|
|
11187
|
-
/* @__PURE__ */ jsxs(Card, { children: [
|
|
11188
|
-
/* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
11189
|
-
/* @__PURE__ */ jsx(CardTitle, { children: "Payment Methods" }),
|
|
11190
|
-
/* @__PURE__ */ jsxs(Button, { size: "sm", variant: "ghost", children: [
|
|
11191
|
-
/* @__PURE__ */ jsx(Plus, { className: "h-4 w-4 mr-1" }),
|
|
11192
|
-
"Method"
|
|
11193
|
-
] })
|
|
11194
|
-
] }),
|
|
11195
|
-
/* @__PURE__ */ jsx(CardContent, { children: mockPaymentMethods.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
11196
|
-
/* @__PURE__ */ jsx(Wallet, { className: "h-5 w-5 opacity-50" }),
|
|
11197
|
-
/* @__PURE__ */ jsx("p", { children: "No payment methods configured" })
|
|
11198
|
-
] }) : /* @__PURE__ */ jsx(ResponsiveGrid, { type: "forms", gap: "md", children: mockPaymentMethods.map((method, index) => /* @__PURE__ */ jsx(PaymentMethodCard, { ...method }, index)) }) })
|
|
11199
|
-
] }),
|
|
11200
|
-
/* @__PURE__ */ jsxs(Card, { children: [
|
|
11201
|
-
/* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
11202
|
-
/* @__PURE__ */ jsx(CardTitle, { children: "Documents" }),
|
|
11203
|
-
/* @__PURE__ */ jsxs(Button, { size: "sm", variant: "ghost", children: [
|
|
11204
|
-
/* @__PURE__ */ jsx(Plus, { className: "h-4 w-4 mr-1" }),
|
|
11205
|
-
"Document"
|
|
11206
|
-
] })
|
|
11207
|
-
] }),
|
|
11208
|
-
/* @__PURE__ */ jsx(CardContent, { children: counterpartyDocuments.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
11209
|
-
/* @__PURE__ */ jsx(FileText, { className: "h-5 w-5 opacity-50" }),
|
|
11210
|
-
/* @__PURE__ */ jsx("p", { children: "No documents found" })
|
|
11211
|
-
] }) : /* @__PURE__ */ jsx(
|
|
11212
|
-
DataTable,
|
|
11213
|
-
{
|
|
11214
|
-
columns: documentColumns,
|
|
11215
|
-
data: counterpartyDocuments
|
|
11216
|
-
}
|
|
11217
|
-
) })
|
|
11218
|
-
] })
|
|
11219
|
-
] }),
|
|
11220
|
-
/* @__PURE__ */ jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsx(CounterpartyStatusCard, { isEditing: false, onToggleEdit: () => {
|
|
11221
|
-
} }) })
|
|
11222
|
-
] })
|
|
11581
|
+
counterpartyName: counterparty.name,
|
|
11582
|
+
counterpartyType: counterparty.type,
|
|
11583
|
+
currentStatus,
|
|
11584
|
+
isEditingProfile,
|
|
11585
|
+
mockPaymentMethods,
|
|
11586
|
+
documentsTable,
|
|
11587
|
+
onStatusChange: handleStatusChange,
|
|
11588
|
+
onToggleProfileEdit: handleToggleProfileEdit,
|
|
11589
|
+
onAddPaymentMethod: handleAddPaymentMethod,
|
|
11590
|
+
onAddDocument: handleAddDocument
|
|
11223
11591
|
}
|
|
11224
11592
|
);
|
|
11225
11593
|
};
|
|
@@ -13857,7 +14225,7 @@ var TransactionDetail = () => {
|
|
|
13857
14225
|
/* @__PURE__ */ jsx(Button, { onClick: () => navigate("/transactions/history"), children: "Back to Transaction History" })
|
|
13858
14226
|
] }) });
|
|
13859
14227
|
}
|
|
13860
|
-
const
|
|
14228
|
+
const getStatusVariant2 = (status) => {
|
|
13861
14229
|
switch (status) {
|
|
13862
14230
|
case "POSTED":
|
|
13863
14231
|
return "success";
|
|
@@ -13913,7 +14281,7 @@ var TransactionDetail = () => {
|
|
|
13913
14281
|
isInbound: transaction.isInbound
|
|
13914
14282
|
}
|
|
13915
14283
|
),
|
|
13916
|
-
/* @__PURE__ */ jsx(Badge, { variant:
|
|
14284
|
+
/* @__PURE__ */ jsx(Badge, { variant: getStatusVariant2(transaction.status), children: transaction.status }),
|
|
13917
14285
|
/* @__PURE__ */ jsx(Badge, { variant: getProcessingStatusVariant(transaction.processingStatus), children: transaction.processingStatus })
|
|
13918
14286
|
] }),
|
|
13919
14287
|
maxWidth: "full",
|
|
@@ -14012,7 +14380,342 @@ function UIKit() {
|
|
|
14012
14380
|
] })
|
|
14013
14381
|
] }) }) });
|
|
14014
14382
|
}
|
|
14383
|
+
function OFACFiltersSheet({
|
|
14384
|
+
filters,
|
|
14385
|
+
onFilterChange,
|
|
14386
|
+
onResetFilters
|
|
14387
|
+
}) {
|
|
14388
|
+
const hasActiveFilters = filters.status !== "" || filters.entityType !== "" || filters.startDate !== void 0 || filters.endDate !== void 0;
|
|
14389
|
+
return /* @__PURE__ */ jsxs(Sheet, { children: [
|
|
14390
|
+
/* @__PURE__ */ jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", children: [
|
|
14391
|
+
/* @__PURE__ */ jsx(Filter, { className: "mr-2 h-4 w-4" }),
|
|
14392
|
+
"Filters",
|
|
14393
|
+
hasActiveFilters && /* @__PURE__ */ jsx("span", { className: "ml-2 flex h-5 w-5 items-center justify-center rounded-full bg-primary text-xs text-primary-foreground", children: [filters.status, filters.entityType, filters.startDate, filters.endDate].filter(Boolean).length })
|
|
14394
|
+
] }) }),
|
|
14395
|
+
/* @__PURE__ */ jsxs(SheetContent, { className: "w-full sm:max-w-md overflow-y-auto", children: [
|
|
14396
|
+
/* @__PURE__ */ jsxs(SheetHeader, { children: [
|
|
14397
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
14398
|
+
/* @__PURE__ */ jsx(SheetTitle, { children: "Filter OFAC Checks" }),
|
|
14399
|
+
hasActiveFilters && /* @__PURE__ */ jsxs(
|
|
14400
|
+
Button,
|
|
14401
|
+
{
|
|
14402
|
+
variant: "ghost",
|
|
14403
|
+
size: "sm",
|
|
14404
|
+
onClick: onResetFilters,
|
|
14405
|
+
className: "h-8 px-2",
|
|
14406
|
+
children: [
|
|
14407
|
+
/* @__PURE__ */ jsx(X, { className: "mr-1 h-4 w-4" }),
|
|
14408
|
+
"Clear all"
|
|
14409
|
+
]
|
|
14410
|
+
}
|
|
14411
|
+
)
|
|
14412
|
+
] }),
|
|
14413
|
+
/* @__PURE__ */ jsx(SheetDescription, { children: "Filter OFAC screening results by status, entity type, and date range" })
|
|
14414
|
+
] }),
|
|
14415
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-6 mt-6", children: [
|
|
14416
|
+
/* @__PURE__ */ jsx(
|
|
14417
|
+
EnhancedSelect,
|
|
14418
|
+
{
|
|
14419
|
+
label: "Status",
|
|
14420
|
+
placeholder: "All statuses",
|
|
14421
|
+
options: [
|
|
14422
|
+
{ value: "all", label: "All statuses" },
|
|
14423
|
+
{ value: "NO MATCH", label: "No Match" },
|
|
14424
|
+
{ value: "REVIEW", label: "Review" },
|
|
14425
|
+
{ value: "CLEARED", label: "Cleared" },
|
|
14426
|
+
{ value: "CONFIRMED", label: "Confirmed" }
|
|
14427
|
+
],
|
|
14428
|
+
value: filters.status || "all",
|
|
14429
|
+
onValueChange: (value) => onFilterChange("status", value === "all" ? "" : value)
|
|
14430
|
+
}
|
|
14431
|
+
),
|
|
14432
|
+
/* @__PURE__ */ jsx(
|
|
14433
|
+
EnhancedSelect,
|
|
14434
|
+
{
|
|
14435
|
+
label: "Entity Type",
|
|
14436
|
+
placeholder: "All entity types",
|
|
14437
|
+
options: [
|
|
14438
|
+
{ value: "all", label: "All entity types" },
|
|
14439
|
+
{ value: "Business", label: "Business" },
|
|
14440
|
+
{ value: "Individual", label: "Individual" },
|
|
14441
|
+
{ value: "Counterparty", label: "Counterparty" }
|
|
14442
|
+
],
|
|
14443
|
+
value: filters.entityType || "all",
|
|
14444
|
+
onValueChange: (value) => onFilterChange("entityType", value === "all" ? "" : value)
|
|
14445
|
+
}
|
|
14446
|
+
),
|
|
14447
|
+
/* @__PURE__ */ jsx(
|
|
14448
|
+
DatePicker,
|
|
14449
|
+
{
|
|
14450
|
+
date: filters.startDate,
|
|
14451
|
+
onDateChange: (date) => onFilterChange("startDate", date),
|
|
14452
|
+
label: "Start Date",
|
|
14453
|
+
placeholder: "MM/DD/YYYY"
|
|
14454
|
+
}
|
|
14455
|
+
),
|
|
14456
|
+
/* @__PURE__ */ jsx(
|
|
14457
|
+
DatePicker,
|
|
14458
|
+
{
|
|
14459
|
+
date: filters.endDate,
|
|
14460
|
+
onDateChange: (date) => onFilterChange("endDate", date),
|
|
14461
|
+
label: "End Date",
|
|
14462
|
+
placeholder: "MM/DD/YYYY",
|
|
14463
|
+
disabledDates: (date) => filters.startDate ? date < filters.startDate : false
|
|
14464
|
+
}
|
|
14465
|
+
)
|
|
14466
|
+
] })
|
|
14467
|
+
] })
|
|
14468
|
+
] });
|
|
14469
|
+
}
|
|
14470
|
+
|
|
14471
|
+
// src/lib/mock-data/ofac-data.ts
|
|
14472
|
+
var mockOFACChecks = [
|
|
14473
|
+
{
|
|
14474
|
+
id: "ofac-001",
|
|
14475
|
+
created: "2024-01-15T10:30:00Z",
|
|
14476
|
+
entityId: "8112488",
|
|
14477
|
+
entityName: "Acme Corporation",
|
|
14478
|
+
entityType: "Business",
|
|
14479
|
+
alertId: "ALT-001",
|
|
14480
|
+
status: "CLEARED"
|
|
14481
|
+
},
|
|
14482
|
+
{
|
|
14483
|
+
id: "ofac-002",
|
|
14484
|
+
created: "2024-01-14T14:22:00Z",
|
|
14485
|
+
entityId: "8111609",
|
|
14486
|
+
entityName: "Global Tech Industries",
|
|
14487
|
+
entityType: "Business",
|
|
14488
|
+
alertId: "ALT-002",
|
|
14489
|
+
status: "REVIEW"
|
|
14490
|
+
},
|
|
14491
|
+
{
|
|
14492
|
+
id: "ofac-003",
|
|
14493
|
+
created: "2024-01-14T09:15:00Z",
|
|
14494
|
+
entityId: "IND-001",
|
|
14495
|
+
entityName: "John Smith",
|
|
14496
|
+
entityType: "Individual",
|
|
14497
|
+
alertId: null,
|
|
14498
|
+
status: "NO MATCH"
|
|
14499
|
+
},
|
|
14500
|
+
{
|
|
14501
|
+
id: "ofac-004",
|
|
14502
|
+
created: "2024-01-13T16:45:00Z",
|
|
14503
|
+
entityId: "8111026",
|
|
14504
|
+
entityName: "Innovation Partners LLC",
|
|
14505
|
+
entityType: "Business",
|
|
14506
|
+
alertId: "ALT-003",
|
|
14507
|
+
status: "CONFIRMED"
|
|
14508
|
+
},
|
|
14509
|
+
{
|
|
14510
|
+
id: "ofac-005",
|
|
14511
|
+
created: "2024-01-13T11:20:00Z",
|
|
14512
|
+
entityId: "IND-002",
|
|
14513
|
+
entityName: "Jane Doe",
|
|
14514
|
+
entityType: "Individual",
|
|
14515
|
+
alertId: null,
|
|
14516
|
+
status: "NO MATCH"
|
|
14517
|
+
},
|
|
14518
|
+
{
|
|
14519
|
+
id: "ofac-006",
|
|
14520
|
+
created: "2024-01-12T13:30:00Z",
|
|
14521
|
+
entityId: "CP-001",
|
|
14522
|
+
entityName: "International Suppliers Inc",
|
|
14523
|
+
entityType: "Counterparty",
|
|
14524
|
+
alertId: "ALT-004",
|
|
14525
|
+
status: "REVIEW"
|
|
14526
|
+
},
|
|
14527
|
+
{
|
|
14528
|
+
id: "ofac-007",
|
|
14529
|
+
created: "2024-01-12T08:00:00Z",
|
|
14530
|
+
entityId: "8110892",
|
|
14531
|
+
entityName: "NextGen Solutions",
|
|
14532
|
+
entityType: "Business",
|
|
14533
|
+
alertId: null,
|
|
14534
|
+
status: "NO MATCH"
|
|
14535
|
+
},
|
|
14536
|
+
{
|
|
14537
|
+
id: "ofac-008",
|
|
14538
|
+
created: "2024-01-11T15:10:00Z",
|
|
14539
|
+
entityId: "IND-003",
|
|
14540
|
+
entityName: "Robert Johnson",
|
|
14541
|
+
entityType: "Individual",
|
|
14542
|
+
alertId: "ALT-005",
|
|
14543
|
+
status: "CLEARED"
|
|
14544
|
+
},
|
|
14545
|
+
{
|
|
14546
|
+
id: "ofac-009",
|
|
14547
|
+
created: "2024-01-11T10:45:00Z",
|
|
14548
|
+
entityId: "CP-002",
|
|
14549
|
+
entityName: "Overseas Trading Company",
|
|
14550
|
+
entityType: "Counterparty",
|
|
14551
|
+
alertId: "ALT-006",
|
|
14552
|
+
status: "REVIEW"
|
|
14553
|
+
},
|
|
14554
|
+
{
|
|
14555
|
+
id: "ofac-010",
|
|
14556
|
+
created: "2024-01-10T14:25:00Z",
|
|
14557
|
+
entityId: "8110654",
|
|
14558
|
+
entityName: "Digital Ventures Group",
|
|
14559
|
+
entityType: "Business",
|
|
14560
|
+
alertId: null,
|
|
14561
|
+
status: "NO MATCH"
|
|
14562
|
+
}
|
|
14563
|
+
];
|
|
14564
|
+
var getStatusVariant = (status) => {
|
|
14565
|
+
switch (status) {
|
|
14566
|
+
case "NO MATCH":
|
|
14567
|
+
return "success";
|
|
14568
|
+
case "REVIEW":
|
|
14569
|
+
return "warning";
|
|
14570
|
+
case "CLEARED":
|
|
14571
|
+
return "active";
|
|
14572
|
+
case "CONFIRMED":
|
|
14573
|
+
return "destructive";
|
|
14574
|
+
default:
|
|
14575
|
+
return "secondary";
|
|
14576
|
+
}
|
|
14577
|
+
};
|
|
14578
|
+
var getEntityUrl = (entityType, entityId) => {
|
|
14579
|
+
switch (entityType) {
|
|
14580
|
+
case "Business":
|
|
14581
|
+
return `/business/${entityId}`;
|
|
14582
|
+
case "Individual":
|
|
14583
|
+
return `/individual/${entityId}`;
|
|
14584
|
+
case "Counterparty":
|
|
14585
|
+
return `/counterparty/${entityId}`;
|
|
14586
|
+
default:
|
|
14587
|
+
return "#";
|
|
14588
|
+
}
|
|
14589
|
+
};
|
|
14590
|
+
function OFAC() {
|
|
14591
|
+
const navigate = useNavigate();
|
|
14592
|
+
const [sortField, setSortField] = useState("created");
|
|
14593
|
+
const [sortDirection, setSortDirection] = useState("desc");
|
|
14594
|
+
const [filters, setFilters] = useState({
|
|
14595
|
+
status: "",
|
|
14596
|
+
entityType: "",
|
|
14597
|
+
startDate: void 0,
|
|
14598
|
+
endDate: void 0
|
|
14599
|
+
});
|
|
14600
|
+
const handleFilterChange = (field, value) => {
|
|
14601
|
+
setFilters((prev) => ({ ...prev, [field]: value }));
|
|
14602
|
+
};
|
|
14603
|
+
const handleResetFilters = () => {
|
|
14604
|
+
setFilters({
|
|
14605
|
+
status: "",
|
|
14606
|
+
entityType: "",
|
|
14607
|
+
startDate: void 0,
|
|
14608
|
+
endDate: void 0
|
|
14609
|
+
});
|
|
14610
|
+
};
|
|
14611
|
+
const handleSort = (field) => {
|
|
14612
|
+
if (sortField === field) {
|
|
14613
|
+
setSortDirection(sortDirection === "asc" ? "desc" : "asc");
|
|
14614
|
+
} else {
|
|
14615
|
+
setSortField(field);
|
|
14616
|
+
setSortDirection("desc");
|
|
14617
|
+
}
|
|
14618
|
+
};
|
|
14619
|
+
const filteredChecks = useMemo(() => {
|
|
14620
|
+
return mockOFACChecks.filter((check) => {
|
|
14621
|
+
if (filters.status && check.status !== filters.status) {
|
|
14622
|
+
return false;
|
|
14623
|
+
}
|
|
14624
|
+
if (filters.entityType && check.entityType !== filters.entityType) {
|
|
14625
|
+
return false;
|
|
14626
|
+
}
|
|
14627
|
+
if (filters.startDate || filters.endDate) {
|
|
14628
|
+
const checkDate = parseISO(check.created);
|
|
14629
|
+
if (filters.startDate && isBefore(checkDate, startOfDay(filters.startDate))) {
|
|
14630
|
+
return false;
|
|
14631
|
+
}
|
|
14632
|
+
if (filters.endDate && isAfter(checkDate, endOfDay(filters.endDate))) {
|
|
14633
|
+
return false;
|
|
14634
|
+
}
|
|
14635
|
+
}
|
|
14636
|
+
return true;
|
|
14637
|
+
});
|
|
14638
|
+
}, [filters]);
|
|
14639
|
+
const sortedChecks = [...filteredChecks].sort((a, b) => {
|
|
14640
|
+
const aValue = a[sortField];
|
|
14641
|
+
const bValue = b[sortField];
|
|
14642
|
+
if (aValue == null) return 1;
|
|
14643
|
+
if (bValue == null) return -1;
|
|
14644
|
+
if (sortDirection === "asc") {
|
|
14645
|
+
return aValue > bValue ? 1 : -1;
|
|
14646
|
+
} else {
|
|
14647
|
+
return aValue < bValue ? 1 : -1;
|
|
14648
|
+
}
|
|
14649
|
+
});
|
|
14650
|
+
const columns3 = [
|
|
14651
|
+
{
|
|
14652
|
+
key: "created",
|
|
14653
|
+
title: "Created",
|
|
14654
|
+
sortable: true,
|
|
14655
|
+
render: (value) => /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: format(parseISO(value), "MMM d, yyyy h:mm a") })
|
|
14656
|
+
},
|
|
14657
|
+
{
|
|
14658
|
+
key: "entityName",
|
|
14659
|
+
title: "Entity",
|
|
14660
|
+
render: (value, row) => /* @__PURE__ */ jsx(
|
|
14661
|
+
"button",
|
|
14662
|
+
{
|
|
14663
|
+
onClick: () => navigate(getEntityUrl(row.entityType, row.entityId)),
|
|
14664
|
+
className: "text-sm text-primary hover:underline font-medium",
|
|
14665
|
+
children: value
|
|
14666
|
+
}
|
|
14667
|
+
)
|
|
14668
|
+
},
|
|
14669
|
+
{
|
|
14670
|
+
key: "entityType",
|
|
14671
|
+
title: "Entity Type",
|
|
14672
|
+
sortable: true,
|
|
14673
|
+
render: (value) => /* @__PURE__ */ jsx("span", { className: "text-sm", children: value })
|
|
14674
|
+
},
|
|
14675
|
+
{
|
|
14676
|
+
key: "alertId",
|
|
14677
|
+
title: "Alert ID",
|
|
14678
|
+
render: (value) => value ? /* @__PURE__ */ jsx(
|
|
14679
|
+
"button",
|
|
14680
|
+
{
|
|
14681
|
+
onClick: () => navigate(`/alerts/${value}`),
|
|
14682
|
+
className: "text-sm text-primary hover:underline font-medium",
|
|
14683
|
+
children: value
|
|
14684
|
+
}
|
|
14685
|
+
) : /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "\u2014" })
|
|
14686
|
+
},
|
|
14687
|
+
{
|
|
14688
|
+
key: "status",
|
|
14689
|
+
title: "Status",
|
|
14690
|
+
sortable: true,
|
|
14691
|
+
render: (value) => /* @__PURE__ */ jsx(Badge, { variant: getStatusVariant(value), children: value })
|
|
14692
|
+
}
|
|
14693
|
+
];
|
|
14694
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-screen bg-gradient-subtle", children: [
|
|
14695
|
+
/* @__PURE__ */ jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-6 max-w-none", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
14696
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold text-foreground", children: "OFAC Checks" }) }),
|
|
14697
|
+
/* @__PURE__ */ jsx(
|
|
14698
|
+
OFACFiltersSheet,
|
|
14699
|
+
{
|
|
14700
|
+
filters,
|
|
14701
|
+
onFilterChange: handleFilterChange,
|
|
14702
|
+
onResetFilters: handleResetFilters
|
|
14703
|
+
}
|
|
14704
|
+
)
|
|
14705
|
+
] }) }) }),
|
|
14706
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 h-full max-w-none flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "flex-1 mt-4 overflow-auto", children: /* @__PURE__ */ jsx(
|
|
14707
|
+
DataTable,
|
|
14708
|
+
{
|
|
14709
|
+
columns: columns3,
|
|
14710
|
+
data: sortedChecks,
|
|
14711
|
+
sortBy: sortField,
|
|
14712
|
+
sortDirection,
|
|
14713
|
+
onSort: handleSort
|
|
14714
|
+
}
|
|
14715
|
+
) }) }) })
|
|
14716
|
+
] });
|
|
14717
|
+
}
|
|
14015
14718
|
|
|
14016
|
-
export { ACHBankCard, ACHBasicInfoCard, ACHDetailsSection, ACHTransferSection, AccountCard, AccountDetail_default as AccountDetail, Accounts_default as Accounts, AddressForm, AlertDetail_default as AlertDetail, AlertDetailRouter, AlertDocuments, AlertHeaderControls, AlertNotes, AlertTimeline, Alerts_default as Alerts, AppSidebar, Badge, BankAddressCard, BankingDetailsCard, BasicInfoCard, BasicInfoSection, BeneficiaryAddress, BeneficiaryCard, BeneficiaryDomesticWire, Breadcrumb, BusinessDetail_default as BusinessDetail, BusinessDetailView, BusinessFiltersSheet, BusinessProfileCard, BusinessStatusCard, BusinessTypeBadge, Businesses_default as Businesses, Button, CIPStatusBadge, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Cases_default as Cases, Checkbox, ContactInfoCard, Container, ContextSection, Counterparties_default as Counterparties, CounterpartiesView, CounterpartyBasicInfo, CounterpartyDetail_default as CounterpartyDetail, CounterpartyProfileCard, CounterpartyRecordsCard, CounterpartyTypeBadge, Create_default as CreateBusiness, CreateBusinessView, Create_default2 as CreateCounterparty, Create_default3 as CreateIndividual, Dashboard_default as Dashboard, DashboardDemo, DataGrid, DataTable, DetailPageLayout, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EditableFormCard, EditableInfoField, EnhancedInput, EnhancedSelect, EnhancedTextarea, EntityCard, FormCard, FormField, FormInput, FormProvider, FormSection, FormSelect, IndividualDetail_default as IndividualDetail, Individuals_default as Individuals, InfoField, IntermediaryCard, IntermediaryFI, IntermediaryFIAddress, JsonViewer, Label, ListPage, MainLayout, MetricCard, NewTransaction, NotFound_default as NotFound, OFACAlertView, OriginatorCard, OriginatorFI, OriginatorFIAddress, PageLayout, PatternLibrary, PaymentInformationSection, Popover, PopoverContent, PopoverTrigger, ReceiverCard, ResolveAlertDialog, ResponsiveGrid, ScrollArea, ScrollBar, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Stack, Statement, StatementHeader, StatementView, StatusBadge, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransactionDetail_default as TransactionDetail, TransactionHistory_default as TransactionHistory, TransactionTypeBadge, UIKit, UIKitShowcase, WireDetailsSection, WireTransferSection, badgeVariants, buttonVariants, cardVariants, downloadCSV, generateStatementCSV, inputVariants, reducer, textareaVariants, toast, useAlertDetail, useCounterpartyEntity, useEditState, useFormWithEditState, useIsMobile, useSidebar, useToast };
|
|
14719
|
+
export { ACHBankCard, ACHBasicInfoCard, ACHDetailsSection, ACHTransferSection, AccountCard, AccountDetail_default as AccountDetail, Accounts_default as Accounts, AddressForm, AlertDetail_default as AlertDetail, AlertDetailRouter, AlertDocuments, AlertHeaderControls, AlertNotes, AlertTimeline, Alerts_default as Alerts, AppSidebar, Badge, BankAddressCard, BankingDetailsCard, BasicInfoCard, BasicInfoSection, BeneficiaryAddress, BeneficiaryCard, BeneficiaryDomesticWire, Breadcrumb, BusinessDetail_default as BusinessDetail, BusinessDetailView, BusinessFiltersSheet, BusinessProfileCard, BusinessStatusCard, BusinessTypeBadge, Businesses_default as Businesses, Button, CIPStatusBadge, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Cases_default as Cases, Checkbox, ContactInfoCard, Container, ContextSection, Counterparties_default as Counterparties, CounterpartiesView, CounterpartyBasicInfo, CounterpartyDetail_default as CounterpartyDetail, CounterpartyDetailView, CounterpartyProfileCard, CounterpartyRecordsCard, CounterpartyTypeBadge, Create_default as CreateBusiness, CreateBusinessView, Create_default2 as CreateCounterparty, Create_default3 as CreateIndividual, Dashboard_default as Dashboard, DashboardDemo, DataGrid, DataTable, DetailPageLayout, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EditableFormCard, EditableInfoField, EnhancedInput, EnhancedSelect, EnhancedTextarea, EntityCard, FormCard, FormField, FormInput, FormProvider, FormSection, FormSelect, IndividualDetail_default as IndividualDetail, Individuals_default as Individuals, InfoField, IntermediaryCard, IntermediaryFI, IntermediaryFIAddress, JsonViewer, Label, ListPage, MainLayout, MetricCard, NewTransaction, NotFound_default as NotFound, OFAC, OFACAlertView, OriginatorCard, OriginatorFI, OriginatorFIAddress, PageLayout, PatternLibrary, PaymentInformationSection, Popover, PopoverContent, PopoverTrigger, ReceiverCard, ResolveAlertDialog, ResponsiveGrid, ScrollArea, ScrollBar, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Stack, Statement, StatementHeader, StatementView, StatusBadge, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransactionDetail_default as TransactionDetail, TransactionHistory_default as TransactionHistory, TransactionTypeBadge, UIKit, UIKitShowcase, WireDetailsSection, WireTransferSection, badgeVariants, buttonVariants, cardVariants, downloadCSV, generateStatementCSV, inputVariants, reducer, textareaVariants, toast, useAlertDetail, useCounterpartyEntity, useEditState, useFormWithEditState, useIsMobile, useSidebar, useToast };
|
|
14017
14720
|
//# sourceMappingURL=index.js.map
|
|
14018
14721
|
//# sourceMappingURL=index.js.map
|