braid-ui 1.0.9 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3198 -798
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +53 -6
- package/dist/index.d.ts +53 -6
- package/dist/index.js +3195 -798
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -259,14 +259,14 @@ var FormCard = React15__namespace.forwardRef(
|
|
|
259
259
|
CardHeader,
|
|
260
260
|
{
|
|
261
261
|
direction: headerActions ? "row" : "column",
|
|
262
|
-
size: "
|
|
262
|
+
size: "sm",
|
|
263
263
|
children: [
|
|
264
264
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1", children: /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { size: "md", children: title }) }),
|
|
265
265
|
headerActions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: headerActions })
|
|
266
266
|
]
|
|
267
267
|
}
|
|
268
268
|
),
|
|
269
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { size: "
|
|
269
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { size: "sm", fullHeight: true, children })
|
|
270
270
|
]
|
|
271
271
|
}
|
|
272
272
|
)
|
|
@@ -2885,25 +2885,9 @@ var navigationItems = [
|
|
|
2885
2885
|
icon: lucideReact.Building2
|
|
2886
2886
|
},
|
|
2887
2887
|
{
|
|
2888
|
-
title: "
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
{
|
|
2892
|
-
title: "Management",
|
|
2893
|
-
url: "/counterparty/manage",
|
|
2894
|
-
icon: lucideReact.FileCheck
|
|
2895
|
-
},
|
|
2896
|
-
{
|
|
2897
|
-
title: "Create Counterparty",
|
|
2898
|
-
url: "/counterparty/create",
|
|
2899
|
-
icon: lucideReact.Receipt
|
|
2900
|
-
},
|
|
2901
|
-
{
|
|
2902
|
-
title: "Domestic Wire",
|
|
2903
|
-
url: "/counterparty/domestic-wire",
|
|
2904
|
-
icon: lucideReact.Zap
|
|
2905
|
-
}
|
|
2906
|
-
]
|
|
2888
|
+
title: "Counterparties",
|
|
2889
|
+
url: "/counterparty",
|
|
2890
|
+
icon: lucideReact.Briefcase
|
|
2907
2891
|
},
|
|
2908
2892
|
{
|
|
2909
2893
|
title: "Accounts",
|
|
@@ -3044,7 +3028,7 @@ function AppSidebar() {
|
|
|
3044
3028
|
);
|
|
3045
3029
|
};
|
|
3046
3030
|
return /* @__PURE__ */ jsxRuntime.jsxs(Sidebar, { collapsible: "icon", children: [
|
|
3047
|
-
/* @__PURE__ */ jsxRuntime.jsx(SidebarHeader, { className: "border-b border-sidebar-border", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2 px-4 py-
|
|
3031
|
+
/* @__PURE__ */ jsxRuntime.jsx(SidebarHeader, { className: "border-b border-sidebar-border", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2 px-4 py-6", children: [
|
|
3048
3032
|
state !== "collapsed" ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: braid_logo_default, alt: "Braid", className: "h-8" }) : /* @__PURE__ */ jsxRuntime.jsx("img", { src: braid_logo_default, alt: "Braid", className: "h-6" }),
|
|
3049
3033
|
/* @__PURE__ */ jsxRuntime.jsx(SidebarTrigger, {})
|
|
3050
3034
|
] }) }),
|
|
@@ -3106,7 +3090,7 @@ function AppSidebar() {
|
|
|
3106
3090
|
] });
|
|
3107
3091
|
}
|
|
3108
3092
|
var MainLayout = ({ children }) => {
|
|
3109
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-h-screen w-full", children: /* @__PURE__ */ jsxRuntime.jsx("main", { className: "flex-1
|
|
3093
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-h-screen w-full", children: /* @__PURE__ */ jsxRuntime.jsx("main", { className: "flex-1", children }) });
|
|
3110
3094
|
};
|
|
3111
3095
|
var useEditState = ({ initialEditing = false, onToggleEdit, onSave, onCancel }) => {
|
|
3112
3096
|
const [localEditing, setLocalEditing] = React15.useState(initialEditing);
|
|
@@ -3472,6 +3456,13 @@ zod.z.object({
|
|
|
3472
3456
|
lastOFACDate: zod.z.string(),
|
|
3473
3457
|
lastOFACStatus: zod.z.string()
|
|
3474
3458
|
});
|
|
3459
|
+
zod.z.object({
|
|
3460
|
+
status: zod.z.enum(["ACTIVE", "INACTIVE", "PENDING", "SUSPENDED"]),
|
|
3461
|
+
cipStatus: zod.z.enum(["verified", "pending", "not_started"]),
|
|
3462
|
+
createdAt: zod.z.string(),
|
|
3463
|
+
updatedAt: zod.z.string(),
|
|
3464
|
+
lastOFACCheck: zod.z.string().optional()
|
|
3465
|
+
});
|
|
3475
3466
|
var wireBasicInfoSchema = zod.z.object({
|
|
3476
3467
|
counterpartyName: zod.z.string().min(1, "Counterparty name is required"),
|
|
3477
3468
|
shortName: zod.z.string().min(1, "Short name is required"),
|
|
@@ -3512,6 +3503,14 @@ var businessProfileSchema = zod.z.object({
|
|
|
3512
3503
|
idType: zod.z.string().optional(),
|
|
3513
3504
|
incorporationState: zod.z.string().optional(),
|
|
3514
3505
|
website: zod.z.string().url("Invalid URL format").optional().or(zod.z.literal("")),
|
|
3506
|
+
email: zod.z.string().email("Invalid email format").optional().or(zod.z.literal("")),
|
|
3507
|
+
mobilePhone: zod.z.string().optional(),
|
|
3508
|
+
mcc: zod.z.string().regex(/^\d{4}$/, "MCC must be 4 digits").optional().or(zod.z.literal("")),
|
|
3509
|
+
naics: zod.z.string().regex(/^\d{6}$/, "NAICS must be 6 digits").optional().or(zod.z.literal("")),
|
|
3510
|
+
achCompanyId: zod.z.string().regex(/^\d{10}$/, "ACH Company ID must be 10 digits").optional().or(zod.z.literal("")),
|
|
3511
|
+
achCompanyName: zod.z.string().optional(),
|
|
3512
|
+
externalId: zod.z.string().uuid("Invalid UUID format").optional().or(zod.z.literal("")),
|
|
3513
|
+
productId: zod.z.coerce.number().optional(),
|
|
3515
3514
|
contactFirstName: zod.z.string().optional(),
|
|
3516
3515
|
contactLastName: zod.z.string().optional(),
|
|
3517
3516
|
contactEmail: zod.z.string().optional(),
|
|
@@ -3669,74 +3668,68 @@ var AddressForm = ({
|
|
|
3669
3668
|
showApartment = false
|
|
3670
3669
|
}) => {
|
|
3671
3670
|
const addressTypeLabel = fieldPrefix ? `${fieldPrefix} Address Type` : "Address Type";
|
|
3672
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
3673
|
-
/* @__PURE__ */ jsxRuntime.
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
placeholder: "Select type",
|
|
3735
|
-
options: addressTypeOptions
|
|
3736
|
-
}
|
|
3737
|
-
)
|
|
3738
|
-
] }) })
|
|
3739
|
-
] });
|
|
3671
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
3672
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3673
|
+
EnhancedInput,
|
|
3674
|
+
{
|
|
3675
|
+
label: "Street Address",
|
|
3676
|
+
placeholder: "Enter street address",
|
|
3677
|
+
hint: fieldPrefix ? `${fieldPrefix} street address` : "Primary street address",
|
|
3678
|
+
...fieldOverrides.streetAddress
|
|
3679
|
+
}
|
|
3680
|
+
),
|
|
3681
|
+
showApartment && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3682
|
+
EnhancedInput,
|
|
3683
|
+
{
|
|
3684
|
+
label: "Apt, Building etc",
|
|
3685
|
+
placeholder: "Additional address information",
|
|
3686
|
+
hint: "Additional address information",
|
|
3687
|
+
...fieldOverrides.apartment
|
|
3688
|
+
}
|
|
3689
|
+
),
|
|
3690
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3691
|
+
EnhancedInput,
|
|
3692
|
+
{
|
|
3693
|
+
label: "City",
|
|
3694
|
+
placeholder: "Enter city",
|
|
3695
|
+
required: true,
|
|
3696
|
+
...fieldOverrides.city
|
|
3697
|
+
}
|
|
3698
|
+
),
|
|
3699
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3700
|
+
EnhancedInput,
|
|
3701
|
+
{
|
|
3702
|
+
label: "State",
|
|
3703
|
+
placeholder: "Enter state",
|
|
3704
|
+
hint: "State or province",
|
|
3705
|
+
...fieldOverrides.state
|
|
3706
|
+
}
|
|
3707
|
+
),
|
|
3708
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3709
|
+
EnhancedInput,
|
|
3710
|
+
{
|
|
3711
|
+
label: "Postal Code",
|
|
3712
|
+
placeholder: "12345",
|
|
3713
|
+
...fieldOverrides.postalCode
|
|
3714
|
+
}
|
|
3715
|
+
),
|
|
3716
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3717
|
+
EnhancedSelect,
|
|
3718
|
+
{
|
|
3719
|
+
label: "Country Code",
|
|
3720
|
+
placeholder: "Select country",
|
|
3721
|
+
options: COUNTRY_OPTIONS
|
|
3722
|
+
}
|
|
3723
|
+
),
|
|
3724
|
+
showAddressType && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3725
|
+
EnhancedSelect,
|
|
3726
|
+
{
|
|
3727
|
+
label: addressTypeLabel,
|
|
3728
|
+
placeholder: "Select type",
|
|
3729
|
+
options: addressTypeOptions
|
|
3730
|
+
}
|
|
3731
|
+
)
|
|
3732
|
+
] }) });
|
|
3740
3733
|
};
|
|
3741
3734
|
var BankingDetailsCard = ({ isEditing, onToggleEdit, className }) => {
|
|
3742
3735
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4207,6 +4200,14 @@ var defaultBusinessProfile = {
|
|
|
4207
4200
|
idType: "EIN",
|
|
4208
4201
|
incorporationState: "Delaware",
|
|
4209
4202
|
website: "https://acme.com",
|
|
4203
|
+
email: "contact@acme.com",
|
|
4204
|
+
mobilePhone: "+1 (555) 234-5678",
|
|
4205
|
+
mcc: "1234",
|
|
4206
|
+
naics: "123456",
|
|
4207
|
+
achCompanyId: "1234567890",
|
|
4208
|
+
achCompanyName: "Acme Corporation",
|
|
4209
|
+
externalId: "c48c9834-ccdd-42df-bd56-1022df37341b",
|
|
4210
|
+
productId: 1,
|
|
4210
4211
|
address: {
|
|
4211
4212
|
streetAddress: "123 Business Avenue",
|
|
4212
4213
|
apartment: "Suite 100",
|
|
@@ -4219,12 +4220,14 @@ var defaultBusinessProfile = {
|
|
|
4219
4220
|
};
|
|
4220
4221
|
var BusinessProfileCard = ({
|
|
4221
4222
|
data,
|
|
4223
|
+
identityVerification,
|
|
4222
4224
|
onDataChange,
|
|
4223
4225
|
isEditing,
|
|
4224
4226
|
onToggleEdit,
|
|
4225
4227
|
className,
|
|
4226
4228
|
hideActions
|
|
4227
4229
|
}) => {
|
|
4230
|
+
const [showResultDialog, setShowResultDialog] = React15.useState(false);
|
|
4228
4231
|
const form = useFormWithEditState({
|
|
4229
4232
|
schema: businessProfileSchema,
|
|
4230
4233
|
defaultValues: { ...defaultBusinessProfile, ...data },
|
|
@@ -4232,7 +4235,7 @@ var BusinessProfileCard = ({
|
|
|
4232
4235
|
onToggleEdit,
|
|
4233
4236
|
onSave: onDataChange
|
|
4234
4237
|
});
|
|
4235
|
-
const editContent = /* @__PURE__ */ jsxRuntime.jsx(FormProvider, { form, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-
|
|
4238
|
+
const editContent = /* @__PURE__ */ jsxRuntime.jsx(FormProvider, { form, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
4236
4239
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
4237
4240
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4238
4241
|
FormInput,
|
|
@@ -4313,6 +4316,25 @@ var BusinessProfileCard = ({
|
|
|
4313
4316
|
}
|
|
4314
4317
|
)
|
|
4315
4318
|
] }),
|
|
4319
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
4320
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4321
|
+
FormInput,
|
|
4322
|
+
{
|
|
4323
|
+
name: "email",
|
|
4324
|
+
label: "Business Email",
|
|
4325
|
+
type: "email",
|
|
4326
|
+
placeholder: "Enter business email"
|
|
4327
|
+
}
|
|
4328
|
+
),
|
|
4329
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4330
|
+
FormInput,
|
|
4331
|
+
{
|
|
4332
|
+
name: "mobilePhone",
|
|
4333
|
+
label: "Business Phone",
|
|
4334
|
+
placeholder: "Enter business phone"
|
|
4335
|
+
}
|
|
4336
|
+
)
|
|
4337
|
+
] }),
|
|
4316
4338
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4", children: [
|
|
4317
4339
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4318
4340
|
FormInput,
|
|
@@ -4365,6 +4387,65 @@ var BusinessProfileCard = ({
|
|
|
4365
4387
|
}
|
|
4366
4388
|
)
|
|
4367
4389
|
] }),
|
|
4390
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
4391
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4392
|
+
FormInput,
|
|
4393
|
+
{
|
|
4394
|
+
name: "mcc",
|
|
4395
|
+
label: "MCC",
|
|
4396
|
+
placeholder: "4-digit code",
|
|
4397
|
+
hint: "Merchant Category Code"
|
|
4398
|
+
}
|
|
4399
|
+
),
|
|
4400
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4401
|
+
FormInput,
|
|
4402
|
+
{
|
|
4403
|
+
name: "naics",
|
|
4404
|
+
label: "NAICS",
|
|
4405
|
+
placeholder: "6-digit code",
|
|
4406
|
+
hint: "North American Industry Classification System"
|
|
4407
|
+
}
|
|
4408
|
+
)
|
|
4409
|
+
] }),
|
|
4410
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
4411
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4412
|
+
FormInput,
|
|
4413
|
+
{
|
|
4414
|
+
name: "achCompanyId",
|
|
4415
|
+
label: "ACH Company ID",
|
|
4416
|
+
placeholder: "10-digit company ID"
|
|
4417
|
+
}
|
|
4418
|
+
),
|
|
4419
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4420
|
+
FormInput,
|
|
4421
|
+
{
|
|
4422
|
+
name: "achCompanyName",
|
|
4423
|
+
label: "ACH Company Name",
|
|
4424
|
+
placeholder: "Enter ACH company name"
|
|
4425
|
+
}
|
|
4426
|
+
)
|
|
4427
|
+
] }),
|
|
4428
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
4429
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4430
|
+
FormInput,
|
|
4431
|
+
{
|
|
4432
|
+
name: "externalId",
|
|
4433
|
+
label: "External ID",
|
|
4434
|
+
placeholder: "UUID",
|
|
4435
|
+
disabled: true
|
|
4436
|
+
}
|
|
4437
|
+
),
|
|
4438
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4439
|
+
FormInput,
|
|
4440
|
+
{
|
|
4441
|
+
name: "productId",
|
|
4442
|
+
label: "Product ID",
|
|
4443
|
+
type: "number",
|
|
4444
|
+
placeholder: "Product ID",
|
|
4445
|
+
disabled: true
|
|
4446
|
+
}
|
|
4447
|
+
)
|
|
4448
|
+
] }),
|
|
4368
4449
|
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Contact Person" }),
|
|
4369
4450
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
4370
4451
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4403,40 +4484,94 @@ var BusinessProfileCard = ({
|
|
|
4403
4484
|
] })
|
|
4404
4485
|
] }) });
|
|
4405
4486
|
const formValues = form.watch();
|
|
4406
|
-
const
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
/* @__PURE__ */ jsxRuntime.
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
/* @__PURE__ */ jsxRuntime.
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
/* @__PURE__ */ jsxRuntime.
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
/* @__PURE__ */ jsxRuntime.
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
{
|
|
4426
|
-
label: "
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4487
|
+
const kycBy = identityVerification?.isDeveloperInitiated ? "Fintech" : "Bank";
|
|
4488
|
+
const viewContent = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4489
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
4490
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
4491
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Legal Name", value: formValues?.legalName || "-", layout: "horizontal" }),
|
|
4492
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "DBA Name", value: formValues?.dbaName || "-", layout: "horizontal" })
|
|
4493
|
+
] }),
|
|
4494
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
4495
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Business Type", value: formValues?.businessType || "-", layout: "horizontal" }),
|
|
4496
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Tax ID", value: formValues?.taxId || "-", layout: "horizontal" })
|
|
4497
|
+
] }),
|
|
4498
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
4499
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Formation Date", value: formValues?.formationDate || "-", layout: "horizontal" }),
|
|
4500
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ID Type", value: formValues?.idType || "-", layout: "horizontal" })
|
|
4501
|
+
] }),
|
|
4502
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
4503
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Incorporation State", value: formValues?.incorporationState || "-", layout: "horizontal" }),
|
|
4504
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Website", value: formValues?.website || "-", layout: "horizontal" })
|
|
4505
|
+
] }),
|
|
4506
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
4507
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Business Email", value: formValues?.email || "-", layout: "horizontal" }),
|
|
4508
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Business Phone", value: formValues?.mobilePhone || "-", layout: "horizontal" })
|
|
4509
|
+
] }),
|
|
4510
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
4511
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4512
|
+
InfoField,
|
|
4513
|
+
{
|
|
4514
|
+
label: "KYC by",
|
|
4515
|
+
value: identityVerification ? /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: identityVerification.isDeveloperInitiated ? "business" : "government", children: kycBy }) : "-",
|
|
4516
|
+
layout: "horizontal"
|
|
4517
|
+
}
|
|
4518
|
+
),
|
|
4519
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4520
|
+
InfoField,
|
|
4521
|
+
{
|
|
4522
|
+
label: "Provider",
|
|
4523
|
+
value: identityVerification ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
4524
|
+
"button",
|
|
4525
|
+
{
|
|
4526
|
+
onClick: () => setShowResultDialog(true),
|
|
4527
|
+
className: "text-primary hover:underline font-medium",
|
|
4528
|
+
children: identityVerification.provider
|
|
4529
|
+
}
|
|
4530
|
+
) : "-",
|
|
4531
|
+
layout: "horizontal"
|
|
4532
|
+
}
|
|
4533
|
+
)
|
|
4534
|
+
] }),
|
|
4535
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4536
|
+
InfoField,
|
|
4537
|
+
{
|
|
4538
|
+
label: "Address",
|
|
4539
|
+
value: formValues?.address ? `${formValues.address.streetAddress}${formValues.address.apartment ? ", " + formValues.address.apartment : ""}, ${formValues.address.city}, ${formValues.address.state} ${formValues.address.postalCode}, ${formValues.address.country}` : "-",
|
|
4540
|
+
layout: "horizontal"
|
|
4541
|
+
}
|
|
4542
|
+
),
|
|
4543
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
4544
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "MCC", value: formValues?.mcc || "-", layout: "horizontal" }),
|
|
4545
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "NAICS", value: formValues?.naics || "-", layout: "horizontal" })
|
|
4546
|
+
] }),
|
|
4547
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
4548
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ACH Company ID", value: formValues?.achCompanyId || "-", layout: "horizontal" }),
|
|
4549
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ACH Company Name", value: formValues?.achCompanyName || "-", layout: "horizontal" })
|
|
4550
|
+
] }),
|
|
4551
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
4552
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "External ID", value: formValues?.externalId || "-", layout: "horizontal" }),
|
|
4553
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Product ID", value: formValues?.productId?.toString() || "-", layout: "horizontal" })
|
|
4554
|
+
] }),
|
|
4555
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Contact Person" }),
|
|
4556
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
4557
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "First Name", value: formValues?.contactFirstName || "-", layout: "horizontal" }),
|
|
4558
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Last Name", value: formValues?.contactLastName || "-", layout: "horizontal" })
|
|
4559
|
+
] }),
|
|
4560
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
4561
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Email", value: formValues?.contactEmail || "-", layout: "horizontal" }),
|
|
4562
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Phone Number", value: formValues?.contactPhone || "-", layout: "horizontal" })
|
|
4563
|
+
] })
|
|
4435
4564
|
] }),
|
|
4436
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4437
|
-
/* @__PURE__ */ jsxRuntime.
|
|
4438
|
-
|
|
4439
|
-
|
|
4565
|
+
/* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: showResultDialog, onOpenChange: setShowResultDialog, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "max-w-3xl max-h-[80vh] overflow-y-auto", children: [
|
|
4566
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
|
|
4567
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogTitle, { children: [
|
|
4568
|
+
"Provider Result - ",
|
|
4569
|
+
identityVerification?.provider || "-"
|
|
4570
|
+
] }),
|
|
4571
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogDescription, { children: "KYC verification result from the provider" })
|
|
4572
|
+
] }),
|
|
4573
|
+
/* @__PURE__ */ jsxRuntime.jsx(JsonViewer, { data: identityVerification?.result || {} })
|
|
4574
|
+
] }) })
|
|
4440
4575
|
] });
|
|
4441
4576
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4442
4577
|
EditableFormCard,
|
|
@@ -4590,7 +4725,10 @@ var CounterpartyBasicInfo = ({ onDataChange }) => {
|
|
|
4590
4725
|
type: "business",
|
|
4591
4726
|
email: "",
|
|
4592
4727
|
phone: "",
|
|
4593
|
-
|
|
4728
|
+
dateOfBirth: "",
|
|
4729
|
+
idNumber: "",
|
|
4730
|
+
idType: "product_id",
|
|
4731
|
+
idValue: ""
|
|
4594
4732
|
});
|
|
4595
4733
|
const handleInputChange = (field, value) => {
|
|
4596
4734
|
const updatedData = { ...formData, [field]: value };
|
|
@@ -4601,11 +4739,7 @@ var CounterpartyBasicInfo = ({ onDataChange }) => {
|
|
|
4601
4739
|
handleInputChange("type", type);
|
|
4602
4740
|
};
|
|
4603
4741
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
4604
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
4605
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Basic Information" }),
|
|
4606
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: "Enter the basic details for the counterparty" })
|
|
4607
|
-
] }),
|
|
4608
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
4742
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
4609
4743
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4610
4744
|
EnhancedInput,
|
|
4611
4745
|
{
|
|
@@ -4616,9 +4750,9 @@ var CounterpartyBasicInfo = ({ onDataChange }) => {
|
|
|
4616
4750
|
required: true
|
|
4617
4751
|
}
|
|
4618
4752
|
),
|
|
4619
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-
|
|
4753
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
4620
4754
|
/* @__PURE__ */ jsxRuntime.jsx(Label, { className: "text-sm font-medium", children: "Counterparty Type" }),
|
|
4621
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-6", children: [
|
|
4755
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-6 h-10 items-center", children: [
|
|
4622
4756
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center space-x-2 cursor-pointer", children: [
|
|
4623
4757
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4624
4758
|
"input",
|
|
@@ -4649,57 +4783,89 @@ var CounterpartyBasicInfo = ({ onDataChange }) => {
|
|
|
4649
4783
|
] })
|
|
4650
4784
|
] })
|
|
4651
4785
|
] }),
|
|
4652
|
-
/* @__PURE__ */ jsxRuntime.
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
{
|
|
4667
|
-
label: "Phone Number",
|
|
4668
|
-
type: "tel",
|
|
4669
|
-
value: formData.phone,
|
|
4670
|
-
onChange: (e) => handleInputChange("phone", e.target.value),
|
|
4671
|
-
placeholder: "Enter phone number",
|
|
4672
|
-
required: true
|
|
4673
|
-
}
|
|
4674
|
-
)
|
|
4675
|
-
] }),
|
|
4786
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4787
|
+
EnhancedSelect,
|
|
4788
|
+
{
|
|
4789
|
+
label: "Associated with",
|
|
4790
|
+
value: formData.idType,
|
|
4791
|
+
onValueChange: (value) => handleInputChange("idType", value),
|
|
4792
|
+
options: [
|
|
4793
|
+
{ value: "product_id", label: "Product ID" },
|
|
4794
|
+
{ value: "business_id", label: "Business ID" },
|
|
4795
|
+
{ value: "individual_id", label: "Individual ID" },
|
|
4796
|
+
{ value: "account_number", label: "Account Number" }
|
|
4797
|
+
]
|
|
4798
|
+
}
|
|
4799
|
+
),
|
|
4676
4800
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4677
4801
|
EnhancedInput,
|
|
4678
4802
|
{
|
|
4679
|
-
label: "Product ID",
|
|
4680
|
-
value: formData.
|
|
4681
|
-
|
|
4682
|
-
|
|
4803
|
+
label: formData.idType === "product_id" ? "Product ID" : formData.idType === "business_id" ? "Business ID" : formData.idType === "individual_id" ? "Individual ID" : "Account Number",
|
|
4804
|
+
value: formData.idValue,
|
|
4805
|
+
onChange: (e) => handleInputChange("idValue", e.target.value),
|
|
4806
|
+
placeholder: `Enter ${formData.idType === "product_id" ? "product ID" : formData.idType === "business_id" ? "business ID" : formData.idType === "individual_id" ? "individual ID" : "account number"}`,
|
|
4807
|
+
required: true
|
|
4683
4808
|
}
|
|
4684
4809
|
)
|
|
4685
|
-
] })
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4810
|
+
] }),
|
|
4811
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
4812
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4813
|
+
EnhancedInput,
|
|
4814
|
+
{
|
|
4815
|
+
label: "Email",
|
|
4816
|
+
type: "email",
|
|
4817
|
+
value: formData.email,
|
|
4818
|
+
onChange: (e) => handleInputChange("email", e.target.value),
|
|
4819
|
+
placeholder: "Enter email address"
|
|
4820
|
+
}
|
|
4821
|
+
),
|
|
4822
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4823
|
+
EnhancedInput,
|
|
4824
|
+
{
|
|
4825
|
+
label: "Phone Number",
|
|
4826
|
+
type: "tel",
|
|
4827
|
+
value: formData.phone,
|
|
4828
|
+
onChange: (e) => handleInputChange("phone", e.target.value),
|
|
4829
|
+
placeholder: "Enter phone number"
|
|
4830
|
+
}
|
|
4831
|
+
),
|
|
4832
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4833
|
+
EnhancedInput,
|
|
4834
|
+
{
|
|
4835
|
+
label: "Date of Birth",
|
|
4836
|
+
type: "date",
|
|
4837
|
+
value: formData.dateOfBirth,
|
|
4838
|
+
onChange: (e) => handleInputChange("dateOfBirth", e.target.value),
|
|
4839
|
+
placeholder: "Select date of birth"
|
|
4840
|
+
}
|
|
4841
|
+
),
|
|
4842
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4843
|
+
EnhancedInput,
|
|
4844
|
+
{
|
|
4845
|
+
label: "ID Number",
|
|
4846
|
+
value: formData.idNumber,
|
|
4847
|
+
onChange: (e) => handleInputChange("idNumber", e.target.value),
|
|
4848
|
+
placeholder: "Enter ID number"
|
|
4849
|
+
}
|
|
4850
|
+
)
|
|
4851
|
+
] })
|
|
4852
|
+
] });
|
|
4853
|
+
};
|
|
4854
|
+
var spacingClasses = {
|
|
4855
|
+
sm: "space-y-3",
|
|
4856
|
+
md: "space-y-4",
|
|
4857
|
+
lg: "space-y-6"
|
|
4858
|
+
};
|
|
4859
|
+
var gridClasses = {
|
|
4860
|
+
1: "grid-cols-1",
|
|
4861
|
+
2: "grid-cols-1 md:grid-cols-2",
|
|
4862
|
+
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
|
|
4863
|
+
4: "grid-cols-1 md:grid-cols-2 lg:grid-cols-4"
|
|
4864
|
+
};
|
|
4865
|
+
var FormSection = React15__namespace.forwardRef(
|
|
4866
|
+
({
|
|
4867
|
+
title,
|
|
4868
|
+
description,
|
|
4703
4869
|
children,
|
|
4704
4870
|
className,
|
|
4705
4871
|
spacing: spacing2 = "md",
|
|
@@ -4930,79 +5096,88 @@ var OriginatorCard = ({ isEditing, onToggleEdit, className, hideActions }) => {
|
|
|
4930
5096
|
}
|
|
4931
5097
|
);
|
|
4932
5098
|
};
|
|
4933
|
-
var
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
}
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5099
|
+
var SimpleACHForm = () => {
|
|
5100
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
5101
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5102
|
+
EnhancedInput,
|
|
5103
|
+
{
|
|
5104
|
+
label: "Routing Number",
|
|
5105
|
+
placeholder: "Enter 9-digit routing number",
|
|
5106
|
+
pattern: "[0-9]{9}",
|
|
5107
|
+
maxLength: 9,
|
|
5108
|
+
hint: "9-digit routing number",
|
|
5109
|
+
required: true
|
|
5110
|
+
}
|
|
5111
|
+
),
|
|
5112
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5113
|
+
EnhancedInput,
|
|
5114
|
+
{
|
|
5115
|
+
label: "Account Number",
|
|
5116
|
+
placeholder: "Enter account number",
|
|
5117
|
+
required: true
|
|
5118
|
+
}
|
|
5119
|
+
),
|
|
5120
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5121
|
+
EnhancedSelect,
|
|
5122
|
+
{
|
|
5123
|
+
label: "Account Type",
|
|
5124
|
+
placeholder: "Select account type",
|
|
5125
|
+
options: [
|
|
5126
|
+
{ value: "checking", label: "Checking" },
|
|
5127
|
+
{ value: "savings", label: "Savings" }
|
|
5128
|
+
]
|
|
5129
|
+
}
|
|
5130
|
+
)
|
|
5131
|
+
] });
|
|
5132
|
+
};
|
|
5133
|
+
var SimpleWireForm = () => {
|
|
5134
|
+
const [wireType, setWireType] = React15.useState("domestic");
|
|
5135
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
5136
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5137
|
+
EnhancedSelect,
|
|
5138
|
+
{
|
|
5139
|
+
label: "Wire Type",
|
|
5140
|
+
placeholder: "Select wire type",
|
|
5141
|
+
value: wireType,
|
|
5142
|
+
onValueChange: setWireType,
|
|
5143
|
+
options: [
|
|
5144
|
+
{ value: "domestic", label: "Domestic" },
|
|
5145
|
+
{ value: "international", label: "International" }
|
|
5146
|
+
]
|
|
5147
|
+
}
|
|
5148
|
+
),
|
|
5149
|
+
wireType === "domestic" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
5150
|
+
EnhancedInput,
|
|
5151
|
+
{
|
|
5152
|
+
label: "Routing Number",
|
|
5153
|
+
placeholder: "Enter 9-digit routing number",
|
|
5154
|
+
pattern: "[0-9]{9}",
|
|
5155
|
+
maxLength: 9,
|
|
5156
|
+
hint: "9-digit routing number",
|
|
5157
|
+
required: true
|
|
5158
|
+
}
|
|
5159
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
5160
|
+
EnhancedInput,
|
|
5161
|
+
{
|
|
5162
|
+
label: "BIC Number",
|
|
5163
|
+
placeholder: "Enter BIC/SWIFT code",
|
|
5164
|
+
hint: "Bank Identifier Code",
|
|
5165
|
+
required: true
|
|
5166
|
+
}
|
|
5167
|
+
),
|
|
5168
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5169
|
+
EnhancedInput,
|
|
5170
|
+
{
|
|
5171
|
+
label: "Account Number",
|
|
5172
|
+
placeholder: "Enter account number",
|
|
5173
|
+
required: true
|
|
5174
|
+
}
|
|
5175
|
+
)
|
|
5176
|
+
] }) });
|
|
5001
5177
|
};
|
|
5002
|
-
var PaymentInformationSection = () => {
|
|
5178
|
+
var PaymentInformationSection = ({ onPaymentMethodsChange } = {}) => {
|
|
5003
5179
|
const [paymentMethods, setPaymentMethods] = React15.useState([]);
|
|
5004
5180
|
const [showAddMenu, setShowAddMenu] = React15.useState(false);
|
|
5005
|
-
const [achData, setAchData] = React15.useState(defaultACHTransfer);
|
|
5006
5181
|
const addPaymentMethod = (type) => {
|
|
5007
5182
|
const newMethod = {
|
|
5008
5183
|
id: `${type}-${Date.now()}`,
|
|
@@ -5010,57 +5185,29 @@ var PaymentInformationSection = () => {
|
|
|
5010
5185
|
name: type === "ach" ? "ACH Payment" : "Wire Transfer",
|
|
5011
5186
|
collapsed: false
|
|
5012
5187
|
};
|
|
5013
|
-
|
|
5188
|
+
const updatedMethods = [...paymentMethods, newMethod];
|
|
5189
|
+
setPaymentMethods(updatedMethods);
|
|
5190
|
+
onPaymentMethodsChange?.(updatedMethods);
|
|
5014
5191
|
setShowAddMenu(false);
|
|
5015
5192
|
};
|
|
5016
5193
|
const removePaymentMethod = (id) => {
|
|
5017
|
-
|
|
5194
|
+
const updatedMethods = paymentMethods.filter((method) => method.id !== id);
|
|
5195
|
+
setPaymentMethods(updatedMethods);
|
|
5196
|
+
onPaymentMethodsChange?.(updatedMethods);
|
|
5018
5197
|
};
|
|
5019
5198
|
const toggleCollapse = (id) => {
|
|
5020
5199
|
setPaymentMethods(paymentMethods.map(
|
|
5021
5200
|
(method) => method.id === id ? { ...method, collapsed: !method.collapsed } : method
|
|
5022
5201
|
));
|
|
5023
5202
|
};
|
|
5024
|
-
const handleACHDataChange = (newData) => {
|
|
5025
|
-
setAchData(newData);
|
|
5026
|
-
};
|
|
5027
5203
|
const renderPaymentMethodContent = (method) => {
|
|
5028
5204
|
if (method.type === "ach") {
|
|
5029
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
5030
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5031
|
-
ACHBasicInfoCard,
|
|
5032
|
-
{
|
|
5033
|
-
data: achData,
|
|
5034
|
-
onDataChange: handleACHDataChange,
|
|
5035
|
-
isEditing: true,
|
|
5036
|
-
hideActions: true
|
|
5037
|
-
}
|
|
5038
|
-
),
|
|
5039
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5040
|
-
ACHBankCard,
|
|
5041
|
-
{
|
|
5042
|
-
data: achData,
|
|
5043
|
-
onDataChange: handleACHDataChange,
|
|
5044
|
-
isEditing: true,
|
|
5045
|
-
hideActions: true
|
|
5046
|
-
}
|
|
5047
|
-
),
|
|
5048
|
-
/* @__PURE__ */ jsxRuntime.jsx(BankAddressCard, { isEditing: true, hideActions: true })
|
|
5049
|
-
] });
|
|
5205
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SimpleACHForm, {});
|
|
5050
5206
|
} else {
|
|
5051
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
5052
|
-
/* @__PURE__ */ jsxRuntime.jsx(ReceiverCard, { isEditing: true, hideActions: true }),
|
|
5053
|
-
/* @__PURE__ */ jsxRuntime.jsx(BeneficiaryCard, { isEditing: true, hideActions: true }),
|
|
5054
|
-
/* @__PURE__ */ jsxRuntime.jsx(OriginatorCard, { isEditing: true, hideActions: true }),
|
|
5055
|
-
/* @__PURE__ */ jsxRuntime.jsx(IntermediaryCard, { isEditing: true, hideActions: true })
|
|
5056
|
-
] });
|
|
5207
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SimpleWireForm, {});
|
|
5057
5208
|
}
|
|
5058
5209
|
};
|
|
5059
5210
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
5060
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-border pb-4", children: [
|
|
5061
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Payment Information" }),
|
|
5062
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: "Add payment methods for this counterparty" })
|
|
5063
|
-
] }),
|
|
5064
5211
|
paymentMethods.map((method) => /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "relative", children: [
|
|
5065
5212
|
/* @__PURE__ */ jsxRuntime.jsx(CardHeader, { className: "pb-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
5066
5213
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
@@ -5091,6 +5238,7 @@ var PaymentInformationSection = () => {
|
|
|
5091
5238
|
!method.collapsed && /* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: renderPaymentMethodContent(method) })
|
|
5092
5239
|
] }, method.id)),
|
|
5093
5240
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
5241
|
+
paymentMethods.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground mb-2", children: "At least one payment method is required *" }),
|
|
5094
5242
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5095
5243
|
Button,
|
|
5096
5244
|
{
|
|
@@ -5126,6 +5274,75 @@ var PaymentInformationSection = () => {
|
|
|
5126
5274
|
] })
|
|
5127
5275
|
] });
|
|
5128
5276
|
};
|
|
5277
|
+
var receiverSchema = zod.z.object({
|
|
5278
|
+
routingNumber: zod.z.string().min(9, "Routing number must be 9 digits").max(9, "Routing number must be 9 digits"),
|
|
5279
|
+
bankShortName: zod.z.string().min(1, "Bank short name is required")
|
|
5280
|
+
});
|
|
5281
|
+
var ReceiverCard = ({
|
|
5282
|
+
data,
|
|
5283
|
+
onDataChange,
|
|
5284
|
+
isEditing,
|
|
5285
|
+
onToggleEdit,
|
|
5286
|
+
className,
|
|
5287
|
+
hideActions
|
|
5288
|
+
}) => {
|
|
5289
|
+
const form = useFormWithEditState({
|
|
5290
|
+
schema: receiverSchema,
|
|
5291
|
+
defaultValues: { ...defaultReceiverInfo, ...data },
|
|
5292
|
+
initialEditing: isEditing,
|
|
5293
|
+
onToggleEdit,
|
|
5294
|
+
onSave: onDataChange
|
|
5295
|
+
});
|
|
5296
|
+
const editContent = /* @__PURE__ */ jsxRuntime.jsx(FormProvider, { form, children: /* @__PURE__ */ jsxRuntime.jsx(FormSection, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
5297
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-border pb-4", children: [
|
|
5298
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Receiver Details" }),
|
|
5299
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: "Receiving bank information" })
|
|
5300
|
+
] }),
|
|
5301
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-6", children: [
|
|
5302
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5303
|
+
FormInput,
|
|
5304
|
+
{
|
|
5305
|
+
name: "routingNumber",
|
|
5306
|
+
label: "Receiver Routing Number",
|
|
5307
|
+
placeholder: "Enter routing number",
|
|
5308
|
+
hint: "9-digit routing number",
|
|
5309
|
+
pattern: "[0-9]{9}",
|
|
5310
|
+
maxLength: 9,
|
|
5311
|
+
required: true
|
|
5312
|
+
}
|
|
5313
|
+
),
|
|
5314
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5315
|
+
FormInput,
|
|
5316
|
+
{
|
|
5317
|
+
name: "bankShortName",
|
|
5318
|
+
label: "Receiver Bank Short Name",
|
|
5319
|
+
placeholder: "Enter bank short name",
|
|
5320
|
+
required: true
|
|
5321
|
+
}
|
|
5322
|
+
)
|
|
5323
|
+
] })
|
|
5324
|
+
] }) }) });
|
|
5325
|
+
const formValues = form.watch();
|
|
5326
|
+
const viewData = [
|
|
5327
|
+
{ label: "Routing Number", value: formValues?.routingNumber },
|
|
5328
|
+
{ label: "Bank Short Name", value: formValues?.bankShortName }
|
|
5329
|
+
];
|
|
5330
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5331
|
+
EditableFormCard,
|
|
5332
|
+
{
|
|
5333
|
+
title: "FedWire Receiver",
|
|
5334
|
+
variant: "subtle",
|
|
5335
|
+
className,
|
|
5336
|
+
isEditing: form.isEditing,
|
|
5337
|
+
onToggleEdit: form.handleToggleEdit,
|
|
5338
|
+
onSave: form.handleSave,
|
|
5339
|
+
onCancel: form.handleCancel,
|
|
5340
|
+
hideActions,
|
|
5341
|
+
editContent,
|
|
5342
|
+
viewContent: /* @__PURE__ */ jsxRuntime.jsx(DataGrid, { data: viewData, columns: 2 })
|
|
5343
|
+
}
|
|
5344
|
+
);
|
|
5345
|
+
};
|
|
5129
5346
|
var WireTransferSection = ({ isEditing, onToggleEdit, className, hideActions }) => {
|
|
5130
5347
|
const [wireTransferType, setWireTransferType] = React15.useState("INTERNATIONAL");
|
|
5131
5348
|
const editContent = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
@@ -5447,7 +5664,9 @@ var mockProducts = [
|
|
|
5447
5664
|
];
|
|
5448
5665
|
var StatementHeader = ({ data, onEdit }) => {
|
|
5449
5666
|
const hasValue = (value) => {
|
|
5450
|
-
|
|
5667
|
+
if (value === void 0 || value === null) return false;
|
|
5668
|
+
if (typeof value === "string" && value.trim() === "") return false;
|
|
5669
|
+
return true;
|
|
5451
5670
|
};
|
|
5452
5671
|
const balanceChange = data.startingBalance && data.endingBalance ? calculateBalanceChange(data.startingBalance, data.endingBalance) : null;
|
|
5453
5672
|
return /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
@@ -5671,11 +5890,11 @@ function DataTable({
|
|
|
5671
5890
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsx("tr", { className: "border-b bg-muted/50", children: columns2.map((column) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5672
5891
|
"th",
|
|
5673
5892
|
{
|
|
5893
|
+
style: column.width ? { width: column.width } : void 0,
|
|
5674
5894
|
className: cn(
|
|
5675
5895
|
"px-3 py-2 text-left align-middle text-sm font-medium bg-muted/50",
|
|
5676
5896
|
column.align === "center" && "text-center",
|
|
5677
|
-
column.align === "right" && "text-right"
|
|
5678
|
-
column.width && `w-[${column.width}]`
|
|
5897
|
+
column.align === "right" && "text-right"
|
|
5679
5898
|
),
|
|
5680
5899
|
children: column.sortable && onSort ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
5681
5900
|
Button,
|
|
@@ -5704,6 +5923,7 @@ function DataTable({
|
|
|
5704
5923
|
children: columns2.map((column) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5705
5924
|
"td",
|
|
5706
5925
|
{
|
|
5926
|
+
style: column.width ? { width: column.width } : void 0,
|
|
5707
5927
|
className: cn(
|
|
5708
5928
|
"px-3 py-2 align-middle text-sm",
|
|
5709
5929
|
column.align === "center" && "text-center",
|
|
@@ -6214,12 +6434,11 @@ var PageLayout = React15__namespace.forwardRef(
|
|
|
6214
6434
|
});
|
|
6215
6435
|
};
|
|
6216
6436
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: "flex flex-col h-screen bg-gradient-subtle", children: [
|
|
6217
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
|
|
6218
|
-
"
|
|
6219
|
-
"container mx-auto px-4 pt-8 pb-4",
|
|
6437
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
|
|
6438
|
+
"container mx-auto px-4 py-6",
|
|
6220
6439
|
maxWidthClasses[maxWidth]
|
|
6221
6440
|
), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-4", children: [
|
|
6222
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
|
|
6441
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-h-[2.5rem]", children: [
|
|
6223
6442
|
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-bold text-foreground mb-2", children: title }),
|
|
6224
6443
|
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground", children: description })
|
|
6225
6444
|
] }),
|
|
@@ -6248,7 +6467,7 @@ var PageLayout = React15__namespace.forwardRef(
|
|
|
6248
6467
|
index
|
|
6249
6468
|
);
|
|
6250
6469
|
}) })
|
|
6251
|
-
] }) }),
|
|
6470
|
+
] }) }) }),
|
|
6252
6471
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
|
|
6253
6472
|
"container mx-auto px-4 py-6",
|
|
6254
6473
|
maxWidthClasses[maxWidth],
|
|
@@ -7892,6 +8111,11 @@ var mockBusinessesList = [
|
|
|
7892
8111
|
productName: "Fiat Republic Canada Inc. FBO Rapidz Pay",
|
|
7893
8112
|
cipStatus: "verified",
|
|
7894
8113
|
status: "active",
|
|
8114
|
+
type: "Business",
|
|
8115
|
+
subType: "Customer",
|
|
8116
|
+
isDeveloperInitiated: true,
|
|
8117
|
+
provider: "Plaid",
|
|
8118
|
+
result: 'vendor:ADVISOR_KYC_VENDOR status:successful data:"id:\\"81ae3fca-bdef-493f-9b13-137d259a97f9\\" corporate_id:\\"9d8665b3-7525-40e7-aa75-e46d4f77f0f1\\" created_timestamp:{seconds:1761333876 nanos:574963000} modified_timestamp:{seconds:1761333889 nanos:83986000} status:processing edition:1 method:reliance"',
|
|
7895
8119
|
created: "2025-10-05",
|
|
7896
8120
|
modified: "2025-10-05"
|
|
7897
8121
|
},
|
|
@@ -7901,6 +8125,11 @@ var mockBusinessesList = [
|
|
|
7901
8125
|
productName: "Atomic Brokerage FBO Atomic Brokerage Clients",
|
|
7902
8126
|
cipStatus: "verified",
|
|
7903
8127
|
status: "active",
|
|
8128
|
+
type: "Business",
|
|
8129
|
+
subType: "UBO",
|
|
8130
|
+
isDeveloperInitiated: false,
|
|
8131
|
+
provider: "Alloy",
|
|
8132
|
+
result: 'vendor:COMPLIANCE_VENDOR status:approved data:"verification_id:\\"vrf-123\\" corporate_id:\\"corp-456\\" timestamp:{seconds:1761333900 nanos:123456000} status:verified"',
|
|
7904
8133
|
created: "2025-10-04",
|
|
7905
8134
|
modified: "2025-10-04"
|
|
7906
8135
|
},
|
|
@@ -7910,6 +8139,11 @@ var mockBusinessesList = [
|
|
|
7910
8139
|
productName: "SendFriend Inc FBO Conduit Pay Agent",
|
|
7911
8140
|
cipStatus: "not_start",
|
|
7912
8141
|
status: "active",
|
|
8142
|
+
type: "Individual",
|
|
8143
|
+
subType: "Customer",
|
|
8144
|
+
isDeveloperInitiated: true,
|
|
8145
|
+
provider: "Plaid",
|
|
8146
|
+
result: 'vendor:IDENTITY_VENDOR status:pending data:"request_id:\\"req-789\\" entity_id:\\"ent-012\\" created:{seconds:1761333800 nanos:987654000}"',
|
|
7913
8147
|
created: "2025-10-03",
|
|
7914
8148
|
modified: "2025-10-03"
|
|
7915
8149
|
},
|
|
@@ -7919,6 +8153,11 @@ var mockBusinessesList = [
|
|
|
7919
8153
|
productName: "Digital Finance Inc FBO Tech Solutions",
|
|
7920
8154
|
cipStatus: "pending",
|
|
7921
8155
|
status: "active",
|
|
8156
|
+
type: "Business",
|
|
8157
|
+
subType: "Customer",
|
|
8158
|
+
isDeveloperInitiated: false,
|
|
8159
|
+
provider: "Alloy",
|
|
8160
|
+
result: 'vendor:KYC_VENDOR status:in_progress data:"kyc_id:\\"kyc-345\\" business_id:\\"biz-678\\" initiated:{seconds:1761333700 nanos:111222000}"',
|
|
7922
8161
|
created: "2025-10-02",
|
|
7923
8162
|
modified: "2025-10-02"
|
|
7924
8163
|
},
|
|
@@ -7928,6 +8167,11 @@ var mockBusinessesList = [
|
|
|
7928
8167
|
productName: "Swift Transfer FBO Global Trade",
|
|
7929
8168
|
cipStatus: "verified",
|
|
7930
8169
|
status: "active",
|
|
8170
|
+
type: "Individual",
|
|
8171
|
+
subType: "UBO",
|
|
8172
|
+
isDeveloperInitiated: true,
|
|
8173
|
+
provider: "Plaid",
|
|
8174
|
+
result: 'vendor:VERIFICATION_VENDOR status:completed data:"account_verified:true holder_verified:true timestamp:{seconds:1761333600 nanos:333444000}"',
|
|
7931
8175
|
created: "2025-10-01",
|
|
7932
8176
|
modified: "2025-10-01"
|
|
7933
8177
|
}
|
|
@@ -8054,11 +8298,8 @@ var Businesses = () => {
|
|
|
8054
8298
|
return 0;
|
|
8055
8299
|
});
|
|
8056
8300
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col h-screen bg-gradient-subtle", children: [
|
|
8057
|
-
/* @__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-
|
|
8058
|
-
/* @__PURE__ */ jsxRuntime.
|
|
8059
|
-
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-bold text-foreground", children: "Businesses" }),
|
|
8060
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mt-1", children: "Manage business entities and their configurations" })
|
|
8061
|
-
] }),
|
|
8301
|
+
/* @__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: [
|
|
8302
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-bold text-foreground mb-2", children: "Businesses" }) }),
|
|
8062
8303
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
8063
8304
|
/* @__PURE__ */ jsxRuntime.jsxs(Sheet, { children: [
|
|
8064
8305
|
/* @__PURE__ */ jsxRuntime.jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", className: "gap-2", children: [
|
|
@@ -8152,559 +8393,2706 @@ var Businesses = () => {
|
|
|
8152
8393
|
] });
|
|
8153
8394
|
};
|
|
8154
8395
|
var Businesses_default = Businesses;
|
|
8155
|
-
var
|
|
8156
|
-
{
|
|
8157
|
-
|
|
8158
|
-
|
|
8159
|
-
|
|
8160
|
-
type: "checking",
|
|
8161
|
-
status: "active",
|
|
8162
|
-
balance: "$125,450.00",
|
|
8163
|
-
currency: "USD",
|
|
8164
|
-
institution: "Chase Bank",
|
|
8165
|
-
routingNumber: "021000021",
|
|
8166
|
-
country: "US"
|
|
8396
|
+
var statusConfig2 = {
|
|
8397
|
+
verified: {
|
|
8398
|
+
variant: "active",
|
|
8399
|
+
label: "Verified",
|
|
8400
|
+
icon: lucideReact.CheckCircle
|
|
8167
8401
|
},
|
|
8168
|
-
{
|
|
8169
|
-
|
|
8170
|
-
|
|
8171
|
-
|
|
8172
|
-
type: "savings",
|
|
8173
|
-
status: "active",
|
|
8174
|
-
balance: "$45,230.00",
|
|
8175
|
-
currency: "USD",
|
|
8176
|
-
institution: "Chase Bank",
|
|
8177
|
-
routingNumber: "021000021",
|
|
8178
|
-
country: "US"
|
|
8402
|
+
not_start: {
|
|
8403
|
+
variant: "secondary",
|
|
8404
|
+
label: "Not Start",
|
|
8405
|
+
icon: lucideReact.Circle
|
|
8179
8406
|
},
|
|
8180
|
-
{
|
|
8181
|
-
|
|
8182
|
-
|
|
8183
|
-
|
|
8184
|
-
type: "checking",
|
|
8185
|
-
status: "active",
|
|
8186
|
-
balance: "$78,900.00",
|
|
8187
|
-
currency: "USD",
|
|
8188
|
-
institution: "Wells Fargo",
|
|
8189
|
-
routingNumber: "121000248",
|
|
8190
|
-
country: "US"
|
|
8407
|
+
pending: {
|
|
8408
|
+
variant: "pending",
|
|
8409
|
+
label: "Pending",
|
|
8410
|
+
icon: lucideReact.Clock
|
|
8191
8411
|
}
|
|
8192
|
-
|
|
8193
|
-
var
|
|
8194
|
-
|
|
8195
|
-
|
|
8196
|
-
|
|
8197
|
-
|
|
8198
|
-
|
|
8199
|
-
|
|
8200
|
-
|
|
8412
|
+
};
|
|
8413
|
+
var CIPStatusBadge = ({ status, className }) => {
|
|
8414
|
+
const config = statusConfig2[status];
|
|
8415
|
+
if (!config) {
|
|
8416
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "secondary", className, children: [
|
|
8417
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "w-3 h-3 mr-1" }),
|
|
8418
|
+
status || "Unknown"
|
|
8419
|
+
] });
|
|
8420
|
+
}
|
|
8421
|
+
const Icon2 = config.icon;
|
|
8422
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: config.variant, className, children: [
|
|
8423
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "w-3 h-3 mr-1" }),
|
|
8424
|
+
config.label
|
|
8425
|
+
] });
|
|
8426
|
+
};
|
|
8427
|
+
var typeConfig3 = {
|
|
8428
|
+
Individual: {
|
|
8429
|
+
variant: "individual",
|
|
8430
|
+
label: "Individual",
|
|
8431
|
+
icon: lucideReact.User
|
|
8201
8432
|
},
|
|
8202
|
-
{
|
|
8203
|
-
|
|
8204
|
-
|
|
8205
|
-
|
|
8206
|
-
|
|
8207
|
-
|
|
8208
|
-
|
|
8433
|
+
Business: {
|
|
8434
|
+
variant: "business",
|
|
8435
|
+
label: "Business",
|
|
8436
|
+
icon: lucideReact.Building2
|
|
8437
|
+
}
|
|
8438
|
+
};
|
|
8439
|
+
var EntityTypeBadge = ({ type, className }) => {
|
|
8440
|
+
const config = typeConfig3[type];
|
|
8441
|
+
if (!config) {
|
|
8442
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "secondary", className, children: [
|
|
8443
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Building2, { className: "w-3 h-3 mr-1" }),
|
|
8444
|
+
type || "Unknown"
|
|
8445
|
+
] });
|
|
8446
|
+
}
|
|
8447
|
+
const Icon2 = config.icon;
|
|
8448
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: config.variant, className, children: [
|
|
8449
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "w-3 h-3 mr-1" }),
|
|
8450
|
+
config.label
|
|
8451
|
+
] });
|
|
8452
|
+
};
|
|
8453
|
+
var subTypeConfig = {
|
|
8454
|
+
UBO: {
|
|
8455
|
+
variant: "government",
|
|
8456
|
+
label: "UBO",
|
|
8457
|
+
icon: lucideReact.UserCheck
|
|
8209
8458
|
},
|
|
8210
|
-
{
|
|
8211
|
-
|
|
8212
|
-
|
|
8213
|
-
|
|
8214
|
-
|
|
8215
|
-
|
|
8216
|
-
|
|
8459
|
+
Customer: {
|
|
8460
|
+
variant: "business",
|
|
8461
|
+
label: "Customer",
|
|
8462
|
+
icon: lucideReact.Users
|
|
8463
|
+
}
|
|
8464
|
+
};
|
|
8465
|
+
var SubTypeBadge = ({ subType, className }) => {
|
|
8466
|
+
const config = subTypeConfig[subType];
|
|
8467
|
+
if (!config) {
|
|
8468
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "secondary", className, children: [
|
|
8469
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Users, { className: "w-3 h-3 mr-1" }),
|
|
8470
|
+
subType || "Unknown"
|
|
8471
|
+
] });
|
|
8472
|
+
}
|
|
8473
|
+
const Icon2 = config.icon;
|
|
8474
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: config.variant, className, children: [
|
|
8475
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "w-3 h-3 mr-1" }),
|
|
8476
|
+
config.label
|
|
8477
|
+
] });
|
|
8478
|
+
};
|
|
8479
|
+
|
|
8480
|
+
// src/lib/mock-data/identity-verification-data.ts
|
|
8481
|
+
var mockIdentityVerifications = {
|
|
8482
|
+
"8112488": {
|
|
8483
|
+
customerId: "8112488",
|
|
8484
|
+
isDeveloperInitiated: true,
|
|
8485
|
+
provider: "Plaid",
|
|
8486
|
+
result: 'vendor:ADVISOR_KYC_VENDOR status:successful data:"id:\\"81ae3fca-bdef-493f-9b13-137d259a97f9\\" corporate_id:\\"9d8665b3-7525-40e7-aa75-e46d4f77f0f1\\" created_timestamp:{seconds:1761333876 nanos:574963000} modified_timestamp:{seconds:1761333889 nanos:83986000} status:processing edition:1 method:reliance"'
|
|
8217
8487
|
},
|
|
8218
|
-
{
|
|
8219
|
-
|
|
8220
|
-
|
|
8221
|
-
|
|
8222
|
-
status: "
|
|
8223
|
-
|
|
8224
|
-
|
|
8488
|
+
"8111609": {
|
|
8489
|
+
customerId: "8111609",
|
|
8490
|
+
isDeveloperInitiated: false,
|
|
8491
|
+
provider: "Alloy",
|
|
8492
|
+
result: 'vendor:COMPLIANCE_VENDOR status:approved data:"verification_id:\\"vrf-123\\" corporate_id:\\"corp-456\\" timestamp:{seconds:1761333900 nanos:123456000} status:verified"'
|
|
8493
|
+
},
|
|
8494
|
+
"8111026": {
|
|
8495
|
+
customerId: "8111026",
|
|
8496
|
+
isDeveloperInitiated: true,
|
|
8497
|
+
provider: "Plaid",
|
|
8498
|
+
result: 'vendor:IDENTITY_VENDOR status:pending data:"request_id:\\"req-789\\" entity_id:\\"ent-012\\" created:{seconds:1761333800 nanos:987654000}"'
|
|
8499
|
+
},
|
|
8500
|
+
"8110892": {
|
|
8501
|
+
customerId: "8110892",
|
|
8502
|
+
isDeveloperInitiated: false,
|
|
8503
|
+
provider: "Alloy",
|
|
8504
|
+
result: 'vendor:KYC_VENDOR status:in_progress data:"kyc_id:\\"kyc-345\\" business_id:\\"biz-678\\" initiated:{seconds:1761333700 nanos:111222000}"'
|
|
8505
|
+
},
|
|
8506
|
+
"8110654": {
|
|
8507
|
+
customerId: "8110654",
|
|
8508
|
+
isDeveloperInitiated: true,
|
|
8509
|
+
provider: "Plaid",
|
|
8510
|
+
result: 'vendor:VERIFICATION_VENDOR status:completed data:"account_verified:true holder_verified:true timestamp:{seconds:1761333600 nanos:333444000}"'
|
|
8225
8511
|
}
|
|
8226
|
-
|
|
8227
|
-
|
|
8228
|
-
|
|
8229
|
-
|
|
8230
|
-
|
|
8231
|
-
const accountColumns = [
|
|
8512
|
+
};
|
|
8513
|
+
|
|
8514
|
+
// src/lib/mock-data/ubo-data.ts
|
|
8515
|
+
var mockBusinessUBOs = {
|
|
8516
|
+
"8112488": [
|
|
8232
8517
|
{
|
|
8233
|
-
|
|
8234
|
-
|
|
8235
|
-
|
|
8518
|
+
id: "ubo-001",
|
|
8519
|
+
name: "John Smith",
|
|
8520
|
+
title: "CEO & Founder",
|
|
8521
|
+
ownershipPercentage: 45,
|
|
8522
|
+
customerId: "cust-001"
|
|
8236
8523
|
},
|
|
8524
|
+
{
|
|
8525
|
+
id: "ubo-002",
|
|
8526
|
+
name: "Sarah Johnson",
|
|
8527
|
+
title: "CFO & Co-Founder",
|
|
8528
|
+
ownershipPercentage: 35,
|
|
8529
|
+
customerId: "cust-002"
|
|
8530
|
+
},
|
|
8531
|
+
{
|
|
8532
|
+
id: "ubo-003",
|
|
8533
|
+
name: "Michael Chen",
|
|
8534
|
+
title: "CTO",
|
|
8535
|
+
ownershipPercentage: 20,
|
|
8536
|
+
customerId: "cust-003"
|
|
8537
|
+
}
|
|
8538
|
+
],
|
|
8539
|
+
"8112489": [
|
|
8540
|
+
{
|
|
8541
|
+
id: "ubo-004",
|
|
8542
|
+
name: "Emily Davis",
|
|
8543
|
+
title: "Managing Director",
|
|
8544
|
+
ownershipPercentage: 60,
|
|
8545
|
+
customerId: "cust-004"
|
|
8546
|
+
},
|
|
8547
|
+
{
|
|
8548
|
+
id: "ubo-005",
|
|
8549
|
+
name: "Robert Wilson",
|
|
8550
|
+
title: "Board Member",
|
|
8551
|
+
ownershipPercentage: 40,
|
|
8552
|
+
customerId: "cust-005"
|
|
8553
|
+
}
|
|
8554
|
+
]
|
|
8555
|
+
};
|
|
8556
|
+
|
|
8557
|
+
// src/lib/mock-data/document-data.ts
|
|
8558
|
+
var mockBusinessDocuments = {
|
|
8559
|
+
"8112488": [
|
|
8560
|
+
{
|
|
8561
|
+
id: "doc-001",
|
|
8562
|
+
name: "Certificate of Incorporation.pdf",
|
|
8563
|
+
type: "BUSINESS_LICENSE",
|
|
8564
|
+
description: "Official certificate of incorporation from Delaware",
|
|
8565
|
+
size: "2.3 MB",
|
|
8566
|
+
uploadedBy: "John Smith",
|
|
8567
|
+
uploadedAt: "2024-01-10T10:30:00Z"
|
|
8568
|
+
},
|
|
8569
|
+
{
|
|
8570
|
+
id: "doc-002",
|
|
8571
|
+
name: "Tax_ID_Verification.pdf",
|
|
8572
|
+
type: "TAX_DOCUMENT",
|
|
8573
|
+
description: "IRS EIN verification letter",
|
|
8574
|
+
size: "1.1 MB",
|
|
8575
|
+
uploadedBy: "Sarah Johnson",
|
|
8576
|
+
uploadedAt: "2024-01-12T14:20:00Z"
|
|
8577
|
+
},
|
|
8578
|
+
{
|
|
8579
|
+
id: "doc-003",
|
|
8580
|
+
name: "Business_Address_Proof.pdf",
|
|
8581
|
+
type: "PROOF_OF_ADDRESS",
|
|
8582
|
+
description: "Utility bill for business address",
|
|
8583
|
+
size: "0.8 MB",
|
|
8584
|
+
uploadedBy: "John Smith",
|
|
8585
|
+
uploadedAt: "2024-01-15T09:15:00Z"
|
|
8586
|
+
},
|
|
8587
|
+
{
|
|
8588
|
+
id: "doc-004",
|
|
8589
|
+
name: "Operating_Agreement.pdf",
|
|
8590
|
+
type: "OTHER",
|
|
8591
|
+
description: "Company operating agreement and bylaws",
|
|
8592
|
+
size: "3.5 MB",
|
|
8593
|
+
uploadedBy: "Legal Team",
|
|
8594
|
+
uploadedAt: "2024-01-08T16:45:00Z"
|
|
8595
|
+
}
|
|
8596
|
+
],
|
|
8597
|
+
"8112489": [
|
|
8598
|
+
{
|
|
8599
|
+
id: "doc-005",
|
|
8600
|
+
name: "Business_License_2024.pdf",
|
|
8601
|
+
type: "BUSINESS_LICENSE",
|
|
8602
|
+
size: "1.5 MB",
|
|
8603
|
+
uploadedBy: "Emily Davis",
|
|
8604
|
+
uploadedAt: "2024-01-05T11:00:00Z"
|
|
8605
|
+
}
|
|
8606
|
+
]
|
|
8607
|
+
};
|
|
8608
|
+
|
|
8609
|
+
// src/lib/mock-data/business-account-data.ts
|
|
8610
|
+
var mockBusinessAccounts = {
|
|
8611
|
+
"8112488": [
|
|
8612
|
+
{
|
|
8613
|
+
id: "acc-001",
|
|
8614
|
+
name: "Primary Operating Account",
|
|
8615
|
+
number: "****7890",
|
|
8616
|
+
type: "checking",
|
|
8617
|
+
status: "active",
|
|
8618
|
+
balance: "$125,450.00",
|
|
8619
|
+
currency: "USD",
|
|
8620
|
+
institution: "Chase Bank",
|
|
8621
|
+
routingNumber: "021000021",
|
|
8622
|
+
country: "US"
|
|
8623
|
+
},
|
|
8624
|
+
{
|
|
8625
|
+
id: "acc-002",
|
|
8626
|
+
name: "Business Savings",
|
|
8627
|
+
number: "****4567",
|
|
8628
|
+
type: "savings",
|
|
8629
|
+
status: "active",
|
|
8630
|
+
balance: "$45,230.00",
|
|
8631
|
+
currency: "USD",
|
|
8632
|
+
institution: "Chase Bank",
|
|
8633
|
+
routingNumber: "021000021",
|
|
8634
|
+
country: "US"
|
|
8635
|
+
},
|
|
8636
|
+
{
|
|
8637
|
+
id: "acc-003",
|
|
8638
|
+
name: "Payroll Account",
|
|
8639
|
+
number: "****1234",
|
|
8640
|
+
type: "checking",
|
|
8641
|
+
status: "active",
|
|
8642
|
+
balance: "$78,900.00",
|
|
8643
|
+
currency: "USD",
|
|
8644
|
+
institution: "Wells Fargo",
|
|
8645
|
+
routingNumber: "121000248",
|
|
8646
|
+
country: "US"
|
|
8647
|
+
}
|
|
8648
|
+
]
|
|
8649
|
+
};
|
|
8650
|
+
var UBOCard = ({ ubos }) => {
|
|
8651
|
+
const columns2 = [
|
|
8237
8652
|
{
|
|
8238
8653
|
key: "name",
|
|
8239
|
-
title: "
|
|
8240
|
-
sortable: true
|
|
8654
|
+
title: "Name",
|
|
8655
|
+
sortable: true,
|
|
8656
|
+
width: "40%",
|
|
8657
|
+
render: (value, row) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8658
|
+
reactRouterDom.Link,
|
|
8659
|
+
{
|
|
8660
|
+
to: `/customer/${row.customerId}`,
|
|
8661
|
+
className: "text-primary hover:underline font-medium",
|
|
8662
|
+
children: value
|
|
8663
|
+
}
|
|
8664
|
+
)
|
|
8241
8665
|
},
|
|
8242
8666
|
{
|
|
8243
|
-
key: "
|
|
8244
|
-
title: "
|
|
8667
|
+
key: "title",
|
|
8668
|
+
title: "Title",
|
|
8245
8669
|
sortable: true,
|
|
8246
|
-
|
|
8670
|
+
width: "40%"
|
|
8247
8671
|
},
|
|
8248
8672
|
{
|
|
8249
|
-
key: "
|
|
8250
|
-
title: "
|
|
8251
|
-
|
|
8673
|
+
key: "ownershipPercentage",
|
|
8674
|
+
title: "Ownership %",
|
|
8675
|
+
sortable: true,
|
|
8676
|
+
width: "20%",
|
|
8677
|
+
align: "right",
|
|
8678
|
+
render: (value) => `${value}%`
|
|
8252
8679
|
}
|
|
8253
8680
|
];
|
|
8254
|
-
|
|
8255
|
-
|
|
8256
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8257
|
-
/* @__PURE__ */ jsxRuntime.
|
|
8258
|
-
|
|
8259
|
-
|
|
8260
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8261
|
-
PageLayout,
|
|
8262
|
-
{
|
|
8263
|
-
title: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
8264
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: business.businessName }),
|
|
8265
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8266
|
-
EditableInfoField,
|
|
8267
|
-
{
|
|
8268
|
-
label: "",
|
|
8269
|
-
value: currentStatus,
|
|
8270
|
-
options: [
|
|
8271
|
-
{ value: "active", label: "Active" },
|
|
8272
|
-
{ value: "inactive", label: "Inactive" },
|
|
8273
|
-
{ value: "suspended", label: "Suspended" }
|
|
8274
|
-
],
|
|
8275
|
-
onChange: (newStatus) => setCurrentStatus(newStatus),
|
|
8276
|
-
renderValue: (value) => /* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status: value.toUpperCase() }),
|
|
8277
|
-
className: "inline-block"
|
|
8278
|
-
}
|
|
8279
|
-
)
|
|
8280
|
-
] }),
|
|
8281
|
-
maxWidth: "full",
|
|
8282
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(Tabs, { defaultValue: "profile", className: "space-y-6", children: [
|
|
8283
|
-
/* @__PURE__ */ jsxRuntime.jsxs(TabsList, { className: "inline-flex gap-8 h-auto bg-transparent border-b border-border w-full p-0 rounded-none justify-start", children: [
|
|
8284
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8285
|
-
TabsTrigger,
|
|
8286
|
-
{
|
|
8287
|
-
value: "profile",
|
|
8288
|
-
className: "rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:shadow-none pb-3",
|
|
8289
|
-
children: "Profile"
|
|
8290
|
-
}
|
|
8291
|
-
),
|
|
8292
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8293
|
-
TabsTrigger,
|
|
8294
|
-
{
|
|
8295
|
-
value: "kyc",
|
|
8296
|
-
className: "rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:shadow-none pb-3",
|
|
8297
|
-
children: "KYC"
|
|
8298
|
-
}
|
|
8299
|
-
),
|
|
8300
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8301
|
-
TabsTrigger,
|
|
8302
|
-
{
|
|
8303
|
-
value: "counterparty",
|
|
8304
|
-
className: "rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:shadow-none pb-3",
|
|
8305
|
-
children: "Counterparty"
|
|
8306
|
-
}
|
|
8307
|
-
)
|
|
8308
|
-
] }),
|
|
8309
|
-
/* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "profile", className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-6", children: [
|
|
8310
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-6", children: [
|
|
8311
|
-
/* @__PURE__ */ jsxRuntime.jsx(BusinessProfileCard, { isEditing: false, onToggleEdit: () => {
|
|
8312
|
-
} }),
|
|
8313
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
8314
|
-
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
8315
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Accounts" }),
|
|
8316
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", children: "+ New Account" })
|
|
8317
|
-
] }),
|
|
8318
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8319
|
-
DataTable,
|
|
8320
|
-
{
|
|
8321
|
-
columns: accountColumns,
|
|
8322
|
-
data: businessAccounts,
|
|
8323
|
-
emptyMessage: "No accounts found"
|
|
8324
|
-
}
|
|
8325
|
-
) })
|
|
8326
|
-
] })
|
|
8327
|
-
] }),
|
|
8328
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsxRuntime.jsx(BusinessStatusCard, { isEditing: false, onToggleEdit: () => {
|
|
8329
|
-
} }) })
|
|
8330
|
-
] }) }),
|
|
8331
|
-
/* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "kyc", className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-8 text-center text-muted-foreground", children: "KYC content coming soon" }) }),
|
|
8332
|
-
/* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "counterparty", className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6", children: businessCounterparties.map((counterparty) => /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
8333
|
-
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { children: [
|
|
8334
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
8335
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { className: "text-lg", children: counterparty.name }),
|
|
8336
|
-
/* @__PURE__ */ jsxRuntime.jsx(CounterpartyTypeBadge, { type: counterparty.type })
|
|
8337
|
-
] }),
|
|
8338
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2 mt-2", children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: counterparty.status === "active" ? "default" : "secondary", children: counterparty.status }) })
|
|
8339
|
-
] }),
|
|
8340
|
-
/* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "space-y-3", children: [
|
|
8341
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: counterparty.description }),
|
|
8342
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center text-sm", children: [
|
|
8343
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Last Transaction" }),
|
|
8344
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: counterparty.lastTransaction })
|
|
8345
|
-
] })
|
|
8346
|
-
] })
|
|
8347
|
-
] }, counterparty.id)) }) })
|
|
8681
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
8682
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
8683
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Ultimate Beneficial Owners (UBO)" }),
|
|
8684
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Button, { size: "sm", variant: "ghost", children: [
|
|
8685
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-1" }),
|
|
8686
|
+
"Add UBO"
|
|
8348
8687
|
] })
|
|
8349
|
-
}
|
|
8350
|
-
|
|
8688
|
+
] }),
|
|
8689
|
+
/* @__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: [
|
|
8690
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Users, { className: "h-5 w-5 opacity-50" }),
|
|
8691
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "No UBOs recorded" })
|
|
8692
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
8693
|
+
DataTable,
|
|
8694
|
+
{
|
|
8695
|
+
columns: columns2,
|
|
8696
|
+
data: ubos
|
|
8697
|
+
}
|
|
8698
|
+
) })
|
|
8699
|
+
] });
|
|
8351
8700
|
};
|
|
8352
|
-
var
|
|
8353
|
-
|
|
8354
|
-
const [
|
|
8355
|
-
|
|
8356
|
-
|
|
8357
|
-
|
|
8358
|
-
|
|
8359
|
-
|
|
8360
|
-
|
|
8361
|
-
|
|
8362
|
-
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
|
|
8366
|
-
|
|
8367
|
-
|
|
8368
|
-
|
|
8369
|
-
|
|
8370
|
-
|
|
8371
|
-
|
|
8372
|
-
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
|
|
8381
|
-
|
|
8382
|
-
|
|
8383
|
-
|
|
8384
|
-
|
|
8385
|
-
|
|
8386
|
-
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
|
|
8392
|
-
|
|
8393
|
-
|
|
8394
|
-
|
|
8395
|
-
|
|
8396
|
-
|
|
8397
|
-
|
|
8398
|
-
|
|
8399
|
-
|
|
8400
|
-
|
|
8401
|
-
|
|
8402
|
-
|
|
8403
|
-
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
|
|
8407
|
-
|
|
8408
|
-
|
|
8409
|
-
|
|
8410
|
-
|
|
8411
|
-
|
|
8412
|
-
|
|
8413
|
-
|
|
8414
|
-
|
|
8415
|
-
|
|
8416
|
-
|
|
8417
|
-
|
|
8418
|
-
|
|
8419
|
-
|
|
8420
|
-
|
|
8421
|
-
|
|
8422
|
-
|
|
8423
|
-
|
|
8424
|
-
|
|
8425
|
-
|
|
8426
|
-
|
|
8427
|
-
|
|
8428
|
-
|
|
8429
|
-
|
|
8430
|
-
|
|
8431
|
-
|
|
8432
|
-
|
|
8433
|
-
|
|
8434
|
-
|
|
8435
|
-
|
|
8436
|
-
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
|
|
8440
|
-
|
|
8441
|
-
|
|
8701
|
+
var BusinessDocuments = ({ businessId, documents }) => {
|
|
8702
|
+
const [isUploading, setIsUploading] = React15.useState(false);
|
|
8703
|
+
const [showUploadDialog, setShowUploadDialog] = React15.useState(false);
|
|
8704
|
+
const [selectedFile, setSelectedFile] = React15.useState(null);
|
|
8705
|
+
const [documentName, setDocumentName] = React15.useState("");
|
|
8706
|
+
const [description, setDescription] = React15.useState("");
|
|
8707
|
+
const [documentType, setDocumentType] = React15.useState("");
|
|
8708
|
+
const handleFileSelect = (e) => {
|
|
8709
|
+
const file = e.target.files?.[0];
|
|
8710
|
+
if (!file) return;
|
|
8711
|
+
setSelectedFile(file);
|
|
8712
|
+
setDocumentName(file.name);
|
|
8713
|
+
};
|
|
8714
|
+
const handleUploadSubmit = () => {
|
|
8715
|
+
if (!selectedFile || !documentName || !documentType) {
|
|
8716
|
+
toast({
|
|
8717
|
+
title: "Missing Information",
|
|
8718
|
+
description: "Please fill in all required fields",
|
|
8719
|
+
variant: "destructive"
|
|
8720
|
+
});
|
|
8721
|
+
return;
|
|
8722
|
+
}
|
|
8723
|
+
setIsUploading(true);
|
|
8724
|
+
setTimeout(() => {
|
|
8725
|
+
toast({
|
|
8726
|
+
title: "Upload Successful",
|
|
8727
|
+
description: `${documentName} uploaded successfully`
|
|
8728
|
+
});
|
|
8729
|
+
setIsUploading(false);
|
|
8730
|
+
setShowUploadDialog(false);
|
|
8731
|
+
resetForm();
|
|
8732
|
+
}, 1e3);
|
|
8733
|
+
};
|
|
8734
|
+
const resetForm = () => {
|
|
8735
|
+
setSelectedFile(null);
|
|
8736
|
+
setDocumentName("");
|
|
8737
|
+
setDescription("");
|
|
8738
|
+
setDocumentType("");
|
|
8739
|
+
const fileInput = document.getElementById("file-upload");
|
|
8740
|
+
if (fileInput) fileInput.value = "";
|
|
8741
|
+
};
|
|
8742
|
+
const handleCancelUpload = () => {
|
|
8743
|
+
setShowUploadDialog(false);
|
|
8744
|
+
resetForm();
|
|
8745
|
+
};
|
|
8746
|
+
const isImageType = (name) => {
|
|
8747
|
+
const imageExtensions = [".jpg", ".jpeg", ".png", ".gif", ".webp", ".bmp"];
|
|
8748
|
+
return imageExtensions.some((ext) => name.toLowerCase().endsWith(ext));
|
|
8749
|
+
};
|
|
8750
|
+
const getFileIcon = (type) => {
|
|
8751
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { className: "h-5 w-5" });
|
|
8752
|
+
};
|
|
8753
|
+
const getFileTypeColor = (type) => {
|
|
8754
|
+
switch (type.toUpperCase()) {
|
|
8755
|
+
case "PDF":
|
|
8756
|
+
return "text-red-500";
|
|
8757
|
+
case "DOCX":
|
|
8758
|
+
case "DOC":
|
|
8759
|
+
return "text-blue-500";
|
|
8760
|
+
case "XLSX":
|
|
8761
|
+
case "XLS":
|
|
8762
|
+
return "text-green-500";
|
|
8763
|
+
case "JPG":
|
|
8764
|
+
case "JPEG":
|
|
8765
|
+
case "PNG":
|
|
8766
|
+
return "text-purple-500";
|
|
8767
|
+
default:
|
|
8768
|
+
return "text-muted-foreground";
|
|
8769
|
+
}
|
|
8770
|
+
};
|
|
8771
|
+
const documentTypeOptions = [
|
|
8772
|
+
{ value: "BUSINESS_LICENSE", label: "Business License" },
|
|
8773
|
+
{ value: "TAX_DOCUMENT", label: "Tax Document" },
|
|
8774
|
+
{ value: "PROOF_OF_ADDRESS", label: "Proof of Address" },
|
|
8775
|
+
{ value: "BANK_STATEMENT", label: "Bank Statement" },
|
|
8776
|
+
{ value: "INCORPORATION_DOCS", label: "Incorporation Documents" },
|
|
8777
|
+
{ value: "OPERATING_AGREEMENT", label: "Operating Agreement" },
|
|
8778
|
+
{ value: "OTHER", label: "Other" }
|
|
8779
|
+
];
|
|
8780
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
8781
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
8782
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Documents" }),
|
|
8783
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8784
|
+
Button,
|
|
8785
|
+
{
|
|
8786
|
+
onClick: () => setShowUploadDialog(true),
|
|
8787
|
+
size: "sm",
|
|
8788
|
+
variant: "ghost",
|
|
8789
|
+
className: "gap-2",
|
|
8790
|
+
children: [
|
|
8791
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Upload, { className: "h-4 w-4" }),
|
|
8792
|
+
"Upload"
|
|
8793
|
+
]
|
|
8794
|
+
}
|
|
8795
|
+
)
|
|
8796
|
+
] }),
|
|
8797
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardContent, { children: [
|
|
8798
|
+
showUploadDialog && reactDom.createPortal(
|
|
8799
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "fixed inset-0 z-[100] flex items-center justify-center p-4", children: [
|
|
8800
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8801
|
+
"div",
|
|
8802
|
+
{
|
|
8803
|
+
className: "fixed inset-0 bg-background/80 backdrop-blur-sm",
|
|
8804
|
+
onClick: handleCancelUpload
|
|
8805
|
+
}
|
|
8806
|
+
),
|
|
8807
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative bg-card border rounded-lg shadow-lg max-w-lg w-full p-6 z-[101]", children: [
|
|
8808
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-6", children: [
|
|
8809
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-bold", children: "Upload Document" }),
|
|
8810
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8811
|
+
Button,
|
|
8812
|
+
{
|
|
8813
|
+
variant: "ghost",
|
|
8814
|
+
size: "sm",
|
|
8815
|
+
className: "h-8 w-8 p-0",
|
|
8816
|
+
onClick: handleCancelUpload,
|
|
8817
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" })
|
|
8818
|
+
}
|
|
8819
|
+
)
|
|
8820
|
+
] }),
|
|
8821
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
8822
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-2 border-dashed rounded-lg p-6 text-center hover:border-primary/50 transition-colors", children: [
|
|
8823
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8824
|
+
"input",
|
|
8825
|
+
{
|
|
8826
|
+
type: "file",
|
|
8827
|
+
id: "file-upload-dialog",
|
|
8828
|
+
className: "hidden",
|
|
8829
|
+
onChange: handleFileSelect,
|
|
8830
|
+
disabled: isUploading
|
|
8831
|
+
}
|
|
8832
|
+
),
|
|
8833
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8834
|
+
"label",
|
|
8835
|
+
{
|
|
8836
|
+
htmlFor: "file-upload-dialog",
|
|
8837
|
+
className: cn(
|
|
8838
|
+
"cursor-pointer flex flex-col items-center gap-2",
|
|
8839
|
+
isUploading && "opacity-50 cursor-not-allowed"
|
|
8840
|
+
),
|
|
8841
|
+
children: [
|
|
8842
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Upload, { className: "h-8 w-8 text-muted-foreground" }),
|
|
8843
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
8844
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-foreground", children: selectedFile ? "Change file" : "Click to upload or drag and drop" }),
|
|
8845
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-1", children: "PDF, DOC, DOCX, JPG, PNG up to 10MB" })
|
|
8846
|
+
] })
|
|
8847
|
+
]
|
|
8848
|
+
}
|
|
8849
|
+
)
|
|
8850
|
+
] }),
|
|
8851
|
+
selectedFile && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-3 bg-muted/50 rounded-lg", children: [
|
|
8852
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: "Selected file:" }),
|
|
8853
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium", children: selectedFile.name }),
|
|
8854
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
8855
|
+
(selectedFile.size / 1024 / 1024).toFixed(2),
|
|
8856
|
+
" MB"
|
|
8857
|
+
] })
|
|
8858
|
+
] }),
|
|
8859
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8860
|
+
EnhancedInput,
|
|
8861
|
+
{
|
|
8862
|
+
label: "Document name",
|
|
8863
|
+
value: documentName,
|
|
8864
|
+
onChange: (e) => setDocumentName(e.target.value),
|
|
8865
|
+
placeholder: "Enter document name"
|
|
8866
|
+
}
|
|
8867
|
+
),
|
|
8868
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8869
|
+
EnhancedTextarea,
|
|
8870
|
+
{
|
|
8871
|
+
label: "Description",
|
|
8872
|
+
value: description,
|
|
8873
|
+
onChange: (e) => setDescription(e.target.value),
|
|
8874
|
+
placeholder: "Enter document description (optional)",
|
|
8875
|
+
rows: 3
|
|
8876
|
+
}
|
|
8877
|
+
),
|
|
8878
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8879
|
+
EnhancedSelect,
|
|
8880
|
+
{
|
|
8881
|
+
label: "Document type",
|
|
8882
|
+
value: documentType,
|
|
8883
|
+
onValueChange: setDocumentType,
|
|
8884
|
+
placeholder: "Select document type",
|
|
8885
|
+
options: documentTypeOptions
|
|
8886
|
+
}
|
|
8887
|
+
)
|
|
8888
|
+
] }),
|
|
8889
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3 mt-6", children: [
|
|
8890
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8891
|
+
Button,
|
|
8892
|
+
{
|
|
8893
|
+
variant: "outline",
|
|
8894
|
+
onClick: handleCancelUpload,
|
|
8895
|
+
disabled: isUploading,
|
|
8896
|
+
className: "flex-1",
|
|
8897
|
+
children: "Cancel"
|
|
8898
|
+
}
|
|
8899
|
+
),
|
|
8900
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8901
|
+
Button,
|
|
8902
|
+
{
|
|
8903
|
+
onClick: handleUploadSubmit,
|
|
8904
|
+
disabled: isUploading,
|
|
8905
|
+
className: "flex-1",
|
|
8906
|
+
children: isUploading ? "Uploading..." : "Upload"
|
|
8907
|
+
}
|
|
8908
|
+
)
|
|
8909
|
+
] })
|
|
8442
8910
|
] })
|
|
8443
8911
|
] }),
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
|
-
|
|
8451
|
-
|
|
8452
|
-
|
|
8453
|
-
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
}
|
|
8457
|
-
),
|
|
8458
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8459
|
-
EnhancedInput,
|
|
8460
|
-
{
|
|
8461
|
-
label: "City",
|
|
8462
|
-
placeholder: "Enter city",
|
|
8463
|
-
required: true
|
|
8464
|
-
}
|
|
8465
|
-
),
|
|
8466
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8467
|
-
EnhancedInput,
|
|
8468
|
-
{
|
|
8469
|
-
label: "State",
|
|
8470
|
-
placeholder: "Enter state",
|
|
8471
|
-
required: true
|
|
8472
|
-
}
|
|
8473
|
-
),
|
|
8474
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8475
|
-
EnhancedInput,
|
|
8476
|
-
{
|
|
8477
|
-
label: "Postal Code",
|
|
8478
|
-
placeholder: "12345",
|
|
8479
|
-
required: true
|
|
8480
|
-
}
|
|
8481
|
-
),
|
|
8482
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8483
|
-
EnhancedSelect,
|
|
8484
|
-
{
|
|
8485
|
-
label: "Country",
|
|
8486
|
-
placeholder: "Select country",
|
|
8487
|
-
options: [
|
|
8488
|
-
{ value: "US", label: "United States" },
|
|
8489
|
-
{ value: "CA", label: "Canada" },
|
|
8490
|
-
{ value: "GB", label: "United Kingdom" },
|
|
8491
|
-
{ value: "DE", label: "Germany" }
|
|
8492
|
-
]
|
|
8493
|
-
}
|
|
8494
|
-
),
|
|
8495
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8496
|
-
EnhancedInput,
|
|
8497
|
-
{
|
|
8498
|
-
label: "Phone Number",
|
|
8499
|
-
placeholder: "+1 (555) 123-4567",
|
|
8500
|
-
required: true
|
|
8501
|
-
}
|
|
8502
|
-
),
|
|
8503
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8504
|
-
EnhancedInput,
|
|
8505
|
-
{
|
|
8506
|
-
label: "Email Address",
|
|
8507
|
-
placeholder: "contact@business.com",
|
|
8508
|
-
type: "email",
|
|
8509
|
-
required: true
|
|
8510
|
-
}
|
|
8511
|
-
),
|
|
8512
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8513
|
-
EnhancedInput,
|
|
8912
|
+
document.body
|
|
8913
|
+
),
|
|
8914
|
+
documents.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
8915
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { className: "h-5 w-5 opacity-50" }),
|
|
8916
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "No documents uploaded yet" })
|
|
8917
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2", children: documents.map((doc) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8918
|
+
"div",
|
|
8919
|
+
{
|
|
8920
|
+
className: "border rounded-lg hover:bg-muted/30 transition-colors overflow-hidden",
|
|
8921
|
+
children: [
|
|
8922
|
+
isImageType(doc.name) && doc.url && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full bg-muted/50", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8923
|
+
"img",
|
|
8514
8924
|
{
|
|
8515
|
-
|
|
8516
|
-
|
|
8517
|
-
|
|
8925
|
+
src: doc.url,
|
|
8926
|
+
alt: doc.name,
|
|
8927
|
+
className: "w-full h-48 object-cover"
|
|
8518
8928
|
}
|
|
8519
|
-
)
|
|
8520
|
-
|
|
8521
|
-
|
|
8522
|
-
|
|
8523
|
-
|
|
8524
|
-
|
|
8525
|
-
|
|
8526
|
-
|
|
8527
|
-
|
|
8528
|
-
|
|
8529
|
-
|
|
8530
|
-
|
|
8531
|
-
|
|
8532
|
-
|
|
8533
|
-
|
|
8534
|
-
|
|
8535
|
-
|
|
8536
|
-
|
|
8929
|
+
) }),
|
|
8930
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-3", children: [
|
|
8931
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
8932
|
+
!isImageType(doc.name) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(getFileTypeColor(doc.type)), children: getFileIcon(doc.type) }),
|
|
8933
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
8934
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-medium text-sm truncate", children: doc.name }),
|
|
8935
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-xs px-2 py-0.5 rounded-full bg-muted inline-block mt-1", getFileTypeColor(doc.type)), children: doc.type }),
|
|
8936
|
+
doc.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground mt-1", children: doc.description }),
|
|
8937
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-muted-foreground mt-1", children: [
|
|
8938
|
+
doc.size,
|
|
8939
|
+
" \u2022 Uploaded by ",
|
|
8940
|
+
doc.uploadedBy,
|
|
8941
|
+
" \u2022 ",
|
|
8942
|
+
new Date(doc.uploadedAt).toLocaleDateString()
|
|
8943
|
+
] })
|
|
8944
|
+
] })
|
|
8945
|
+
] }),
|
|
8946
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
8947
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8948
|
+
Button,
|
|
8949
|
+
{
|
|
8950
|
+
variant: "ghost",
|
|
8951
|
+
size: "sm",
|
|
8952
|
+
className: "h-8 w-8 p-0",
|
|
8953
|
+
onClick: () => toast({ title: "Preview", description: `Viewing ${doc.name}` }),
|
|
8954
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, { className: "h-4 w-4" })
|
|
8955
|
+
}
|
|
8956
|
+
),
|
|
8957
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8958
|
+
Button,
|
|
8959
|
+
{
|
|
8960
|
+
variant: "ghost",
|
|
8961
|
+
size: "sm",
|
|
8962
|
+
className: "h-8 w-8 p-0",
|
|
8963
|
+
onClick: () => toast({ title: "Download", description: `Downloading ${doc.name}` }),
|
|
8964
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Download, { className: "h-4 w-4" })
|
|
8965
|
+
}
|
|
8966
|
+
),
|
|
8967
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8968
|
+
Button,
|
|
8969
|
+
{
|
|
8970
|
+
variant: "ghost",
|
|
8971
|
+
size: "sm",
|
|
8972
|
+
className: "h-8 w-8 p-0 text-muted-foreground hover:text-foreground",
|
|
8973
|
+
onClick: () => toast({ title: "Delete", description: `Deleted ${doc.name}` }),
|
|
8974
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { className: "h-4 w-4" })
|
|
8975
|
+
}
|
|
8976
|
+
)
|
|
8977
|
+
] })
|
|
8978
|
+
] })
|
|
8979
|
+
]
|
|
8980
|
+
},
|
|
8981
|
+
doc.id
|
|
8982
|
+
)) })
|
|
8983
|
+
] })
|
|
8984
|
+
] });
|
|
8985
|
+
};
|
|
8986
|
+
var Business = () => {
|
|
8987
|
+
const { id } = reactRouterDom.useParams();
|
|
8988
|
+
const navigate = reactRouterDom.useNavigate();
|
|
8989
|
+
const business = mockBusinessesList.find((b) => b.id === id);
|
|
8990
|
+
const identityVerification = id ? mockIdentityVerifications[id] : void 0;
|
|
8991
|
+
const businessUBOs = id ? mockBusinessUBOs[id] || [] : [];
|
|
8992
|
+
const businessDocuments = id ? mockBusinessDocuments[id] || [] : [];
|
|
8993
|
+
const businessAccounts = id ? mockBusinessAccounts[id] || [] : [];
|
|
8994
|
+
const [currentStatus, setCurrentStatus] = React15.useState(business?.status || "active");
|
|
8995
|
+
const [isEditingProfile, setIsEditingProfile] = React15.useState(false);
|
|
8996
|
+
const accountColumns = [
|
|
8997
|
+
{
|
|
8998
|
+
key: "number",
|
|
8999
|
+
title: "Account Number",
|
|
9000
|
+
sortable: true,
|
|
9001
|
+
width: "40%"
|
|
9002
|
+
},
|
|
9003
|
+
{
|
|
9004
|
+
key: "routingNumber",
|
|
9005
|
+
title: "Routing Number",
|
|
9006
|
+
sortable: true,
|
|
9007
|
+
width: "40%"
|
|
9008
|
+
},
|
|
9009
|
+
{
|
|
9010
|
+
key: "type",
|
|
9011
|
+
title: "Account Type",
|
|
9012
|
+
sortable: true,
|
|
9013
|
+
width: "20%",
|
|
9014
|
+
align: "right",
|
|
9015
|
+
render: (value) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "capitalize", children: value })
|
|
9016
|
+
}
|
|
9017
|
+
];
|
|
9018
|
+
if (!business) {
|
|
9019
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container mx-auto px-4 py-8", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
|
|
9020
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-2xl font-bold mb-2", children: "Business Not Found" }),
|
|
9021
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mb-4", children: "The business could not be found." })
|
|
9022
|
+
] }) });
|
|
9023
|
+
}
|
|
9024
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9025
|
+
PageLayout,
|
|
9026
|
+
{
|
|
9027
|
+
title: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
9028
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: business.businessName }),
|
|
9029
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9030
|
+
EditableInfoField,
|
|
9031
|
+
{
|
|
9032
|
+
label: "",
|
|
9033
|
+
value: currentStatus,
|
|
9034
|
+
options: [
|
|
9035
|
+
{ value: "active", label: "Active" },
|
|
9036
|
+
{ value: "inactive", label: "Inactive" },
|
|
9037
|
+
{ value: "suspended", label: "Suspended" }
|
|
9038
|
+
],
|
|
9039
|
+
onChange: (newStatus) => setCurrentStatus(newStatus),
|
|
9040
|
+
renderValue: (value) => /* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status: value.toUpperCase() }),
|
|
9041
|
+
className: "inline-block"
|
|
9042
|
+
}
|
|
9043
|
+
),
|
|
9044
|
+
/* @__PURE__ */ jsxRuntime.jsx(CIPStatusBadge, { status: business.cipStatus }),
|
|
9045
|
+
/* @__PURE__ */ jsxRuntime.jsx(EntityTypeBadge, { type: business.type }),
|
|
9046
|
+
/* @__PURE__ */ jsxRuntime.jsx(SubTypeBadge, { subType: business.subType })
|
|
9047
|
+
] }),
|
|
9048
|
+
actions: [
|
|
9049
|
+
{
|
|
9050
|
+
label: "Account",
|
|
9051
|
+
variant: "outline",
|
|
9052
|
+
onClick: () => navigate(`/business/${id}/accounts`),
|
|
9053
|
+
icon: lucideReact.Wallet
|
|
9054
|
+
},
|
|
9055
|
+
{
|
|
9056
|
+
label: "Counterparty",
|
|
9057
|
+
variant: "outline",
|
|
9058
|
+
onClick: () => navigate(`/business/${id}/counterparties`),
|
|
9059
|
+
icon: lucideReact.Users
|
|
9060
|
+
}
|
|
9061
|
+
],
|
|
9062
|
+
maxWidth: "full",
|
|
9063
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-4", children: [
|
|
9064
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-4", children: [
|
|
9065
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9066
|
+
BusinessProfileCard,
|
|
9067
|
+
{
|
|
9068
|
+
identityVerification,
|
|
9069
|
+
isEditing: isEditingProfile,
|
|
9070
|
+
onToggleEdit: () => setIsEditingProfile(!isEditingProfile)
|
|
9071
|
+
}
|
|
9072
|
+
),
|
|
9073
|
+
/* @__PURE__ */ jsxRuntime.jsx(UBOCard, { ubos: businessUBOs }),
|
|
9074
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
9075
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
9076
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "External Accounts" }),
|
|
9077
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Button, { size: "sm", variant: "ghost", children: [
|
|
9078
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-1" }),
|
|
9079
|
+
"Account"
|
|
9080
|
+
] })
|
|
9081
|
+
] }),
|
|
9082
|
+
/* @__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: [
|
|
9083
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wallet, { className: "h-5 w-5 opacity-50" }),
|
|
9084
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "No external accounts found" })
|
|
9085
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
9086
|
+
DataTable,
|
|
9087
|
+
{
|
|
9088
|
+
columns: accountColumns,
|
|
9089
|
+
data: businessAccounts
|
|
9090
|
+
}
|
|
9091
|
+
) })
|
|
9092
|
+
] }),
|
|
9093
|
+
/* @__PURE__ */ jsxRuntime.jsx(BusinessDocuments, { businessId: id || "", documents: businessDocuments })
|
|
9094
|
+
] }),
|
|
9095
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsxRuntime.jsx(BusinessStatusCard, { isEditing: false, onToggleEdit: () => {
|
|
9096
|
+
} }) })
|
|
9097
|
+
] })
|
|
9098
|
+
}
|
|
9099
|
+
);
|
|
9100
|
+
};
|
|
9101
|
+
var BusinessDetail_default = Business;
|
|
9102
|
+
var CreateBusiness = () => {
|
|
9103
|
+
const navigate = reactRouterDom.useNavigate();
|
|
9104
|
+
const [businessType, setBusinessType] = React15.useState("");
|
|
9105
|
+
const form = reactHookForm.useForm({
|
|
9106
|
+
resolver: zod$1.zodResolver(businessProfileSchema),
|
|
9107
|
+
defaultValues: {
|
|
9108
|
+
legalName: "",
|
|
9109
|
+
dbaName: "",
|
|
9110
|
+
businessType: "",
|
|
9111
|
+
taxId: "",
|
|
9112
|
+
formationDate: "",
|
|
9113
|
+
idType: "EIN",
|
|
9114
|
+
incorporationState: "",
|
|
9115
|
+
website: "",
|
|
9116
|
+
email: "",
|
|
9117
|
+
mobilePhone: "",
|
|
9118
|
+
mcc: "",
|
|
9119
|
+
naics: "",
|
|
9120
|
+
achCompanyId: "",
|
|
9121
|
+
achCompanyName: "",
|
|
9122
|
+
externalId: "",
|
|
9123
|
+
contactFirstName: "",
|
|
9124
|
+
contactLastName: "",
|
|
9125
|
+
contactEmail: "",
|
|
9126
|
+
contactPhone: "",
|
|
9127
|
+
address: {
|
|
9128
|
+
streetAddress: "",
|
|
9129
|
+
apartment: "",
|
|
9130
|
+
city: "",
|
|
9131
|
+
state: "",
|
|
9132
|
+
postalCode: "",
|
|
9133
|
+
country: "US",
|
|
9134
|
+
addressType: "business"
|
|
9135
|
+
}
|
|
9136
|
+
}
|
|
9137
|
+
});
|
|
9138
|
+
const onSubmit = (data) => {
|
|
9139
|
+
console.log("Business data:", data);
|
|
9140
|
+
navigate("/business");
|
|
9141
|
+
};
|
|
9142
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9143
|
+
PageLayout,
|
|
9144
|
+
{
|
|
9145
|
+
title: "Create Business",
|
|
9146
|
+
actions: [
|
|
9147
|
+
{ label: "Cancel", variant: "outline", onClick: () => navigate("/business") },
|
|
9148
|
+
{ label: "Create Business", variant: "default", onClick: form.handleSubmit(onSubmit) }
|
|
9149
|
+
],
|
|
9150
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "space-y-6", children: [
|
|
9151
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "p-6", children: [
|
|
9152
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b border-border pb-4 mb-6", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Business Information" }) }),
|
|
9153
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
|
|
9154
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9155
|
+
EnhancedInput,
|
|
9156
|
+
{
|
|
9157
|
+
label: "Legal Name",
|
|
9158
|
+
placeholder: "Enter legal business name",
|
|
9159
|
+
required: true,
|
|
9160
|
+
...form.register("legalName")
|
|
9161
|
+
}
|
|
9162
|
+
),
|
|
9163
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9164
|
+
EnhancedInput,
|
|
9165
|
+
{
|
|
9166
|
+
label: "DBA Name",
|
|
9167
|
+
placeholder: "Enter DBA name",
|
|
9168
|
+
hint: "Doing Business As name",
|
|
9169
|
+
...form.register("dbaName")
|
|
9170
|
+
}
|
|
9171
|
+
),
|
|
9172
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
9173
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9174
|
+
EnhancedSelect,
|
|
9175
|
+
{
|
|
9176
|
+
label: "Business Type",
|
|
9177
|
+
placeholder: "Select business type",
|
|
9178
|
+
value: businessType,
|
|
9179
|
+
onValueChange: (value) => {
|
|
9180
|
+
setBusinessType(value);
|
|
9181
|
+
form.setValue("businessType", value);
|
|
9182
|
+
},
|
|
9183
|
+
options: [
|
|
9184
|
+
{ value: "corporation", label: "Corporation" },
|
|
9185
|
+
{ value: "llc", label: "LLC" },
|
|
9186
|
+
{ value: "partnership", label: "Partnership" },
|
|
9187
|
+
{ value: "sole_proprietorship", label: "Sole Proprietorship" }
|
|
9188
|
+
]
|
|
9189
|
+
}
|
|
9190
|
+
),
|
|
9191
|
+
businessType && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
9192
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: "Preview:" }),
|
|
9193
|
+
/* @__PURE__ */ jsxRuntime.jsx(BusinessTypeBadge, { type: businessType })
|
|
9194
|
+
] })
|
|
9195
|
+
] }),
|
|
9196
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9197
|
+
EnhancedInput,
|
|
9198
|
+
{
|
|
9199
|
+
label: "Tax ID (EIN)",
|
|
9200
|
+
placeholder: "12-3456789",
|
|
9201
|
+
hint: "Employer Identification Number",
|
|
9202
|
+
required: true,
|
|
9203
|
+
...form.register("taxId")
|
|
9204
|
+
}
|
|
9205
|
+
),
|
|
9206
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9207
|
+
EnhancedInput,
|
|
9208
|
+
{
|
|
9209
|
+
label: "Formation Date",
|
|
9210
|
+
placeholder: "YYYY-MM-DD",
|
|
9211
|
+
type: "date",
|
|
9212
|
+
...form.register("formationDate")
|
|
9213
|
+
}
|
|
9214
|
+
),
|
|
9215
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9216
|
+
EnhancedInput,
|
|
9217
|
+
{
|
|
9218
|
+
label: "Incorporation State",
|
|
9219
|
+
placeholder: "Enter state",
|
|
9220
|
+
...form.register("incorporationState")
|
|
9221
|
+
}
|
|
9222
|
+
),
|
|
9223
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9224
|
+
EnhancedInput,
|
|
9225
|
+
{
|
|
9226
|
+
label: "Website",
|
|
9227
|
+
placeholder: "https://www.business.com",
|
|
9228
|
+
type: "url",
|
|
9229
|
+
...form.register("website")
|
|
9230
|
+
}
|
|
9231
|
+
),
|
|
9232
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9233
|
+
EnhancedInput,
|
|
9234
|
+
{
|
|
9235
|
+
label: "Email Address",
|
|
9236
|
+
placeholder: "contact@business.com",
|
|
9237
|
+
type: "email",
|
|
9238
|
+
...form.register("email")
|
|
9239
|
+
}
|
|
9240
|
+
),
|
|
9241
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9242
|
+
EnhancedInput,
|
|
9243
|
+
{
|
|
9244
|
+
label: "Mobile Phone",
|
|
9245
|
+
placeholder: "+1 (555) 123-4567",
|
|
9246
|
+
...form.register("mobilePhone")
|
|
9247
|
+
}
|
|
9248
|
+
),
|
|
9249
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9250
|
+
EnhancedInput,
|
|
9251
|
+
{
|
|
9252
|
+
label: "MCC",
|
|
9253
|
+
placeholder: "1234",
|
|
9254
|
+
hint: "4-digit Merchant Category Code",
|
|
9255
|
+
...form.register("mcc")
|
|
9256
|
+
}
|
|
9257
|
+
),
|
|
9258
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9259
|
+
EnhancedInput,
|
|
9260
|
+
{
|
|
9261
|
+
label: "NAICS",
|
|
9262
|
+
placeholder: "123456",
|
|
9263
|
+
hint: "6-digit industry classification",
|
|
9264
|
+
...form.register("naics")
|
|
9265
|
+
}
|
|
9266
|
+
),
|
|
9267
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9268
|
+
EnhancedInput,
|
|
9269
|
+
{
|
|
9270
|
+
label: "ACH Company ID",
|
|
9271
|
+
placeholder: "1234567890",
|
|
9272
|
+
hint: "10-digit ACH identifier",
|
|
9273
|
+
...form.register("achCompanyId")
|
|
9274
|
+
}
|
|
9275
|
+
),
|
|
9276
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9277
|
+
EnhancedInput,
|
|
9278
|
+
{
|
|
9279
|
+
label: "ACH Company Name",
|
|
9280
|
+
placeholder: "Enter ACH company name",
|
|
9281
|
+
...form.register("achCompanyName")
|
|
9282
|
+
}
|
|
9283
|
+
),
|
|
9284
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9285
|
+
EnhancedInput,
|
|
9286
|
+
{
|
|
9287
|
+
label: "External ID",
|
|
9288
|
+
placeholder: "UUID format",
|
|
9289
|
+
hint: "External system identifier",
|
|
9290
|
+
...form.register("externalId")
|
|
9291
|
+
}
|
|
9292
|
+
)
|
|
9293
|
+
] })
|
|
9294
|
+
] }),
|
|
9295
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "p-6", children: [
|
|
9296
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b border-border pb-4 mb-6", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Business Address" }) }),
|
|
9297
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
|
|
9298
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9299
|
+
EnhancedInput,
|
|
9300
|
+
{
|
|
9301
|
+
label: "Street Address",
|
|
9302
|
+
placeholder: "Enter street address",
|
|
9303
|
+
required: true,
|
|
9304
|
+
...form.register("address.streetAddress")
|
|
9305
|
+
}
|
|
9306
|
+
),
|
|
9307
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9308
|
+
EnhancedInput,
|
|
9309
|
+
{
|
|
9310
|
+
label: "Apartment/Suite",
|
|
9311
|
+
placeholder: "Enter apartment or suite number",
|
|
9312
|
+
...form.register("address.apartment")
|
|
9313
|
+
}
|
|
9314
|
+
),
|
|
9315
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9316
|
+
EnhancedInput,
|
|
9317
|
+
{
|
|
9318
|
+
label: "City",
|
|
9319
|
+
placeholder: "Enter city",
|
|
9320
|
+
required: true,
|
|
9321
|
+
...form.register("address.city")
|
|
9322
|
+
}
|
|
9323
|
+
),
|
|
9324
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9325
|
+
EnhancedInput,
|
|
9326
|
+
{
|
|
9327
|
+
label: "State",
|
|
9328
|
+
placeholder: "Enter state",
|
|
9329
|
+
required: true,
|
|
9330
|
+
...form.register("address.state")
|
|
9331
|
+
}
|
|
9332
|
+
),
|
|
9333
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9334
|
+
EnhancedInput,
|
|
9335
|
+
{
|
|
9336
|
+
label: "Postal Code",
|
|
9337
|
+
placeholder: "12345",
|
|
9338
|
+
required: true,
|
|
9339
|
+
...form.register("address.postalCode")
|
|
9340
|
+
}
|
|
9341
|
+
),
|
|
9342
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9343
|
+
EnhancedSelect,
|
|
9344
|
+
{
|
|
9345
|
+
label: "Country",
|
|
9346
|
+
placeholder: "Select country",
|
|
9347
|
+
value: form.watch("address.country"),
|
|
9348
|
+
onValueChange: (value) => form.setValue("address.country", value),
|
|
9349
|
+
options: [
|
|
9350
|
+
{ value: "US", label: "United States" },
|
|
9351
|
+
{ value: "CA", label: "Canada" },
|
|
9352
|
+
{ value: "GB", label: "United Kingdom" },
|
|
9353
|
+
{ value: "DE", label: "Germany" }
|
|
9354
|
+
]
|
|
9355
|
+
}
|
|
9356
|
+
)
|
|
9357
|
+
] })
|
|
9358
|
+
] }),
|
|
9359
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "p-6", children: [
|
|
9360
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b border-border pb-4 mb-6", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Contact Information" }) }),
|
|
9361
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
|
|
9362
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9363
|
+
EnhancedInput,
|
|
9364
|
+
{
|
|
9365
|
+
label: "Contact First Name",
|
|
9366
|
+
placeholder: "Enter first name",
|
|
9367
|
+
...form.register("contactFirstName")
|
|
9368
|
+
}
|
|
9369
|
+
),
|
|
9370
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9371
|
+
EnhancedInput,
|
|
9372
|
+
{
|
|
9373
|
+
label: "Contact Last Name",
|
|
9374
|
+
placeholder: "Enter last name",
|
|
9375
|
+
...form.register("contactLastName")
|
|
9376
|
+
}
|
|
9377
|
+
),
|
|
9378
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9379
|
+
EnhancedInput,
|
|
9380
|
+
{
|
|
9381
|
+
label: "Contact Email",
|
|
9382
|
+
placeholder: "contact@business.com",
|
|
9383
|
+
type: "email",
|
|
9384
|
+
...form.register("contactEmail")
|
|
9385
|
+
}
|
|
9386
|
+
),
|
|
9387
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9388
|
+
EnhancedInput,
|
|
9389
|
+
{
|
|
9390
|
+
label: "Contact Phone",
|
|
9391
|
+
placeholder: "+1 (555) 123-4567",
|
|
9392
|
+
...form.register("contactPhone")
|
|
9393
|
+
}
|
|
9394
|
+
)
|
|
9395
|
+
] })
|
|
9396
|
+
] })
|
|
9397
|
+
] })
|
|
9398
|
+
}
|
|
9399
|
+
);
|
|
9400
|
+
};
|
|
9401
|
+
var Create_default = CreateBusiness;
|
|
9402
|
+
var Cases = () => {
|
|
9403
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9404
|
+
PageLayout,
|
|
9405
|
+
{
|
|
9406
|
+
title: "Cases",
|
|
9407
|
+
description: "Manage and track investigation cases",
|
|
9408
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center py-12 text-muted-foreground", children: "Cases content coming soon" })
|
|
9409
|
+
}
|
|
9410
|
+
);
|
|
9411
|
+
};
|
|
9412
|
+
var Cases_default = Cases;
|
|
9413
|
+
|
|
9414
|
+
// src/lib/mock-data/counterparties-list-data.ts
|
|
9415
|
+
var mockCounterpartiesList = [
|
|
9416
|
+
{
|
|
9417
|
+
id: "cp-001",
|
|
9418
|
+
name: "Acme Corporation",
|
|
9419
|
+
type: "BUSINESS",
|
|
9420
|
+
status: "ACTIVE",
|
|
9421
|
+
productName: "Business Banking Pro",
|
|
9422
|
+
created: "2024-01-15",
|
|
9423
|
+
modified: "2024-01-20"
|
|
9424
|
+
},
|
|
9425
|
+
{
|
|
9426
|
+
id: "cp-002",
|
|
9427
|
+
name: "John Smith",
|
|
9428
|
+
type: "INDIVIDUAL",
|
|
9429
|
+
status: "ACTIVE",
|
|
9430
|
+
productName: "Personal Banking",
|
|
9431
|
+
created: "2024-01-10",
|
|
9432
|
+
modified: "2024-01-18"
|
|
9433
|
+
},
|
|
9434
|
+
{
|
|
9435
|
+
id: "cp-003",
|
|
9436
|
+
name: "Global Tech Solutions",
|
|
9437
|
+
type: "BUSINESS",
|
|
9438
|
+
status: "ACTIVE",
|
|
9439
|
+
productName: "Enterprise Banking",
|
|
9440
|
+
created: "2024-01-08",
|
|
9441
|
+
modified: "2024-01-22"
|
|
9442
|
+
},
|
|
9443
|
+
{
|
|
9444
|
+
id: "cp-004",
|
|
9445
|
+
name: "City Government",
|
|
9446
|
+
type: "GOVERNMENT",
|
|
9447
|
+
status: "ACTIVE",
|
|
9448
|
+
productName: "Government Banking",
|
|
9449
|
+
created: "2024-01-05",
|
|
9450
|
+
modified: "2024-01-15"
|
|
9451
|
+
},
|
|
9452
|
+
{
|
|
9453
|
+
id: "cp-005",
|
|
9454
|
+
name: "Hope Foundation",
|
|
9455
|
+
type: "NONPROFIT",
|
|
9456
|
+
status: "ACTIVE",
|
|
9457
|
+
productName: "Non-Profit Banking",
|
|
9458
|
+
created: "2024-01-03",
|
|
9459
|
+
modified: "2024-01-12"
|
|
9460
|
+
},
|
|
9461
|
+
{
|
|
9462
|
+
id: "cp-006",
|
|
9463
|
+
name: "Sarah Johnson",
|
|
9464
|
+
type: "INDIVIDUAL",
|
|
9465
|
+
status: "PENDING",
|
|
9466
|
+
productName: "Personal Banking",
|
|
9467
|
+
created: "2024-01-25",
|
|
9468
|
+
modified: "2024-01-25"
|
|
9469
|
+
},
|
|
9470
|
+
{
|
|
9471
|
+
id: "cp-007",
|
|
9472
|
+
name: "Tech Innovations LLC",
|
|
9473
|
+
type: "BUSINESS",
|
|
9474
|
+
status: "INACTIVE",
|
|
9475
|
+
productName: "Business Banking",
|
|
9476
|
+
created: "2023-12-20",
|
|
9477
|
+
modified: "2024-01-10"
|
|
9478
|
+
},
|
|
9479
|
+
{
|
|
9480
|
+
id: "cp-008",
|
|
9481
|
+
name: "State Department",
|
|
9482
|
+
type: "GOVERNMENT",
|
|
9483
|
+
status: "ACTIVE",
|
|
9484
|
+
productName: "Government Banking Pro",
|
|
9485
|
+
created: "2023-12-15",
|
|
9486
|
+
modified: "2024-01-08"
|
|
9487
|
+
},
|
|
9488
|
+
{
|
|
9489
|
+
id: "cp-009",
|
|
9490
|
+
name: "Michael Chen",
|
|
9491
|
+
type: "INDIVIDUAL",
|
|
9492
|
+
status: "ACTIVE",
|
|
9493
|
+
productName: "Premium Banking",
|
|
9494
|
+
created: "2023-12-10",
|
|
9495
|
+
modified: "2024-01-05"
|
|
9496
|
+
},
|
|
9497
|
+
{
|
|
9498
|
+
id: "cp-010",
|
|
9499
|
+
name: "Green Earth Initiative",
|
|
9500
|
+
type: "NONPROFIT",
|
|
9501
|
+
status: "ACTIVE",
|
|
9502
|
+
productName: "Non-Profit Banking Plus",
|
|
9503
|
+
created: "2023-12-01",
|
|
9504
|
+
modified: "2023-12-28"
|
|
9505
|
+
}
|
|
9506
|
+
];
|
|
9507
|
+
var Counterparties = () => {
|
|
9508
|
+
const navigate = reactRouterDom.useNavigate();
|
|
9509
|
+
const [counterparties, setCounterparties] = React15.useState(mockCounterpartiesList);
|
|
9510
|
+
const [filteredCounterparties, setFilteredCounterparties] = React15.useState(mockCounterpartiesList);
|
|
9511
|
+
const [sortBy, setSortBy] = React15.useState("created");
|
|
9512
|
+
const [sortDirection, setSortDirection] = React15.useState("desc");
|
|
9513
|
+
const [filters, setFilters] = React15.useState({
|
|
9514
|
+
name: "",
|
|
9515
|
+
type: "",
|
|
9516
|
+
status: "",
|
|
9517
|
+
createdDateStart: void 0,
|
|
9518
|
+
createdDateEnd: void 0
|
|
9519
|
+
});
|
|
9520
|
+
const handleFilterChange = (field, value) => {
|
|
9521
|
+
setFilters((prev) => ({ ...prev, [field]: value }));
|
|
9522
|
+
};
|
|
9523
|
+
const applyFilters = () => {
|
|
9524
|
+
let filtered = counterparties;
|
|
9525
|
+
if (filters.name) {
|
|
9526
|
+
filtered = filtered.filter(
|
|
9527
|
+
(counterparty) => counterparty.name.toLowerCase().includes(filters.name.toLowerCase())
|
|
9528
|
+
);
|
|
9529
|
+
}
|
|
9530
|
+
if (filters.type) {
|
|
9531
|
+
filtered = filtered.filter((counterparty) => counterparty.type === filters.type);
|
|
9532
|
+
}
|
|
9533
|
+
if (filters.status) {
|
|
9534
|
+
filtered = filtered.filter((counterparty) => counterparty.status === filters.status);
|
|
9535
|
+
}
|
|
9536
|
+
if (filters.createdDateStart) {
|
|
9537
|
+
filtered = filtered.filter(
|
|
9538
|
+
(counterparty) => new Date(counterparty.created) >= filters.createdDateStart
|
|
9539
|
+
);
|
|
9540
|
+
}
|
|
9541
|
+
if (filters.createdDateEnd) {
|
|
9542
|
+
filtered = filtered.filter(
|
|
9543
|
+
(counterparty) => new Date(counterparty.created) <= filters.createdDateEnd
|
|
9544
|
+
);
|
|
9545
|
+
}
|
|
9546
|
+
setFilteredCounterparties(filtered);
|
|
9547
|
+
};
|
|
9548
|
+
const resetFilters = () => {
|
|
9549
|
+
setFilters({
|
|
9550
|
+
name: "",
|
|
9551
|
+
type: "",
|
|
9552
|
+
status: "",
|
|
9553
|
+
createdDateStart: void 0,
|
|
9554
|
+
createdDateEnd: void 0
|
|
9555
|
+
});
|
|
9556
|
+
setFilteredCounterparties(counterparties);
|
|
9557
|
+
};
|
|
9558
|
+
const handleSort = (key) => {
|
|
9559
|
+
if (sortBy === key) {
|
|
9560
|
+
setSortDirection(sortDirection === "asc" ? "desc" : "asc");
|
|
9561
|
+
} else {
|
|
9562
|
+
setSortBy(key);
|
|
9563
|
+
setSortDirection("asc");
|
|
9564
|
+
}
|
|
9565
|
+
};
|
|
9566
|
+
const handleRowClick = (counterparty) => {
|
|
9567
|
+
navigate(`/counterparty/${counterparty.id}`);
|
|
9568
|
+
};
|
|
9569
|
+
const columns2 = [
|
|
9570
|
+
{
|
|
9571
|
+
key: "id",
|
|
9572
|
+
title: "Counterparty ID",
|
|
9573
|
+
sortable: true
|
|
9574
|
+
},
|
|
9575
|
+
{
|
|
9576
|
+
key: "name",
|
|
9577
|
+
title: "Name",
|
|
9578
|
+
sortable: true
|
|
9579
|
+
},
|
|
9580
|
+
{
|
|
9581
|
+
key: "type",
|
|
9582
|
+
title: "Type",
|
|
9583
|
+
sortable: true,
|
|
9584
|
+
render: (value) => /* @__PURE__ */ jsxRuntime.jsx(CounterpartyTypeBadge, { type: value })
|
|
9585
|
+
},
|
|
9586
|
+
{
|
|
9587
|
+
key: "status",
|
|
9588
|
+
title: "Status",
|
|
9589
|
+
sortable: true,
|
|
9590
|
+
render: (value) => /* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status: value })
|
|
9591
|
+
},
|
|
9592
|
+
{
|
|
9593
|
+
key: "productName",
|
|
9594
|
+
title: "Product Name",
|
|
9595
|
+
sortable: true,
|
|
9596
|
+
render: (value) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary hover:underline cursor-pointer", children: value })
|
|
9597
|
+
},
|
|
9598
|
+
{
|
|
9599
|
+
key: "created",
|
|
9600
|
+
title: "Created",
|
|
9601
|
+
sortable: true
|
|
9602
|
+
},
|
|
9603
|
+
{
|
|
9604
|
+
key: "modified",
|
|
9605
|
+
title: "Modified",
|
|
9606
|
+
sortable: true
|
|
9607
|
+
}
|
|
9608
|
+
];
|
|
9609
|
+
const sortedCounterparties = [...filteredCounterparties].sort((a, b) => {
|
|
9610
|
+
const aValue = a[sortBy];
|
|
9611
|
+
const bValue = b[sortBy];
|
|
9612
|
+
if (aValue < bValue) return sortDirection === "asc" ? -1 : 1;
|
|
9613
|
+
if (aValue > bValue) return sortDirection === "asc" ? 1 : -1;
|
|
9614
|
+
return 0;
|
|
9615
|
+
});
|
|
9616
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col h-screen bg-gradient-subtle", children: [
|
|
9617
|
+
/* @__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: [
|
|
9618
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-bold text-foreground mb-2", children: "Counterparties" }) }),
|
|
9619
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
9620
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Sheet, { children: [
|
|
9621
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", className: "gap-2", children: [
|
|
9622
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Filter, { className: "h-4 w-4" }),
|
|
9623
|
+
"Filters"
|
|
9624
|
+
] }) }),
|
|
9625
|
+
/* @__PURE__ */ jsxRuntime.jsxs(SheetContent, { side: "right", className: "w-full sm:max-w-xl overflow-y-auto", children: [
|
|
9626
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { children: "Counterparty Filters" }) }),
|
|
9627
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6 py-6", children: [
|
|
9628
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9629
|
+
EnhancedInput,
|
|
9630
|
+
{
|
|
9631
|
+
label: "Name",
|
|
9632
|
+
value: filters.name,
|
|
9633
|
+
onChange: (e) => handleFilterChange("name", e.target.value),
|
|
9634
|
+
placeholder: "Enter counterparty name"
|
|
9635
|
+
}
|
|
9636
|
+
),
|
|
9637
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9638
|
+
EnhancedSelect,
|
|
9639
|
+
{
|
|
9640
|
+
label: "Type",
|
|
9641
|
+
value: filters.type,
|
|
9642
|
+
onValueChange: (value) => handleFilterChange("type", value),
|
|
9643
|
+
placeholder: "Select type",
|
|
9644
|
+
options: [
|
|
9645
|
+
{ value: "BUSINESS", label: "Business" },
|
|
9646
|
+
{ value: "INDIVIDUAL", label: "Individual" },
|
|
9647
|
+
{ value: "GOVERNMENT", label: "Government" },
|
|
9648
|
+
{ value: "NONPROFIT", label: "Non-Profit" }
|
|
9649
|
+
]
|
|
9650
|
+
}
|
|
9651
|
+
),
|
|
9652
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9653
|
+
EnhancedSelect,
|
|
9654
|
+
{
|
|
9655
|
+
label: "Status",
|
|
9656
|
+
value: filters.status,
|
|
9657
|
+
onValueChange: (value) => handleFilterChange("status", value),
|
|
9658
|
+
placeholder: "Select status",
|
|
9659
|
+
options: [
|
|
9660
|
+
{ value: "ACTIVE", label: "Active" },
|
|
9661
|
+
{ value: "INACTIVE", label: "Inactive" },
|
|
9662
|
+
{ value: "PENDING", label: "Pending" },
|
|
9663
|
+
{ value: "SUSPENDED", label: "Suspended" }
|
|
9664
|
+
]
|
|
9665
|
+
}
|
|
9666
|
+
),
|
|
9667
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
9668
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
9669
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "Created Date Start" }),
|
|
9670
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9671
|
+
DatePicker,
|
|
9672
|
+
{
|
|
9673
|
+
date: filters.createdDateStart,
|
|
9674
|
+
onDateChange: (date) => handleFilterChange("createdDateStart", date),
|
|
9675
|
+
placeholder: "MM/DD/YYYY",
|
|
9676
|
+
buttonClassName: "w-full",
|
|
9677
|
+
className: "bg-background z-50"
|
|
9678
|
+
}
|
|
9679
|
+
)
|
|
9680
|
+
] }),
|
|
9681
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
9682
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "Created Date End" }),
|
|
9683
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9684
|
+
DatePicker,
|
|
9685
|
+
{
|
|
9686
|
+
date: filters.createdDateEnd,
|
|
9687
|
+
onDateChange: (date) => handleFilterChange("createdDateEnd", date),
|
|
9688
|
+
placeholder: "MM/DD/YYYY",
|
|
9689
|
+
buttonClassName: "w-full",
|
|
9690
|
+
className: "bg-background z-50"
|
|
9691
|
+
}
|
|
9692
|
+
)
|
|
9693
|
+
] })
|
|
9694
|
+
] })
|
|
9695
|
+
] }),
|
|
9696
|
+
/* @__PURE__ */ jsxRuntime.jsxs(SheetFooter, { className: "gap-2", children: [
|
|
9697
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", onClick: resetFilters, children: "Reset Filters" }),
|
|
9698
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: applyFilters, children: "Apply Filters" })
|
|
9699
|
+
] })
|
|
9700
|
+
] })
|
|
9701
|
+
] }),
|
|
9702
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: () => navigate("/counterparty/create"), children: "Create Counterparty" })
|
|
9703
|
+
] })
|
|
9704
|
+
] }) }) }),
|
|
9705
|
+
/* @__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(
|
|
9706
|
+
DataTable,
|
|
9707
|
+
{
|
|
9708
|
+
columns: columns2,
|
|
9709
|
+
data: sortedCounterparties,
|
|
9710
|
+
sortBy,
|
|
9711
|
+
sortDirection,
|
|
9712
|
+
onSort: handleSort,
|
|
9713
|
+
onRowClick: handleRowClick
|
|
9714
|
+
}
|
|
9715
|
+
) }) }) })
|
|
9716
|
+
] });
|
|
9717
|
+
};
|
|
9718
|
+
var Counterparties_default = Counterparties;
|
|
9719
|
+
var mockCounterpartyTimeline = [
|
|
9720
|
+
{
|
|
9721
|
+
id: "1",
|
|
9722
|
+
action: "Counterparty Created",
|
|
9723
|
+
user: "admin",
|
|
9724
|
+
details: "Initial counterparty setup",
|
|
9725
|
+
status: "Active",
|
|
9726
|
+
timestamp: "2024-01-15 10:30:00"
|
|
9727
|
+
},
|
|
9728
|
+
{
|
|
9729
|
+
id: "2",
|
|
9730
|
+
action: "Profile Updated",
|
|
9731
|
+
user: "admin",
|
|
9732
|
+
details: "Updated counterparty information",
|
|
9733
|
+
timestamp: "2024-01-20 14:22:00"
|
|
9734
|
+
},
|
|
9735
|
+
{
|
|
9736
|
+
id: "3",
|
|
9737
|
+
action: "OFAC Check Completed",
|
|
9738
|
+
user: "System",
|
|
9739
|
+
details: "Automated compliance check",
|
|
9740
|
+
status: "Verified",
|
|
9741
|
+
timestamp: "2024-01-20 14:30:00"
|
|
9742
|
+
}
|
|
9743
|
+
];
|
|
9744
|
+
var CounterpartyStatusCard = ({ isEditing, onToggleEdit, className }) => {
|
|
9745
|
+
const getIcon = (action) => {
|
|
9746
|
+
if (action.includes("Created")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-4 w-4" });
|
|
9747
|
+
if (action.includes("Assigned")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserPlus, { className: "h-4 w-4" });
|
|
9748
|
+
if (action.includes("Updated") || action.includes("Modified") || action.includes("Check")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Edit, { className: "h-4 w-4" });
|
|
9749
|
+
if (action.includes("Completed") || action.includes("Verified")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle, { className: "h-4 w-4" });
|
|
9750
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-4 w-4" });
|
|
9751
|
+
};
|
|
9752
|
+
const getStatusColor2 = (status) => {
|
|
9753
|
+
switch (status) {
|
|
9754
|
+
case "Active":
|
|
9755
|
+
case "Verified":
|
|
9756
|
+
return "text-success";
|
|
9757
|
+
case "Pending":
|
|
9758
|
+
return "text-warning";
|
|
9759
|
+
default:
|
|
9760
|
+
return "text-muted-foreground";
|
|
9761
|
+
}
|
|
9762
|
+
};
|
|
9763
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9764
|
+
FormCard,
|
|
9765
|
+
{
|
|
9766
|
+
title: "Timeline",
|
|
9767
|
+
className,
|
|
9768
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: mockCounterpartyTimeline.map((event, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative pl-6 pb-3", children: [
|
|
9769
|
+
index !== mockCounterpartyTimeline.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-[7px] top-5 bottom-0 w-[2px] bg-border" }),
|
|
9770
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
|
|
9771
|
+
"absolute left-0 top-0 flex-none",
|
|
9772
|
+
getStatusColor2(event.status)
|
|
9773
|
+
), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-4", children: getIcon(event.action) }) }),
|
|
9774
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-0.5", children: [
|
|
9775
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-foreground", children: event.action }),
|
|
9776
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
9777
|
+
"by ",
|
|
9778
|
+
event.user
|
|
9779
|
+
] }),
|
|
9780
|
+
event.details && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: event.details }),
|
|
9781
|
+
event.status && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cn("text-xs font-medium", getStatusColor2(event.status)), children: [
|
|
9782
|
+
"Status: ",
|
|
9783
|
+
event.status
|
|
9784
|
+
] }),
|
|
9785
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground/70 pt-0.5", children: event.timestamp })
|
|
9786
|
+
] })
|
|
9787
|
+
] }, event.id)) })
|
|
9788
|
+
}
|
|
9789
|
+
);
|
|
9790
|
+
};
|
|
9791
|
+
var mockPaymentMethods = [
|
|
9792
|
+
{
|
|
9793
|
+
id: "pm-001",
|
|
9794
|
+
type: "Wire Transfer",
|
|
9795
|
+
accountNumber: "****1234",
|
|
9796
|
+
status: "active",
|
|
9797
|
+
default: true
|
|
9798
|
+
},
|
|
9799
|
+
{
|
|
9800
|
+
id: "pm-002",
|
|
9801
|
+
type: "ACH",
|
|
9802
|
+
accountNumber: "****5678",
|
|
9803
|
+
status: "active",
|
|
9804
|
+
default: false
|
|
9805
|
+
}
|
|
9806
|
+
];
|
|
9807
|
+
var CounterpartyDetail = () => {
|
|
9808
|
+
const { id } = reactRouterDom.useParams();
|
|
9809
|
+
const navigate = reactRouterDom.useNavigate();
|
|
9810
|
+
const counterparty = mockCounterpartiesList.find((c) => c.id === id);
|
|
9811
|
+
const counterpartyDocuments = id ? mockBusinessDocuments[id] || [] : [];
|
|
9812
|
+
const [currentStatus, setCurrentStatus] = React15.useState(counterparty?.status || "ACTIVE");
|
|
9813
|
+
const [isEditingProfile, setIsEditingProfile] = React15.useState(false);
|
|
9814
|
+
const paymentMethodColumns = [
|
|
9815
|
+
{
|
|
9816
|
+
key: "type",
|
|
9817
|
+
title: "Payment Method",
|
|
9818
|
+
sortable: true,
|
|
9819
|
+
width: "30%"
|
|
9820
|
+
},
|
|
9821
|
+
{
|
|
9822
|
+
key: "accountNumber",
|
|
9823
|
+
title: "Account Number",
|
|
9824
|
+
sortable: true,
|
|
9825
|
+
width: "30%"
|
|
9826
|
+
},
|
|
9827
|
+
{
|
|
9828
|
+
key: "status",
|
|
9829
|
+
title: "Status",
|
|
9830
|
+
sortable: true,
|
|
9831
|
+
width: "20%",
|
|
9832
|
+
render: (value) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "capitalize", children: value })
|
|
9833
|
+
},
|
|
9834
|
+
{
|
|
9835
|
+
key: "default",
|
|
9836
|
+
title: "Default",
|
|
9837
|
+
sortable: true,
|
|
9838
|
+
width: "20%",
|
|
9839
|
+
align: "right",
|
|
9840
|
+
render: (value) => value ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-success", children: "Yes" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "No" })
|
|
9841
|
+
}
|
|
9842
|
+
];
|
|
9843
|
+
const documentColumns = [
|
|
9844
|
+
{
|
|
9845
|
+
key: "name",
|
|
9846
|
+
title: "Document Name",
|
|
9847
|
+
sortable: true,
|
|
9848
|
+
width: "40%"
|
|
9849
|
+
},
|
|
9850
|
+
{
|
|
9851
|
+
key: "type",
|
|
9852
|
+
title: "Type",
|
|
9853
|
+
sortable: true,
|
|
9854
|
+
width: "20%"
|
|
9855
|
+
},
|
|
9856
|
+
{
|
|
9857
|
+
key: "uploadedDate",
|
|
9858
|
+
title: "Uploaded",
|
|
9859
|
+
sortable: true,
|
|
9860
|
+
width: "20%"
|
|
9861
|
+
},
|
|
9862
|
+
{
|
|
9863
|
+
key: "status",
|
|
9864
|
+
title: "Status",
|
|
9865
|
+
sortable: true,
|
|
9866
|
+
width: "20%",
|
|
9867
|
+
align: "right",
|
|
9868
|
+
render: (value) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "capitalize", children: value })
|
|
9869
|
+
}
|
|
9870
|
+
];
|
|
9871
|
+
if (!counterparty) {
|
|
9872
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container mx-auto px-4 py-8", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
|
|
9873
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-2xl font-bold mb-2", children: "Counterparty Not Found" }),
|
|
9874
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mb-4", children: "The counterparty could not be found." })
|
|
9875
|
+
] }) });
|
|
9876
|
+
}
|
|
9877
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9878
|
+
PageLayout,
|
|
9879
|
+
{
|
|
9880
|
+
title: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
9881
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: counterparty.name }),
|
|
9882
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9883
|
+
EditableInfoField,
|
|
9884
|
+
{
|
|
9885
|
+
label: "",
|
|
9886
|
+
value: currentStatus,
|
|
9887
|
+
options: [
|
|
9888
|
+
{ value: "ACTIVE", label: "Active" },
|
|
9889
|
+
{ value: "INACTIVE", label: "Inactive" },
|
|
9890
|
+
{ value: "PENDING", label: "Pending" },
|
|
9891
|
+
{ value: "SUSPENDED", label: "Suspended" }
|
|
9892
|
+
],
|
|
9893
|
+
onChange: (newStatus) => setCurrentStatus(newStatus),
|
|
9894
|
+
renderValue: (value) => /* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status: value }),
|
|
9895
|
+
className: "inline-block"
|
|
9896
|
+
}
|
|
9897
|
+
),
|
|
9898
|
+
/* @__PURE__ */ jsxRuntime.jsx(CIPStatusBadge, { status: "verified" }),
|
|
9899
|
+
/* @__PURE__ */ jsxRuntime.jsx(CounterpartyTypeBadge, { type: counterparty.type })
|
|
9900
|
+
] }),
|
|
9901
|
+
actions: [
|
|
9902
|
+
{
|
|
9903
|
+
label: "View Account",
|
|
9904
|
+
variant: "outline",
|
|
9905
|
+
onClick: () => navigate(`/counterparty/${id}/account`),
|
|
9906
|
+
icon: lucideReact.Wallet
|
|
9907
|
+
},
|
|
9908
|
+
{
|
|
9909
|
+
label: "View Transactions",
|
|
9910
|
+
variant: "outline",
|
|
9911
|
+
onClick: () => navigate(`/counterparty/${id}/transactions`),
|
|
9912
|
+
icon: lucideReact.FileText
|
|
9913
|
+
}
|
|
9914
|
+
],
|
|
9915
|
+
maxWidth: "full",
|
|
9916
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-4", children: [
|
|
9917
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-4", children: [
|
|
9918
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9919
|
+
CounterpartyProfileCard,
|
|
9920
|
+
{
|
|
9921
|
+
isEditing: isEditingProfile,
|
|
9922
|
+
onToggleEdit: () => setIsEditingProfile(!isEditingProfile)
|
|
9923
|
+
}
|
|
9924
|
+
),
|
|
9925
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
9926
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
9927
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Payment Methods" }),
|
|
9928
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Button, { size: "sm", variant: "ghost", children: [
|
|
9929
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-1" }),
|
|
9930
|
+
"Method"
|
|
9931
|
+
] })
|
|
9932
|
+
] }),
|
|
9933
|
+
/* @__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: [
|
|
9934
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wallet, { className: "h-5 w-5 opacity-50" }),
|
|
9935
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "No payment methods configured" })
|
|
9936
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
9937
|
+
DataTable,
|
|
9938
|
+
{
|
|
9939
|
+
columns: paymentMethodColumns,
|
|
9940
|
+
data: mockPaymentMethods
|
|
9941
|
+
}
|
|
9942
|
+
) })
|
|
9943
|
+
] }),
|
|
9944
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
9945
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
9946
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Documents" }),
|
|
9947
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Button, { size: "sm", variant: "ghost", children: [
|
|
9948
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-1" }),
|
|
9949
|
+
"Document"
|
|
9950
|
+
] })
|
|
9951
|
+
] }),
|
|
9952
|
+
/* @__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: [
|
|
9953
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { className: "h-5 w-5 opacity-50" }),
|
|
9954
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "No documents found" })
|
|
9955
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
9956
|
+
DataTable,
|
|
9957
|
+
{
|
|
9958
|
+
columns: documentColumns,
|
|
9959
|
+
data: counterpartyDocuments
|
|
9960
|
+
}
|
|
9961
|
+
) })
|
|
9962
|
+
] })
|
|
9963
|
+
] }),
|
|
9964
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsxRuntime.jsx(CounterpartyStatusCard, { isEditing: false, onToggleEdit: () => {
|
|
9965
|
+
} }) })
|
|
9966
|
+
] })
|
|
9967
|
+
}
|
|
9968
|
+
);
|
|
9969
|
+
};
|
|
9970
|
+
var CounterpartyDetail_default = CounterpartyDetail;
|
|
9971
|
+
var CreateCounterparty = () => {
|
|
9972
|
+
const navigate = reactRouterDom.useNavigate();
|
|
9973
|
+
const [counterpartyData, setCounterpartyData] = React15.useState(null);
|
|
9974
|
+
const [paymentMethods, setPaymentMethods] = React15.useState([]);
|
|
9975
|
+
const handlePaymentMethodsChange = (methods) => {
|
|
9976
|
+
setPaymentMethods(methods);
|
|
9977
|
+
};
|
|
9978
|
+
const handleBasicInfoChange = (data) => {
|
|
9979
|
+
setCounterpartyData(data);
|
|
9980
|
+
};
|
|
9981
|
+
const counterpartyType = counterpartyData?.type || "";
|
|
9982
|
+
const handleCancel = () => {
|
|
9983
|
+
navigate("/counterparty");
|
|
9984
|
+
};
|
|
9985
|
+
const handleSubmit = () => {
|
|
9986
|
+
if (!counterpartyType) {
|
|
9987
|
+
toast({
|
|
9988
|
+
title: "Error",
|
|
9989
|
+
description: "Please select a counterparty type",
|
|
9990
|
+
variant: "destructive"
|
|
9991
|
+
});
|
|
9992
|
+
return;
|
|
9993
|
+
}
|
|
9994
|
+
if (paymentMethods.length === 0) {
|
|
9995
|
+
toast({
|
|
9996
|
+
title: "Error",
|
|
9997
|
+
description: "At least one payment method is required",
|
|
9998
|
+
variant: "destructive"
|
|
9999
|
+
});
|
|
10000
|
+
return;
|
|
10001
|
+
}
|
|
10002
|
+
if (paymentMethods.some((m) => m.type === "wire")) {
|
|
10003
|
+
console.log("Address validation required for wire transfers");
|
|
10004
|
+
}
|
|
10005
|
+
console.log("Creating counterparty with data:", {
|
|
10006
|
+
type: counterpartyType,
|
|
10007
|
+
basicInfo: counterpartyData
|
|
10008
|
+
});
|
|
10009
|
+
toast({
|
|
10010
|
+
title: "Success",
|
|
10011
|
+
description: "Counterparty created successfully"
|
|
10012
|
+
});
|
|
10013
|
+
setTimeout(() => {
|
|
10014
|
+
navigate("/counterparty");
|
|
10015
|
+
}, 1e3);
|
|
10016
|
+
};
|
|
10017
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10018
|
+
PageLayout,
|
|
10019
|
+
{
|
|
10020
|
+
title: "Create Counterparty",
|
|
10021
|
+
description: "Create a new counterparty with all required information",
|
|
10022
|
+
actions: [
|
|
10023
|
+
{ label: "Cancel", variant: "outline", onClick: handleCancel },
|
|
10024
|
+
{ label: "Create Counterparty", variant: "default", onClick: handleSubmit }
|
|
10025
|
+
],
|
|
10026
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
10027
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
10028
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Basic Information" }) }),
|
|
10029
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: /* @__PURE__ */ jsxRuntime.jsx(CounterpartyBasicInfo, { onDataChange: handleBasicInfoChange }) })
|
|
10030
|
+
] }),
|
|
10031
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
10032
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(CardTitle, { children: [
|
|
10033
|
+
"Address",
|
|
10034
|
+
paymentMethods.some((m) => m.type === "wire") && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive ml-1", children: "*" })
|
|
10035
|
+
] }) }),
|
|
10036
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardContent, { children: [
|
|
10037
|
+
paymentMethods.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground mb-4", children: "Optional for ACH payments, required for wire transfers" }),
|
|
10038
|
+
paymentMethods.some((m) => m.type === "wire") && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground mb-4", children: "Required because you have wire payment methods" }),
|
|
10039
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10040
|
+
AddressForm,
|
|
10041
|
+
{
|
|
10042
|
+
title: "",
|
|
10043
|
+
description: "",
|
|
10044
|
+
showApartment: true
|
|
10045
|
+
}
|
|
10046
|
+
)
|
|
10047
|
+
] })
|
|
10048
|
+
] }),
|
|
10049
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
10050
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Payment Configuration" }) }),
|
|
10051
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: /* @__PURE__ */ jsxRuntime.jsx(PaymentInformationSection, { onPaymentMethodsChange: handlePaymentMethodsChange }) })
|
|
10052
|
+
] })
|
|
10053
|
+
] })
|
|
10054
|
+
}
|
|
10055
|
+
);
|
|
10056
|
+
};
|
|
10057
|
+
var Create_default2 = CreateCounterparty;
|
|
10058
|
+
var Dashboard = () => {
|
|
10059
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10060
|
+
PageLayout,
|
|
10061
|
+
{
|
|
10062
|
+
title: "Dashboard",
|
|
10063
|
+
description: "Overview of your system metrics and activity",
|
|
10064
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center py-12 text-muted-foreground", children: "Dashboard content coming soon" })
|
|
10065
|
+
}
|
|
10066
|
+
);
|
|
10067
|
+
};
|
|
10068
|
+
var Dashboard_default = Dashboard;
|
|
10069
|
+
|
|
10070
|
+
// src/lib/mock-data/individuals-list-data.ts
|
|
10071
|
+
var mockIndividualsListData = [
|
|
10072
|
+
{
|
|
10073
|
+
id: "IND-2024-001",
|
|
10074
|
+
firstName: "John",
|
|
10075
|
+
lastName: "Smith",
|
|
10076
|
+
fullName: "John Smith",
|
|
10077
|
+
productName: "Personal Checking",
|
|
10078
|
+
cipStatus: "verified",
|
|
10079
|
+
status: "active",
|
|
10080
|
+
createdAt: "2024-01-15T10:30:00Z",
|
|
10081
|
+
modifiedAt: "2024-01-20T14:45:00Z"
|
|
10082
|
+
},
|
|
10083
|
+
{
|
|
10084
|
+
id: "IND-2024-002",
|
|
10085
|
+
firstName: "Sarah",
|
|
10086
|
+
lastName: "Johnson",
|
|
10087
|
+
fullName: "Sarah Johnson",
|
|
10088
|
+
productName: "Premium Savings",
|
|
10089
|
+
cipStatus: "verified",
|
|
10090
|
+
status: "active",
|
|
10091
|
+
createdAt: "2024-01-18T09:15:00Z",
|
|
10092
|
+
modifiedAt: "2024-01-22T11:30:00Z"
|
|
10093
|
+
},
|
|
10094
|
+
{
|
|
10095
|
+
id: "IND-2024-003",
|
|
10096
|
+
firstName: "Michael",
|
|
10097
|
+
lastName: "Chen",
|
|
10098
|
+
fullName: "Michael Chen",
|
|
10099
|
+
productName: "Personal Checking",
|
|
10100
|
+
cipStatus: "pending",
|
|
10101
|
+
status: "pending",
|
|
10102
|
+
createdAt: "2024-01-20T13:45:00Z",
|
|
10103
|
+
modifiedAt: "2024-01-20T13:45:00Z"
|
|
10104
|
+
},
|
|
10105
|
+
{
|
|
10106
|
+
id: "IND-2024-004",
|
|
10107
|
+
firstName: "Emily",
|
|
10108
|
+
lastName: "Rodriguez",
|
|
10109
|
+
fullName: "Emily Rodriguez",
|
|
10110
|
+
productName: "Student Checking",
|
|
10111
|
+
cipStatus: "verified",
|
|
10112
|
+
status: "active",
|
|
10113
|
+
createdAt: "2024-01-22T16:20:00Z",
|
|
10114
|
+
modifiedAt: "2024-01-25T10:15:00Z"
|
|
10115
|
+
},
|
|
10116
|
+
{
|
|
10117
|
+
id: "IND-2024-005",
|
|
10118
|
+
firstName: "David",
|
|
10119
|
+
lastName: "Williams",
|
|
10120
|
+
fullName: "David Williams",
|
|
10121
|
+
productName: "Business Checking",
|
|
10122
|
+
cipStatus: "rejected",
|
|
10123
|
+
status: "rejected",
|
|
10124
|
+
createdAt: "2024-01-25T08:30:00Z",
|
|
10125
|
+
modifiedAt: "2024-01-26T14:00:00Z"
|
|
10126
|
+
}
|
|
10127
|
+
];
|
|
10128
|
+
var Individuals = () => {
|
|
10129
|
+
const navigate = reactRouterDom.useNavigate();
|
|
10130
|
+
const [individuals, setIndividuals] = React15.useState(mockIndividualsListData);
|
|
10131
|
+
const [filteredIndividuals, setFilteredIndividuals] = React15.useState(mockIndividualsListData);
|
|
10132
|
+
const [sortBy, setSortBy] = React15.useState("created");
|
|
10133
|
+
const [sortDirection, setSortDirection] = React15.useState("desc");
|
|
10134
|
+
const [filters, setFilters] = React15.useState({
|
|
10135
|
+
name: "",
|
|
10136
|
+
productName: "",
|
|
10137
|
+
status: "",
|
|
10138
|
+
createdDateStart: void 0,
|
|
10139
|
+
createdDateEnd: void 0
|
|
10140
|
+
});
|
|
10141
|
+
const handleFilterChange = (field, value) => {
|
|
10142
|
+
setFilters((prev) => ({ ...prev, [field]: value }));
|
|
10143
|
+
};
|
|
10144
|
+
const applyFilters = () => {
|
|
10145
|
+
let filtered = individuals;
|
|
10146
|
+
if (filters.name) {
|
|
10147
|
+
filtered = filtered.filter(
|
|
10148
|
+
(individual) => individual.fullName.toLowerCase().includes(filters.name.toLowerCase())
|
|
10149
|
+
);
|
|
10150
|
+
}
|
|
10151
|
+
if (filters.productName) {
|
|
10152
|
+
filtered = filtered.filter(
|
|
10153
|
+
(individual) => individual.productName.toLowerCase().includes(filters.productName.toLowerCase())
|
|
10154
|
+
);
|
|
10155
|
+
}
|
|
10156
|
+
if (filters.status) {
|
|
10157
|
+
filtered = filtered.filter((individual) => individual.status === filters.status);
|
|
10158
|
+
}
|
|
10159
|
+
if (filters.createdDateStart) {
|
|
10160
|
+
filtered = filtered.filter(
|
|
10161
|
+
(individual) => new Date(individual.createdAt) >= filters.createdDateStart
|
|
10162
|
+
);
|
|
10163
|
+
}
|
|
10164
|
+
if (filters.createdDateEnd) {
|
|
10165
|
+
filtered = filtered.filter(
|
|
10166
|
+
(individual) => new Date(individual.createdAt) <= filters.createdDateEnd
|
|
10167
|
+
);
|
|
10168
|
+
}
|
|
10169
|
+
setFilteredIndividuals(filtered);
|
|
10170
|
+
};
|
|
10171
|
+
const resetFilters = () => {
|
|
10172
|
+
setFilters({
|
|
10173
|
+
name: "",
|
|
10174
|
+
productName: "",
|
|
10175
|
+
status: "",
|
|
10176
|
+
createdDateStart: void 0,
|
|
10177
|
+
createdDateEnd: void 0
|
|
10178
|
+
});
|
|
10179
|
+
setFilteredIndividuals(individuals);
|
|
10180
|
+
};
|
|
10181
|
+
const handleSort = (key) => {
|
|
10182
|
+
if (sortBy === key) {
|
|
10183
|
+
setSortDirection(sortDirection === "asc" ? "desc" : "asc");
|
|
10184
|
+
} else {
|
|
10185
|
+
setSortBy(key);
|
|
10186
|
+
setSortDirection("asc");
|
|
10187
|
+
}
|
|
10188
|
+
};
|
|
10189
|
+
const handleRowClick = (row) => {
|
|
10190
|
+
navigate(`/individual/${row.id}`);
|
|
10191
|
+
};
|
|
10192
|
+
const columns2 = [
|
|
10193
|
+
{
|
|
10194
|
+
key: "id",
|
|
10195
|
+
title: "Individual ID",
|
|
10196
|
+
sortable: true
|
|
10197
|
+
},
|
|
10198
|
+
{
|
|
10199
|
+
key: "fullName",
|
|
10200
|
+
title: "Name",
|
|
10201
|
+
sortable: true
|
|
10202
|
+
},
|
|
10203
|
+
{
|
|
10204
|
+
key: "productName",
|
|
10205
|
+
title: "Product Name",
|
|
10206
|
+
sortable: true
|
|
10207
|
+
},
|
|
10208
|
+
{
|
|
10209
|
+
key: "cipStatus",
|
|
10210
|
+
title: "CIP Status",
|
|
10211
|
+
sortable: true,
|
|
10212
|
+
render: (value) => /* @__PURE__ */ jsxRuntime.jsx(CIPStatusBadge, { status: value })
|
|
10213
|
+
},
|
|
10214
|
+
{
|
|
10215
|
+
key: "status",
|
|
10216
|
+
title: "Status",
|
|
10217
|
+
sortable: true,
|
|
10218
|
+
render: (value) => /* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status: value })
|
|
10219
|
+
},
|
|
10220
|
+
{
|
|
10221
|
+
key: "createdAt",
|
|
10222
|
+
title: "Created",
|
|
10223
|
+
sortable: true,
|
|
10224
|
+
render: (value) => new Date(value).toLocaleDateString()
|
|
10225
|
+
},
|
|
10226
|
+
{
|
|
10227
|
+
key: "modifiedAt",
|
|
10228
|
+
title: "Modified",
|
|
10229
|
+
sortable: true,
|
|
10230
|
+
render: (value) => new Date(value).toLocaleDateString()
|
|
10231
|
+
}
|
|
10232
|
+
];
|
|
10233
|
+
const sortedIndividuals = [...filteredIndividuals].sort((a, b) => {
|
|
10234
|
+
const aValue = a[sortBy];
|
|
10235
|
+
const bValue = b[sortBy];
|
|
10236
|
+
if (aValue < bValue) return sortDirection === "asc" ? -1 : 1;
|
|
10237
|
+
if (aValue > bValue) return sortDirection === "asc" ? 1 : -1;
|
|
10238
|
+
return 0;
|
|
10239
|
+
});
|
|
10240
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col h-screen bg-gradient-subtle", children: [
|
|
10241
|
+
/* @__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: [
|
|
10242
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-bold text-foreground mb-2", children: "Individuals" }) }),
|
|
10243
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
10244
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Sheet, { children: [
|
|
10245
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", className: "gap-2", children: [
|
|
10246
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Filter, { className: "h-4 w-4" }),
|
|
10247
|
+
"Filters"
|
|
10248
|
+
] }) }),
|
|
10249
|
+
/* @__PURE__ */ jsxRuntime.jsxs(SheetContent, { side: "right", className: "w-full sm:max-w-xl overflow-y-auto", children: [
|
|
10250
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { children: "Individual Filters" }) }),
|
|
10251
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6 py-6", children: [
|
|
10252
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10253
|
+
EnhancedInput,
|
|
10254
|
+
{
|
|
10255
|
+
label: "Name",
|
|
10256
|
+
value: filters.name,
|
|
10257
|
+
onChange: (e) => handleFilterChange("name", e.target.value),
|
|
10258
|
+
placeholder: "Enter individual name"
|
|
10259
|
+
}
|
|
10260
|
+
),
|
|
10261
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10262
|
+
EnhancedInput,
|
|
10263
|
+
{
|
|
10264
|
+
label: "Product Name",
|
|
10265
|
+
value: filters.productName,
|
|
10266
|
+
onChange: (e) => handleFilterChange("productName", e.target.value),
|
|
10267
|
+
placeholder: "Enter product name"
|
|
10268
|
+
}
|
|
10269
|
+
),
|
|
10270
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10271
|
+
EnhancedSelect,
|
|
10272
|
+
{
|
|
10273
|
+
label: "Status",
|
|
10274
|
+
value: filters.status,
|
|
10275
|
+
onValueChange: (value) => handleFilterChange("status", value),
|
|
10276
|
+
placeholder: "Select status",
|
|
10277
|
+
options: [
|
|
10278
|
+
{ value: "active", label: "Active" },
|
|
10279
|
+
{ value: "pending", label: "Pending" },
|
|
10280
|
+
{ value: "rejected", label: "Rejected" },
|
|
10281
|
+
{ value: "suspended", label: "Suspended" }
|
|
10282
|
+
]
|
|
10283
|
+
}
|
|
10284
|
+
),
|
|
10285
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
10286
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
10287
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "Created Date Start" }),
|
|
10288
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10289
|
+
DatePicker,
|
|
10290
|
+
{
|
|
10291
|
+
date: filters.createdDateStart,
|
|
10292
|
+
onDateChange: (date) => handleFilterChange("createdDateStart", date),
|
|
10293
|
+
placeholder: "MM/DD/YYYY",
|
|
10294
|
+
buttonClassName: "w-full",
|
|
10295
|
+
className: "bg-background z-50"
|
|
10296
|
+
}
|
|
10297
|
+
)
|
|
10298
|
+
] }),
|
|
10299
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
10300
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "Created Date End" }),
|
|
10301
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10302
|
+
DatePicker,
|
|
10303
|
+
{
|
|
10304
|
+
date: filters.createdDateEnd,
|
|
10305
|
+
onDateChange: (date) => handleFilterChange("createdDateEnd", date),
|
|
10306
|
+
placeholder: "MM/DD/YYYY",
|
|
10307
|
+
buttonClassName: "w-full",
|
|
10308
|
+
className: "bg-background z-50"
|
|
10309
|
+
}
|
|
10310
|
+
)
|
|
10311
|
+
] })
|
|
10312
|
+
] })
|
|
10313
|
+
] }),
|
|
10314
|
+
/* @__PURE__ */ jsxRuntime.jsxs(SheetFooter, { className: "gap-2", children: [
|
|
10315
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", onClick: resetFilters, children: "Reset Filters" }),
|
|
10316
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: applyFilters, children: "Apply Filters" })
|
|
10317
|
+
] })
|
|
10318
|
+
] })
|
|
10319
|
+
] }),
|
|
10320
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: () => navigate("/individual/create"), children: "Create Individual" })
|
|
10321
|
+
] })
|
|
10322
|
+
] }) }) }),
|
|
10323
|
+
/* @__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(
|
|
10324
|
+
DataTable,
|
|
10325
|
+
{
|
|
10326
|
+
columns: columns2,
|
|
10327
|
+
data: sortedIndividuals,
|
|
10328
|
+
sortBy,
|
|
10329
|
+
sortDirection,
|
|
10330
|
+
onSort: handleSort,
|
|
10331
|
+
onRowClick: handleRowClick
|
|
10332
|
+
}
|
|
10333
|
+
) }) }) })
|
|
10334
|
+
] });
|
|
10335
|
+
};
|
|
10336
|
+
var Individuals_default = Individuals;
|
|
10337
|
+
var individualProfileSchema = zod.z.object({
|
|
10338
|
+
// Personal Information
|
|
10339
|
+
firstName: zod.z.string().min(1, "First name is required"),
|
|
10340
|
+
lastName: zod.z.string().min(1, "Last name is required"),
|
|
10341
|
+
dateOfBirth: zod.z.string().optional(),
|
|
10342
|
+
// Identification
|
|
10343
|
+
idType: zod.z.enum(["SSN", "ITIN", "Passport", "Driver License"]).optional(),
|
|
10344
|
+
ssn: zod.z.string().optional(),
|
|
10345
|
+
// Contact Information
|
|
10346
|
+
email: zod.z.string().email("Invalid email address").optional(),
|
|
10347
|
+
mobilePhone: zod.z.string().optional(),
|
|
10348
|
+
// Address
|
|
10349
|
+
streetAddress: zod.z.string().optional(),
|
|
10350
|
+
apartment: zod.z.string().optional(),
|
|
10351
|
+
city: zod.z.string().optional(),
|
|
10352
|
+
state: zod.z.string().optional(),
|
|
10353
|
+
postalCode: zod.z.string().optional(),
|
|
10354
|
+
country: zod.z.string().optional(),
|
|
10355
|
+
// Integration Fields
|
|
10356
|
+
externalId: zod.z.string().optional(),
|
|
10357
|
+
productId: zod.z.string().optional()
|
|
10358
|
+
});
|
|
10359
|
+
|
|
10360
|
+
// src/lib/mock-data/individual-data.ts
|
|
10361
|
+
var mockIndividualData = {
|
|
10362
|
+
id: "IND-2024-001",
|
|
10363
|
+
firstName: "John",
|
|
10364
|
+
lastName: "Smith",
|
|
10365
|
+
dateOfBirth: "1985-06-15",
|
|
10366
|
+
idType: "SSN",
|
|
10367
|
+
ssn: "***-**-4567",
|
|
10368
|
+
email: "john.smith@email.com",
|
|
10369
|
+
mobilePhone: "+1 (555) 123-4567",
|
|
10370
|
+
// Address
|
|
10371
|
+
streetAddress: "123 Main Street",
|
|
10372
|
+
apartment: "Apt 4B",
|
|
10373
|
+
city: "San Francisco",
|
|
10374
|
+
state: "CA",
|
|
10375
|
+
postalCode: "94102",
|
|
10376
|
+
country: "United States",
|
|
10377
|
+
// Integration
|
|
10378
|
+
externalId: "EXT-IND-001",
|
|
10379
|
+
productId: "PROD-CHECKING-001",
|
|
10380
|
+
productName: "Personal Checking",
|
|
10381
|
+
// Status Information
|
|
10382
|
+
status: "active",
|
|
10383
|
+
cipStatus: "verified",
|
|
10384
|
+
entityType: "individual",
|
|
10385
|
+
subType: "retail",
|
|
10386
|
+
// Dates
|
|
10387
|
+
createdAt: "2024-01-15T10:30:00Z",
|
|
10388
|
+
modifiedAt: "2024-01-20T14:45:00Z",
|
|
10389
|
+
// OFAC
|
|
10390
|
+
ofacStatus: "clear",
|
|
10391
|
+
lastOfacCheck: "2024-01-20T14:45:00Z"
|
|
10392
|
+
};
|
|
10393
|
+
var IndividualProfileCard = ({ isEditing, onToggleEdit, className }) => {
|
|
10394
|
+
const form = useFormWithEditState({
|
|
10395
|
+
schema: individualProfileSchema,
|
|
10396
|
+
defaultValues: {
|
|
10397
|
+
firstName: mockIndividualData.firstName,
|
|
10398
|
+
lastName: mockIndividualData.lastName,
|
|
10399
|
+
dateOfBirth: mockIndividualData.dateOfBirth,
|
|
10400
|
+
idType: mockIndividualData.idType,
|
|
10401
|
+
ssn: mockIndividualData.ssn,
|
|
10402
|
+
email: mockIndividualData.email,
|
|
10403
|
+
mobilePhone: mockIndividualData.mobilePhone,
|
|
10404
|
+
streetAddress: mockIndividualData.streetAddress,
|
|
10405
|
+
apartment: mockIndividualData.apartment,
|
|
10406
|
+
city: mockIndividualData.city,
|
|
10407
|
+
state: mockIndividualData.state,
|
|
10408
|
+
postalCode: mockIndividualData.postalCode,
|
|
10409
|
+
country: mockIndividualData.country,
|
|
10410
|
+
externalId: mockIndividualData.externalId,
|
|
10411
|
+
productId: mockIndividualData.productId
|
|
10412
|
+
},
|
|
10413
|
+
initialEditing: isEditing,
|
|
10414
|
+
onToggleEdit,
|
|
10415
|
+
onSave: async (data) => {
|
|
10416
|
+
console.log("Saving individual profile:", data);
|
|
10417
|
+
}
|
|
10418
|
+
});
|
|
10419
|
+
const editContent = /* @__PURE__ */ jsxRuntime.jsx(FormProvider, { form, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
10420
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
10421
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10422
|
+
FormInput,
|
|
10423
|
+
{
|
|
10424
|
+
name: "firstName",
|
|
10425
|
+
label: "First Name",
|
|
10426
|
+
placeholder: "Enter first name",
|
|
10427
|
+
required: true
|
|
10428
|
+
}
|
|
10429
|
+
),
|
|
10430
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10431
|
+
FormInput,
|
|
10432
|
+
{
|
|
10433
|
+
name: "lastName",
|
|
10434
|
+
label: "Last Name",
|
|
10435
|
+
placeholder: "Enter last name",
|
|
10436
|
+
required: true
|
|
10437
|
+
}
|
|
10438
|
+
),
|
|
10439
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10440
|
+
FormInput,
|
|
10441
|
+
{
|
|
10442
|
+
name: "dateOfBirth",
|
|
10443
|
+
label: "Date of Birth",
|
|
10444
|
+
type: "date",
|
|
10445
|
+
placeholder: "Enter date of birth"
|
|
10446
|
+
}
|
|
10447
|
+
),
|
|
10448
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10449
|
+
FormSelect,
|
|
10450
|
+
{
|
|
10451
|
+
name: "idType",
|
|
10452
|
+
label: "ID Type",
|
|
10453
|
+
placeholder: "Select ID type",
|
|
10454
|
+
options: [
|
|
10455
|
+
{ value: "SSN", label: "SSN" },
|
|
10456
|
+
{ value: "ITIN", label: "ITIN" },
|
|
10457
|
+
{ value: "Passport", label: "Passport" },
|
|
10458
|
+
{ value: "Driver License", label: "Driver License" }
|
|
10459
|
+
]
|
|
10460
|
+
}
|
|
10461
|
+
),
|
|
10462
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10463
|
+
FormInput,
|
|
10464
|
+
{
|
|
10465
|
+
name: "ssn",
|
|
10466
|
+
label: "SSN/ITIN",
|
|
10467
|
+
placeholder: "Enter SSN or ITIN",
|
|
10468
|
+
hint: "Last 4 digits will be masked"
|
|
10469
|
+
}
|
|
10470
|
+
),
|
|
10471
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10472
|
+
FormInput,
|
|
10473
|
+
{
|
|
10474
|
+
name: "email",
|
|
10475
|
+
label: "Email",
|
|
10476
|
+
type: "email",
|
|
10477
|
+
placeholder: "Enter email address"
|
|
10478
|
+
}
|
|
10479
|
+
),
|
|
10480
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10481
|
+
FormInput,
|
|
10482
|
+
{
|
|
10483
|
+
name: "mobilePhone",
|
|
10484
|
+
label: "Mobile Phone",
|
|
10485
|
+
placeholder: "Enter mobile phone"
|
|
10486
|
+
}
|
|
10487
|
+
)
|
|
10488
|
+
] }),
|
|
10489
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Address" }),
|
|
10490
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4", children: [
|
|
10491
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10492
|
+
FormInput,
|
|
10493
|
+
{
|
|
10494
|
+
name: "streetAddress",
|
|
10495
|
+
label: "Street Address",
|
|
10496
|
+
placeholder: "Enter street address"
|
|
10497
|
+
}
|
|
10498
|
+
),
|
|
10499
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10500
|
+
FormInput,
|
|
10501
|
+
{
|
|
10502
|
+
name: "apartment",
|
|
10503
|
+
label: "Apartment/Unit",
|
|
10504
|
+
placeholder: "Enter apartment or unit number"
|
|
10505
|
+
}
|
|
10506
|
+
)
|
|
10507
|
+
] }),
|
|
10508
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
10509
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10510
|
+
FormInput,
|
|
10511
|
+
{
|
|
10512
|
+
name: "city",
|
|
10513
|
+
label: "City",
|
|
10514
|
+
placeholder: "Enter city"
|
|
10515
|
+
}
|
|
10516
|
+
),
|
|
10517
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10518
|
+
FormInput,
|
|
10519
|
+
{
|
|
10520
|
+
name: "state",
|
|
10521
|
+
label: "State",
|
|
10522
|
+
placeholder: "Enter state"
|
|
10523
|
+
}
|
|
10524
|
+
),
|
|
10525
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10526
|
+
FormInput,
|
|
10527
|
+
{
|
|
10528
|
+
name: "postalCode",
|
|
10529
|
+
label: "Postal Code",
|
|
10530
|
+
placeholder: "Enter postal code"
|
|
10531
|
+
}
|
|
10532
|
+
),
|
|
10533
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10534
|
+
FormInput,
|
|
10535
|
+
{
|
|
10536
|
+
name: "country",
|
|
10537
|
+
label: "Country",
|
|
10538
|
+
placeholder: "Enter country"
|
|
10539
|
+
}
|
|
10540
|
+
)
|
|
10541
|
+
] }),
|
|
10542
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Integration" }),
|
|
10543
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
10544
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10545
|
+
FormInput,
|
|
10546
|
+
{
|
|
10547
|
+
name: "externalId",
|
|
10548
|
+
label: "External ID",
|
|
10549
|
+
placeholder: "UUID",
|
|
10550
|
+
hint: "ID from external system",
|
|
10551
|
+
disabled: true
|
|
10552
|
+
}
|
|
10553
|
+
),
|
|
10554
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10555
|
+
FormInput,
|
|
10556
|
+
{
|
|
10557
|
+
name: "productId",
|
|
10558
|
+
label: "Product ID",
|
|
10559
|
+
placeholder: "Product ID",
|
|
10560
|
+
disabled: true
|
|
10561
|
+
}
|
|
10562
|
+
)
|
|
10563
|
+
] })
|
|
10564
|
+
] }) });
|
|
10565
|
+
const formValues = form.watch();
|
|
10566
|
+
const viewContent = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
10567
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
10568
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "First Name", value: formValues?.firstName || "-", layout: "horizontal" }),
|
|
10569
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Last Name", value: formValues?.lastName || "-", layout: "horizontal" })
|
|
10570
|
+
] }),
|
|
10571
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
10572
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Date of Birth", value: formValues?.dateOfBirth || "-", layout: "horizontal" }),
|
|
10573
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ID Type", value: formValues?.idType || "-", layout: "horizontal" })
|
|
10574
|
+
] }),
|
|
10575
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
10576
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "SSN/ITIN", value: formValues?.ssn || "-", layout: "horizontal" }),
|
|
10577
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Email", value: formValues?.email || "-", layout: "horizontal" })
|
|
10578
|
+
] }),
|
|
10579
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-4", children: /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Mobile Phone", value: formValues?.mobilePhone || "-", layout: "horizontal" }) }),
|
|
10580
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Address" }),
|
|
10581
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10582
|
+
InfoField,
|
|
10583
|
+
{
|
|
10584
|
+
label: "Address",
|
|
10585
|
+
value: formValues?.streetAddress ? `${formValues.streetAddress}${formValues.apartment ? ", " + formValues.apartment : ""}, ${formValues.city}, ${formValues.state} ${formValues.postalCode}, ${formValues.country}` : "-",
|
|
10586
|
+
layout: "horizontal"
|
|
10587
|
+
}
|
|
10588
|
+
),
|
|
10589
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Integration" }),
|
|
10590
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
10591
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "External ID", value: formValues?.externalId || "-", layout: "horizontal" }),
|
|
10592
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Product ID", value: formValues?.productId || "-", layout: "horizontal" })
|
|
10593
|
+
] })
|
|
10594
|
+
] });
|
|
10595
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10596
|
+
EditableFormCard,
|
|
10597
|
+
{
|
|
10598
|
+
title: "Individual Profile",
|
|
10599
|
+
variant: "subtle",
|
|
10600
|
+
className,
|
|
10601
|
+
isEditing: form.isEditing,
|
|
10602
|
+
onToggleEdit: form.handleToggleEdit,
|
|
10603
|
+
onSave: form.handleSave,
|
|
10604
|
+
onCancel: form.handleCancel,
|
|
10605
|
+
editContent,
|
|
10606
|
+
viewContent
|
|
10607
|
+
}
|
|
10608
|
+
);
|
|
10609
|
+
};
|
|
10610
|
+
var mockIndividualTimeline = [
|
|
10611
|
+
{
|
|
10612
|
+
id: "1",
|
|
10613
|
+
action: "Individual Created",
|
|
10614
|
+
user: "admin",
|
|
10615
|
+
details: "Initial individual setup",
|
|
10616
|
+
status: "Active",
|
|
10617
|
+
timestamp: "2024-01-15 10:30:00"
|
|
10618
|
+
},
|
|
10619
|
+
{
|
|
10620
|
+
id: "2",
|
|
10621
|
+
action: "Identity Documents Uploaded",
|
|
10622
|
+
user: "John Smith",
|
|
10623
|
+
details: "Driver License, Proof of Address",
|
|
10624
|
+
timestamp: "2024-01-18 11:20:00"
|
|
10625
|
+
},
|
|
10626
|
+
{
|
|
10627
|
+
id: "3",
|
|
10628
|
+
action: "CIP Verification Completed",
|
|
10629
|
+
user: "Compliance Team",
|
|
10630
|
+
details: "Identity verification check",
|
|
10631
|
+
status: "Verified",
|
|
10632
|
+
timestamp: "2024-01-20 14:30:00"
|
|
10633
|
+
},
|
|
10634
|
+
{
|
|
10635
|
+
id: "4",
|
|
10636
|
+
action: "OFAC Check Completed",
|
|
10637
|
+
user: "System",
|
|
10638
|
+
details: "Automated compliance check",
|
|
10639
|
+
status: "Verified",
|
|
10640
|
+
timestamp: "2024-01-20 14:45:00"
|
|
10641
|
+
}
|
|
10642
|
+
];
|
|
10643
|
+
var IndividualStatusCard = ({ isEditing, onToggleEdit, className }) => {
|
|
10644
|
+
const getIcon = (action) => {
|
|
10645
|
+
if (action.includes("Created")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-4 w-4" });
|
|
10646
|
+
if (action.includes("Assigned")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserPlus, { className: "h-4 w-4" });
|
|
10647
|
+
if (action.includes("Updated") || action.includes("Modified") || action.includes("Check") || action.includes("Uploaded")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Edit, { className: "h-4 w-4" });
|
|
10648
|
+
if (action.includes("Completed") || action.includes("Verified")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle, { className: "h-4 w-4" });
|
|
10649
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-4 w-4" });
|
|
10650
|
+
};
|
|
10651
|
+
const getStatusColor2 = (status) => {
|
|
10652
|
+
switch (status) {
|
|
10653
|
+
case "Active":
|
|
10654
|
+
case "Verified":
|
|
10655
|
+
return "text-success";
|
|
10656
|
+
case "Pending":
|
|
10657
|
+
return "text-warning";
|
|
10658
|
+
default:
|
|
10659
|
+
return "text-muted-foreground";
|
|
8537
10660
|
}
|
|
8538
|
-
|
|
8539
|
-
};
|
|
8540
|
-
var Create_default = CreateBusiness;
|
|
8541
|
-
var Cases = () => {
|
|
10661
|
+
};
|
|
8542
10662
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8543
|
-
|
|
10663
|
+
FormCard,
|
|
8544
10664
|
{
|
|
8545
|
-
title: "
|
|
8546
|
-
|
|
8547
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "
|
|
10665
|
+
title: "Timeline",
|
|
10666
|
+
className,
|
|
10667
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: mockIndividualTimeline.map((event, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative pl-6 pb-3", children: [
|
|
10668
|
+
index !== mockIndividualTimeline.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-[7px] top-5 bottom-0 w-[2px] bg-border" }),
|
|
10669
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
|
|
10670
|
+
"absolute left-0 top-0 flex-none",
|
|
10671
|
+
getStatusColor2(event.status)
|
|
10672
|
+
), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-4", children: getIcon(event.action) }) }),
|
|
10673
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-0.5", children: [
|
|
10674
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-foreground", children: event.action }),
|
|
10675
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
10676
|
+
"by ",
|
|
10677
|
+
event.user
|
|
10678
|
+
] }),
|
|
10679
|
+
event.details && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: event.details }),
|
|
10680
|
+
event.status && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cn("text-xs font-medium", getStatusColor2(event.status)), children: [
|
|
10681
|
+
"Status: ",
|
|
10682
|
+
event.status
|
|
10683
|
+
] }),
|
|
10684
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground/70 pt-0.5", children: event.timestamp })
|
|
10685
|
+
] })
|
|
10686
|
+
] }, event.id)) })
|
|
8548
10687
|
}
|
|
8549
10688
|
);
|
|
8550
10689
|
};
|
|
8551
|
-
var
|
|
8552
|
-
|
|
8553
|
-
const [
|
|
8554
|
-
const
|
|
8555
|
-
|
|
10690
|
+
var IndividualDetail = () => {
|
|
10691
|
+
const { id } = reactRouterDom.useParams();
|
|
10692
|
+
const [editingCards, setEditingCards] = React15.useState({});
|
|
10693
|
+
const [status, setStatus] = React15.useState(mockIndividualData.status);
|
|
10694
|
+
const toggleEdit = (cardKey) => {
|
|
10695
|
+
setEditingCards((prev) => ({
|
|
10696
|
+
...prev,
|
|
10697
|
+
[cardKey]: !prev[cardKey]
|
|
10698
|
+
}));
|
|
8556
10699
|
};
|
|
8557
|
-
const
|
|
8558
|
-
|
|
10700
|
+
const handleStatusChange = (newValue) => {
|
|
10701
|
+
setStatus(newValue);
|
|
10702
|
+
console.log("Status changed to:", newValue);
|
|
8559
10703
|
};
|
|
10704
|
+
const mockExternalAccounts = [
|
|
10705
|
+
{
|
|
10706
|
+
id: "1",
|
|
10707
|
+
bankName: "Chase Bank",
|
|
10708
|
+
accountType: "Checking",
|
|
10709
|
+
accountNumber: "1234",
|
|
10710
|
+
status: "ACTIVE"
|
|
10711
|
+
},
|
|
10712
|
+
{
|
|
10713
|
+
id: "2",
|
|
10714
|
+
bankName: "Bank of America",
|
|
10715
|
+
accountType: "Savings",
|
|
10716
|
+
accountNumber: "5678",
|
|
10717
|
+
status: "ACTIVE"
|
|
10718
|
+
}
|
|
10719
|
+
];
|
|
10720
|
+
const mockDocs = [
|
|
10721
|
+
{
|
|
10722
|
+
id: "1",
|
|
10723
|
+
name: "Driver License",
|
|
10724
|
+
type: "Identity Document",
|
|
10725
|
+
uploadedAt: "2024-01-15"
|
|
10726
|
+
},
|
|
10727
|
+
{
|
|
10728
|
+
id: "2",
|
|
10729
|
+
name: "Proof of Address",
|
|
10730
|
+
type: "Address Verification",
|
|
10731
|
+
uploadedAt: "2024-01-15"
|
|
10732
|
+
},
|
|
10733
|
+
{
|
|
10734
|
+
id: "3",
|
|
10735
|
+
name: "SSN Card",
|
|
10736
|
+
type: "Tax Document",
|
|
10737
|
+
uploadedAt: "2024-01-15"
|
|
10738
|
+
}
|
|
10739
|
+
];
|
|
8560
10740
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8561
10741
|
PageLayout,
|
|
8562
10742
|
{
|
|
8563
|
-
title: "
|
|
8564
|
-
|
|
10743
|
+
title: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
10744
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
10745
|
+
mockIndividualData.firstName,
|
|
10746
|
+
" ",
|
|
10747
|
+
mockIndividualData.lastName
|
|
10748
|
+
] }),
|
|
10749
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
10750
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10751
|
+
EditableInfoField,
|
|
10752
|
+
{
|
|
10753
|
+
label: "Status",
|
|
10754
|
+
value: status,
|
|
10755
|
+
onChange: handleStatusChange,
|
|
10756
|
+
options: [
|
|
10757
|
+
{ value: "active", label: "Active" },
|
|
10758
|
+
{ value: "pending", label: "Pending" },
|
|
10759
|
+
{ value: "rejected", label: "Rejected" },
|
|
10760
|
+
{ value: "suspended", label: "Suspended" }
|
|
10761
|
+
],
|
|
10762
|
+
renderValue: (value) => /* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status: value })
|
|
10763
|
+
}
|
|
10764
|
+
),
|
|
10765
|
+
/* @__PURE__ */ jsxRuntime.jsx(CIPStatusBadge, { status: mockIndividualData.cipStatus }),
|
|
10766
|
+
/* @__PURE__ */ jsxRuntime.jsx(EntityTypeBadge, { type: "Individual" })
|
|
10767
|
+
] })
|
|
10768
|
+
] }),
|
|
10769
|
+
description: `Individual ID: ${id || mockIndividualData.id}`,
|
|
8565
10770
|
actions: [
|
|
8566
|
-
{
|
|
8567
|
-
|
|
8568
|
-
|
|
10771
|
+
{
|
|
10772
|
+
label: "View Account",
|
|
10773
|
+
variant: "outline",
|
|
10774
|
+
onClick: () => console.log("View Account")
|
|
10775
|
+
},
|
|
10776
|
+
{
|
|
10777
|
+
label: "Add as Counterparty",
|
|
10778
|
+
variant: "default",
|
|
10779
|
+
onClick: () => console.log("Add as Counterparty")
|
|
10780
|
+
}
|
|
8569
10781
|
],
|
|
8570
|
-
|
|
8571
|
-
|
|
8572
|
-
/* @__PURE__ */ jsxRuntime.
|
|
10782
|
+
maxWidth: "full",
|
|
10783
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-4", children: [
|
|
10784
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-4", children: [
|
|
10785
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10786
|
+
IndividualProfileCard,
|
|
10787
|
+
{
|
|
10788
|
+
isEditing: editingCards["profile"] || false,
|
|
10789
|
+
onToggleEdit: () => toggleEdit("profile")
|
|
10790
|
+
}
|
|
10791
|
+
),
|
|
10792
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
10793
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
10794
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "External Accounts" }),
|
|
10795
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Button, { size: "sm", variant: "ghost", children: [
|
|
10796
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-1" }),
|
|
10797
|
+
"Account"
|
|
10798
|
+
] })
|
|
10799
|
+
] }),
|
|
10800
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: mockExternalAccounts.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
10801
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wallet, { className: "h-5 w-5 opacity-50" }),
|
|
10802
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "No external accounts found" })
|
|
10803
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
10804
|
+
DataTable,
|
|
10805
|
+
{
|
|
10806
|
+
columns: [
|
|
10807
|
+
{
|
|
10808
|
+
key: "bankName",
|
|
10809
|
+
title: "Bank Name",
|
|
10810
|
+
sortable: true,
|
|
10811
|
+
width: "40%"
|
|
10812
|
+
},
|
|
10813
|
+
{
|
|
10814
|
+
key: "accountType",
|
|
10815
|
+
title: "Account Type",
|
|
10816
|
+
sortable: true,
|
|
10817
|
+
width: "30%"
|
|
10818
|
+
},
|
|
10819
|
+
{
|
|
10820
|
+
key: "accountNumber",
|
|
10821
|
+
title: "Account Number",
|
|
10822
|
+
sortable: true,
|
|
10823
|
+
width: "20%",
|
|
10824
|
+
render: (value) => `\u2022\u2022\u2022\u2022 ${value}`
|
|
10825
|
+
},
|
|
10826
|
+
{
|
|
10827
|
+
key: "status",
|
|
10828
|
+
title: "Status",
|
|
10829
|
+
sortable: true,
|
|
10830
|
+
width: "10%",
|
|
10831
|
+
align: "right",
|
|
10832
|
+
render: (value) => /* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status: value })
|
|
10833
|
+
}
|
|
10834
|
+
],
|
|
10835
|
+
data: mockExternalAccounts
|
|
10836
|
+
}
|
|
10837
|
+
) })
|
|
10838
|
+
] }),
|
|
10839
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
10840
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
10841
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Documents" }),
|
|
10842
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Button, { size: "sm", variant: "ghost", children: [
|
|
10843
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Upload, { className: "h-4 w-4 mr-1" }),
|
|
10844
|
+
"Upload"
|
|
10845
|
+
] })
|
|
10846
|
+
] }),
|
|
10847
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: mockDocs.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
10848
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { className: "h-5 w-5 opacity-50" }),
|
|
10849
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "No documents found" })
|
|
10850
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2", children: mockDocs.map((doc) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10851
|
+
"div",
|
|
10852
|
+
{
|
|
10853
|
+
className: "flex items-center justify-between p-3 border rounded-lg hover:bg-accent/50 transition-colors",
|
|
10854
|
+
children: [
|
|
10855
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
10856
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { className: "h-5 w-5 text-muted-foreground" }),
|
|
10857
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
10858
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-medium text-sm", children: doc.name }),
|
|
10859
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: doc.type })
|
|
10860
|
+
] })
|
|
10861
|
+
] }),
|
|
10862
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
10863
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: new Date(doc.uploadedAt).toLocaleDateString() }),
|
|
10864
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, { className: "h-4 w-4" }) }),
|
|
10865
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Download, { className: "h-4 w-4" }) })
|
|
10866
|
+
] })
|
|
10867
|
+
]
|
|
10868
|
+
},
|
|
10869
|
+
doc.id
|
|
10870
|
+
)) }) })
|
|
10871
|
+
] })
|
|
10872
|
+
] }),
|
|
10873
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsxRuntime.jsx(IndividualStatusCard, { isEditing: false, onToggleEdit: () => {
|
|
10874
|
+
} }) })
|
|
8573
10875
|
] })
|
|
8574
10876
|
}
|
|
8575
10877
|
);
|
|
8576
10878
|
};
|
|
8577
|
-
var
|
|
8578
|
-
var
|
|
8579
|
-
const
|
|
8580
|
-
const
|
|
10879
|
+
var IndividualDetail_default = IndividualDetail;
|
|
10880
|
+
var CreateIndividual = () => {
|
|
10881
|
+
const navigate = reactRouterDom.useNavigate();
|
|
10882
|
+
const form = useFormWithEditState({
|
|
10883
|
+
schema: individualProfileSchema,
|
|
10884
|
+
defaultValues: {
|
|
10885
|
+
firstName: "",
|
|
10886
|
+
lastName: "",
|
|
10887
|
+
dateOfBirth: "",
|
|
10888
|
+
idType: "SSN",
|
|
10889
|
+
ssn: "",
|
|
10890
|
+
email: "",
|
|
10891
|
+
mobilePhone: "",
|
|
10892
|
+
streetAddress: "",
|
|
10893
|
+
apartment: "",
|
|
10894
|
+
city: "",
|
|
10895
|
+
state: "",
|
|
10896
|
+
postalCode: "",
|
|
10897
|
+
country: "United States",
|
|
10898
|
+
externalId: "",
|
|
10899
|
+
productId: ""
|
|
10900
|
+
},
|
|
10901
|
+
initialEditing: true,
|
|
10902
|
+
onSave: async (data) => {
|
|
10903
|
+
console.log("Creating individual:", data);
|
|
10904
|
+
navigate("/individual");
|
|
10905
|
+
}
|
|
10906
|
+
});
|
|
8581
10907
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8582
10908
|
PageLayout,
|
|
8583
10909
|
{
|
|
8584
|
-
title: "
|
|
8585
|
-
description: "
|
|
8586
|
-
actions:
|
|
8587
|
-
{
|
|
8588
|
-
|
|
8589
|
-
|
|
8590
|
-
|
|
8591
|
-
|
|
8592
|
-
|
|
8593
|
-
|
|
8594
|
-
/* @__PURE__ */ jsxRuntime.jsx(Separator, { className: "my-8" }),
|
|
10910
|
+
title: "Create Individual",
|
|
10911
|
+
description: "Add a new individual account",
|
|
10912
|
+
actions: [
|
|
10913
|
+
{
|
|
10914
|
+
label: "Back",
|
|
10915
|
+
variant: "outline",
|
|
10916
|
+
onClick: () => navigate("/individual")
|
|
10917
|
+
}
|
|
10918
|
+
],
|
|
10919
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(FormProvider, { form, children: /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: form.handleSubmit(form.handleSave), className: "space-y-6", children: [
|
|
8595
10920
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8596
10921
|
FormCard,
|
|
8597
10922
|
{
|
|
8598
|
-
title: "
|
|
8599
|
-
|
|
8600
|
-
headerActions: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: isEditing ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
10923
|
+
title: "Personal Information",
|
|
10924
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
8601
10925
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8602
|
-
|
|
10926
|
+
FormInput,
|
|
10927
|
+
{
|
|
10928
|
+
name: "firstName",
|
|
10929
|
+
label: "First Name",
|
|
10930
|
+
placeholder: "Enter first name",
|
|
10931
|
+
required: true
|
|
10932
|
+
}
|
|
10933
|
+
),
|
|
10934
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10935
|
+
FormInput,
|
|
10936
|
+
{
|
|
10937
|
+
name: "lastName",
|
|
10938
|
+
label: "Last Name",
|
|
10939
|
+
placeholder: "Enter last name",
|
|
10940
|
+
required: true
|
|
10941
|
+
}
|
|
10942
|
+
),
|
|
10943
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10944
|
+
FormInput,
|
|
10945
|
+
{
|
|
10946
|
+
name: "dateOfBirth",
|
|
10947
|
+
label: "Date of Birth",
|
|
10948
|
+
type: "date",
|
|
10949
|
+
placeholder: "Select date of birth"
|
|
10950
|
+
}
|
|
10951
|
+
),
|
|
10952
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10953
|
+
FormSelect,
|
|
8603
10954
|
{
|
|
8604
|
-
|
|
8605
|
-
|
|
10955
|
+
name: "idType",
|
|
10956
|
+
label: "ID Type",
|
|
10957
|
+
placeholder: "Select ID type",
|
|
8606
10958
|
options: [
|
|
8607
|
-
{ value: "
|
|
8608
|
-
{ value: "
|
|
8609
|
-
|
|
8610
|
-
|
|
10959
|
+
{ value: "SSN", label: "SSN" },
|
|
10960
|
+
{ value: "ITIN", label: "ITIN" },
|
|
10961
|
+
{ value: "Passport", label: "Passport" },
|
|
10962
|
+
{ value: "Driver License", label: "Driver License" }
|
|
10963
|
+
]
|
|
8611
10964
|
}
|
|
8612
10965
|
),
|
|
8613
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8614
|
-
|
|
8615
|
-
|
|
8616
|
-
|
|
8617
|
-
|
|
8618
|
-
|
|
8619
|
-
|
|
8620
|
-
|
|
8621
|
-
|
|
10966
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10967
|
+
FormInput,
|
|
10968
|
+
{
|
|
10969
|
+
name: "ssn",
|
|
10970
|
+
label: "SSN/ITIN",
|
|
10971
|
+
placeholder: "Enter SSN or ITIN",
|
|
10972
|
+
hint: "Enter full SSN or ITIN"
|
|
10973
|
+
}
|
|
10974
|
+
),
|
|
10975
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10976
|
+
FormInput,
|
|
10977
|
+
{
|
|
10978
|
+
name: "email",
|
|
10979
|
+
label: "Email",
|
|
10980
|
+
type: "email",
|
|
10981
|
+
placeholder: "Enter email address"
|
|
10982
|
+
}
|
|
10983
|
+
),
|
|
10984
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10985
|
+
FormInput,
|
|
10986
|
+
{
|
|
10987
|
+
name: "mobilePhone",
|
|
10988
|
+
label: "Mobile Phone",
|
|
10989
|
+
placeholder: "Enter mobile phone"
|
|
10990
|
+
}
|
|
10991
|
+
),
|
|
10992
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10993
|
+
FormInput,
|
|
10994
|
+
{
|
|
10995
|
+
name: "externalId",
|
|
10996
|
+
label: "External ID",
|
|
10997
|
+
placeholder: "Optional ID from external system",
|
|
10998
|
+
hint: "Optional ID from external system"
|
|
10999
|
+
}
|
|
11000
|
+
),
|
|
11001
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11002
|
+
FormInput,
|
|
11003
|
+
{
|
|
11004
|
+
name: "productId",
|
|
11005
|
+
label: "Product ID",
|
|
11006
|
+
placeholder: "Enter product ID"
|
|
11007
|
+
}
|
|
11008
|
+
)
|
|
8622
11009
|
] })
|
|
8623
11010
|
}
|
|
8624
|
-
)
|
|
8625
|
-
|
|
8626
|
-
|
|
8627
|
-
|
|
8628
|
-
|
|
8629
|
-
|
|
8630
|
-
|
|
8631
|
-
|
|
8632
|
-
|
|
8633
|
-
|
|
8634
|
-
|
|
8635
|
-
|
|
8636
|
-
|
|
8637
|
-
|
|
8638
|
-
|
|
8639
|
-
|
|
8640
|
-
|
|
8641
|
-
|
|
8642
|
-
|
|
8643
|
-
|
|
8644
|
-
|
|
8645
|
-
|
|
8646
|
-
|
|
8647
|
-
|
|
8648
|
-
|
|
8649
|
-
|
|
8650
|
-
|
|
8651
|
-
|
|
8652
|
-
|
|
8653
|
-
|
|
8654
|
-
|
|
8655
|
-
|
|
8656
|
-
|
|
8657
|
-
|
|
8658
|
-
|
|
8659
|
-
|
|
8660
|
-
|
|
8661
|
-
|
|
8662
|
-
|
|
8663
|
-
|
|
8664
|
-
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
|
|
8668
|
-
|
|
8669
|
-
|
|
8670
|
-
|
|
8671
|
-
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
|
|
8675
|
-
|
|
8676
|
-
|
|
8677
|
-
|
|
8678
|
-
|
|
8679
|
-
|
|
8680
|
-
|
|
8681
|
-
|
|
8682
|
-
|
|
8683
|
-
|
|
8684
|
-
|
|
8685
|
-
|
|
8686
|
-
|
|
8687
|
-
|
|
8688
|
-
|
|
8689
|
-
|
|
8690
|
-
|
|
8691
|
-
|
|
8692
|
-
|
|
8693
|
-
|
|
8694
|
-
|
|
8695
|
-
|
|
8696
|
-
|
|
8697
|
-
|
|
8698
|
-
|
|
8699
|
-
|
|
8700
|
-
|
|
8701
|
-
|
|
8702
|
-
|
|
8703
|
-
|
|
11011
|
+
),
|
|
11012
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11013
|
+
FormCard,
|
|
11014
|
+
{
|
|
11015
|
+
title: "Address Information",
|
|
11016
|
+
children: [
|
|
11017
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4", children: [
|
|
11018
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11019
|
+
FormInput,
|
|
11020
|
+
{
|
|
11021
|
+
name: "streetAddress",
|
|
11022
|
+
label: "Street Address",
|
|
11023
|
+
placeholder: "Enter street address"
|
|
11024
|
+
}
|
|
11025
|
+
),
|
|
11026
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11027
|
+
FormInput,
|
|
11028
|
+
{
|
|
11029
|
+
name: "apartment",
|
|
11030
|
+
label: "Apartment/Unit",
|
|
11031
|
+
placeholder: "Enter apartment or unit number"
|
|
11032
|
+
}
|
|
11033
|
+
)
|
|
11034
|
+
] }),
|
|
11035
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6 mt-4", children: [
|
|
11036
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11037
|
+
FormInput,
|
|
11038
|
+
{
|
|
11039
|
+
name: "city",
|
|
11040
|
+
label: "City",
|
|
11041
|
+
placeholder: "Enter city"
|
|
11042
|
+
}
|
|
11043
|
+
),
|
|
11044
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11045
|
+
FormInput,
|
|
11046
|
+
{
|
|
11047
|
+
name: "state",
|
|
11048
|
+
label: "State",
|
|
11049
|
+
placeholder: "Enter state"
|
|
11050
|
+
}
|
|
11051
|
+
),
|
|
11052
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11053
|
+
FormInput,
|
|
11054
|
+
{
|
|
11055
|
+
name: "postalCode",
|
|
11056
|
+
label: "Postal Code",
|
|
11057
|
+
placeholder: "Enter postal code"
|
|
11058
|
+
}
|
|
11059
|
+
),
|
|
11060
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11061
|
+
FormInput,
|
|
11062
|
+
{
|
|
11063
|
+
name: "country",
|
|
11064
|
+
label: "Country",
|
|
11065
|
+
placeholder: "Enter country"
|
|
11066
|
+
}
|
|
11067
|
+
)
|
|
11068
|
+
] })
|
|
11069
|
+
]
|
|
11070
|
+
}
|
|
11071
|
+
),
|
|
11072
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-end gap-3 pt-4 border-t", children: [
|
|
11073
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11074
|
+
Button,
|
|
11075
|
+
{
|
|
11076
|
+
type: "button",
|
|
11077
|
+
variant: "outline",
|
|
11078
|
+
onClick: () => navigate("/individual"),
|
|
11079
|
+
children: "Cancel"
|
|
11080
|
+
}
|
|
11081
|
+
),
|
|
11082
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11083
|
+
Button,
|
|
11084
|
+
{
|
|
11085
|
+
type: "submit",
|
|
11086
|
+
disabled: !form.isFormValid || form.isLoading,
|
|
11087
|
+
children: form.isLoading ? "Creating..." : "Create Individual"
|
|
11088
|
+
}
|
|
11089
|
+
)
|
|
11090
|
+
] })
|
|
11091
|
+
] }) })
|
|
8704
11092
|
}
|
|
8705
11093
|
);
|
|
8706
11094
|
};
|
|
8707
|
-
var
|
|
11095
|
+
var Create_default3 = CreateIndividual;
|
|
8708
11096
|
var NotFound = () => {
|
|
8709
11097
|
const location = reactRouterDom.useLocation();
|
|
8710
11098
|
React15.useEffect(() => {
|
|
@@ -8745,7 +11133,12 @@ function Statement() {
|
|
|
8745
11133
|
setProgramsError(null);
|
|
8746
11134
|
try {
|
|
8747
11135
|
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
8748
|
-
|
|
11136
|
+
throw new Error("Network connection timeout - Unable to reach program service");
|
|
11137
|
+
const data = mockPrograms;
|
|
11138
|
+
if (typeof data === "string") {
|
|
11139
|
+
throw new Error(data);
|
|
11140
|
+
}
|
|
11141
|
+
setPrograms(data);
|
|
8749
11142
|
} catch (error) {
|
|
8750
11143
|
const errorMessage = error instanceof Error ? error.message : "Failed to load programs";
|
|
8751
11144
|
setProgramsError(errorMessage);
|
|
@@ -8764,7 +11157,11 @@ function Statement() {
|
|
|
8764
11157
|
setProductsError(null);
|
|
8765
11158
|
try {
|
|
8766
11159
|
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
8767
|
-
|
|
11160
|
+
const data = mockProducts;
|
|
11161
|
+
if (typeof data === "string") {
|
|
11162
|
+
throw new Error(data);
|
|
11163
|
+
}
|
|
11164
|
+
setProducts(data);
|
|
8768
11165
|
} catch (error) {
|
|
8769
11166
|
const errorMessage = error instanceof Error ? error.message : "Failed to load products";
|
|
8770
11167
|
setProductsError(errorMessage);
|
|
@@ -10311,14 +12708,15 @@ exports.Checkbox = Checkbox;
|
|
|
10311
12708
|
exports.ContactInfoCard = ContactInfoCard;
|
|
10312
12709
|
exports.Container = Container;
|
|
10313
12710
|
exports.ContextSection = ContextSection;
|
|
12711
|
+
exports.Counterparties = Counterparties_default;
|
|
10314
12712
|
exports.CounterpartyBasicInfo = CounterpartyBasicInfo;
|
|
10315
|
-
exports.
|
|
10316
|
-
exports.CounterpartyManage = Manage_default;
|
|
12713
|
+
exports.CounterpartyDetail = CounterpartyDetail_default;
|
|
10317
12714
|
exports.CounterpartyProfileCard = CounterpartyProfileCard;
|
|
10318
12715
|
exports.CounterpartyRecordsCard = CounterpartyRecordsCard;
|
|
10319
12716
|
exports.CounterpartyTypeBadge = CounterpartyTypeBadge;
|
|
10320
12717
|
exports.CreateBusiness = Create_default;
|
|
10321
12718
|
exports.CreateCounterparty = Create_default2;
|
|
12719
|
+
exports.CreateIndividual = Create_default3;
|
|
10322
12720
|
exports.Dashboard = Dashboard_default;
|
|
10323
12721
|
exports.DashboardDemo = DashboardDemo;
|
|
10324
12722
|
exports.DataGrid = DataGrid;
|
|
@@ -10352,6 +12750,8 @@ exports.FormInput = FormInput;
|
|
|
10352
12750
|
exports.FormProvider = FormProvider;
|
|
10353
12751
|
exports.FormSection = FormSection;
|
|
10354
12752
|
exports.FormSelect = FormSelect;
|
|
12753
|
+
exports.IndividualDetail = IndividualDetail_default;
|
|
12754
|
+
exports.Individuals = Individuals_default;
|
|
10355
12755
|
exports.InfoField = InfoField;
|
|
10356
12756
|
exports.IntermediaryCard = IntermediaryCard;
|
|
10357
12757
|
exports.IntermediaryFI = IntermediaryFI;
|