braid-ui 1.0.37 → 1.0.39
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 +1310 -570
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +1313 -574
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -22,11 +22,11 @@ var TooltipPrimitive = require('@radix-ui/react-tooltip');
|
|
|
22
22
|
var dateFns = require('date-fns');
|
|
23
23
|
var reactDayPicker = require('react-day-picker');
|
|
24
24
|
var PopoverPrimitive = require('@radix-ui/react-popover');
|
|
25
|
+
var sonner = require('sonner');
|
|
25
26
|
var LabelPrimitive = require('@radix-ui/react-label');
|
|
26
27
|
var CheckboxPrimitive = require('@radix-ui/react-checkbox');
|
|
27
28
|
var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
|
|
28
29
|
var nextThemes = require('next-themes');
|
|
29
|
-
var sonner = require('sonner');
|
|
30
30
|
var TabsPrimitive = require('@radix-ui/react-tabs');
|
|
31
31
|
var ToastPrimitives = require('@radix-ui/react-toast');
|
|
32
32
|
|
|
@@ -556,8 +556,8 @@ var reducer = (state, action) => {
|
|
|
556
556
|
if (toastId) {
|
|
557
557
|
addToRemoveQueue(toastId);
|
|
558
558
|
} else {
|
|
559
|
-
state.toasts.forEach((
|
|
560
|
-
addToRemoveQueue(
|
|
559
|
+
state.toasts.forEach((toast5) => {
|
|
560
|
+
addToRemoveQueue(toast5.id);
|
|
561
561
|
});
|
|
562
562
|
}
|
|
563
563
|
return {
|
|
@@ -3588,24 +3588,26 @@ var BusinessProfileCard = ({
|
|
|
3588
3588
|
}
|
|
3589
3589
|
)
|
|
3590
3590
|
] }),
|
|
3591
|
-
/* @__PURE__ */ jsxRuntime.
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3591
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
3592
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3593
|
+
FormInput,
|
|
3594
|
+
{
|
|
3595
|
+
name: "achCompanyId",
|
|
3596
|
+
label: "ACH Company ID",
|
|
3597
|
+
placeholder: "10-digit company ID"
|
|
3598
|
+
}
|
|
3599
|
+
),
|
|
3600
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3601
|
+
FormInput,
|
|
3602
|
+
{
|
|
3603
|
+
name: "productId",
|
|
3604
|
+
label: "Product ID",
|
|
3605
|
+
type: "number",
|
|
3606
|
+
placeholder: "Product ID",
|
|
3607
|
+
disabled: true
|
|
3608
|
+
}
|
|
3609
|
+
)
|
|
3610
|
+
] }),
|
|
3609
3611
|
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Contact Person" }),
|
|
3610
3612
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
3611
3613
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3664,6 +3666,34 @@ var BusinessProfileCard = ({
|
|
|
3664
3666
|
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Website", value: formValues?.website || "-", layout: "horizontal" })
|
|
3665
3667
|
] }),
|
|
3666
3668
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-4", children: /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Business Phone", value: formValues?.mobilePhone || "-", layout: "horizontal" }) }),
|
|
3669
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3670
|
+
InfoField,
|
|
3671
|
+
{
|
|
3672
|
+
label: "Address",
|
|
3673
|
+
value: formValues?.address ? (() => {
|
|
3674
|
+
const parts = [];
|
|
3675
|
+
if (formValues.address.line1) parts.push(formValues.address.line1);
|
|
3676
|
+
if (formValues.address.line2) parts.push(formValues.address.line2);
|
|
3677
|
+
const cityStateZip = [
|
|
3678
|
+
formValues.address.city,
|
|
3679
|
+
formValues.address.state,
|
|
3680
|
+
formValues.address.postalCode
|
|
3681
|
+
].filter(Boolean).join(" ");
|
|
3682
|
+
if (cityStateZip) parts.push(cityStateZip);
|
|
3683
|
+
if (formValues.address.countryCode) parts.push(formValues.address.countryCode);
|
|
3684
|
+
return parts.length > 0 ? parts.join(", ") : "-";
|
|
3685
|
+
})() : "-",
|
|
3686
|
+
layout: "horizontal"
|
|
3687
|
+
}
|
|
3688
|
+
),
|
|
3689
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
3690
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "MCC", value: formValues?.mcc || "-", layout: "horizontal" }),
|
|
3691
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "NAICS", value: formValues?.naics || "-", layout: "horizontal" })
|
|
3692
|
+
] }),
|
|
3693
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
3694
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ACH Company ID", value: formValues?.achCompanyId || "-", layout: "horizontal" }),
|
|
3695
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Product ID", value: formValues?.productId?.toString() || "-", layout: "horizontal" })
|
|
3696
|
+
] }),
|
|
3667
3697
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
3668
3698
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3669
3699
|
InfoField,
|
|
@@ -3689,32 +3719,6 @@ var BusinessProfileCard = ({
|
|
|
3689
3719
|
}
|
|
3690
3720
|
)
|
|
3691
3721
|
] }),
|
|
3692
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3693
|
-
InfoField,
|
|
3694
|
-
{
|
|
3695
|
-
label: "Address",
|
|
3696
|
-
value: formValues?.address ? (() => {
|
|
3697
|
-
const parts = [];
|
|
3698
|
-
if (formValues.address.line1) parts.push(formValues.address.line1);
|
|
3699
|
-
if (formValues.address.line2) parts.push(formValues.address.line2);
|
|
3700
|
-
const cityStateZip = [
|
|
3701
|
-
formValues.address.city,
|
|
3702
|
-
formValues.address.state,
|
|
3703
|
-
formValues.address.postalCode
|
|
3704
|
-
].filter(Boolean).join(" ");
|
|
3705
|
-
if (cityStateZip) parts.push(cityStateZip);
|
|
3706
|
-
if (formValues.address.countryCode) parts.push(formValues.address.countryCode);
|
|
3707
|
-
return parts.length > 0 ? parts.join(", ") : "-";
|
|
3708
|
-
})() : "-",
|
|
3709
|
-
layout: "horizontal"
|
|
3710
|
-
}
|
|
3711
|
-
),
|
|
3712
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
3713
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "MCC", value: formValues?.mcc || "-", layout: "horizontal" }),
|
|
3714
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "NAICS", value: formValues?.naics || "-", layout: "horizontal" })
|
|
3715
|
-
] }),
|
|
3716
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-4", children: /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ACH Company ID", value: formValues?.achCompanyId || "-", layout: "horizontal" }) }),
|
|
3717
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-4", children: /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Product ID", value: formValues?.productId?.toString() || "-", layout: "horizontal" }) }),
|
|
3718
3722
|
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Contact Person" }),
|
|
3719
3723
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
3720
3724
|
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "First Name", value: formValues?.contactPersonFirstName || "-", layout: "horizontal" }),
|
|
@@ -4288,93 +4292,575 @@ var PageLayout = React15__namespace.forwardRef(
|
|
|
4288
4292
|
}
|
|
4289
4293
|
);
|
|
4290
4294
|
PageLayout.displayName = "PageLayout";
|
|
4291
|
-
var
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
sortable: true,
|
|
4297
|
-
width: "40%",
|
|
4298
|
-
render: (value, row) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4299
|
-
"button",
|
|
4300
|
-
{
|
|
4301
|
-
onClick: () => onUBOClick(row.customerId),
|
|
4302
|
-
className: "text-primary hover:underline font-medium text-left",
|
|
4303
|
-
children: value
|
|
4304
|
-
}
|
|
4305
|
-
)
|
|
4306
|
-
},
|
|
4307
|
-
{
|
|
4308
|
-
key: "title",
|
|
4309
|
-
title: "Title",
|
|
4310
|
-
sortable: true,
|
|
4311
|
-
width: "40%"
|
|
4312
|
-
},
|
|
4313
|
-
{
|
|
4314
|
-
key: "ownershipPercentage",
|
|
4315
|
-
title: "Ownership %",
|
|
4316
|
-
sortable: true,
|
|
4317
|
-
width: "20%",
|
|
4318
|
-
align: "right",
|
|
4319
|
-
render: (value) => `${value}%`
|
|
4320
|
-
}
|
|
4321
|
-
];
|
|
4322
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
4323
|
-
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
4324
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Ultimate Beneficial Owners (UBO)" }),
|
|
4325
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Button, { size: "sm", variant: "ghost", children: [
|
|
4326
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-1" }),
|
|
4327
|
-
"Add UBO"
|
|
4328
|
-
] })
|
|
4329
|
-
] }),
|
|
4330
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: ubos.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
4331
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Users, { className: "h-5 w-5 opacity-50" }),
|
|
4332
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "No UBOs recorded" })
|
|
4333
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
4334
|
-
DataTable,
|
|
4295
|
+
var FormField = React15__namespace.forwardRef(
|
|
4296
|
+
({ label, description, error, required, children, className, layout = "vertical" }, ref) => {
|
|
4297
|
+
const isHorizontal = layout === "horizontal";
|
|
4298
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4299
|
+
"div",
|
|
4335
4300
|
{
|
|
4336
|
-
|
|
4337
|
-
|
|
4301
|
+
ref,
|
|
4302
|
+
className: cn(
|
|
4303
|
+
"space-y-2",
|
|
4304
|
+
isHorizontal && "grid grid-cols-1 md:grid-cols-3 gap-4 items-start space-y-0",
|
|
4305
|
+
className
|
|
4306
|
+
),
|
|
4307
|
+
children: [
|
|
4308
|
+
label && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("space-y-1", isHorizontal && "pt-2"), children: [
|
|
4309
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "text-sm font-medium text-foreground", children: [
|
|
4310
|
+
label,
|
|
4311
|
+
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive ml-1", children: "*" })
|
|
4312
|
+
] }),
|
|
4313
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: description })
|
|
4314
|
+
] }),
|
|
4315
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(isHorizontal && "md:col-span-2"), children: [
|
|
4316
|
+
children,
|
|
4317
|
+
error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-destructive mt-1", children: error })
|
|
4318
|
+
] })
|
|
4319
|
+
]
|
|
4338
4320
|
}
|
|
4339
|
-
)
|
|
4340
|
-
|
|
4321
|
+
);
|
|
4322
|
+
}
|
|
4323
|
+
);
|
|
4324
|
+
FormField.displayName = "FormField";
|
|
4325
|
+
var spacingClasses = {
|
|
4326
|
+
sm: "space-y-3",
|
|
4327
|
+
md: "space-y-4",
|
|
4328
|
+
lg: "space-y-6"
|
|
4341
4329
|
};
|
|
4342
|
-
var
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4330
|
+
var gridClasses = {
|
|
4331
|
+
1: "grid-cols-1",
|
|
4332
|
+
2: "grid-cols-1 md:grid-cols-2",
|
|
4333
|
+
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
|
|
4334
|
+
4: "grid-cols-1 md:grid-cols-2 lg:grid-cols-4"
|
|
4335
|
+
};
|
|
4336
|
+
var FormSection = React15__namespace.forwardRef(
|
|
4337
|
+
({
|
|
4338
|
+
title,
|
|
4339
|
+
description,
|
|
4340
|
+
children,
|
|
4341
|
+
className,
|
|
4342
|
+
spacing: spacing2 = "md",
|
|
4343
|
+
layout = "vertical",
|
|
4344
|
+
columns: columns3 = 2
|
|
4345
|
+
}, ref) => {
|
|
4346
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("space-y-4", className), children: [
|
|
4347
|
+
(title || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
4348
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold text-foreground", children: title }),
|
|
4349
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: description })
|
|
4350
|
+
] }),
|
|
4351
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
|
|
4352
|
+
layout === "grid" ? `grid gap-4 ${gridClasses[columns3]}` : spacingClasses[spacing2]
|
|
4353
|
+
), children })
|
|
4354
|
+
] });
|
|
4355
|
+
}
|
|
4356
|
+
);
|
|
4357
|
+
FormSection.displayName = "FormSection";
|
|
4358
|
+
function Calendar({
|
|
4359
|
+
className,
|
|
4360
|
+
classNames,
|
|
4361
|
+
showOutsideDays = true,
|
|
4362
|
+
...props
|
|
4363
|
+
}) {
|
|
4364
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4365
|
+
reactDayPicker.DayPicker,
|
|
4366
|
+
{
|
|
4367
|
+
showOutsideDays,
|
|
4368
|
+
className: cn("p-3 pointer-events-auto", className),
|
|
4369
|
+
classNames: {
|
|
4370
|
+
months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
|
|
4371
|
+
month: "space-y-4",
|
|
4372
|
+
caption: "flex justify-center pt-1 relative items-center",
|
|
4373
|
+
caption_label: "text-sm font-medium",
|
|
4374
|
+
nav: "space-x-1 flex items-center",
|
|
4375
|
+
button_previous: "absolute left-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
|
|
4376
|
+
button_next: "absolute right-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
|
|
4377
|
+
month_grid: "w-full border-collapse space-y-1",
|
|
4378
|
+
weekdays: "flex",
|
|
4379
|
+
weekday: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
|
|
4380
|
+
week: "flex w-full mt-2",
|
|
4381
|
+
day: "h-9 w-9 text-center text-sm p-0 relative hover:bg-accent hover:text-accent-foreground rounded-md",
|
|
4382
|
+
day_button: cn(
|
|
4383
|
+
buttonVariants({ variant: "ghost" }),
|
|
4384
|
+
"h-9 w-9 p-0 font-normal"
|
|
4385
|
+
),
|
|
4386
|
+
selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground",
|
|
4387
|
+
today: "bg-accent text-accent-foreground",
|
|
4388
|
+
outside: "text-muted-foreground opacity-50",
|
|
4389
|
+
disabled: "text-muted-foreground opacity-50",
|
|
4390
|
+
hidden: "invisible",
|
|
4391
|
+
...classNames
|
|
4392
|
+
},
|
|
4393
|
+
...props
|
|
4363
4394
|
}
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4395
|
+
);
|
|
4396
|
+
}
|
|
4397
|
+
Calendar.displayName = "Calendar";
|
|
4398
|
+
var Popover = PopoverPrimitive__namespace.Root;
|
|
4399
|
+
var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
|
|
4400
|
+
var PopoverContent = React15__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4401
|
+
PopoverPrimitive__namespace.Content,
|
|
4402
|
+
{
|
|
4403
|
+
ref,
|
|
4404
|
+
align,
|
|
4405
|
+
sideOffset,
|
|
4406
|
+
className: cn(
|
|
4407
|
+
"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",
|
|
4408
|
+
className
|
|
4409
|
+
),
|
|
4410
|
+
...props
|
|
4411
|
+
}
|
|
4412
|
+
) }));
|
|
4413
|
+
PopoverContent.displayName = PopoverPrimitive__namespace.Content.displayName;
|
|
4414
|
+
function DatePicker({
|
|
4415
|
+
date,
|
|
4416
|
+
onDateChange,
|
|
4417
|
+
placeholder = "Pick a date",
|
|
4418
|
+
disabled = false,
|
|
4419
|
+
className,
|
|
4420
|
+
buttonClassName,
|
|
4421
|
+
calendarClassName,
|
|
4422
|
+
align = "start",
|
|
4423
|
+
disabledDates,
|
|
4424
|
+
label,
|
|
4425
|
+
wrapperClassName
|
|
4426
|
+
}) {
|
|
4427
|
+
const [open, setOpen] = React15__namespace.useState(false);
|
|
4428
|
+
const handleSelect = (selectedDate) => {
|
|
4429
|
+
onDateChange?.(selectedDate);
|
|
4430
|
+
setOpen(false);
|
|
4431
|
+
};
|
|
4432
|
+
const picker = /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
4433
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4434
|
+
Button,
|
|
4435
|
+
{
|
|
4436
|
+
variant: "outline",
|
|
4437
|
+
disabled,
|
|
4438
|
+
className: cn(
|
|
4439
|
+
"justify-start text-left font-normal",
|
|
4440
|
+
!date && "text-muted-foreground",
|
|
4441
|
+
buttonClassName
|
|
4442
|
+
),
|
|
4443
|
+
children: [
|
|
4444
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CalendarIcon, { className: "mr-2 h-4 w-4" }),
|
|
4445
|
+
date ? dateFns.format(date, "MM/dd/yyyy") : placeholder
|
|
4446
|
+
]
|
|
4447
|
+
}
|
|
4448
|
+
) }),
|
|
4449
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: cn("w-auto p-0", className), align, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4450
|
+
Calendar,
|
|
4451
|
+
{
|
|
4452
|
+
mode: "single",
|
|
4453
|
+
selected: date,
|
|
4454
|
+
onSelect: handleSelect,
|
|
4455
|
+
disabled: disabledDates,
|
|
4456
|
+
initialFocus: true,
|
|
4457
|
+
className: cn("pointer-events-auto", calendarClassName)
|
|
4458
|
+
}
|
|
4459
|
+
) })
|
|
4460
|
+
] });
|
|
4461
|
+
if (label) {
|
|
4462
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("space-y-2", wrapperClassName), children: [
|
|
4463
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: label }),
|
|
4464
|
+
picker
|
|
4465
|
+
] });
|
|
4466
|
+
}
|
|
4467
|
+
return picker;
|
|
4468
|
+
}
|
|
4469
|
+
var uboSchema = zod.z.object({
|
|
4470
|
+
legalFirstName: zod.z.string().min(1, "Legal first name is required"),
|
|
4471
|
+
legalLastName: zod.z.string().min(1, "Legal last name is required"),
|
|
4472
|
+
email: zod.z.string().email("Invalid email address"),
|
|
4473
|
+
title: zod.z.string().min(1, "Title is required"),
|
|
4474
|
+
ownershipPercentage: zod.z.number().min(0).max(100, "Must be between 0 and 100"),
|
|
4475
|
+
idNumber: zod.z.string().min(1, "ID number is required"),
|
|
4476
|
+
ssn: zod.z.string().min(1, "SSN is required"),
|
|
4477
|
+
dateOfBirth: zod.z.date({
|
|
4478
|
+
message: "Date of birth is required"
|
|
4479
|
+
}),
|
|
4480
|
+
street: zod.z.string().min(1, "Street is required"),
|
|
4481
|
+
apartment: zod.z.string().optional(),
|
|
4482
|
+
city: zod.z.string().min(1, "City is required"),
|
|
4483
|
+
state: zod.z.string().min(1, "State is required"),
|
|
4484
|
+
country: zod.z.string().min(1, "Country is required")
|
|
4485
|
+
});
|
|
4486
|
+
var titleOptions = [
|
|
4487
|
+
{ value: "CEO", label: "CEO" },
|
|
4488
|
+
{ value: "CFO", label: "CFO" },
|
|
4489
|
+
{ value: "CTO", label: "CTO" },
|
|
4490
|
+
{ value: "COO", label: "COO" },
|
|
4491
|
+
{ value: "President", label: "President" },
|
|
4492
|
+
{ value: "Vice President", label: "Vice President" },
|
|
4493
|
+
{ value: "Director", label: "Director" },
|
|
4494
|
+
{ value: "Manager", label: "Manager" },
|
|
4495
|
+
{ value: "Board Member", label: "Board Member" },
|
|
4496
|
+
{ value: "Partner", label: "Partner" },
|
|
4497
|
+
{ value: "Other", label: "Other" }
|
|
4498
|
+
];
|
|
4499
|
+
var AddUBODialog = ({ open, onOpenChange, onSubmit }) => {
|
|
4500
|
+
const [isSubmitting, setIsSubmitting] = React15.useState(false);
|
|
4501
|
+
const form = reactHookForm.useForm({
|
|
4502
|
+
resolver: zod$1.zodResolver(uboSchema),
|
|
4503
|
+
defaultValues: {
|
|
4504
|
+
legalFirstName: "",
|
|
4505
|
+
legalLastName: "",
|
|
4506
|
+
email: "",
|
|
4507
|
+
title: "",
|
|
4508
|
+
ownershipPercentage: 0,
|
|
4509
|
+
idNumber: "",
|
|
4510
|
+
ssn: "",
|
|
4511
|
+
street: "",
|
|
4512
|
+
apartment: "",
|
|
4513
|
+
city: "",
|
|
4514
|
+
state: "",
|
|
4515
|
+
country: "US"
|
|
4516
|
+
}
|
|
4517
|
+
});
|
|
4518
|
+
const handleSubmit = async (data) => {
|
|
4519
|
+
setIsSubmitting(true);
|
|
4520
|
+
try {
|
|
4521
|
+
await onSubmit(data);
|
|
4522
|
+
form.reset();
|
|
4523
|
+
onOpenChange(false);
|
|
4524
|
+
} catch (error) {
|
|
4525
|
+
console.error("Error adding UBO:", error);
|
|
4526
|
+
} finally {
|
|
4527
|
+
setIsSubmitting(false);
|
|
4528
|
+
}
|
|
4529
|
+
};
|
|
4530
|
+
const handleCancel = () => {
|
|
4531
|
+
form.reset();
|
|
4532
|
+
onOpenChange(false);
|
|
4533
|
+
};
|
|
4534
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "max-w-3xl max-h-[90vh] overflow-y-auto", children: [
|
|
4535
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: "Add Ultimate Beneficial Owner" }) }),
|
|
4536
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactHookForm.FormProvider, { ...form, children: /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: form.handleSubmit(handleSubmit), className: "space-y-6", children: [
|
|
4537
|
+
/* @__PURE__ */ jsxRuntime.jsxs(FormSection, { layout: "grid", columns: 2, spacing: "md", children: [
|
|
4538
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4539
|
+
FormInput,
|
|
4540
|
+
{
|
|
4541
|
+
name: "legalFirstName",
|
|
4542
|
+
label: "Legal first name",
|
|
4543
|
+
placeholder: "Enter first name"
|
|
4544
|
+
}
|
|
4545
|
+
),
|
|
4546
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4547
|
+
FormInput,
|
|
4548
|
+
{
|
|
4549
|
+
name: "legalLastName",
|
|
4550
|
+
label: "Legal last name",
|
|
4551
|
+
placeholder: "Enter last name"
|
|
4552
|
+
}
|
|
4553
|
+
)
|
|
4554
|
+
] }),
|
|
4555
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormSection, { layout: "vertical", spacing: "md", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4556
|
+
FormInput,
|
|
4557
|
+
{
|
|
4558
|
+
name: "email",
|
|
4559
|
+
label: "Email",
|
|
4560
|
+
type: "email",
|
|
4561
|
+
placeholder: "Enter email address"
|
|
4562
|
+
}
|
|
4563
|
+
) }),
|
|
4564
|
+
/* @__PURE__ */ jsxRuntime.jsxs(FormSection, { layout: "grid", columns: 2, spacing: "md", children: [
|
|
4565
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4566
|
+
FormSelect,
|
|
4567
|
+
{
|
|
4568
|
+
name: "title",
|
|
4569
|
+
label: "Title",
|
|
4570
|
+
placeholder: "Select title",
|
|
4571
|
+
options: titleOptions
|
|
4572
|
+
}
|
|
4573
|
+
),
|
|
4574
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4575
|
+
FormInput,
|
|
4576
|
+
{
|
|
4577
|
+
name: "ownershipPercentage",
|
|
4578
|
+
label: "Ownership %",
|
|
4579
|
+
type: "number",
|
|
4580
|
+
placeholder: "Enter ownership percentage"
|
|
4581
|
+
}
|
|
4582
|
+
)
|
|
4583
|
+
] }),
|
|
4584
|
+
/* @__PURE__ */ jsxRuntime.jsxs(FormSection, { layout: "grid", columns: 2, spacing: "md", children: [
|
|
4585
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4586
|
+
FormInput,
|
|
4587
|
+
{
|
|
4588
|
+
name: "idNumber",
|
|
4589
|
+
label: "ID Number",
|
|
4590
|
+
placeholder: "Enter ID number"
|
|
4591
|
+
}
|
|
4592
|
+
),
|
|
4593
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4594
|
+
FormInput,
|
|
4595
|
+
{
|
|
4596
|
+
name: "ssn",
|
|
4597
|
+
label: "SSN",
|
|
4598
|
+
placeholder: "Enter SSN"
|
|
4599
|
+
}
|
|
4600
|
+
)
|
|
4601
|
+
] }),
|
|
4602
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormSection, { layout: "vertical", spacing: "md", children: /* @__PURE__ */ jsxRuntime.jsx(FormField, { label: "Date of birth", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4603
|
+
reactHookForm.Controller,
|
|
4604
|
+
{
|
|
4605
|
+
name: "dateOfBirth",
|
|
4606
|
+
control: form.control,
|
|
4607
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4608
|
+
DatePicker,
|
|
4609
|
+
{
|
|
4610
|
+
date: field.value,
|
|
4611
|
+
onDateChange: field.onChange,
|
|
4612
|
+
placeholder: "MM/DD/YYYY"
|
|
4613
|
+
}
|
|
4614
|
+
)
|
|
4615
|
+
}
|
|
4616
|
+
) }) }),
|
|
4617
|
+
/* @__PURE__ */ jsxRuntime.jsxs(FormSection, { title: "Address Details", layout: "vertical", spacing: "md", children: [
|
|
4618
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4619
|
+
FormInput,
|
|
4620
|
+
{
|
|
4621
|
+
name: "street",
|
|
4622
|
+
label: "Street",
|
|
4623
|
+
placeholder: "Enter street address"
|
|
4624
|
+
}
|
|
4625
|
+
),
|
|
4626
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4627
|
+
FormInput,
|
|
4628
|
+
{
|
|
4629
|
+
name: "apartment",
|
|
4630
|
+
label: "Apartment, suite, or floor",
|
|
4631
|
+
placeholder: "Enter apartment, suite, or floor (optional)"
|
|
4632
|
+
}
|
|
4633
|
+
),
|
|
4634
|
+
/* @__PURE__ */ jsxRuntime.jsxs(FormSection, { layout: "grid", columns: 2, spacing: "md", children: [
|
|
4635
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4636
|
+
FormInput,
|
|
4637
|
+
{
|
|
4638
|
+
name: "city",
|
|
4639
|
+
label: "City",
|
|
4640
|
+
placeholder: "Enter city"
|
|
4641
|
+
}
|
|
4642
|
+
),
|
|
4643
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4644
|
+
FormInput,
|
|
4645
|
+
{
|
|
4646
|
+
name: "state",
|
|
4647
|
+
label: "State",
|
|
4648
|
+
placeholder: "Enter state"
|
|
4649
|
+
}
|
|
4650
|
+
)
|
|
4651
|
+
] }),
|
|
4652
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4653
|
+
FormInput,
|
|
4654
|
+
{
|
|
4655
|
+
name: "country",
|
|
4656
|
+
label: "Country",
|
|
4657
|
+
placeholder: "Enter country"
|
|
4658
|
+
}
|
|
4659
|
+
)
|
|
4660
|
+
] }),
|
|
4661
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogFooter, { children: [
|
|
4662
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", variant: "outline", onClick: handleCancel, children: "Cancel" }),
|
|
4663
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { type: "submit", disabled: isSubmitting, children: isSubmitting ? "Adding..." : "Add UBO" })
|
|
4664
|
+
] })
|
|
4665
|
+
] }) })
|
|
4666
|
+
] }) });
|
|
4667
|
+
};
|
|
4668
|
+
var UBOCard = ({ ubos, onUBOClick }) => {
|
|
4669
|
+
const [isDialogOpen, setIsDialogOpen] = React15.useState(false);
|
|
4670
|
+
const handleAddUBO = (data) => {
|
|
4671
|
+
console.log("New UBO data:", data);
|
|
4672
|
+
sonner.toast.success("UBO added successfully");
|
|
4673
|
+
};
|
|
4674
|
+
const columns3 = [
|
|
4675
|
+
{
|
|
4676
|
+
key: "name",
|
|
4677
|
+
title: "Name",
|
|
4678
|
+
sortable: true,
|
|
4679
|
+
width: "40%",
|
|
4680
|
+
render: (value, row) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4681
|
+
"button",
|
|
4682
|
+
{
|
|
4683
|
+
onClick: () => onUBOClick(row.customerId),
|
|
4684
|
+
className: "text-primary hover:underline font-medium text-left",
|
|
4685
|
+
children: value
|
|
4686
|
+
}
|
|
4687
|
+
)
|
|
4688
|
+
},
|
|
4689
|
+
{
|
|
4690
|
+
key: "title",
|
|
4691
|
+
title: "Title",
|
|
4692
|
+
sortable: true,
|
|
4693
|
+
width: "40%"
|
|
4694
|
+
},
|
|
4695
|
+
{
|
|
4696
|
+
key: "ownershipPercentage",
|
|
4697
|
+
title: "Ownership %",
|
|
4698
|
+
sortable: true,
|
|
4699
|
+
width: "20%",
|
|
4700
|
+
align: "right",
|
|
4701
|
+
render: (value) => `${value}%`
|
|
4702
|
+
}
|
|
4703
|
+
];
|
|
4704
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
4705
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
4706
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Ultimate Beneficial Owners (UBO)" }),
|
|
4707
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Button, { size: "sm", variant: "ghost", onClick: () => setIsDialogOpen(true), children: [
|
|
4708
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-1" }),
|
|
4709
|
+
"Add UBO"
|
|
4710
|
+
] })
|
|
4711
|
+
] }),
|
|
4712
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: ubos.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
4713
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Users, { className: "h-5 w-5 opacity-50" }),
|
|
4714
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "No UBOs recorded" })
|
|
4715
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
4716
|
+
DataTable,
|
|
4717
|
+
{
|
|
4718
|
+
columns: columns3,
|
|
4719
|
+
data: ubos
|
|
4720
|
+
}
|
|
4721
|
+
) }),
|
|
4722
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4723
|
+
AddUBODialog,
|
|
4724
|
+
{
|
|
4725
|
+
open: isDialogOpen,
|
|
4726
|
+
onOpenChange: setIsDialogOpen,
|
|
4727
|
+
onSubmit: handleAddUBO
|
|
4728
|
+
}
|
|
4729
|
+
)
|
|
4730
|
+
] });
|
|
4731
|
+
};
|
|
4732
|
+
var accountSchema = zod.z.object({
|
|
4733
|
+
accountName: zod.z.string().min(1, "Account name is required"),
|
|
4734
|
+
accountType: zod.z.string().min(1, "Account type is required"),
|
|
4735
|
+
fundingFromAccount: zod.z.string().optional(),
|
|
4736
|
+
sweepToAccount: zod.z.string().optional()
|
|
4737
|
+
});
|
|
4738
|
+
var AddAccountDialog = ({
|
|
4739
|
+
open,
|
|
4740
|
+
onOpenChange,
|
|
4741
|
+
onSubmit,
|
|
4742
|
+
existingAccounts = []
|
|
4743
|
+
}) => {
|
|
4744
|
+
const [isLoading, setIsLoading] = React15.useState(false);
|
|
4745
|
+
const form = reactHookForm.useForm({
|
|
4746
|
+
resolver: zod$1.zodResolver(accountSchema),
|
|
4747
|
+
defaultValues: {
|
|
4748
|
+
accountName: "",
|
|
4749
|
+
accountType: void 0,
|
|
4750
|
+
fundingFromAccount: "",
|
|
4751
|
+
sweepToAccount: ""
|
|
4752
|
+
}
|
|
4753
|
+
});
|
|
4754
|
+
const handleSubmit = async (data) => {
|
|
4755
|
+
setIsLoading(true);
|
|
4756
|
+
try {
|
|
4757
|
+
await onSubmit?.(data);
|
|
4758
|
+
form.reset();
|
|
4759
|
+
onOpenChange(false);
|
|
4760
|
+
} catch (error) {
|
|
4761
|
+
console.error("Error creating account:", error);
|
|
4762
|
+
} finally {
|
|
4763
|
+
setIsLoading(false);
|
|
4764
|
+
}
|
|
4765
|
+
};
|
|
4766
|
+
existingAccounts.map((acc) => ({
|
|
4767
|
+
value: acc.id,
|
|
4768
|
+
label: `${acc.number}${acc.type ? ` (${acc.type})` : ""}`
|
|
4769
|
+
}));
|
|
4770
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "sm:max-w-[600px] max-h-[90vh] overflow-y-auto", children: [
|
|
4771
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: "Add Account" }) }),
|
|
4772
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormProvider, { form, children: /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: form.handleSubmit(handleSubmit), className: "space-y-4", children: [
|
|
4773
|
+
/* @__PURE__ */ jsxRuntime.jsxs(FormSection, { spacing: "md", children: [
|
|
4774
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4775
|
+
FormInput,
|
|
4776
|
+
{
|
|
4777
|
+
name: "accountName",
|
|
4778
|
+
label: "Account Name",
|
|
4779
|
+
placeholder: "Enter account name",
|
|
4780
|
+
required: true
|
|
4781
|
+
}
|
|
4782
|
+
),
|
|
4783
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4784
|
+
FormSelect,
|
|
4785
|
+
{
|
|
4786
|
+
name: "accountType",
|
|
4787
|
+
label: "Account Type",
|
|
4788
|
+
placeholder: "Select account type",
|
|
4789
|
+
options: [
|
|
4790
|
+
{ value: "CHECKING", label: "Checking" },
|
|
4791
|
+
{ value: "SAVINGS", label: "Savings" }
|
|
4792
|
+
]
|
|
4793
|
+
}
|
|
4794
|
+
),
|
|
4795
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4796
|
+
FormInput,
|
|
4797
|
+
{
|
|
4798
|
+
name: "fundingFromAccount",
|
|
4799
|
+
label: "Funding from Account",
|
|
4800
|
+
placeholder: "Enter funding account"
|
|
4801
|
+
}
|
|
4802
|
+
),
|
|
4803
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4804
|
+
FormInput,
|
|
4805
|
+
{
|
|
4806
|
+
name: "sweepToAccount",
|
|
4807
|
+
label: "Sweep to Account",
|
|
4808
|
+
placeholder: "Enter sweep account"
|
|
4809
|
+
}
|
|
4810
|
+
)
|
|
4811
|
+
] }),
|
|
4812
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogFooter, { children: [
|
|
4813
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4814
|
+
Button,
|
|
4815
|
+
{
|
|
4816
|
+
type: "button",
|
|
4817
|
+
variant: "outline",
|
|
4818
|
+
onClick: () => onOpenChange(false),
|
|
4819
|
+
disabled: isLoading,
|
|
4820
|
+
children: "Cancel"
|
|
4821
|
+
}
|
|
4822
|
+
),
|
|
4823
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { type: "submit", disabled: isLoading, children: isLoading ? "Creating..." : "Create Account" })
|
|
4824
|
+
] })
|
|
4825
|
+
] }) })
|
|
4826
|
+
] }) });
|
|
4827
|
+
};
|
|
4828
|
+
var BusinessDocuments = ({ businessId, documents, onDocumentUpload }) => {
|
|
4829
|
+
const [isUploading, setIsUploading] = React15.useState(false);
|
|
4830
|
+
const [showUploadDialog, setShowUploadDialog] = React15.useState(false);
|
|
4831
|
+
const [selectedFile, setSelectedFile] = React15.useState(null);
|
|
4832
|
+
const [documentName, setDocumentName] = React15.useState("");
|
|
4833
|
+
const [description, setDescription] = React15.useState("");
|
|
4834
|
+
const [documentType, setDocumentType] = React15.useState("");
|
|
4835
|
+
const handleFileSelect = (e) => {
|
|
4836
|
+
const file = e.target.files?.[0];
|
|
4837
|
+
if (!file) return;
|
|
4838
|
+
setSelectedFile(file);
|
|
4839
|
+
setDocumentName(file.name);
|
|
4840
|
+
};
|
|
4841
|
+
const handleUploadSubmit = async () => {
|
|
4842
|
+
if (!selectedFile || !documentName || !documentType) {
|
|
4843
|
+
toast({
|
|
4844
|
+
title: "Missing Information",
|
|
4845
|
+
description: "Please fill in all required fields",
|
|
4846
|
+
variant: "destructive"
|
|
4847
|
+
});
|
|
4848
|
+
return;
|
|
4849
|
+
}
|
|
4850
|
+
setIsUploading(true);
|
|
4851
|
+
try {
|
|
4852
|
+
await onDocumentUpload(selectedFile, {
|
|
4853
|
+
name: documentName,
|
|
4854
|
+
description,
|
|
4855
|
+
type: documentType
|
|
4856
|
+
});
|
|
4857
|
+
toast({
|
|
4858
|
+
title: "Upload Successful",
|
|
4859
|
+
description: `${documentName} uploaded successfully`
|
|
4860
|
+
});
|
|
4861
|
+
setShowUploadDialog(false);
|
|
4862
|
+
resetForm();
|
|
4863
|
+
} catch (error) {
|
|
4378
4864
|
toast({
|
|
4379
4865
|
title: "Upload Failed",
|
|
4380
4866
|
description: "Failed to upload document. Please try again.",
|
|
@@ -4676,7 +5162,11 @@ var BusinessDetailView = ({
|
|
|
4676
5162
|
onUBOClick,
|
|
4677
5163
|
onDocumentUpload
|
|
4678
5164
|
}) => {
|
|
4679
|
-
|
|
5165
|
+
const [showAddAccountDialog, setShowAddAccountDialog] = React15.useState(false);
|
|
5166
|
+
const handleAddAccount = (data) => {
|
|
5167
|
+
console.log("New account data:", data);
|
|
5168
|
+
};
|
|
5169
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4680
5170
|
PageLayout,
|
|
4681
5171
|
{
|
|
4682
5172
|
title: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
@@ -4715,164 +5205,64 @@ var BusinessDetailView = ({
|
|
|
4715
5205
|
}
|
|
4716
5206
|
],
|
|
4717
5207
|
maxWidth: "full",
|
|
4718
|
-
children:
|
|
4719
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-
|
|
4720
|
-
/* @__PURE__ */ jsxRuntime.
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4733
|
-
/* @__PURE__ */ jsxRuntime.
|
|
4734
|
-
|
|
4735
|
-
/* @__PURE__ */ jsxRuntime.
|
|
4736
|
-
|
|
4737
|
-
|
|
5208
|
+
children: [
|
|
5209
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-4", children: [
|
|
5210
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-4", children: [
|
|
5211
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5212
|
+
BusinessProfileCard,
|
|
5213
|
+
{
|
|
5214
|
+
data: businessProfile,
|
|
5215
|
+
identityVerification,
|
|
5216
|
+
isEditing: isEditingProfile,
|
|
5217
|
+
onToggleEdit: onToggleProfileEdit,
|
|
5218
|
+
onDataChange: onProfileDataChange
|
|
5219
|
+
}
|
|
5220
|
+
),
|
|
5221
|
+
/* @__PURE__ */ jsxRuntime.jsx(UBOCard, { ubos: businessUBOs, onUBOClick }),
|
|
5222
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
5223
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
5224
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "External Accounts" }),
|
|
5225
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Button, { size: "sm", variant: "ghost", onClick: () => setShowAddAccountDialog(true), children: [
|
|
5226
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-1" }),
|
|
5227
|
+
"Account"
|
|
5228
|
+
] })
|
|
5229
|
+
] }),
|
|
5230
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: businessAccounts.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
5231
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wallet, { className: "h-5 w-5 opacity-50" }),
|
|
5232
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "No external accounts found" })
|
|
5233
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
5234
|
+
DataTable,
|
|
5235
|
+
{
|
|
5236
|
+
columns: accountColumns,
|
|
5237
|
+
data: businessAccounts
|
|
5238
|
+
}
|
|
5239
|
+
) })
|
|
4738
5240
|
] }),
|
|
4739
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4740
|
-
|
|
4741
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "No external accounts found" })
|
|
4742
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
4743
|
-
DataTable,
|
|
5241
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5242
|
+
BusinessDocuments,
|
|
4744
5243
|
{
|
|
4745
|
-
|
|
4746
|
-
|
|
5244
|
+
businessId: business.id,
|
|
5245
|
+
documents: businessDocuments,
|
|
5246
|
+
onDocumentUpload
|
|
4747
5247
|
}
|
|
4748
|
-
)
|
|
5248
|
+
)
|
|
4749
5249
|
] }),
|
|
4750
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4751
|
-
|
|
4752
|
-
{
|
|
4753
|
-
businessId: business.id,
|
|
4754
|
-
documents: businessDocuments,
|
|
4755
|
-
onDocumentUpload
|
|
4756
|
-
}
|
|
4757
|
-
)
|
|
5250
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsxRuntime.jsx(BusinessStatusCard, { isEditing: false, onToggleEdit: () => {
|
|
5251
|
+
} }) })
|
|
4758
5252
|
] }),
|
|
4759
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4760
|
-
|
|
4761
|
-
|
|
5253
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5254
|
+
AddAccountDialog,
|
|
5255
|
+
{
|
|
5256
|
+
open: showAddAccountDialog,
|
|
5257
|
+
onOpenChange: setShowAddAccountDialog,
|
|
5258
|
+
onSubmit: handleAddAccount,
|
|
5259
|
+
existingAccounts: businessAccounts
|
|
5260
|
+
}
|
|
5261
|
+
)
|
|
5262
|
+
]
|
|
4762
5263
|
}
|
|
4763
5264
|
);
|
|
4764
5265
|
};
|
|
4765
|
-
function Calendar({
|
|
4766
|
-
className,
|
|
4767
|
-
classNames,
|
|
4768
|
-
showOutsideDays = true,
|
|
4769
|
-
...props
|
|
4770
|
-
}) {
|
|
4771
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4772
|
-
reactDayPicker.DayPicker,
|
|
4773
|
-
{
|
|
4774
|
-
showOutsideDays,
|
|
4775
|
-
className: cn("p-3 pointer-events-auto", className),
|
|
4776
|
-
classNames: {
|
|
4777
|
-
months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
|
|
4778
|
-
month: "space-y-4",
|
|
4779
|
-
caption: "flex justify-center pt-1 relative items-center",
|
|
4780
|
-
caption_label: "text-sm font-medium",
|
|
4781
|
-
nav: "space-x-1 flex items-center",
|
|
4782
|
-
button_previous: "absolute left-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
|
|
4783
|
-
button_next: "absolute right-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
|
|
4784
|
-
month_grid: "w-full border-collapse space-y-1",
|
|
4785
|
-
weekdays: "flex",
|
|
4786
|
-
weekday: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
|
|
4787
|
-
week: "flex w-full mt-2",
|
|
4788
|
-
day: "h-9 w-9 text-center text-sm p-0 relative hover:bg-accent hover:text-accent-foreground rounded-md",
|
|
4789
|
-
day_button: cn(
|
|
4790
|
-
buttonVariants({ variant: "ghost" }),
|
|
4791
|
-
"h-9 w-9 p-0 font-normal"
|
|
4792
|
-
),
|
|
4793
|
-
selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground",
|
|
4794
|
-
today: "bg-accent text-accent-foreground",
|
|
4795
|
-
outside: "text-muted-foreground opacity-50",
|
|
4796
|
-
disabled: "text-muted-foreground opacity-50",
|
|
4797
|
-
hidden: "invisible",
|
|
4798
|
-
...classNames
|
|
4799
|
-
},
|
|
4800
|
-
...props
|
|
4801
|
-
}
|
|
4802
|
-
);
|
|
4803
|
-
}
|
|
4804
|
-
Calendar.displayName = "Calendar";
|
|
4805
|
-
var Popover = PopoverPrimitive__namespace.Root;
|
|
4806
|
-
var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
|
|
4807
|
-
var PopoverContent = React15__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4808
|
-
PopoverPrimitive__namespace.Content,
|
|
4809
|
-
{
|
|
4810
|
-
ref,
|
|
4811
|
-
align,
|
|
4812
|
-
sideOffset,
|
|
4813
|
-
className: cn(
|
|
4814
|
-
"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",
|
|
4815
|
-
className
|
|
4816
|
-
),
|
|
4817
|
-
...props
|
|
4818
|
-
}
|
|
4819
|
-
) }));
|
|
4820
|
-
PopoverContent.displayName = PopoverPrimitive__namespace.Content.displayName;
|
|
4821
|
-
function DatePicker({
|
|
4822
|
-
date,
|
|
4823
|
-
onDateChange,
|
|
4824
|
-
placeholder = "Pick a date",
|
|
4825
|
-
disabled = false,
|
|
4826
|
-
className,
|
|
4827
|
-
buttonClassName,
|
|
4828
|
-
calendarClassName,
|
|
4829
|
-
align = "start",
|
|
4830
|
-
disabledDates,
|
|
4831
|
-
label,
|
|
4832
|
-
wrapperClassName
|
|
4833
|
-
}) {
|
|
4834
|
-
const [open, setOpen] = React15__namespace.useState(false);
|
|
4835
|
-
const handleSelect = (selectedDate) => {
|
|
4836
|
-
onDateChange?.(selectedDate);
|
|
4837
|
-
setOpen(false);
|
|
4838
|
-
};
|
|
4839
|
-
const picker = /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
4840
|
-
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4841
|
-
Button,
|
|
4842
|
-
{
|
|
4843
|
-
variant: "outline",
|
|
4844
|
-
disabled,
|
|
4845
|
-
className: cn(
|
|
4846
|
-
"justify-start text-left font-normal",
|
|
4847
|
-
!date && "text-muted-foreground",
|
|
4848
|
-
buttonClassName
|
|
4849
|
-
),
|
|
4850
|
-
children: [
|
|
4851
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CalendarIcon, { className: "mr-2 h-4 w-4" }),
|
|
4852
|
-
date ? dateFns.format(date, "MM/dd/yyyy") : placeholder
|
|
4853
|
-
]
|
|
4854
|
-
}
|
|
4855
|
-
) }),
|
|
4856
|
-
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: cn("w-auto p-0", className), align, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4857
|
-
Calendar,
|
|
4858
|
-
{
|
|
4859
|
-
mode: "single",
|
|
4860
|
-
selected: date,
|
|
4861
|
-
onSelect: handleSelect,
|
|
4862
|
-
disabled: disabledDates,
|
|
4863
|
-
initialFocus: true,
|
|
4864
|
-
className: cn("pointer-events-auto", calendarClassName)
|
|
4865
|
-
}
|
|
4866
|
-
) })
|
|
4867
|
-
] });
|
|
4868
|
-
if (label) {
|
|
4869
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("space-y-2", wrapperClassName), children: [
|
|
4870
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: label }),
|
|
4871
|
-
picker
|
|
4872
|
-
] });
|
|
4873
|
-
}
|
|
4874
|
-
return picker;
|
|
4875
|
-
}
|
|
4876
5266
|
var BusinessFiltersSheet = ({
|
|
4877
5267
|
filters,
|
|
4878
5268
|
onFilterChange,
|
|
@@ -5255,98 +5645,137 @@ var CreateBusinessView = ({
|
|
|
5255
5645
|
}
|
|
5256
5646
|
);
|
|
5257
5647
|
};
|
|
5648
|
+
var CounterpartyFiltersSheet = ({
|
|
5649
|
+
filters,
|
|
5650
|
+
onFilterChange,
|
|
5651
|
+
onResetFilters
|
|
5652
|
+
}) => {
|
|
5653
|
+
const [localFilters, setLocalFilters] = React15.useState(filters);
|
|
5654
|
+
const [open, setOpen] = React15.useState(false);
|
|
5655
|
+
React15.useEffect(() => {
|
|
5656
|
+
setLocalFilters(filters);
|
|
5657
|
+
}, [filters]);
|
|
5658
|
+
const handleLocalFilterChange = (field, value) => {
|
|
5659
|
+
setLocalFilters((prev) => ({ ...prev, [field]: value }));
|
|
5660
|
+
};
|
|
5661
|
+
const handleApplyFilters = () => {
|
|
5662
|
+
Object.entries(localFilters).forEach(([key, value]) => {
|
|
5663
|
+
onFilterChange(key, value);
|
|
5664
|
+
});
|
|
5665
|
+
setOpen(false);
|
|
5666
|
+
};
|
|
5667
|
+
const handleResetFilters = () => {
|
|
5668
|
+
const resetFilters = {
|
|
5669
|
+
name: "",
|
|
5670
|
+
type: "",
|
|
5671
|
+
status: "",
|
|
5672
|
+
createdDateStart: void 0,
|
|
5673
|
+
createdDateEnd: void 0
|
|
5674
|
+
};
|
|
5675
|
+
setLocalFilters(resetFilters);
|
|
5676
|
+
onResetFilters();
|
|
5677
|
+
setOpen(false);
|
|
5678
|
+
};
|
|
5679
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Sheet, { open, onOpenChange: setOpen, children: [
|
|
5680
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", className: "gap-2", children: [
|
|
5681
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Filter, { className: "h-4 w-4" }),
|
|
5682
|
+
"Filters"
|
|
5683
|
+
] }) }),
|
|
5684
|
+
/* @__PURE__ */ jsxRuntime.jsxs(SheetContent, { side: "right", className: "w-full sm:max-w-xl overflow-y-auto", children: [
|
|
5685
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { children: "Counterparty Filters" }) }),
|
|
5686
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6 py-6", children: [
|
|
5687
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5688
|
+
EnhancedInput,
|
|
5689
|
+
{
|
|
5690
|
+
label: "Name",
|
|
5691
|
+
value: localFilters.name,
|
|
5692
|
+
onChange: (e) => handleLocalFilterChange("name", e.target.value),
|
|
5693
|
+
placeholder: "Enter counterparty name"
|
|
5694
|
+
}
|
|
5695
|
+
),
|
|
5696
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5697
|
+
EnhancedSelect,
|
|
5698
|
+
{
|
|
5699
|
+
label: "Type",
|
|
5700
|
+
value: localFilters.type,
|
|
5701
|
+
onValueChange: (value) => handleLocalFilterChange("type", value),
|
|
5702
|
+
placeholder: "Select type",
|
|
5703
|
+
options: [
|
|
5704
|
+
{ value: "BUSINESS", label: "Business" },
|
|
5705
|
+
{ value: "INDIVIDUAL", label: "Individual" }
|
|
5706
|
+
]
|
|
5707
|
+
}
|
|
5708
|
+
),
|
|
5709
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5710
|
+
EnhancedSelect,
|
|
5711
|
+
{
|
|
5712
|
+
label: "Status",
|
|
5713
|
+
value: localFilters.status,
|
|
5714
|
+
onValueChange: (value) => handleLocalFilterChange("status", value),
|
|
5715
|
+
placeholder: "Select status",
|
|
5716
|
+
options: [
|
|
5717
|
+
{ value: "ACTIVE", label: "Active" },
|
|
5718
|
+
{ value: "INACTIVE", label: "Inactive" },
|
|
5719
|
+
{ value: "PENDING", label: "Pending" },
|
|
5720
|
+
{ value: "SUSPENDED", label: "Suspended" }
|
|
5721
|
+
]
|
|
5722
|
+
}
|
|
5723
|
+
),
|
|
5724
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5725
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
5726
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "Created Date Start" }),
|
|
5727
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5728
|
+
DatePicker,
|
|
5729
|
+
{
|
|
5730
|
+
date: localFilters.createdDateStart,
|
|
5731
|
+
onDateChange: (date) => handleLocalFilterChange("createdDateStart", date),
|
|
5732
|
+
placeholder: "MM/DD/YYYY",
|
|
5733
|
+
buttonClassName: "w-full",
|
|
5734
|
+
className: "bg-background z-50"
|
|
5735
|
+
}
|
|
5736
|
+
)
|
|
5737
|
+
] }),
|
|
5738
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
5739
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "Created Date End" }),
|
|
5740
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5741
|
+
DatePicker,
|
|
5742
|
+
{
|
|
5743
|
+
date: localFilters.createdDateEnd,
|
|
5744
|
+
onDateChange: (date) => handleLocalFilterChange("createdDateEnd", date),
|
|
5745
|
+
placeholder: "MM/DD/YYYY",
|
|
5746
|
+
buttonClassName: "w-full",
|
|
5747
|
+
className: "bg-background z-50"
|
|
5748
|
+
}
|
|
5749
|
+
)
|
|
5750
|
+
] })
|
|
5751
|
+
] })
|
|
5752
|
+
] }),
|
|
5753
|
+
/* @__PURE__ */ jsxRuntime.jsxs(SheetFooter, { className: "flex gap-2", children: [
|
|
5754
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", onClick: handleResetFilters, className: "flex-1", children: "Reset Filters" }),
|
|
5755
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: handleApplyFilters, className: "flex-1", children: "Apply Filters" })
|
|
5756
|
+
] })
|
|
5757
|
+
] })
|
|
5758
|
+
] });
|
|
5759
|
+
};
|
|
5258
5760
|
var CounterpartiesView = ({
|
|
5259
5761
|
table,
|
|
5260
5762
|
filters,
|
|
5261
5763
|
onFilterChange,
|
|
5262
5764
|
onResetFilters,
|
|
5263
|
-
onApplyFilters,
|
|
5264
5765
|
onCreateCounterparty
|
|
5265
5766
|
}) => {
|
|
5266
5767
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col h-screen bg-gradient-subtle", children: [
|
|
5267
5768
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container mx-auto px-4 py-6 max-w-none", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
5268
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-bold text-foreground
|
|
5769
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-bold text-foreground", children: "Counterparties" }) }),
|
|
5269
5770
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5270
|
-
/* @__PURE__ */ jsxRuntime.
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5279
|
-
EnhancedInput,
|
|
5280
|
-
{
|
|
5281
|
-
label: "Name",
|
|
5282
|
-
value: filters.name,
|
|
5283
|
-
onChange: (e) => onFilterChange("name", e.target.value),
|
|
5284
|
-
placeholder: "Enter counterparty name"
|
|
5285
|
-
}
|
|
5286
|
-
),
|
|
5287
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5288
|
-
EnhancedSelect,
|
|
5289
|
-
{
|
|
5290
|
-
label: "Type",
|
|
5291
|
-
value: filters.type,
|
|
5292
|
-
onValueChange: (value) => onFilterChange("type", value),
|
|
5293
|
-
placeholder: "Select type",
|
|
5294
|
-
options: [
|
|
5295
|
-
{ value: "BUSINESS", label: "Business" },
|
|
5296
|
-
{ value: "INDIVIDUAL", label: "Individual" }
|
|
5297
|
-
]
|
|
5298
|
-
}
|
|
5299
|
-
),
|
|
5300
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5301
|
-
EnhancedSelect,
|
|
5302
|
-
{
|
|
5303
|
-
label: "Status",
|
|
5304
|
-
value: filters.status,
|
|
5305
|
-
onValueChange: (value) => onFilterChange("status", value),
|
|
5306
|
-
placeholder: "Select status",
|
|
5307
|
-
options: [
|
|
5308
|
-
{ value: "ACTIVE", label: "Active" },
|
|
5309
|
-
{ value: "INACTIVE", label: "Inactive" },
|
|
5310
|
-
{ value: "PENDING", label: "Pending" },
|
|
5311
|
-
{ value: "SUSPENDED", label: "Suspended" }
|
|
5312
|
-
]
|
|
5313
|
-
}
|
|
5314
|
-
),
|
|
5315
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5316
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
5317
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "Created Date Start" }),
|
|
5318
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5319
|
-
DatePicker,
|
|
5320
|
-
{
|
|
5321
|
-
date: filters.createdDateStart,
|
|
5322
|
-
onDateChange: (date) => onFilterChange("createdDateStart", date),
|
|
5323
|
-
placeholder: "MM/DD/YYYY",
|
|
5324
|
-
buttonClassName: "w-full",
|
|
5325
|
-
className: "bg-background z-50"
|
|
5326
|
-
}
|
|
5327
|
-
)
|
|
5328
|
-
] }),
|
|
5329
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
5330
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "Created Date End" }),
|
|
5331
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5332
|
-
DatePicker,
|
|
5333
|
-
{
|
|
5334
|
-
date: filters.createdDateEnd,
|
|
5335
|
-
onDateChange: (date) => onFilterChange("createdDateEnd", date),
|
|
5336
|
-
placeholder: "MM/DD/YYYY",
|
|
5337
|
-
buttonClassName: "w-full",
|
|
5338
|
-
className: "bg-background z-50"
|
|
5339
|
-
}
|
|
5340
|
-
)
|
|
5341
|
-
] })
|
|
5342
|
-
] })
|
|
5343
|
-
] }),
|
|
5344
|
-
/* @__PURE__ */ jsxRuntime.jsxs(SheetFooter, { className: "gap-2", children: [
|
|
5345
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", onClick: onResetFilters, children: "Reset Filters" }),
|
|
5346
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: onApplyFilters, children: "Apply Filters" })
|
|
5347
|
-
] })
|
|
5348
|
-
] })
|
|
5349
|
-
] }),
|
|
5771
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5772
|
+
CounterpartyFiltersSheet,
|
|
5773
|
+
{
|
|
5774
|
+
filters,
|
|
5775
|
+
onFilterChange,
|
|
5776
|
+
onResetFilters
|
|
5777
|
+
}
|
|
5778
|
+
),
|
|
5350
5779
|
/* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: onCreateCounterparty, children: "Create Counterparty" })
|
|
5351
5780
|
] })
|
|
5352
5781
|
] }) }) }),
|
|
@@ -6450,39 +6879,6 @@ var CounterpartyBasicInfo = ({ onDataChange }) => {
|
|
|
6450
6879
|
] })
|
|
6451
6880
|
] });
|
|
6452
6881
|
};
|
|
6453
|
-
var spacingClasses = {
|
|
6454
|
-
sm: "space-y-3",
|
|
6455
|
-
md: "space-y-4",
|
|
6456
|
-
lg: "space-y-6"
|
|
6457
|
-
};
|
|
6458
|
-
var gridClasses = {
|
|
6459
|
-
1: "grid-cols-1",
|
|
6460
|
-
2: "grid-cols-1 md:grid-cols-2",
|
|
6461
|
-
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
|
|
6462
|
-
4: "grid-cols-1 md:grid-cols-2 lg:grid-cols-4"
|
|
6463
|
-
};
|
|
6464
|
-
var FormSection = React15__namespace.forwardRef(
|
|
6465
|
-
({
|
|
6466
|
-
title,
|
|
6467
|
-
description,
|
|
6468
|
-
children,
|
|
6469
|
-
className,
|
|
6470
|
-
spacing: spacing2 = "md",
|
|
6471
|
-
layout = "vertical",
|
|
6472
|
-
columns: columns3 = 2
|
|
6473
|
-
}, ref) => {
|
|
6474
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("space-y-4", className), children: [
|
|
6475
|
-
(title || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
6476
|
-
title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold text-foreground", children: title }),
|
|
6477
|
-
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: description })
|
|
6478
|
-
] }),
|
|
6479
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
|
|
6480
|
-
layout === "grid" ? `grid gap-4 ${gridClasses[columns3]}` : spacingClasses[spacing2]
|
|
6481
|
-
), children })
|
|
6482
|
-
] });
|
|
6483
|
-
}
|
|
6484
|
-
);
|
|
6485
|
-
FormSection.displayName = "FormSection";
|
|
6486
6882
|
var IntermediaryFI = () => {
|
|
6487
6883
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
6488
6884
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-border pb-4", children: [
|
|
@@ -7949,36 +8345,6 @@ var EntityCard = React15__namespace.forwardRef(
|
|
|
7949
8345
|
}
|
|
7950
8346
|
);
|
|
7951
8347
|
EntityCard.displayName = "EntityCard";
|
|
7952
|
-
var FormField = React15__namespace.forwardRef(
|
|
7953
|
-
({ label, description, error, required, children, className, layout = "vertical" }, ref) => {
|
|
7954
|
-
const isHorizontal = layout === "horizontal";
|
|
7955
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7956
|
-
"div",
|
|
7957
|
-
{
|
|
7958
|
-
ref,
|
|
7959
|
-
className: cn(
|
|
7960
|
-
"space-y-2",
|
|
7961
|
-
isHorizontal && "grid grid-cols-1 md:grid-cols-3 gap-4 items-start space-y-0",
|
|
7962
|
-
className
|
|
7963
|
-
),
|
|
7964
|
-
children: [
|
|
7965
|
-
label && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("space-y-1", isHorizontal && "pt-2"), children: [
|
|
7966
|
-
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "text-sm font-medium text-foreground", children: [
|
|
7967
|
-
label,
|
|
7968
|
-
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive ml-1", children: "*" })
|
|
7969
|
-
] }),
|
|
7970
|
-
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: description })
|
|
7971
|
-
] }),
|
|
7972
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(isHorizontal && "md:col-span-2"), children: [
|
|
7973
|
-
children,
|
|
7974
|
-
error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-destructive mt-1", children: error })
|
|
7975
|
-
] })
|
|
7976
|
-
]
|
|
7977
|
-
}
|
|
7978
|
-
);
|
|
7979
|
-
}
|
|
7980
|
-
);
|
|
7981
|
-
FormField.displayName = "FormField";
|
|
7982
8348
|
var variantStyles = {
|
|
7983
8349
|
default: "",
|
|
7984
8350
|
success: "border-success/20 bg-success/5",
|
|
@@ -9357,39 +9723,6 @@ var AccountStatusCard = ({ isEditing, onToggleEdit, className }) => {
|
|
|
9357
9723
|
}
|
|
9358
9724
|
);
|
|
9359
9725
|
};
|
|
9360
|
-
var AccountBalanceCard = React15__namespace.default.forwardRef(
|
|
9361
|
-
({ balance, availableBalance, accountNumber, accountType, className }, ref) => {
|
|
9362
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9363
|
-
Card,
|
|
9364
|
-
{
|
|
9365
|
-
ref,
|
|
9366
|
-
className: cn(
|
|
9367
|
-
"border-primary/20 bg-gradient-to-br from-primary/5 via-primary/3 to-background",
|
|
9368
|
-
className
|
|
9369
|
-
),
|
|
9370
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(CardContent, { className: "p-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
9371
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
9372
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wallet, { className: "h-4 w-4 text-primary" }),
|
|
9373
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: accountNumber }),
|
|
9374
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "\u2022" }),
|
|
9375
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground capitalize", children: accountType })
|
|
9376
|
-
] }),
|
|
9377
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-end gap-8", children: [
|
|
9378
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
9379
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-muted-foreground mb-1", children: "Account Balance" }),
|
|
9380
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-3xl font-bold text-foreground tracking-tight", children: balance })
|
|
9381
|
-
] }),
|
|
9382
|
-
availableBalance && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
9383
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-muted-foreground mb-1", children: "Available Balance" }),
|
|
9384
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-3xl font-bold text-foreground tracking-tight", children: availableBalance })
|
|
9385
|
-
] })
|
|
9386
|
-
] })
|
|
9387
|
-
] }) })
|
|
9388
|
-
}
|
|
9389
|
-
);
|
|
9390
|
-
}
|
|
9391
|
-
);
|
|
9392
|
-
AccountBalanceCard.displayName = "AccountBalanceCard";
|
|
9393
9726
|
var accountInfoSchema = zod.z.object({
|
|
9394
9727
|
accountName: zod.z.string().trim().min(1, "Account name is required").max(100, "Account name must be less than 100 characters"),
|
|
9395
9728
|
canAcceptSweep: zod.z.enum(["Yes", "No"]),
|
|
@@ -9419,7 +9752,7 @@ var AccountDetail = () => {
|
|
|
9419
9752
|
}
|
|
9420
9753
|
const formValues = form.watch();
|
|
9421
9754
|
const customerPath = account.customerType === "business" ? `/business/${account.customerId}` : `/individual/${account.customerId}`;
|
|
9422
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
9755
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9423
9756
|
PageLayout,
|
|
9424
9757
|
{
|
|
9425
9758
|
title: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
@@ -9462,29 +9795,37 @@ var AccountDetail = () => {
|
|
|
9462
9795
|
}
|
|
9463
9796
|
],
|
|
9464
9797
|
maxWidth: "full",
|
|
9465
|
-
children: [
|
|
9466
|
-
/* @__PURE__ */ jsxRuntime.
|
|
9467
|
-
|
|
9468
|
-
|
|
9469
|
-
|
|
9470
|
-
|
|
9471
|
-
|
|
9472
|
-
|
|
9473
|
-
|
|
9474
|
-
|
|
9475
|
-
|
|
9476
|
-
|
|
9477
|
-
|
|
9478
|
-
|
|
9479
|
-
|
|
9480
|
-
|
|
9481
|
-
|
|
9482
|
-
|
|
9483
|
-
|
|
9484
|
-
|
|
9485
|
-
|
|
9486
|
-
|
|
9487
|
-
|
|
9798
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-4", children: [
|
|
9799
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-4", children: [
|
|
9800
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9801
|
+
EditableFormCard,
|
|
9802
|
+
{
|
|
9803
|
+
title: "Account Information",
|
|
9804
|
+
variant: "subtle",
|
|
9805
|
+
isEditing: form.isEditing,
|
|
9806
|
+
onToggleEdit: form.handleToggleEdit,
|
|
9807
|
+
onSave: form.handleSave,
|
|
9808
|
+
onCancel: form.handleCancel,
|
|
9809
|
+
viewContent: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
9810
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-6 p-6 rounded-lg bg-gradient-to-br from-primary/10 via-primary/5 to-background border border-primary/20", children: [
|
|
9811
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mb-4", children: [
|
|
9812
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wallet, { className: "h-4 w-4 text-primary" }),
|
|
9813
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: account.number }),
|
|
9814
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "\u2022" }),
|
|
9815
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground capitalize", children: account.type })
|
|
9816
|
+
] }),
|
|
9817
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-end gap-8", children: [
|
|
9818
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
9819
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-muted-foreground mb-1", children: "Account Balance" }),
|
|
9820
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-3xl font-bold text-foreground tracking-tight", children: account.balance })
|
|
9821
|
+
] }),
|
|
9822
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
9823
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-muted-foreground mb-1", children: "Available Balance" }),
|
|
9824
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-3xl font-bold text-foreground tracking-tight", children: account.balance })
|
|
9825
|
+
] })
|
|
9826
|
+
] })
|
|
9827
|
+
] }),
|
|
9828
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
9488
9829
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9489
9830
|
InfoField,
|
|
9490
9831
|
{
|
|
@@ -9548,8 +9889,28 @@ var AccountDetail = () => {
|
|
|
9548
9889
|
value: formValues.sweepAccountNumber || "-"
|
|
9549
9890
|
}
|
|
9550
9891
|
)
|
|
9892
|
+
] })
|
|
9893
|
+
] }),
|
|
9894
|
+
editContent: /* @__PURE__ */ jsxRuntime.jsx(FormProvider, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
9895
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-6 p-6 rounded-lg bg-gradient-to-br from-primary/10 via-primary/5 to-background border border-primary/20", children: [
|
|
9896
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mb-4", children: [
|
|
9897
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wallet, { className: "h-4 w-4 text-primary" }),
|
|
9898
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: account.number }),
|
|
9899
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "\u2022" }),
|
|
9900
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground capitalize", children: account.type })
|
|
9901
|
+
] }),
|
|
9902
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-end gap-8", children: [
|
|
9903
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
9904
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-muted-foreground mb-1", children: "Account Balance" }),
|
|
9905
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-3xl font-bold text-foreground tracking-tight", children: account.balance })
|
|
9906
|
+
] }),
|
|
9907
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
9908
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-muted-foreground mb-1", children: "Available Balance" }),
|
|
9909
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-3xl font-bold text-foreground tracking-tight", children: account.balance })
|
|
9910
|
+
] })
|
|
9911
|
+
] })
|
|
9551
9912
|
] }),
|
|
9552
|
-
|
|
9913
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
9553
9914
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9554
9915
|
InfoField,
|
|
9555
9916
|
{
|
|
@@ -9621,18 +9982,18 @@ var AccountDetail = () => {
|
|
|
9621
9982
|
placeholder: "Enter sweep account number"
|
|
9622
9983
|
}
|
|
9623
9984
|
)
|
|
9624
|
-
] })
|
|
9625
|
-
}
|
|
9626
|
-
|
|
9627
|
-
|
|
9628
|
-
|
|
9629
|
-
|
|
9630
|
-
|
|
9631
|
-
] })
|
|
9632
|
-
|
|
9633
|
-
|
|
9634
|
-
|
|
9635
|
-
]
|
|
9985
|
+
] })
|
|
9986
|
+
] }) })
|
|
9987
|
+
}
|
|
9988
|
+
),
|
|
9989
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
9990
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Fees" }) }),
|
|
9991
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center py-8 text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Fees information coming soon" }) }) })
|
|
9992
|
+
] })
|
|
9993
|
+
] }),
|
|
9994
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsxRuntime.jsx(AccountStatusCard, { isEditing: false, onToggleEdit: () => {
|
|
9995
|
+
} }) })
|
|
9996
|
+
] })
|
|
9636
9997
|
}
|
|
9637
9998
|
);
|
|
9638
9999
|
};
|
|
@@ -10867,8 +11228,6 @@ var Counterparties = () => {
|
|
|
10867
11228
|
createdDateEnd: void 0
|
|
10868
11229
|
});
|
|
10869
11230
|
}, []);
|
|
10870
|
-
const handleApplyFilters = React15.useCallback(() => {
|
|
10871
|
-
}, []);
|
|
10872
11231
|
const handleSort = React15.useCallback((key) => {
|
|
10873
11232
|
if (sortBy === key) {
|
|
10874
11233
|
setSortDirection((prev) => prev === "asc" ? "desc" : "asc");
|
|
@@ -10953,7 +11312,6 @@ var Counterparties = () => {
|
|
|
10953
11312
|
filters,
|
|
10954
11313
|
onFilterChange: handleFilterChange,
|
|
10955
11314
|
onResetFilters: handleResetFilters,
|
|
10956
|
-
onApplyFilters: handleApplyFilters,
|
|
10957
11315
|
onCreateCounterparty: handleCreateCounterparty
|
|
10958
11316
|
}
|
|
10959
11317
|
);
|
|
@@ -11080,8 +11438,83 @@ var PaymentMethodCard = ({
|
|
|
11080
11438
|
intermediaryBankId && /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Intermediary Bank ID", value: intermediaryBankId })
|
|
11081
11439
|
] })
|
|
11082
11440
|
] })
|
|
11083
|
-
] })
|
|
11084
|
-
] });
|
|
11441
|
+
] })
|
|
11442
|
+
] });
|
|
11443
|
+
};
|
|
11444
|
+
var CounterpartyDetailView = ({
|
|
11445
|
+
counterpartyName,
|
|
11446
|
+
counterpartyType,
|
|
11447
|
+
currentStatus,
|
|
11448
|
+
isEditingProfile,
|
|
11449
|
+
mockPaymentMethods: mockPaymentMethods2,
|
|
11450
|
+
documentsTable,
|
|
11451
|
+
onStatusChange,
|
|
11452
|
+
onToggleProfileEdit,
|
|
11453
|
+
onAddPaymentMethod,
|
|
11454
|
+
onAddDocument
|
|
11455
|
+
}) => {
|
|
11456
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11457
|
+
PageLayout,
|
|
11458
|
+
{
|
|
11459
|
+
title: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
11460
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: counterpartyName }),
|
|
11461
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11462
|
+
EditableInfoField,
|
|
11463
|
+
{
|
|
11464
|
+
label: "",
|
|
11465
|
+
value: currentStatus,
|
|
11466
|
+
options: [
|
|
11467
|
+
{ value: "ACTIVE", label: "Active" },
|
|
11468
|
+
{ value: "INACTIVE", label: "Inactive" },
|
|
11469
|
+
{ value: "PENDING", label: "Pending" },
|
|
11470
|
+
{ value: "SUSPENDED", label: "Suspended" }
|
|
11471
|
+
],
|
|
11472
|
+
onChange: onStatusChange,
|
|
11473
|
+
renderValue: (value) => /* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status: value }),
|
|
11474
|
+
className: "inline-block"
|
|
11475
|
+
}
|
|
11476
|
+
),
|
|
11477
|
+
/* @__PURE__ */ jsxRuntime.jsx(CounterpartyTypeBadge, { type: counterpartyType })
|
|
11478
|
+
] }),
|
|
11479
|
+
maxWidth: "full",
|
|
11480
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-4", children: [
|
|
11481
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-4", children: [
|
|
11482
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11483
|
+
CounterpartyProfileCard,
|
|
11484
|
+
{
|
|
11485
|
+
isEditing: isEditingProfile,
|
|
11486
|
+
onToggleEdit: onToggleProfileEdit
|
|
11487
|
+
}
|
|
11488
|
+
),
|
|
11489
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
11490
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
11491
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Payment Methods" }),
|
|
11492
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Button, { size: "sm", variant: "ghost", onClick: onAddPaymentMethod, children: [
|
|
11493
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-1" }),
|
|
11494
|
+
"Method"
|
|
11495
|
+
] })
|
|
11496
|
+
] }),
|
|
11497
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: mockPaymentMethods2.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
11498
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wallet, { className: "h-5 w-5 opacity-50" }),
|
|
11499
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "No payment methods configured" })
|
|
11500
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(ResponsiveGrid, { type: "forms", gap: "md", children: mockPaymentMethods2.map((method, index) => /* @__PURE__ */ jsxRuntime.jsx(PaymentMethodCard, { ...method }, index)) }) })
|
|
11501
|
+
] }),
|
|
11502
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
11503
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
11504
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Documents" }),
|
|
11505
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Button, { size: "sm", variant: "ghost", onClick: onAddDocument, children: [
|
|
11506
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-1" }),
|
|
11507
|
+
"Document"
|
|
11508
|
+
] })
|
|
11509
|
+
] }),
|
|
11510
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: documentsTable })
|
|
11511
|
+
] })
|
|
11512
|
+
] }),
|
|
11513
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsxRuntime.jsx(CounterpartyStatusCard, { isEditing: false, onToggleEdit: () => {
|
|
11514
|
+
} }) })
|
|
11515
|
+
] })
|
|
11516
|
+
}
|
|
11517
|
+
);
|
|
11085
11518
|
};
|
|
11086
11519
|
var mockPaymentMethods = [
|
|
11087
11520
|
{
|
|
@@ -11141,6 +11574,33 @@ var CounterpartyDetail = () => {
|
|
|
11141
11574
|
render: (value) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "capitalize", children: value })
|
|
11142
11575
|
}
|
|
11143
11576
|
];
|
|
11577
|
+
const handleStatusChange = (newStatus) => {
|
|
11578
|
+
setCurrentStatus(newStatus);
|
|
11579
|
+
};
|
|
11580
|
+
const handleToggleProfileEdit = () => {
|
|
11581
|
+
setIsEditingProfile(!isEditingProfile);
|
|
11582
|
+
};
|
|
11583
|
+
const handleAddPaymentMethod = () => {
|
|
11584
|
+
console.log("Add payment method");
|
|
11585
|
+
};
|
|
11586
|
+
const handleAddDocument = () => {
|
|
11587
|
+
console.log("Add document");
|
|
11588
|
+
};
|
|
11589
|
+
const documentsTable = React15.useMemo(() => {
|
|
11590
|
+
if (counterpartyDocuments.length === 0) {
|
|
11591
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
11592
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { className: "h-5 w-5 opacity-50" }),
|
|
11593
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "No documents found" })
|
|
11594
|
+
] });
|
|
11595
|
+
}
|
|
11596
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11597
|
+
DataTable,
|
|
11598
|
+
{
|
|
11599
|
+
columns: documentColumns,
|
|
11600
|
+
data: counterpartyDocuments
|
|
11601
|
+
}
|
|
11602
|
+
);
|
|
11603
|
+
}, [counterpartyDocuments, documentColumns]);
|
|
11144
11604
|
if (!counterparty) {
|
|
11145
11605
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container mx-auto px-4 py-8", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
|
|
11146
11606
|
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-2xl font-bold mb-2", children: "Counterparty Not Found" }),
|
|
@@ -11148,74 +11608,18 @@ var CounterpartyDetail = () => {
|
|
|
11148
11608
|
] }) });
|
|
11149
11609
|
}
|
|
11150
11610
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11151
|
-
|
|
11611
|
+
CounterpartyDetailView,
|
|
11152
11612
|
{
|
|
11153
|
-
|
|
11154
|
-
|
|
11155
|
-
|
|
11156
|
-
|
|
11157
|
-
|
|
11158
|
-
|
|
11159
|
-
|
|
11160
|
-
|
|
11161
|
-
|
|
11162
|
-
|
|
11163
|
-
{ value: "PENDING", label: "Pending" },
|
|
11164
|
-
{ value: "SUSPENDED", label: "Suspended" }
|
|
11165
|
-
],
|
|
11166
|
-
onChange: (newStatus) => setCurrentStatus(newStatus),
|
|
11167
|
-
renderValue: (value) => /* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status: value }),
|
|
11168
|
-
className: "inline-block"
|
|
11169
|
-
}
|
|
11170
|
-
),
|
|
11171
|
-
/* @__PURE__ */ jsxRuntime.jsx(CounterpartyTypeBadge, { type: counterparty.type })
|
|
11172
|
-
] }),
|
|
11173
|
-
maxWidth: "full",
|
|
11174
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-4", children: [
|
|
11175
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-4", children: [
|
|
11176
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11177
|
-
CounterpartyProfileCard,
|
|
11178
|
-
{
|
|
11179
|
-
isEditing: isEditingProfile,
|
|
11180
|
-
onToggleEdit: () => setIsEditingProfile(!isEditingProfile)
|
|
11181
|
-
}
|
|
11182
|
-
),
|
|
11183
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
11184
|
-
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
11185
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Payment Methods" }),
|
|
11186
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Button, { size: "sm", variant: "ghost", children: [
|
|
11187
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-1" }),
|
|
11188
|
-
"Method"
|
|
11189
|
-
] })
|
|
11190
|
-
] }),
|
|
11191
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: mockPaymentMethods.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
11192
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wallet, { className: "h-5 w-5 opacity-50" }),
|
|
11193
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "No payment methods configured" })
|
|
11194
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx(ResponsiveGrid, { type: "forms", gap: "md", children: mockPaymentMethods.map((method, index) => /* @__PURE__ */ jsxRuntime.jsx(PaymentMethodCard, { ...method }, index)) }) })
|
|
11195
|
-
] }),
|
|
11196
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
11197
|
-
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
11198
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Documents" }),
|
|
11199
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Button, { size: "sm", variant: "ghost", children: [
|
|
11200
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-1" }),
|
|
11201
|
-
"Document"
|
|
11202
|
-
] })
|
|
11203
|
-
] }),
|
|
11204
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: counterpartyDocuments.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
11205
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { className: "h-5 w-5 opacity-50" }),
|
|
11206
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "No documents found" })
|
|
11207
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
11208
|
-
DataTable,
|
|
11209
|
-
{
|
|
11210
|
-
columns: documentColumns,
|
|
11211
|
-
data: counterpartyDocuments
|
|
11212
|
-
}
|
|
11213
|
-
) })
|
|
11214
|
-
] })
|
|
11215
|
-
] }),
|
|
11216
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsxRuntime.jsx(CounterpartyStatusCard, { isEditing: false, onToggleEdit: () => {
|
|
11217
|
-
} }) })
|
|
11218
|
-
] })
|
|
11613
|
+
counterpartyName: counterparty.name,
|
|
11614
|
+
counterpartyType: counterparty.type,
|
|
11615
|
+
currentStatus,
|
|
11616
|
+
isEditingProfile,
|
|
11617
|
+
mockPaymentMethods,
|
|
11618
|
+
documentsTable,
|
|
11619
|
+
onStatusChange: handleStatusChange,
|
|
11620
|
+
onToggleProfileEdit: handleToggleProfileEdit,
|
|
11621
|
+
onAddPaymentMethod: handleAddPaymentMethod,
|
|
11622
|
+
onAddDocument: handleAddDocument
|
|
11219
11623
|
}
|
|
11220
11624
|
);
|
|
11221
11625
|
};
|
|
@@ -13853,7 +14257,7 @@ var TransactionDetail = () => {
|
|
|
13853
14257
|
/* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: () => navigate("/transactions/history"), children: "Back to Transaction History" })
|
|
13854
14258
|
] }) });
|
|
13855
14259
|
}
|
|
13856
|
-
const
|
|
14260
|
+
const getStatusVariant2 = (status) => {
|
|
13857
14261
|
switch (status) {
|
|
13858
14262
|
case "POSTED":
|
|
13859
14263
|
return "success";
|
|
@@ -13909,7 +14313,7 @@ var TransactionDetail = () => {
|
|
|
13909
14313
|
isInbound: transaction.isInbound
|
|
13910
14314
|
}
|
|
13911
14315
|
),
|
|
13912
|
-
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant:
|
|
14316
|
+
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: getStatusVariant2(transaction.status), children: transaction.status }),
|
|
13913
14317
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: getProcessingStatusVariant(transaction.processingStatus), children: transaction.processingStatus })
|
|
13914
14318
|
] }),
|
|
13915
14319
|
maxWidth: "full",
|
|
@@ -14008,6 +14412,341 @@ function UIKit() {
|
|
|
14008
14412
|
] })
|
|
14009
14413
|
] }) }) });
|
|
14010
14414
|
}
|
|
14415
|
+
function OFACFiltersSheet({
|
|
14416
|
+
filters,
|
|
14417
|
+
onFilterChange,
|
|
14418
|
+
onResetFilters
|
|
14419
|
+
}) {
|
|
14420
|
+
const hasActiveFilters = filters.status !== "" || filters.entityType !== "" || filters.startDate !== void 0 || filters.endDate !== void 0;
|
|
14421
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Sheet, { children: [
|
|
14422
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", children: [
|
|
14423
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Filter, { className: "mr-2 h-4 w-4" }),
|
|
14424
|
+
"Filters",
|
|
14425
|
+
hasActiveFilters && /* @__PURE__ */ jsxRuntime.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 })
|
|
14426
|
+
] }) }),
|
|
14427
|
+
/* @__PURE__ */ jsxRuntime.jsxs(SheetContent, { className: "w-full sm:max-w-md overflow-y-auto", children: [
|
|
14428
|
+
/* @__PURE__ */ jsxRuntime.jsxs(SheetHeader, { children: [
|
|
14429
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
14430
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { children: "Filter OFAC Checks" }),
|
|
14431
|
+
hasActiveFilters && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14432
|
+
Button,
|
|
14433
|
+
{
|
|
14434
|
+
variant: "ghost",
|
|
14435
|
+
size: "sm",
|
|
14436
|
+
onClick: onResetFilters,
|
|
14437
|
+
className: "h-8 px-2",
|
|
14438
|
+
children: [
|
|
14439
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "mr-1 h-4 w-4" }),
|
|
14440
|
+
"Clear all"
|
|
14441
|
+
]
|
|
14442
|
+
}
|
|
14443
|
+
)
|
|
14444
|
+
] }),
|
|
14445
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetDescription, { children: "Filter OFAC screening results by status, entity type, and date range" })
|
|
14446
|
+
] }),
|
|
14447
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6 mt-6", children: [
|
|
14448
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14449
|
+
EnhancedSelect,
|
|
14450
|
+
{
|
|
14451
|
+
label: "Status",
|
|
14452
|
+
placeholder: "All statuses",
|
|
14453
|
+
options: [
|
|
14454
|
+
{ value: "all", label: "All statuses" },
|
|
14455
|
+
{ value: "NO MATCH", label: "No Match" },
|
|
14456
|
+
{ value: "REVIEW", label: "Review" },
|
|
14457
|
+
{ value: "CLEARED", label: "Cleared" },
|
|
14458
|
+
{ value: "CONFIRMED", label: "Confirmed" }
|
|
14459
|
+
],
|
|
14460
|
+
value: filters.status || "all",
|
|
14461
|
+
onValueChange: (value) => onFilterChange("status", value === "all" ? "" : value)
|
|
14462
|
+
}
|
|
14463
|
+
),
|
|
14464
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14465
|
+
EnhancedSelect,
|
|
14466
|
+
{
|
|
14467
|
+
label: "Entity Type",
|
|
14468
|
+
placeholder: "All entity types",
|
|
14469
|
+
options: [
|
|
14470
|
+
{ value: "all", label: "All entity types" },
|
|
14471
|
+
{ value: "Business", label: "Business" },
|
|
14472
|
+
{ value: "Individual", label: "Individual" },
|
|
14473
|
+
{ value: "Counterparty", label: "Counterparty" }
|
|
14474
|
+
],
|
|
14475
|
+
value: filters.entityType || "all",
|
|
14476
|
+
onValueChange: (value) => onFilterChange("entityType", value === "all" ? "" : value)
|
|
14477
|
+
}
|
|
14478
|
+
),
|
|
14479
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14480
|
+
DatePicker,
|
|
14481
|
+
{
|
|
14482
|
+
date: filters.startDate,
|
|
14483
|
+
onDateChange: (date) => onFilterChange("startDate", date),
|
|
14484
|
+
label: "Start Date",
|
|
14485
|
+
placeholder: "MM/DD/YYYY"
|
|
14486
|
+
}
|
|
14487
|
+
),
|
|
14488
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14489
|
+
DatePicker,
|
|
14490
|
+
{
|
|
14491
|
+
date: filters.endDate,
|
|
14492
|
+
onDateChange: (date) => onFilterChange("endDate", date),
|
|
14493
|
+
label: "End Date",
|
|
14494
|
+
placeholder: "MM/DD/YYYY",
|
|
14495
|
+
disabledDates: (date) => filters.startDate ? date < filters.startDate : false
|
|
14496
|
+
}
|
|
14497
|
+
)
|
|
14498
|
+
] })
|
|
14499
|
+
] })
|
|
14500
|
+
] });
|
|
14501
|
+
}
|
|
14502
|
+
|
|
14503
|
+
// src/lib/mock-data/ofac-data.ts
|
|
14504
|
+
var mockOFACChecks = [
|
|
14505
|
+
{
|
|
14506
|
+
id: "ofac-001",
|
|
14507
|
+
created: "2024-01-15T10:30:00Z",
|
|
14508
|
+
entityId: "8112488",
|
|
14509
|
+
entityName: "Acme Corporation",
|
|
14510
|
+
entityType: "Business",
|
|
14511
|
+
alertId: "ALT-001",
|
|
14512
|
+
status: "CLEARED"
|
|
14513
|
+
},
|
|
14514
|
+
{
|
|
14515
|
+
id: "ofac-002",
|
|
14516
|
+
created: "2024-01-14T14:22:00Z",
|
|
14517
|
+
entityId: "8111609",
|
|
14518
|
+
entityName: "Global Tech Industries",
|
|
14519
|
+
entityType: "Business",
|
|
14520
|
+
alertId: "ALT-002",
|
|
14521
|
+
status: "REVIEW"
|
|
14522
|
+
},
|
|
14523
|
+
{
|
|
14524
|
+
id: "ofac-003",
|
|
14525
|
+
created: "2024-01-14T09:15:00Z",
|
|
14526
|
+
entityId: "IND-001",
|
|
14527
|
+
entityName: "John Smith",
|
|
14528
|
+
entityType: "Individual",
|
|
14529
|
+
alertId: null,
|
|
14530
|
+
status: "NO MATCH"
|
|
14531
|
+
},
|
|
14532
|
+
{
|
|
14533
|
+
id: "ofac-004",
|
|
14534
|
+
created: "2024-01-13T16:45:00Z",
|
|
14535
|
+
entityId: "8111026",
|
|
14536
|
+
entityName: "Innovation Partners LLC",
|
|
14537
|
+
entityType: "Business",
|
|
14538
|
+
alertId: "ALT-003",
|
|
14539
|
+
status: "CONFIRMED"
|
|
14540
|
+
},
|
|
14541
|
+
{
|
|
14542
|
+
id: "ofac-005",
|
|
14543
|
+
created: "2024-01-13T11:20:00Z",
|
|
14544
|
+
entityId: "IND-002",
|
|
14545
|
+
entityName: "Jane Doe",
|
|
14546
|
+
entityType: "Individual",
|
|
14547
|
+
alertId: null,
|
|
14548
|
+
status: "NO MATCH"
|
|
14549
|
+
},
|
|
14550
|
+
{
|
|
14551
|
+
id: "ofac-006",
|
|
14552
|
+
created: "2024-01-12T13:30:00Z",
|
|
14553
|
+
entityId: "CP-001",
|
|
14554
|
+
entityName: "International Suppliers Inc",
|
|
14555
|
+
entityType: "Counterparty",
|
|
14556
|
+
alertId: "ALT-004",
|
|
14557
|
+
status: "REVIEW"
|
|
14558
|
+
},
|
|
14559
|
+
{
|
|
14560
|
+
id: "ofac-007",
|
|
14561
|
+
created: "2024-01-12T08:00:00Z",
|
|
14562
|
+
entityId: "8110892",
|
|
14563
|
+
entityName: "NextGen Solutions",
|
|
14564
|
+
entityType: "Business",
|
|
14565
|
+
alertId: null,
|
|
14566
|
+
status: "NO MATCH"
|
|
14567
|
+
},
|
|
14568
|
+
{
|
|
14569
|
+
id: "ofac-008",
|
|
14570
|
+
created: "2024-01-11T15:10:00Z",
|
|
14571
|
+
entityId: "IND-003",
|
|
14572
|
+
entityName: "Robert Johnson",
|
|
14573
|
+
entityType: "Individual",
|
|
14574
|
+
alertId: "ALT-005",
|
|
14575
|
+
status: "CLEARED"
|
|
14576
|
+
},
|
|
14577
|
+
{
|
|
14578
|
+
id: "ofac-009",
|
|
14579
|
+
created: "2024-01-11T10:45:00Z",
|
|
14580
|
+
entityId: "CP-002",
|
|
14581
|
+
entityName: "Overseas Trading Company",
|
|
14582
|
+
entityType: "Counterparty",
|
|
14583
|
+
alertId: "ALT-006",
|
|
14584
|
+
status: "REVIEW"
|
|
14585
|
+
},
|
|
14586
|
+
{
|
|
14587
|
+
id: "ofac-010",
|
|
14588
|
+
created: "2024-01-10T14:25:00Z",
|
|
14589
|
+
entityId: "8110654",
|
|
14590
|
+
entityName: "Digital Ventures Group",
|
|
14591
|
+
entityType: "Business",
|
|
14592
|
+
alertId: null,
|
|
14593
|
+
status: "NO MATCH"
|
|
14594
|
+
}
|
|
14595
|
+
];
|
|
14596
|
+
var getStatusVariant = (status) => {
|
|
14597
|
+
switch (status) {
|
|
14598
|
+
case "NO MATCH":
|
|
14599
|
+
return "success";
|
|
14600
|
+
case "REVIEW":
|
|
14601
|
+
return "warning";
|
|
14602
|
+
case "CLEARED":
|
|
14603
|
+
return "active";
|
|
14604
|
+
case "CONFIRMED":
|
|
14605
|
+
return "destructive";
|
|
14606
|
+
default:
|
|
14607
|
+
return "secondary";
|
|
14608
|
+
}
|
|
14609
|
+
};
|
|
14610
|
+
var getEntityUrl = (entityType, entityId) => {
|
|
14611
|
+
switch (entityType) {
|
|
14612
|
+
case "Business":
|
|
14613
|
+
return `/business/${entityId}`;
|
|
14614
|
+
case "Individual":
|
|
14615
|
+
return `/individual/${entityId}`;
|
|
14616
|
+
case "Counterparty":
|
|
14617
|
+
return `/counterparty/${entityId}`;
|
|
14618
|
+
default:
|
|
14619
|
+
return "#";
|
|
14620
|
+
}
|
|
14621
|
+
};
|
|
14622
|
+
function OFAC() {
|
|
14623
|
+
const navigate = reactRouterDom.useNavigate();
|
|
14624
|
+
const [sortField, setSortField] = React15.useState("created");
|
|
14625
|
+
const [sortDirection, setSortDirection] = React15.useState("desc");
|
|
14626
|
+
const [filters, setFilters] = React15.useState({
|
|
14627
|
+
status: "",
|
|
14628
|
+
entityType: "",
|
|
14629
|
+
startDate: void 0,
|
|
14630
|
+
endDate: void 0
|
|
14631
|
+
});
|
|
14632
|
+
const handleFilterChange = (field, value) => {
|
|
14633
|
+
setFilters((prev) => ({ ...prev, [field]: value }));
|
|
14634
|
+
};
|
|
14635
|
+
const handleResetFilters = () => {
|
|
14636
|
+
setFilters({
|
|
14637
|
+
status: "",
|
|
14638
|
+
entityType: "",
|
|
14639
|
+
startDate: void 0,
|
|
14640
|
+
endDate: void 0
|
|
14641
|
+
});
|
|
14642
|
+
};
|
|
14643
|
+
const handleSort = (field) => {
|
|
14644
|
+
if (sortField === field) {
|
|
14645
|
+
setSortDirection(sortDirection === "asc" ? "desc" : "asc");
|
|
14646
|
+
} else {
|
|
14647
|
+
setSortField(field);
|
|
14648
|
+
setSortDirection("desc");
|
|
14649
|
+
}
|
|
14650
|
+
};
|
|
14651
|
+
const filteredChecks = React15.useMemo(() => {
|
|
14652
|
+
return mockOFACChecks.filter((check) => {
|
|
14653
|
+
if (filters.status && check.status !== filters.status) {
|
|
14654
|
+
return false;
|
|
14655
|
+
}
|
|
14656
|
+
if (filters.entityType && check.entityType !== filters.entityType) {
|
|
14657
|
+
return false;
|
|
14658
|
+
}
|
|
14659
|
+
if (filters.startDate || filters.endDate) {
|
|
14660
|
+
const checkDate = dateFns.parseISO(check.created);
|
|
14661
|
+
if (filters.startDate && dateFns.isBefore(checkDate, dateFns.startOfDay(filters.startDate))) {
|
|
14662
|
+
return false;
|
|
14663
|
+
}
|
|
14664
|
+
if (filters.endDate && dateFns.isAfter(checkDate, dateFns.endOfDay(filters.endDate))) {
|
|
14665
|
+
return false;
|
|
14666
|
+
}
|
|
14667
|
+
}
|
|
14668
|
+
return true;
|
|
14669
|
+
});
|
|
14670
|
+
}, [filters]);
|
|
14671
|
+
const sortedChecks = [...filteredChecks].sort((a, b) => {
|
|
14672
|
+
const aValue = a[sortField];
|
|
14673
|
+
const bValue = b[sortField];
|
|
14674
|
+
if (aValue == null) return 1;
|
|
14675
|
+
if (bValue == null) return -1;
|
|
14676
|
+
if (sortDirection === "asc") {
|
|
14677
|
+
return aValue > bValue ? 1 : -1;
|
|
14678
|
+
} else {
|
|
14679
|
+
return aValue < bValue ? 1 : -1;
|
|
14680
|
+
}
|
|
14681
|
+
});
|
|
14682
|
+
const columns3 = [
|
|
14683
|
+
{
|
|
14684
|
+
key: "created",
|
|
14685
|
+
title: "Created",
|
|
14686
|
+
sortable: true,
|
|
14687
|
+
render: (value) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: dateFns.format(dateFns.parseISO(value), "MMM d, yyyy h:mm a") })
|
|
14688
|
+
},
|
|
14689
|
+
{
|
|
14690
|
+
key: "entityName",
|
|
14691
|
+
title: "Entity",
|
|
14692
|
+
render: (value, row) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
14693
|
+
"button",
|
|
14694
|
+
{
|
|
14695
|
+
onClick: () => navigate(getEntityUrl(row.entityType, row.entityId)),
|
|
14696
|
+
className: "text-sm text-primary hover:underline font-medium",
|
|
14697
|
+
children: value
|
|
14698
|
+
}
|
|
14699
|
+
)
|
|
14700
|
+
},
|
|
14701
|
+
{
|
|
14702
|
+
key: "entityType",
|
|
14703
|
+
title: "Entity Type",
|
|
14704
|
+
sortable: true,
|
|
14705
|
+
render: (value) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: value })
|
|
14706
|
+
},
|
|
14707
|
+
{
|
|
14708
|
+
key: "alertId",
|
|
14709
|
+
title: "Alert ID",
|
|
14710
|
+
render: (value) => value ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
14711
|
+
"button",
|
|
14712
|
+
{
|
|
14713
|
+
onClick: () => navigate(`/alerts/${value}`),
|
|
14714
|
+
className: "text-sm text-primary hover:underline font-medium",
|
|
14715
|
+
children: value
|
|
14716
|
+
}
|
|
14717
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: "\u2014" })
|
|
14718
|
+
},
|
|
14719
|
+
{
|
|
14720
|
+
key: "status",
|
|
14721
|
+
title: "Status",
|
|
14722
|
+
sortable: true,
|
|
14723
|
+
render: (value) => /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: getStatusVariant(value), children: value })
|
|
14724
|
+
}
|
|
14725
|
+
];
|
|
14726
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col h-screen bg-gradient-subtle", children: [
|
|
14727
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container mx-auto px-4 py-6 max-w-none", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
14728
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-bold text-foreground", children: "OFAC Checks" }) }),
|
|
14729
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14730
|
+
OFACFiltersSheet,
|
|
14731
|
+
{
|
|
14732
|
+
filters,
|
|
14733
|
+
onFilterChange: handleFilterChange,
|
|
14734
|
+
onResetFilters: handleResetFilters
|
|
14735
|
+
}
|
|
14736
|
+
)
|
|
14737
|
+
] }) }) }),
|
|
14738
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container mx-auto px-4 h-full max-w-none flex flex-col", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 mt-4 overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14739
|
+
DataTable,
|
|
14740
|
+
{
|
|
14741
|
+
columns: columns3,
|
|
14742
|
+
data: sortedChecks,
|
|
14743
|
+
sortBy: sortField,
|
|
14744
|
+
sortDirection,
|
|
14745
|
+
onSort: handleSort
|
|
14746
|
+
}
|
|
14747
|
+
) }) }) })
|
|
14748
|
+
] });
|
|
14749
|
+
}
|
|
14011
14750
|
|
|
14012
14751
|
exports.ACHBankCard = ACHBankCard;
|
|
14013
14752
|
exports.ACHBasicInfoCard = ACHBasicInfoCard;
|
|
@@ -14112,6 +14851,7 @@ exports.MainLayout = MainLayout;
|
|
|
14112
14851
|
exports.MetricCard = MetricCard;
|
|
14113
14852
|
exports.NewTransaction = NewTransaction;
|
|
14114
14853
|
exports.NotFound = NotFound_default;
|
|
14854
|
+
exports.OFAC = OFAC;
|
|
14115
14855
|
exports.OFACAlertView = OFACAlertView;
|
|
14116
14856
|
exports.OriginatorCard = OriginatorCard;
|
|
14117
14857
|
exports.OriginatorFI = OriginatorFI;
|