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.js
CHANGED
|
@@ -4,7 +4,7 @@ import { cva } from 'class-variance-authority';
|
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
|
-
import { ChevronDown, ChevronUp, Check, X, PanelLeft, Edit, Home, Globe, CreditCard, Building, MoreVertical, Minus, TrendingDown, TrendingUp, ChevronRight, Eye, Trash2, Plus, MessageSquare, Upload, FileText, Download, Copy, LayoutDashboard, Bell, Briefcase, FileCheck, Receipt, ArrowLeftRight, Users, Building2,
|
|
7
|
+
import { ChevronDown, ChevronUp, Check, X, PanelLeft, Edit, Home, Globe, CreditCard, Building, MoreVertical, Minus, TrendingDown, TrendingUp, ChevronRight, Eye, Trash2, Plus, MessageSquare, Upload, FileText, Download, Copy, LayoutDashboard, Bell, Briefcase, FileCheck, Receipt, ArrowLeftRight, Users, Building2, Shield, AlertCircle, RefreshCw, Landmark, Search, Repeat, Zap, Box, Settings, BarChart3, Key, Heart, User, AlertTriangle, XCircle, CheckCircle, Clock, Loader2, ArrowDownRight, ArrowUpRight, Filter, ChevronLeft, Wallet, CheckCircle2, StickyNote, FileUp, RotateCcw, Send, PlayCircle, Circle, UserPlus, ChevronsUpDown, CalendarIcon, UserCheck, FileJson } from 'lucide-react';
|
|
8
8
|
import { createPortal } from 'react-dom';
|
|
9
9
|
import { Slot } from '@radix-ui/react-slot';
|
|
10
10
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
@@ -227,14 +227,14 @@ var FormCard = React15.forwardRef(
|
|
|
227
227
|
CardHeader,
|
|
228
228
|
{
|
|
229
229
|
direction: headerActions ? "row" : "column",
|
|
230
|
-
size: "
|
|
230
|
+
size: "sm",
|
|
231
231
|
children: [
|
|
232
232
|
/* @__PURE__ */ jsx("div", { className: "space-y-1", children: /* @__PURE__ */ jsx(CardTitle, { size: "md", children: title }) }),
|
|
233
233
|
headerActions && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: headerActions })
|
|
234
234
|
]
|
|
235
235
|
}
|
|
236
236
|
),
|
|
237
|
-
/* @__PURE__ */ jsx(CardContent, { size: "
|
|
237
|
+
/* @__PURE__ */ jsx(CardContent, { size: "sm", fullHeight: true, children })
|
|
238
238
|
]
|
|
239
239
|
}
|
|
240
240
|
)
|
|
@@ -2853,25 +2853,9 @@ var navigationItems = [
|
|
|
2853
2853
|
icon: Building2
|
|
2854
2854
|
},
|
|
2855
2855
|
{
|
|
2856
|
-
title: "
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
{
|
|
2860
|
-
title: "Management",
|
|
2861
|
-
url: "/counterparty/manage",
|
|
2862
|
-
icon: FileCheck
|
|
2863
|
-
},
|
|
2864
|
-
{
|
|
2865
|
-
title: "Create Counterparty",
|
|
2866
|
-
url: "/counterparty/create",
|
|
2867
|
-
icon: Receipt
|
|
2868
|
-
},
|
|
2869
|
-
{
|
|
2870
|
-
title: "Domestic Wire",
|
|
2871
|
-
url: "/counterparty/domestic-wire",
|
|
2872
|
-
icon: Zap
|
|
2873
|
-
}
|
|
2874
|
-
]
|
|
2856
|
+
title: "Counterparties",
|
|
2857
|
+
url: "/counterparty",
|
|
2858
|
+
icon: Briefcase
|
|
2875
2859
|
},
|
|
2876
2860
|
{
|
|
2877
2861
|
title: "Accounts",
|
|
@@ -3012,7 +2996,7 @@ function AppSidebar() {
|
|
|
3012
2996
|
);
|
|
3013
2997
|
};
|
|
3014
2998
|
return /* @__PURE__ */ jsxs(Sidebar, { collapsible: "icon", children: [
|
|
3015
|
-
/* @__PURE__ */ jsx(SidebarHeader, { className: "border-b border-sidebar-border", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 px-4 py-
|
|
2999
|
+
/* @__PURE__ */ jsx(SidebarHeader, { className: "border-b border-sidebar-border", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 px-4 py-6", children: [
|
|
3016
3000
|
state !== "collapsed" ? /* @__PURE__ */ jsx("img", { src: braid_logo_default, alt: "Braid", className: "h-8" }) : /* @__PURE__ */ jsx("img", { src: braid_logo_default, alt: "Braid", className: "h-6" }),
|
|
3017
3001
|
/* @__PURE__ */ jsx(SidebarTrigger, {})
|
|
3018
3002
|
] }) }),
|
|
@@ -3074,7 +3058,7 @@ function AppSidebar() {
|
|
|
3074
3058
|
] });
|
|
3075
3059
|
}
|
|
3076
3060
|
var MainLayout = ({ children }) => {
|
|
3077
|
-
return /* @__PURE__ */ jsx("div", { className: "flex min-h-screen w-full", children: /* @__PURE__ */ jsx("main", { className: "flex-1
|
|
3061
|
+
return /* @__PURE__ */ jsx("div", { className: "flex min-h-screen w-full", children: /* @__PURE__ */ jsx("main", { className: "flex-1", children }) });
|
|
3078
3062
|
};
|
|
3079
3063
|
var useEditState = ({ initialEditing = false, onToggleEdit, onSave, onCancel }) => {
|
|
3080
3064
|
const [localEditing, setLocalEditing] = useState(initialEditing);
|
|
@@ -3440,6 +3424,13 @@ z.object({
|
|
|
3440
3424
|
lastOFACDate: z.string(),
|
|
3441
3425
|
lastOFACStatus: z.string()
|
|
3442
3426
|
});
|
|
3427
|
+
z.object({
|
|
3428
|
+
status: z.enum(["ACTIVE", "INACTIVE", "PENDING", "SUSPENDED"]),
|
|
3429
|
+
cipStatus: z.enum(["verified", "pending", "not_started"]),
|
|
3430
|
+
createdAt: z.string(),
|
|
3431
|
+
updatedAt: z.string(),
|
|
3432
|
+
lastOFACCheck: z.string().optional()
|
|
3433
|
+
});
|
|
3443
3434
|
var wireBasicInfoSchema = z.object({
|
|
3444
3435
|
counterpartyName: z.string().min(1, "Counterparty name is required"),
|
|
3445
3436
|
shortName: z.string().min(1, "Short name is required"),
|
|
@@ -3480,6 +3471,14 @@ var businessProfileSchema = z.object({
|
|
|
3480
3471
|
idType: z.string().optional(),
|
|
3481
3472
|
incorporationState: z.string().optional(),
|
|
3482
3473
|
website: z.string().url("Invalid URL format").optional().or(z.literal("")),
|
|
3474
|
+
email: z.string().email("Invalid email format").optional().or(z.literal("")),
|
|
3475
|
+
mobilePhone: z.string().optional(),
|
|
3476
|
+
mcc: z.string().regex(/^\d{4}$/, "MCC must be 4 digits").optional().or(z.literal("")),
|
|
3477
|
+
naics: z.string().regex(/^\d{6}$/, "NAICS must be 6 digits").optional().or(z.literal("")),
|
|
3478
|
+
achCompanyId: z.string().regex(/^\d{10}$/, "ACH Company ID must be 10 digits").optional().or(z.literal("")),
|
|
3479
|
+
achCompanyName: z.string().optional(),
|
|
3480
|
+
externalId: z.string().uuid("Invalid UUID format").optional().or(z.literal("")),
|
|
3481
|
+
productId: z.coerce.number().optional(),
|
|
3483
3482
|
contactFirstName: z.string().optional(),
|
|
3484
3483
|
contactLastName: z.string().optional(),
|
|
3485
3484
|
contactEmail: z.string().optional(),
|
|
@@ -3637,74 +3636,68 @@ var AddressForm = ({
|
|
|
3637
3636
|
showApartment = false
|
|
3638
3637
|
}) => {
|
|
3639
3638
|
const addressTypeLabel = fieldPrefix ? `${fieldPrefix} Address Type` : "Address Type";
|
|
3640
|
-
return /* @__PURE__ */
|
|
3641
|
-
/* @__PURE__ */
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
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
|
-
placeholder: "Select type",
|
|
3703
|
-
options: addressTypeOptions
|
|
3704
|
-
}
|
|
3705
|
-
)
|
|
3706
|
-
] }) })
|
|
3707
|
-
] });
|
|
3639
|
+
return /* @__PURE__ */ jsx("div", { className: "space-y-6", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
3640
|
+
/* @__PURE__ */ jsx(
|
|
3641
|
+
EnhancedInput,
|
|
3642
|
+
{
|
|
3643
|
+
label: "Street Address",
|
|
3644
|
+
placeholder: "Enter street address",
|
|
3645
|
+
hint: fieldPrefix ? `${fieldPrefix} street address` : "Primary street address",
|
|
3646
|
+
...fieldOverrides.streetAddress
|
|
3647
|
+
}
|
|
3648
|
+
),
|
|
3649
|
+
showApartment && /* @__PURE__ */ jsx(
|
|
3650
|
+
EnhancedInput,
|
|
3651
|
+
{
|
|
3652
|
+
label: "Apt, Building etc",
|
|
3653
|
+
placeholder: "Additional address information",
|
|
3654
|
+
hint: "Additional address information",
|
|
3655
|
+
...fieldOverrides.apartment
|
|
3656
|
+
}
|
|
3657
|
+
),
|
|
3658
|
+
/* @__PURE__ */ jsx(
|
|
3659
|
+
EnhancedInput,
|
|
3660
|
+
{
|
|
3661
|
+
label: "City",
|
|
3662
|
+
placeholder: "Enter city",
|
|
3663
|
+
required: true,
|
|
3664
|
+
...fieldOverrides.city
|
|
3665
|
+
}
|
|
3666
|
+
),
|
|
3667
|
+
/* @__PURE__ */ jsx(
|
|
3668
|
+
EnhancedInput,
|
|
3669
|
+
{
|
|
3670
|
+
label: "State",
|
|
3671
|
+
placeholder: "Enter state",
|
|
3672
|
+
hint: "State or province",
|
|
3673
|
+
...fieldOverrides.state
|
|
3674
|
+
}
|
|
3675
|
+
),
|
|
3676
|
+
/* @__PURE__ */ jsx(
|
|
3677
|
+
EnhancedInput,
|
|
3678
|
+
{
|
|
3679
|
+
label: "Postal Code",
|
|
3680
|
+
placeholder: "12345",
|
|
3681
|
+
...fieldOverrides.postalCode
|
|
3682
|
+
}
|
|
3683
|
+
),
|
|
3684
|
+
/* @__PURE__ */ jsx(
|
|
3685
|
+
EnhancedSelect,
|
|
3686
|
+
{
|
|
3687
|
+
label: "Country Code",
|
|
3688
|
+
placeholder: "Select country",
|
|
3689
|
+
options: COUNTRY_OPTIONS
|
|
3690
|
+
}
|
|
3691
|
+
),
|
|
3692
|
+
showAddressType && /* @__PURE__ */ jsx(
|
|
3693
|
+
EnhancedSelect,
|
|
3694
|
+
{
|
|
3695
|
+
label: addressTypeLabel,
|
|
3696
|
+
placeholder: "Select type",
|
|
3697
|
+
options: addressTypeOptions
|
|
3698
|
+
}
|
|
3699
|
+
)
|
|
3700
|
+
] }) });
|
|
3708
3701
|
};
|
|
3709
3702
|
var BankingDetailsCard = ({ isEditing, onToggleEdit, className }) => {
|
|
3710
3703
|
return /* @__PURE__ */ jsx(
|
|
@@ -4175,6 +4168,14 @@ var defaultBusinessProfile = {
|
|
|
4175
4168
|
idType: "EIN",
|
|
4176
4169
|
incorporationState: "Delaware",
|
|
4177
4170
|
website: "https://acme.com",
|
|
4171
|
+
email: "contact@acme.com",
|
|
4172
|
+
mobilePhone: "+1 (555) 234-5678",
|
|
4173
|
+
mcc: "1234",
|
|
4174
|
+
naics: "123456",
|
|
4175
|
+
achCompanyId: "1234567890",
|
|
4176
|
+
achCompanyName: "Acme Corporation",
|
|
4177
|
+
externalId: "c48c9834-ccdd-42df-bd56-1022df37341b",
|
|
4178
|
+
productId: 1,
|
|
4178
4179
|
address: {
|
|
4179
4180
|
streetAddress: "123 Business Avenue",
|
|
4180
4181
|
apartment: "Suite 100",
|
|
@@ -4187,12 +4188,14 @@ var defaultBusinessProfile = {
|
|
|
4187
4188
|
};
|
|
4188
4189
|
var BusinessProfileCard = ({
|
|
4189
4190
|
data,
|
|
4191
|
+
identityVerification,
|
|
4190
4192
|
onDataChange,
|
|
4191
4193
|
isEditing,
|
|
4192
4194
|
onToggleEdit,
|
|
4193
4195
|
className,
|
|
4194
4196
|
hideActions
|
|
4195
4197
|
}) => {
|
|
4198
|
+
const [showResultDialog, setShowResultDialog] = useState(false);
|
|
4196
4199
|
const form = useFormWithEditState({
|
|
4197
4200
|
schema: businessProfileSchema,
|
|
4198
4201
|
defaultValues: { ...defaultBusinessProfile, ...data },
|
|
@@ -4200,7 +4203,7 @@ var BusinessProfileCard = ({
|
|
|
4200
4203
|
onToggleEdit,
|
|
4201
4204
|
onSave: onDataChange
|
|
4202
4205
|
});
|
|
4203
|
-
const editContent = /* @__PURE__ */ jsx(FormProvider, { form, children: /* @__PURE__ */ jsxs("div", { className: "space-y-
|
|
4206
|
+
const editContent = /* @__PURE__ */ jsx(FormProvider, { form, children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
4204
4207
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
4205
4208
|
/* @__PURE__ */ jsx(
|
|
4206
4209
|
FormInput,
|
|
@@ -4281,6 +4284,25 @@ var BusinessProfileCard = ({
|
|
|
4281
4284
|
}
|
|
4282
4285
|
)
|
|
4283
4286
|
] }),
|
|
4287
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
4288
|
+
/* @__PURE__ */ jsx(
|
|
4289
|
+
FormInput,
|
|
4290
|
+
{
|
|
4291
|
+
name: "email",
|
|
4292
|
+
label: "Business Email",
|
|
4293
|
+
type: "email",
|
|
4294
|
+
placeholder: "Enter business email"
|
|
4295
|
+
}
|
|
4296
|
+
),
|
|
4297
|
+
/* @__PURE__ */ jsx(
|
|
4298
|
+
FormInput,
|
|
4299
|
+
{
|
|
4300
|
+
name: "mobilePhone",
|
|
4301
|
+
label: "Business Phone",
|
|
4302
|
+
placeholder: "Enter business phone"
|
|
4303
|
+
}
|
|
4304
|
+
)
|
|
4305
|
+
] }),
|
|
4284
4306
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-4", children: [
|
|
4285
4307
|
/* @__PURE__ */ jsx(
|
|
4286
4308
|
FormInput,
|
|
@@ -4333,6 +4355,65 @@ var BusinessProfileCard = ({
|
|
|
4333
4355
|
}
|
|
4334
4356
|
)
|
|
4335
4357
|
] }),
|
|
4358
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
4359
|
+
/* @__PURE__ */ jsx(
|
|
4360
|
+
FormInput,
|
|
4361
|
+
{
|
|
4362
|
+
name: "mcc",
|
|
4363
|
+
label: "MCC",
|
|
4364
|
+
placeholder: "4-digit code",
|
|
4365
|
+
hint: "Merchant Category Code"
|
|
4366
|
+
}
|
|
4367
|
+
),
|
|
4368
|
+
/* @__PURE__ */ jsx(
|
|
4369
|
+
FormInput,
|
|
4370
|
+
{
|
|
4371
|
+
name: "naics",
|
|
4372
|
+
label: "NAICS",
|
|
4373
|
+
placeholder: "6-digit code",
|
|
4374
|
+
hint: "North American Industry Classification System"
|
|
4375
|
+
}
|
|
4376
|
+
)
|
|
4377
|
+
] }),
|
|
4378
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
4379
|
+
/* @__PURE__ */ jsx(
|
|
4380
|
+
FormInput,
|
|
4381
|
+
{
|
|
4382
|
+
name: "achCompanyId",
|
|
4383
|
+
label: "ACH Company ID",
|
|
4384
|
+
placeholder: "10-digit company ID"
|
|
4385
|
+
}
|
|
4386
|
+
),
|
|
4387
|
+
/* @__PURE__ */ jsx(
|
|
4388
|
+
FormInput,
|
|
4389
|
+
{
|
|
4390
|
+
name: "achCompanyName",
|
|
4391
|
+
label: "ACH Company Name",
|
|
4392
|
+
placeholder: "Enter ACH company name"
|
|
4393
|
+
}
|
|
4394
|
+
)
|
|
4395
|
+
] }),
|
|
4396
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
4397
|
+
/* @__PURE__ */ jsx(
|
|
4398
|
+
FormInput,
|
|
4399
|
+
{
|
|
4400
|
+
name: "externalId",
|
|
4401
|
+
label: "External ID",
|
|
4402
|
+
placeholder: "UUID",
|
|
4403
|
+
disabled: true
|
|
4404
|
+
}
|
|
4405
|
+
),
|
|
4406
|
+
/* @__PURE__ */ jsx(
|
|
4407
|
+
FormInput,
|
|
4408
|
+
{
|
|
4409
|
+
name: "productId",
|
|
4410
|
+
label: "Product ID",
|
|
4411
|
+
type: "number",
|
|
4412
|
+
placeholder: "Product ID",
|
|
4413
|
+
disabled: true
|
|
4414
|
+
}
|
|
4415
|
+
)
|
|
4416
|
+
] }),
|
|
4336
4417
|
/* @__PURE__ */ jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Contact Person" }),
|
|
4337
4418
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
4338
4419
|
/* @__PURE__ */ jsx(
|
|
@@ -4371,40 +4452,94 @@ var BusinessProfileCard = ({
|
|
|
4371
4452
|
] })
|
|
4372
4453
|
] }) });
|
|
4373
4454
|
const formValues = form.watch();
|
|
4374
|
-
const
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
/* @__PURE__ */
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
/* @__PURE__ */
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
/* @__PURE__ */
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
/* @__PURE__ */
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
{
|
|
4394
|
-
label: "
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4455
|
+
const kycBy = identityVerification?.isDeveloperInitiated ? "Fintech" : "Bank";
|
|
4456
|
+
const viewContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4457
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
4458
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
4459
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Legal Name", value: formValues?.legalName || "-", layout: "horizontal" }),
|
|
4460
|
+
/* @__PURE__ */ jsx(InfoField, { label: "DBA Name", value: formValues?.dbaName || "-", layout: "horizontal" })
|
|
4461
|
+
] }),
|
|
4462
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
4463
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Business Type", value: formValues?.businessType || "-", layout: "horizontal" }),
|
|
4464
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Tax ID", value: formValues?.taxId || "-", layout: "horizontal" })
|
|
4465
|
+
] }),
|
|
4466
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
4467
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Formation Date", value: formValues?.formationDate || "-", layout: "horizontal" }),
|
|
4468
|
+
/* @__PURE__ */ jsx(InfoField, { label: "ID Type", value: formValues?.idType || "-", layout: "horizontal" })
|
|
4469
|
+
] }),
|
|
4470
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
4471
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Incorporation State", value: formValues?.incorporationState || "-", layout: "horizontal" }),
|
|
4472
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Website", value: formValues?.website || "-", layout: "horizontal" })
|
|
4473
|
+
] }),
|
|
4474
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
4475
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Business Email", value: formValues?.email || "-", layout: "horizontal" }),
|
|
4476
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Business Phone", value: formValues?.mobilePhone || "-", layout: "horizontal" })
|
|
4477
|
+
] }),
|
|
4478
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
4479
|
+
/* @__PURE__ */ jsx(
|
|
4480
|
+
InfoField,
|
|
4481
|
+
{
|
|
4482
|
+
label: "KYC by",
|
|
4483
|
+
value: identityVerification ? /* @__PURE__ */ jsx(Badge, { variant: identityVerification.isDeveloperInitiated ? "business" : "government", children: kycBy }) : "-",
|
|
4484
|
+
layout: "horizontal"
|
|
4485
|
+
}
|
|
4486
|
+
),
|
|
4487
|
+
/* @__PURE__ */ jsx(
|
|
4488
|
+
InfoField,
|
|
4489
|
+
{
|
|
4490
|
+
label: "Provider",
|
|
4491
|
+
value: identityVerification ? /* @__PURE__ */ jsx(
|
|
4492
|
+
"button",
|
|
4493
|
+
{
|
|
4494
|
+
onClick: () => setShowResultDialog(true),
|
|
4495
|
+
className: "text-primary hover:underline font-medium",
|
|
4496
|
+
children: identityVerification.provider
|
|
4497
|
+
}
|
|
4498
|
+
) : "-",
|
|
4499
|
+
layout: "horizontal"
|
|
4500
|
+
}
|
|
4501
|
+
)
|
|
4502
|
+
] }),
|
|
4503
|
+
/* @__PURE__ */ jsx(
|
|
4504
|
+
InfoField,
|
|
4505
|
+
{
|
|
4506
|
+
label: "Address",
|
|
4507
|
+
value: formValues?.address ? `${formValues.address.streetAddress}${formValues.address.apartment ? ", " + formValues.address.apartment : ""}, ${formValues.address.city}, ${formValues.address.state} ${formValues.address.postalCode}, ${formValues.address.country}` : "-",
|
|
4508
|
+
layout: "horizontal"
|
|
4509
|
+
}
|
|
4510
|
+
),
|
|
4511
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
4512
|
+
/* @__PURE__ */ jsx(InfoField, { label: "MCC", value: formValues?.mcc || "-", layout: "horizontal" }),
|
|
4513
|
+
/* @__PURE__ */ jsx(InfoField, { label: "NAICS", value: formValues?.naics || "-", layout: "horizontal" })
|
|
4514
|
+
] }),
|
|
4515
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
4516
|
+
/* @__PURE__ */ jsx(InfoField, { label: "ACH Company ID", value: formValues?.achCompanyId || "-", layout: "horizontal" }),
|
|
4517
|
+
/* @__PURE__ */ jsx(InfoField, { label: "ACH Company Name", value: formValues?.achCompanyName || "-", layout: "horizontal" })
|
|
4518
|
+
] }),
|
|
4519
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
4520
|
+
/* @__PURE__ */ jsx(InfoField, { label: "External ID", value: formValues?.externalId || "-", layout: "horizontal" }),
|
|
4521
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Product ID", value: formValues?.productId?.toString() || "-", layout: "horizontal" })
|
|
4522
|
+
] }),
|
|
4523
|
+
/* @__PURE__ */ jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Contact Person" }),
|
|
4524
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
4525
|
+
/* @__PURE__ */ jsx(InfoField, { label: "First Name", value: formValues?.contactFirstName || "-", layout: "horizontal" }),
|
|
4526
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Last Name", value: formValues?.contactLastName || "-", layout: "horizontal" })
|
|
4527
|
+
] }),
|
|
4528
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
4529
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Email", value: formValues?.contactEmail || "-", layout: "horizontal" }),
|
|
4530
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Phone Number", value: formValues?.contactPhone || "-", layout: "horizontal" })
|
|
4531
|
+
] })
|
|
4403
4532
|
] }),
|
|
4404
|
-
/* @__PURE__ */ jsxs(
|
|
4405
|
-
/* @__PURE__ */
|
|
4406
|
-
|
|
4407
|
-
|
|
4533
|
+
/* @__PURE__ */ jsx(Dialog, { open: showResultDialog, onOpenChange: setShowResultDialog, children: /* @__PURE__ */ jsxs(DialogContent, { className: "max-w-3xl max-h-[80vh] overflow-y-auto", children: [
|
|
4534
|
+
/* @__PURE__ */ jsxs(DialogHeader, { children: [
|
|
4535
|
+
/* @__PURE__ */ jsxs(DialogTitle, { children: [
|
|
4536
|
+
"Provider Result - ",
|
|
4537
|
+
identityVerification?.provider || "-"
|
|
4538
|
+
] }),
|
|
4539
|
+
/* @__PURE__ */ jsx(DialogDescription, { children: "KYC verification result from the provider" })
|
|
4540
|
+
] }),
|
|
4541
|
+
/* @__PURE__ */ jsx(JsonViewer, { data: identityVerification?.result || {} })
|
|
4542
|
+
] }) })
|
|
4408
4543
|
] });
|
|
4409
4544
|
return /* @__PURE__ */ jsx(
|
|
4410
4545
|
EditableFormCard,
|
|
@@ -4558,7 +4693,10 @@ var CounterpartyBasicInfo = ({ onDataChange }) => {
|
|
|
4558
4693
|
type: "business",
|
|
4559
4694
|
email: "",
|
|
4560
4695
|
phone: "",
|
|
4561
|
-
|
|
4696
|
+
dateOfBirth: "",
|
|
4697
|
+
idNumber: "",
|
|
4698
|
+
idType: "product_id",
|
|
4699
|
+
idValue: ""
|
|
4562
4700
|
});
|
|
4563
4701
|
const handleInputChange = (field, value) => {
|
|
4564
4702
|
const updatedData = { ...formData, [field]: value };
|
|
@@ -4569,11 +4707,7 @@ var CounterpartyBasicInfo = ({ onDataChange }) => {
|
|
|
4569
4707
|
handleInputChange("type", type);
|
|
4570
4708
|
};
|
|
4571
4709
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
4572
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
4573
|
-
/* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Basic Information" }),
|
|
4574
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Enter the basic details for the counterparty" })
|
|
4575
|
-
] }),
|
|
4576
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
4710
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
4577
4711
|
/* @__PURE__ */ jsx(
|
|
4578
4712
|
EnhancedInput,
|
|
4579
4713
|
{
|
|
@@ -4584,9 +4718,9 @@ var CounterpartyBasicInfo = ({ onDataChange }) => {
|
|
|
4584
4718
|
required: true
|
|
4585
4719
|
}
|
|
4586
4720
|
),
|
|
4587
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-
|
|
4721
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
4588
4722
|
/* @__PURE__ */ jsx(Label, { className: "text-sm font-medium", children: "Counterparty Type" }),
|
|
4589
|
-
/* @__PURE__ */ jsxs("div", { className: "flex gap-6", children: [
|
|
4723
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-6 h-10 items-center", children: [
|
|
4590
4724
|
/* @__PURE__ */ jsxs("label", { className: "flex items-center space-x-2 cursor-pointer", children: [
|
|
4591
4725
|
/* @__PURE__ */ jsx(
|
|
4592
4726
|
"input",
|
|
@@ -4617,57 +4751,89 @@ var CounterpartyBasicInfo = ({ onDataChange }) => {
|
|
|
4617
4751
|
] })
|
|
4618
4752
|
] })
|
|
4619
4753
|
] }),
|
|
4620
|
-
/* @__PURE__ */
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
{
|
|
4635
|
-
label: "Phone Number",
|
|
4636
|
-
type: "tel",
|
|
4637
|
-
value: formData.phone,
|
|
4638
|
-
onChange: (e) => handleInputChange("phone", e.target.value),
|
|
4639
|
-
placeholder: "Enter phone number",
|
|
4640
|
-
required: true
|
|
4641
|
-
}
|
|
4642
|
-
)
|
|
4643
|
-
] }),
|
|
4754
|
+
/* @__PURE__ */ jsx(
|
|
4755
|
+
EnhancedSelect,
|
|
4756
|
+
{
|
|
4757
|
+
label: "Associated with",
|
|
4758
|
+
value: formData.idType,
|
|
4759
|
+
onValueChange: (value) => handleInputChange("idType", value),
|
|
4760
|
+
options: [
|
|
4761
|
+
{ value: "product_id", label: "Product ID" },
|
|
4762
|
+
{ value: "business_id", label: "Business ID" },
|
|
4763
|
+
{ value: "individual_id", label: "Individual ID" },
|
|
4764
|
+
{ value: "account_number", label: "Account Number" }
|
|
4765
|
+
]
|
|
4766
|
+
}
|
|
4767
|
+
),
|
|
4644
4768
|
/* @__PURE__ */ jsx(
|
|
4645
4769
|
EnhancedInput,
|
|
4646
4770
|
{
|
|
4647
|
-
label: "Product ID",
|
|
4648
|
-
value: formData.
|
|
4649
|
-
|
|
4650
|
-
|
|
4771
|
+
label: formData.idType === "product_id" ? "Product ID" : formData.idType === "business_id" ? "Business ID" : formData.idType === "individual_id" ? "Individual ID" : "Account Number",
|
|
4772
|
+
value: formData.idValue,
|
|
4773
|
+
onChange: (e) => handleInputChange("idValue", e.target.value),
|
|
4774
|
+
placeholder: `Enter ${formData.idType === "product_id" ? "product ID" : formData.idType === "business_id" ? "business ID" : formData.idType === "individual_id" ? "individual ID" : "account number"}`,
|
|
4775
|
+
required: true
|
|
4651
4776
|
}
|
|
4652
4777
|
)
|
|
4653
|
-
] })
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4778
|
+
] }),
|
|
4779
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
4780
|
+
/* @__PURE__ */ jsx(
|
|
4781
|
+
EnhancedInput,
|
|
4782
|
+
{
|
|
4783
|
+
label: "Email",
|
|
4784
|
+
type: "email",
|
|
4785
|
+
value: formData.email,
|
|
4786
|
+
onChange: (e) => handleInputChange("email", e.target.value),
|
|
4787
|
+
placeholder: "Enter email address"
|
|
4788
|
+
}
|
|
4789
|
+
),
|
|
4790
|
+
/* @__PURE__ */ jsx(
|
|
4791
|
+
EnhancedInput,
|
|
4792
|
+
{
|
|
4793
|
+
label: "Phone Number",
|
|
4794
|
+
type: "tel",
|
|
4795
|
+
value: formData.phone,
|
|
4796
|
+
onChange: (e) => handleInputChange("phone", e.target.value),
|
|
4797
|
+
placeholder: "Enter phone number"
|
|
4798
|
+
}
|
|
4799
|
+
),
|
|
4800
|
+
/* @__PURE__ */ jsx(
|
|
4801
|
+
EnhancedInput,
|
|
4802
|
+
{
|
|
4803
|
+
label: "Date of Birth",
|
|
4804
|
+
type: "date",
|
|
4805
|
+
value: formData.dateOfBirth,
|
|
4806
|
+
onChange: (e) => handleInputChange("dateOfBirth", e.target.value),
|
|
4807
|
+
placeholder: "Select date of birth"
|
|
4808
|
+
}
|
|
4809
|
+
),
|
|
4810
|
+
/* @__PURE__ */ jsx(
|
|
4811
|
+
EnhancedInput,
|
|
4812
|
+
{
|
|
4813
|
+
label: "ID Number",
|
|
4814
|
+
value: formData.idNumber,
|
|
4815
|
+
onChange: (e) => handleInputChange("idNumber", e.target.value),
|
|
4816
|
+
placeholder: "Enter ID number"
|
|
4817
|
+
}
|
|
4818
|
+
)
|
|
4819
|
+
] })
|
|
4820
|
+
] });
|
|
4821
|
+
};
|
|
4822
|
+
var spacingClasses = {
|
|
4823
|
+
sm: "space-y-3",
|
|
4824
|
+
md: "space-y-4",
|
|
4825
|
+
lg: "space-y-6"
|
|
4826
|
+
};
|
|
4827
|
+
var gridClasses = {
|
|
4828
|
+
1: "grid-cols-1",
|
|
4829
|
+
2: "grid-cols-1 md:grid-cols-2",
|
|
4830
|
+
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
|
|
4831
|
+
4: "grid-cols-1 md:grid-cols-2 lg:grid-cols-4"
|
|
4832
|
+
};
|
|
4833
|
+
var FormSection = React15.forwardRef(
|
|
4834
|
+
({
|
|
4835
|
+
title,
|
|
4836
|
+
description,
|
|
4671
4837
|
children,
|
|
4672
4838
|
className,
|
|
4673
4839
|
spacing: spacing2 = "md",
|
|
@@ -4898,79 +5064,88 @@ var OriginatorCard = ({ isEditing, onToggleEdit, className, hideActions }) => {
|
|
|
4898
5064
|
}
|
|
4899
5065
|
);
|
|
4900
5066
|
};
|
|
4901
|
-
var
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
}
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
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
|
-
|
|
5067
|
+
var SimpleACHForm = () => {
|
|
5068
|
+
return /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
5069
|
+
/* @__PURE__ */ jsx(
|
|
5070
|
+
EnhancedInput,
|
|
5071
|
+
{
|
|
5072
|
+
label: "Routing Number",
|
|
5073
|
+
placeholder: "Enter 9-digit routing number",
|
|
5074
|
+
pattern: "[0-9]{9}",
|
|
5075
|
+
maxLength: 9,
|
|
5076
|
+
hint: "9-digit routing number",
|
|
5077
|
+
required: true
|
|
5078
|
+
}
|
|
5079
|
+
),
|
|
5080
|
+
/* @__PURE__ */ jsx(
|
|
5081
|
+
EnhancedInput,
|
|
5082
|
+
{
|
|
5083
|
+
label: "Account Number",
|
|
5084
|
+
placeholder: "Enter account number",
|
|
5085
|
+
required: true
|
|
5086
|
+
}
|
|
5087
|
+
),
|
|
5088
|
+
/* @__PURE__ */ jsx(
|
|
5089
|
+
EnhancedSelect,
|
|
5090
|
+
{
|
|
5091
|
+
label: "Account Type",
|
|
5092
|
+
placeholder: "Select account type",
|
|
5093
|
+
options: [
|
|
5094
|
+
{ value: "checking", label: "Checking" },
|
|
5095
|
+
{ value: "savings", label: "Savings" }
|
|
5096
|
+
]
|
|
5097
|
+
}
|
|
5098
|
+
)
|
|
5099
|
+
] });
|
|
5100
|
+
};
|
|
5101
|
+
var SimpleWireForm = () => {
|
|
5102
|
+
const [wireType, setWireType] = useState("domestic");
|
|
5103
|
+
return /* @__PURE__ */ jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
5104
|
+
/* @__PURE__ */ jsx(
|
|
5105
|
+
EnhancedSelect,
|
|
5106
|
+
{
|
|
5107
|
+
label: "Wire Type",
|
|
5108
|
+
placeholder: "Select wire type",
|
|
5109
|
+
value: wireType,
|
|
5110
|
+
onValueChange: setWireType,
|
|
5111
|
+
options: [
|
|
5112
|
+
{ value: "domestic", label: "Domestic" },
|
|
5113
|
+
{ value: "international", label: "International" }
|
|
5114
|
+
]
|
|
5115
|
+
}
|
|
5116
|
+
),
|
|
5117
|
+
wireType === "domestic" ? /* @__PURE__ */ jsx(
|
|
5118
|
+
EnhancedInput,
|
|
5119
|
+
{
|
|
5120
|
+
label: "Routing Number",
|
|
5121
|
+
placeholder: "Enter 9-digit routing number",
|
|
5122
|
+
pattern: "[0-9]{9}",
|
|
5123
|
+
maxLength: 9,
|
|
5124
|
+
hint: "9-digit routing number",
|
|
5125
|
+
required: true
|
|
5126
|
+
}
|
|
5127
|
+
) : /* @__PURE__ */ jsx(
|
|
5128
|
+
EnhancedInput,
|
|
5129
|
+
{
|
|
5130
|
+
label: "BIC Number",
|
|
5131
|
+
placeholder: "Enter BIC/SWIFT code",
|
|
5132
|
+
hint: "Bank Identifier Code",
|
|
5133
|
+
required: true
|
|
5134
|
+
}
|
|
5135
|
+
),
|
|
5136
|
+
/* @__PURE__ */ jsx(
|
|
5137
|
+
EnhancedInput,
|
|
5138
|
+
{
|
|
5139
|
+
label: "Account Number",
|
|
5140
|
+
placeholder: "Enter account number",
|
|
5141
|
+
required: true
|
|
5142
|
+
}
|
|
5143
|
+
)
|
|
5144
|
+
] }) });
|
|
4969
5145
|
};
|
|
4970
|
-
var PaymentInformationSection = () => {
|
|
5146
|
+
var PaymentInformationSection = ({ onPaymentMethodsChange } = {}) => {
|
|
4971
5147
|
const [paymentMethods, setPaymentMethods] = useState([]);
|
|
4972
5148
|
const [showAddMenu, setShowAddMenu] = useState(false);
|
|
4973
|
-
const [achData, setAchData] = useState(defaultACHTransfer);
|
|
4974
5149
|
const addPaymentMethod = (type) => {
|
|
4975
5150
|
const newMethod = {
|
|
4976
5151
|
id: `${type}-${Date.now()}`,
|
|
@@ -4978,57 +5153,29 @@ var PaymentInformationSection = () => {
|
|
|
4978
5153
|
name: type === "ach" ? "ACH Payment" : "Wire Transfer",
|
|
4979
5154
|
collapsed: false
|
|
4980
5155
|
};
|
|
4981
|
-
|
|
5156
|
+
const updatedMethods = [...paymentMethods, newMethod];
|
|
5157
|
+
setPaymentMethods(updatedMethods);
|
|
5158
|
+
onPaymentMethodsChange?.(updatedMethods);
|
|
4982
5159
|
setShowAddMenu(false);
|
|
4983
5160
|
};
|
|
4984
5161
|
const removePaymentMethod = (id) => {
|
|
4985
|
-
|
|
5162
|
+
const updatedMethods = paymentMethods.filter((method) => method.id !== id);
|
|
5163
|
+
setPaymentMethods(updatedMethods);
|
|
5164
|
+
onPaymentMethodsChange?.(updatedMethods);
|
|
4986
5165
|
};
|
|
4987
5166
|
const toggleCollapse = (id) => {
|
|
4988
5167
|
setPaymentMethods(paymentMethods.map(
|
|
4989
5168
|
(method) => method.id === id ? { ...method, collapsed: !method.collapsed } : method
|
|
4990
5169
|
));
|
|
4991
5170
|
};
|
|
4992
|
-
const handleACHDataChange = (newData) => {
|
|
4993
|
-
setAchData(newData);
|
|
4994
|
-
};
|
|
4995
5171
|
const renderPaymentMethodContent = (method) => {
|
|
4996
5172
|
if (method.type === "ach") {
|
|
4997
|
-
return /* @__PURE__ */
|
|
4998
|
-
/* @__PURE__ */ jsx(
|
|
4999
|
-
ACHBasicInfoCard,
|
|
5000
|
-
{
|
|
5001
|
-
data: achData,
|
|
5002
|
-
onDataChange: handleACHDataChange,
|
|
5003
|
-
isEditing: true,
|
|
5004
|
-
hideActions: true
|
|
5005
|
-
}
|
|
5006
|
-
),
|
|
5007
|
-
/* @__PURE__ */ jsx(
|
|
5008
|
-
ACHBankCard,
|
|
5009
|
-
{
|
|
5010
|
-
data: achData,
|
|
5011
|
-
onDataChange: handleACHDataChange,
|
|
5012
|
-
isEditing: true,
|
|
5013
|
-
hideActions: true
|
|
5014
|
-
}
|
|
5015
|
-
),
|
|
5016
|
-
/* @__PURE__ */ jsx(BankAddressCard, { isEditing: true, hideActions: true })
|
|
5017
|
-
] });
|
|
5173
|
+
return /* @__PURE__ */ jsx(SimpleACHForm, {});
|
|
5018
5174
|
} else {
|
|
5019
|
-
return /* @__PURE__ */
|
|
5020
|
-
/* @__PURE__ */ jsx(ReceiverCard, { isEditing: true, hideActions: true }),
|
|
5021
|
-
/* @__PURE__ */ jsx(BeneficiaryCard, { isEditing: true, hideActions: true }),
|
|
5022
|
-
/* @__PURE__ */ jsx(OriginatorCard, { isEditing: true, hideActions: true }),
|
|
5023
|
-
/* @__PURE__ */ jsx(IntermediaryCard, { isEditing: true, hideActions: true })
|
|
5024
|
-
] });
|
|
5175
|
+
return /* @__PURE__ */ jsx(SimpleWireForm, {});
|
|
5025
5176
|
}
|
|
5026
5177
|
};
|
|
5027
5178
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
5028
|
-
/* @__PURE__ */ jsxs("div", { className: "border-b border-border pb-4", children: [
|
|
5029
|
-
/* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Payment Information" }),
|
|
5030
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Add payment methods for this counterparty" })
|
|
5031
|
-
] }),
|
|
5032
5179
|
paymentMethods.map((method) => /* @__PURE__ */ jsxs(Card, { className: "relative", children: [
|
|
5033
5180
|
/* @__PURE__ */ jsx(CardHeader, { className: "pb-3", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
5034
5181
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
@@ -5059,6 +5206,7 @@ var PaymentInformationSection = () => {
|
|
|
5059
5206
|
!method.collapsed && /* @__PURE__ */ jsx(CardContent, { children: renderPaymentMethodContent(method) })
|
|
5060
5207
|
] }, method.id)),
|
|
5061
5208
|
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
5209
|
+
paymentMethods.length === 0 && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-2", children: "At least one payment method is required *" }),
|
|
5062
5210
|
/* @__PURE__ */ jsxs(
|
|
5063
5211
|
Button,
|
|
5064
5212
|
{
|
|
@@ -5094,6 +5242,75 @@ var PaymentInformationSection = () => {
|
|
|
5094
5242
|
] })
|
|
5095
5243
|
] });
|
|
5096
5244
|
};
|
|
5245
|
+
var receiverSchema = z.object({
|
|
5246
|
+
routingNumber: z.string().min(9, "Routing number must be 9 digits").max(9, "Routing number must be 9 digits"),
|
|
5247
|
+
bankShortName: z.string().min(1, "Bank short name is required")
|
|
5248
|
+
});
|
|
5249
|
+
var ReceiverCard = ({
|
|
5250
|
+
data,
|
|
5251
|
+
onDataChange,
|
|
5252
|
+
isEditing,
|
|
5253
|
+
onToggleEdit,
|
|
5254
|
+
className,
|
|
5255
|
+
hideActions
|
|
5256
|
+
}) => {
|
|
5257
|
+
const form = useFormWithEditState({
|
|
5258
|
+
schema: receiverSchema,
|
|
5259
|
+
defaultValues: { ...defaultReceiverInfo, ...data },
|
|
5260
|
+
initialEditing: isEditing,
|
|
5261
|
+
onToggleEdit,
|
|
5262
|
+
onSave: onDataChange
|
|
5263
|
+
});
|
|
5264
|
+
const editContent = /* @__PURE__ */ jsx(FormProvider, { form, children: /* @__PURE__ */ jsx(FormSection, { children: /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
5265
|
+
/* @__PURE__ */ jsxs("div", { className: "border-b border-border pb-4", children: [
|
|
5266
|
+
/* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Receiver Details" }),
|
|
5267
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Receiving bank information" })
|
|
5268
|
+
] }),
|
|
5269
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-6", children: [
|
|
5270
|
+
/* @__PURE__ */ jsx(
|
|
5271
|
+
FormInput,
|
|
5272
|
+
{
|
|
5273
|
+
name: "routingNumber",
|
|
5274
|
+
label: "Receiver Routing Number",
|
|
5275
|
+
placeholder: "Enter routing number",
|
|
5276
|
+
hint: "9-digit routing number",
|
|
5277
|
+
pattern: "[0-9]{9}",
|
|
5278
|
+
maxLength: 9,
|
|
5279
|
+
required: true
|
|
5280
|
+
}
|
|
5281
|
+
),
|
|
5282
|
+
/* @__PURE__ */ jsx(
|
|
5283
|
+
FormInput,
|
|
5284
|
+
{
|
|
5285
|
+
name: "bankShortName",
|
|
5286
|
+
label: "Receiver Bank Short Name",
|
|
5287
|
+
placeholder: "Enter bank short name",
|
|
5288
|
+
required: true
|
|
5289
|
+
}
|
|
5290
|
+
)
|
|
5291
|
+
] })
|
|
5292
|
+
] }) }) });
|
|
5293
|
+
const formValues = form.watch();
|
|
5294
|
+
const viewData = [
|
|
5295
|
+
{ label: "Routing Number", value: formValues?.routingNumber },
|
|
5296
|
+
{ label: "Bank Short Name", value: formValues?.bankShortName }
|
|
5297
|
+
];
|
|
5298
|
+
return /* @__PURE__ */ jsx(
|
|
5299
|
+
EditableFormCard,
|
|
5300
|
+
{
|
|
5301
|
+
title: "FedWire Receiver",
|
|
5302
|
+
variant: "subtle",
|
|
5303
|
+
className,
|
|
5304
|
+
isEditing: form.isEditing,
|
|
5305
|
+
onToggleEdit: form.handleToggleEdit,
|
|
5306
|
+
onSave: form.handleSave,
|
|
5307
|
+
onCancel: form.handleCancel,
|
|
5308
|
+
hideActions,
|
|
5309
|
+
editContent,
|
|
5310
|
+
viewContent: /* @__PURE__ */ jsx(DataGrid, { data: viewData, columns: 2 })
|
|
5311
|
+
}
|
|
5312
|
+
);
|
|
5313
|
+
};
|
|
5097
5314
|
var WireTransferSection = ({ isEditing, onToggleEdit, className, hideActions }) => {
|
|
5098
5315
|
const [wireTransferType, setWireTransferType] = useState("INTERNATIONAL");
|
|
5099
5316
|
const editContent = /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
@@ -5415,7 +5632,9 @@ var mockProducts = [
|
|
|
5415
5632
|
];
|
|
5416
5633
|
var StatementHeader = ({ data, onEdit }) => {
|
|
5417
5634
|
const hasValue = (value) => {
|
|
5418
|
-
|
|
5635
|
+
if (value === void 0 || value === null) return false;
|
|
5636
|
+
if (typeof value === "string" && value.trim() === "") return false;
|
|
5637
|
+
return true;
|
|
5419
5638
|
};
|
|
5420
5639
|
const balanceChange = data.startingBalance && data.endingBalance ? calculateBalanceChange(data.startingBalance, data.endingBalance) : null;
|
|
5421
5640
|
return /* @__PURE__ */ jsxs(Card, { children: [
|
|
@@ -5639,11 +5858,11 @@ function DataTable({
|
|
|
5639
5858
|
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { className: "border-b bg-muted/50", children: columns2.map((column) => /* @__PURE__ */ jsx(
|
|
5640
5859
|
"th",
|
|
5641
5860
|
{
|
|
5861
|
+
style: column.width ? { width: column.width } : void 0,
|
|
5642
5862
|
className: cn(
|
|
5643
5863
|
"px-3 py-2 text-left align-middle text-sm font-medium bg-muted/50",
|
|
5644
5864
|
column.align === "center" && "text-center",
|
|
5645
|
-
column.align === "right" && "text-right"
|
|
5646
|
-
column.width && `w-[${column.width}]`
|
|
5865
|
+
column.align === "right" && "text-right"
|
|
5647
5866
|
),
|
|
5648
5867
|
children: column.sortable && onSort ? /* @__PURE__ */ jsx(
|
|
5649
5868
|
Button,
|
|
@@ -5672,6 +5891,7 @@ function DataTable({
|
|
|
5672
5891
|
children: columns2.map((column) => /* @__PURE__ */ jsx(
|
|
5673
5892
|
"td",
|
|
5674
5893
|
{
|
|
5894
|
+
style: column.width ? { width: column.width } : void 0,
|
|
5675
5895
|
className: cn(
|
|
5676
5896
|
"px-3 py-2 align-middle text-sm",
|
|
5677
5897
|
column.align === "center" && "text-center",
|
|
@@ -6182,12 +6402,11 @@ var PageLayout = React15.forwardRef(
|
|
|
6182
6402
|
});
|
|
6183
6403
|
};
|
|
6184
6404
|
return /* @__PURE__ */ jsxs("div", { ref, className: "flex flex-col h-screen bg-gradient-subtle", children: [
|
|
6185
|
-
/* @__PURE__ */ jsx("div", { className: cn(
|
|
6186
|
-
"
|
|
6187
|
-
"container mx-auto px-4 pt-8 pb-4",
|
|
6405
|
+
/* @__PURE__ */ jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsx("div", { className: cn(
|
|
6406
|
+
"container mx-auto px-4 py-6",
|
|
6188
6407
|
maxWidthClasses[maxWidth]
|
|
6189
6408
|
), children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4", children: [
|
|
6190
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
6409
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-h-[2.5rem]", children: [
|
|
6191
6410
|
/* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold text-foreground mb-2", children: title }),
|
|
6192
6411
|
description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: description })
|
|
6193
6412
|
] }),
|
|
@@ -6216,7 +6435,7 @@ var PageLayout = React15.forwardRef(
|
|
|
6216
6435
|
index
|
|
6217
6436
|
);
|
|
6218
6437
|
}) })
|
|
6219
|
-
] }) }),
|
|
6438
|
+
] }) }) }),
|
|
6220
6439
|
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx("div", { className: cn(
|
|
6221
6440
|
"container mx-auto px-4 py-6",
|
|
6222
6441
|
maxWidthClasses[maxWidth],
|
|
@@ -7860,6 +8079,11 @@ var mockBusinessesList = [
|
|
|
7860
8079
|
productName: "Fiat Republic Canada Inc. FBO Rapidz Pay",
|
|
7861
8080
|
cipStatus: "verified",
|
|
7862
8081
|
status: "active",
|
|
8082
|
+
type: "Business",
|
|
8083
|
+
subType: "Customer",
|
|
8084
|
+
isDeveloperInitiated: true,
|
|
8085
|
+
provider: "Plaid",
|
|
8086
|
+
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"',
|
|
7863
8087
|
created: "2025-10-05",
|
|
7864
8088
|
modified: "2025-10-05"
|
|
7865
8089
|
},
|
|
@@ -7869,6 +8093,11 @@ var mockBusinessesList = [
|
|
|
7869
8093
|
productName: "Atomic Brokerage FBO Atomic Brokerage Clients",
|
|
7870
8094
|
cipStatus: "verified",
|
|
7871
8095
|
status: "active",
|
|
8096
|
+
type: "Business",
|
|
8097
|
+
subType: "UBO",
|
|
8098
|
+
isDeveloperInitiated: false,
|
|
8099
|
+
provider: "Alloy",
|
|
8100
|
+
result: 'vendor:COMPLIANCE_VENDOR status:approved data:"verification_id:\\"vrf-123\\" corporate_id:\\"corp-456\\" timestamp:{seconds:1761333900 nanos:123456000} status:verified"',
|
|
7872
8101
|
created: "2025-10-04",
|
|
7873
8102
|
modified: "2025-10-04"
|
|
7874
8103
|
},
|
|
@@ -7878,6 +8107,11 @@ var mockBusinessesList = [
|
|
|
7878
8107
|
productName: "SendFriend Inc FBO Conduit Pay Agent",
|
|
7879
8108
|
cipStatus: "not_start",
|
|
7880
8109
|
status: "active",
|
|
8110
|
+
type: "Individual",
|
|
8111
|
+
subType: "Customer",
|
|
8112
|
+
isDeveloperInitiated: true,
|
|
8113
|
+
provider: "Plaid",
|
|
8114
|
+
result: 'vendor:IDENTITY_VENDOR status:pending data:"request_id:\\"req-789\\" entity_id:\\"ent-012\\" created:{seconds:1761333800 nanos:987654000}"',
|
|
7881
8115
|
created: "2025-10-03",
|
|
7882
8116
|
modified: "2025-10-03"
|
|
7883
8117
|
},
|
|
@@ -7887,6 +8121,11 @@ var mockBusinessesList = [
|
|
|
7887
8121
|
productName: "Digital Finance Inc FBO Tech Solutions",
|
|
7888
8122
|
cipStatus: "pending",
|
|
7889
8123
|
status: "active",
|
|
8124
|
+
type: "Business",
|
|
8125
|
+
subType: "Customer",
|
|
8126
|
+
isDeveloperInitiated: false,
|
|
8127
|
+
provider: "Alloy",
|
|
8128
|
+
result: 'vendor:KYC_VENDOR status:in_progress data:"kyc_id:\\"kyc-345\\" business_id:\\"biz-678\\" initiated:{seconds:1761333700 nanos:111222000}"',
|
|
7890
8129
|
created: "2025-10-02",
|
|
7891
8130
|
modified: "2025-10-02"
|
|
7892
8131
|
},
|
|
@@ -7896,6 +8135,11 @@ var mockBusinessesList = [
|
|
|
7896
8135
|
productName: "Swift Transfer FBO Global Trade",
|
|
7897
8136
|
cipStatus: "verified",
|
|
7898
8137
|
status: "active",
|
|
8138
|
+
type: "Individual",
|
|
8139
|
+
subType: "UBO",
|
|
8140
|
+
isDeveloperInitiated: true,
|
|
8141
|
+
provider: "Plaid",
|
|
8142
|
+
result: 'vendor:VERIFICATION_VENDOR status:completed data:"account_verified:true holder_verified:true timestamp:{seconds:1761333600 nanos:333444000}"',
|
|
7899
8143
|
created: "2025-10-01",
|
|
7900
8144
|
modified: "2025-10-01"
|
|
7901
8145
|
}
|
|
@@ -8022,11 +8266,8 @@ var Businesses = () => {
|
|
|
8022
8266
|
return 0;
|
|
8023
8267
|
});
|
|
8024
8268
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-screen bg-gradient-subtle", children: [
|
|
8025
|
-
/* @__PURE__ */ jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-
|
|
8026
|
-
/* @__PURE__ */
|
|
8027
|
-
/* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold text-foreground", children: "Businesses" }),
|
|
8028
|
-
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-1", children: "Manage business entities and their configurations" })
|
|
8029
|
-
] }),
|
|
8269
|
+
/* @__PURE__ */ jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-6 max-w-none", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
8270
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold text-foreground mb-2", children: "Businesses" }) }),
|
|
8030
8271
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
8031
8272
|
/* @__PURE__ */ jsxs(Sheet, { children: [
|
|
8032
8273
|
/* @__PURE__ */ jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", className: "gap-2", children: [
|
|
@@ -8120,559 +8361,2706 @@ var Businesses = () => {
|
|
|
8120
8361
|
] });
|
|
8121
8362
|
};
|
|
8122
8363
|
var Businesses_default = Businesses;
|
|
8123
|
-
var
|
|
8124
|
-
{
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
type: "checking",
|
|
8129
|
-
status: "active",
|
|
8130
|
-
balance: "$125,450.00",
|
|
8131
|
-
currency: "USD",
|
|
8132
|
-
institution: "Chase Bank",
|
|
8133
|
-
routingNumber: "021000021",
|
|
8134
|
-
country: "US"
|
|
8364
|
+
var statusConfig2 = {
|
|
8365
|
+
verified: {
|
|
8366
|
+
variant: "active",
|
|
8367
|
+
label: "Verified",
|
|
8368
|
+
icon: CheckCircle
|
|
8135
8369
|
},
|
|
8136
|
-
{
|
|
8137
|
-
|
|
8138
|
-
|
|
8139
|
-
|
|
8140
|
-
type: "savings",
|
|
8141
|
-
status: "active",
|
|
8142
|
-
balance: "$45,230.00",
|
|
8143
|
-
currency: "USD",
|
|
8144
|
-
institution: "Chase Bank",
|
|
8145
|
-
routingNumber: "021000021",
|
|
8146
|
-
country: "US"
|
|
8370
|
+
not_start: {
|
|
8371
|
+
variant: "secondary",
|
|
8372
|
+
label: "Not Start",
|
|
8373
|
+
icon: Circle
|
|
8147
8374
|
},
|
|
8148
|
-
{
|
|
8149
|
-
|
|
8150
|
-
|
|
8151
|
-
|
|
8152
|
-
type: "checking",
|
|
8153
|
-
status: "active",
|
|
8154
|
-
balance: "$78,900.00",
|
|
8155
|
-
currency: "USD",
|
|
8156
|
-
institution: "Wells Fargo",
|
|
8157
|
-
routingNumber: "121000248",
|
|
8158
|
-
country: "US"
|
|
8375
|
+
pending: {
|
|
8376
|
+
variant: "pending",
|
|
8377
|
+
label: "Pending",
|
|
8378
|
+
icon: Clock
|
|
8159
8379
|
}
|
|
8160
|
-
|
|
8161
|
-
var
|
|
8162
|
-
|
|
8163
|
-
|
|
8164
|
-
|
|
8165
|
-
|
|
8166
|
-
|
|
8167
|
-
|
|
8168
|
-
|
|
8380
|
+
};
|
|
8381
|
+
var CIPStatusBadge = ({ status, className }) => {
|
|
8382
|
+
const config = statusConfig2[status];
|
|
8383
|
+
if (!config) {
|
|
8384
|
+
return /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className, children: [
|
|
8385
|
+
/* @__PURE__ */ jsx(Circle, { className: "w-3 h-3 mr-1" }),
|
|
8386
|
+
status || "Unknown"
|
|
8387
|
+
] });
|
|
8388
|
+
}
|
|
8389
|
+
const Icon2 = config.icon;
|
|
8390
|
+
return /* @__PURE__ */ jsxs(Badge, { variant: config.variant, className, children: [
|
|
8391
|
+
/* @__PURE__ */ jsx(Icon2, { className: "w-3 h-3 mr-1" }),
|
|
8392
|
+
config.label
|
|
8393
|
+
] });
|
|
8394
|
+
};
|
|
8395
|
+
var typeConfig3 = {
|
|
8396
|
+
Individual: {
|
|
8397
|
+
variant: "individual",
|
|
8398
|
+
label: "Individual",
|
|
8399
|
+
icon: User
|
|
8169
8400
|
},
|
|
8170
|
-
{
|
|
8171
|
-
|
|
8172
|
-
|
|
8173
|
-
|
|
8174
|
-
|
|
8175
|
-
|
|
8176
|
-
|
|
8401
|
+
Business: {
|
|
8402
|
+
variant: "business",
|
|
8403
|
+
label: "Business",
|
|
8404
|
+
icon: Building2
|
|
8405
|
+
}
|
|
8406
|
+
};
|
|
8407
|
+
var EntityTypeBadge = ({ type, className }) => {
|
|
8408
|
+
const config = typeConfig3[type];
|
|
8409
|
+
if (!config) {
|
|
8410
|
+
return /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className, children: [
|
|
8411
|
+
/* @__PURE__ */ jsx(Building2, { className: "w-3 h-3 mr-1" }),
|
|
8412
|
+
type || "Unknown"
|
|
8413
|
+
] });
|
|
8414
|
+
}
|
|
8415
|
+
const Icon2 = config.icon;
|
|
8416
|
+
return /* @__PURE__ */ jsxs(Badge, { variant: config.variant, className, children: [
|
|
8417
|
+
/* @__PURE__ */ jsx(Icon2, { className: "w-3 h-3 mr-1" }),
|
|
8418
|
+
config.label
|
|
8419
|
+
] });
|
|
8420
|
+
};
|
|
8421
|
+
var subTypeConfig = {
|
|
8422
|
+
UBO: {
|
|
8423
|
+
variant: "government",
|
|
8424
|
+
label: "UBO",
|
|
8425
|
+
icon: UserCheck
|
|
8177
8426
|
},
|
|
8178
|
-
{
|
|
8179
|
-
|
|
8180
|
-
|
|
8181
|
-
|
|
8182
|
-
|
|
8183
|
-
|
|
8184
|
-
|
|
8427
|
+
Customer: {
|
|
8428
|
+
variant: "business",
|
|
8429
|
+
label: "Customer",
|
|
8430
|
+
icon: Users
|
|
8431
|
+
}
|
|
8432
|
+
};
|
|
8433
|
+
var SubTypeBadge = ({ subType, className }) => {
|
|
8434
|
+
const config = subTypeConfig[subType];
|
|
8435
|
+
if (!config) {
|
|
8436
|
+
return /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className, children: [
|
|
8437
|
+
/* @__PURE__ */ jsx(Users, { className: "w-3 h-3 mr-1" }),
|
|
8438
|
+
subType || "Unknown"
|
|
8439
|
+
] });
|
|
8440
|
+
}
|
|
8441
|
+
const Icon2 = config.icon;
|
|
8442
|
+
return /* @__PURE__ */ jsxs(Badge, { variant: config.variant, className, children: [
|
|
8443
|
+
/* @__PURE__ */ jsx(Icon2, { className: "w-3 h-3 mr-1" }),
|
|
8444
|
+
config.label
|
|
8445
|
+
] });
|
|
8446
|
+
};
|
|
8447
|
+
|
|
8448
|
+
// src/lib/mock-data/identity-verification-data.ts
|
|
8449
|
+
var mockIdentityVerifications = {
|
|
8450
|
+
"8112488": {
|
|
8451
|
+
customerId: "8112488",
|
|
8452
|
+
isDeveloperInitiated: true,
|
|
8453
|
+
provider: "Plaid",
|
|
8454
|
+
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"'
|
|
8185
8455
|
},
|
|
8186
|
-
{
|
|
8187
|
-
|
|
8188
|
-
|
|
8189
|
-
|
|
8190
|
-
status: "
|
|
8191
|
-
|
|
8192
|
-
|
|
8456
|
+
"8111609": {
|
|
8457
|
+
customerId: "8111609",
|
|
8458
|
+
isDeveloperInitiated: false,
|
|
8459
|
+
provider: "Alloy",
|
|
8460
|
+
result: 'vendor:COMPLIANCE_VENDOR status:approved data:"verification_id:\\"vrf-123\\" corporate_id:\\"corp-456\\" timestamp:{seconds:1761333900 nanos:123456000} status:verified"'
|
|
8461
|
+
},
|
|
8462
|
+
"8111026": {
|
|
8463
|
+
customerId: "8111026",
|
|
8464
|
+
isDeveloperInitiated: true,
|
|
8465
|
+
provider: "Plaid",
|
|
8466
|
+
result: 'vendor:IDENTITY_VENDOR status:pending data:"request_id:\\"req-789\\" entity_id:\\"ent-012\\" created:{seconds:1761333800 nanos:987654000}"'
|
|
8467
|
+
},
|
|
8468
|
+
"8110892": {
|
|
8469
|
+
customerId: "8110892",
|
|
8470
|
+
isDeveloperInitiated: false,
|
|
8471
|
+
provider: "Alloy",
|
|
8472
|
+
result: 'vendor:KYC_VENDOR status:in_progress data:"kyc_id:\\"kyc-345\\" business_id:\\"biz-678\\" initiated:{seconds:1761333700 nanos:111222000}"'
|
|
8473
|
+
},
|
|
8474
|
+
"8110654": {
|
|
8475
|
+
customerId: "8110654",
|
|
8476
|
+
isDeveloperInitiated: true,
|
|
8477
|
+
provider: "Plaid",
|
|
8478
|
+
result: 'vendor:VERIFICATION_VENDOR status:completed data:"account_verified:true holder_verified:true timestamp:{seconds:1761333600 nanos:333444000}"'
|
|
8193
8479
|
}
|
|
8194
|
-
|
|
8195
|
-
|
|
8196
|
-
|
|
8197
|
-
|
|
8198
|
-
|
|
8199
|
-
const accountColumns = [
|
|
8480
|
+
};
|
|
8481
|
+
|
|
8482
|
+
// src/lib/mock-data/ubo-data.ts
|
|
8483
|
+
var mockBusinessUBOs = {
|
|
8484
|
+
"8112488": [
|
|
8200
8485
|
{
|
|
8201
|
-
|
|
8202
|
-
|
|
8203
|
-
|
|
8486
|
+
id: "ubo-001",
|
|
8487
|
+
name: "John Smith",
|
|
8488
|
+
title: "CEO & Founder",
|
|
8489
|
+
ownershipPercentage: 45,
|
|
8490
|
+
customerId: "cust-001"
|
|
8204
8491
|
},
|
|
8492
|
+
{
|
|
8493
|
+
id: "ubo-002",
|
|
8494
|
+
name: "Sarah Johnson",
|
|
8495
|
+
title: "CFO & Co-Founder",
|
|
8496
|
+
ownershipPercentage: 35,
|
|
8497
|
+
customerId: "cust-002"
|
|
8498
|
+
},
|
|
8499
|
+
{
|
|
8500
|
+
id: "ubo-003",
|
|
8501
|
+
name: "Michael Chen",
|
|
8502
|
+
title: "CTO",
|
|
8503
|
+
ownershipPercentage: 20,
|
|
8504
|
+
customerId: "cust-003"
|
|
8505
|
+
}
|
|
8506
|
+
],
|
|
8507
|
+
"8112489": [
|
|
8508
|
+
{
|
|
8509
|
+
id: "ubo-004",
|
|
8510
|
+
name: "Emily Davis",
|
|
8511
|
+
title: "Managing Director",
|
|
8512
|
+
ownershipPercentage: 60,
|
|
8513
|
+
customerId: "cust-004"
|
|
8514
|
+
},
|
|
8515
|
+
{
|
|
8516
|
+
id: "ubo-005",
|
|
8517
|
+
name: "Robert Wilson",
|
|
8518
|
+
title: "Board Member",
|
|
8519
|
+
ownershipPercentage: 40,
|
|
8520
|
+
customerId: "cust-005"
|
|
8521
|
+
}
|
|
8522
|
+
]
|
|
8523
|
+
};
|
|
8524
|
+
|
|
8525
|
+
// src/lib/mock-data/document-data.ts
|
|
8526
|
+
var mockBusinessDocuments = {
|
|
8527
|
+
"8112488": [
|
|
8528
|
+
{
|
|
8529
|
+
id: "doc-001",
|
|
8530
|
+
name: "Certificate of Incorporation.pdf",
|
|
8531
|
+
type: "BUSINESS_LICENSE",
|
|
8532
|
+
description: "Official certificate of incorporation from Delaware",
|
|
8533
|
+
size: "2.3 MB",
|
|
8534
|
+
uploadedBy: "John Smith",
|
|
8535
|
+
uploadedAt: "2024-01-10T10:30:00Z"
|
|
8536
|
+
},
|
|
8537
|
+
{
|
|
8538
|
+
id: "doc-002",
|
|
8539
|
+
name: "Tax_ID_Verification.pdf",
|
|
8540
|
+
type: "TAX_DOCUMENT",
|
|
8541
|
+
description: "IRS EIN verification letter",
|
|
8542
|
+
size: "1.1 MB",
|
|
8543
|
+
uploadedBy: "Sarah Johnson",
|
|
8544
|
+
uploadedAt: "2024-01-12T14:20:00Z"
|
|
8545
|
+
},
|
|
8546
|
+
{
|
|
8547
|
+
id: "doc-003",
|
|
8548
|
+
name: "Business_Address_Proof.pdf",
|
|
8549
|
+
type: "PROOF_OF_ADDRESS",
|
|
8550
|
+
description: "Utility bill for business address",
|
|
8551
|
+
size: "0.8 MB",
|
|
8552
|
+
uploadedBy: "John Smith",
|
|
8553
|
+
uploadedAt: "2024-01-15T09:15:00Z"
|
|
8554
|
+
},
|
|
8555
|
+
{
|
|
8556
|
+
id: "doc-004",
|
|
8557
|
+
name: "Operating_Agreement.pdf",
|
|
8558
|
+
type: "OTHER",
|
|
8559
|
+
description: "Company operating agreement and bylaws",
|
|
8560
|
+
size: "3.5 MB",
|
|
8561
|
+
uploadedBy: "Legal Team",
|
|
8562
|
+
uploadedAt: "2024-01-08T16:45:00Z"
|
|
8563
|
+
}
|
|
8564
|
+
],
|
|
8565
|
+
"8112489": [
|
|
8566
|
+
{
|
|
8567
|
+
id: "doc-005",
|
|
8568
|
+
name: "Business_License_2024.pdf",
|
|
8569
|
+
type: "BUSINESS_LICENSE",
|
|
8570
|
+
size: "1.5 MB",
|
|
8571
|
+
uploadedBy: "Emily Davis",
|
|
8572
|
+
uploadedAt: "2024-01-05T11:00:00Z"
|
|
8573
|
+
}
|
|
8574
|
+
]
|
|
8575
|
+
};
|
|
8576
|
+
|
|
8577
|
+
// src/lib/mock-data/business-account-data.ts
|
|
8578
|
+
var mockBusinessAccounts = {
|
|
8579
|
+
"8112488": [
|
|
8580
|
+
{
|
|
8581
|
+
id: "acc-001",
|
|
8582
|
+
name: "Primary Operating Account",
|
|
8583
|
+
number: "****7890",
|
|
8584
|
+
type: "checking",
|
|
8585
|
+
status: "active",
|
|
8586
|
+
balance: "$125,450.00",
|
|
8587
|
+
currency: "USD",
|
|
8588
|
+
institution: "Chase Bank",
|
|
8589
|
+
routingNumber: "021000021",
|
|
8590
|
+
country: "US"
|
|
8591
|
+
},
|
|
8592
|
+
{
|
|
8593
|
+
id: "acc-002",
|
|
8594
|
+
name: "Business Savings",
|
|
8595
|
+
number: "****4567",
|
|
8596
|
+
type: "savings",
|
|
8597
|
+
status: "active",
|
|
8598
|
+
balance: "$45,230.00",
|
|
8599
|
+
currency: "USD",
|
|
8600
|
+
institution: "Chase Bank",
|
|
8601
|
+
routingNumber: "021000021",
|
|
8602
|
+
country: "US"
|
|
8603
|
+
},
|
|
8604
|
+
{
|
|
8605
|
+
id: "acc-003",
|
|
8606
|
+
name: "Payroll Account",
|
|
8607
|
+
number: "****1234",
|
|
8608
|
+
type: "checking",
|
|
8609
|
+
status: "active",
|
|
8610
|
+
balance: "$78,900.00",
|
|
8611
|
+
currency: "USD",
|
|
8612
|
+
institution: "Wells Fargo",
|
|
8613
|
+
routingNumber: "121000248",
|
|
8614
|
+
country: "US"
|
|
8615
|
+
}
|
|
8616
|
+
]
|
|
8617
|
+
};
|
|
8618
|
+
var UBOCard = ({ ubos }) => {
|
|
8619
|
+
const columns2 = [
|
|
8205
8620
|
{
|
|
8206
8621
|
key: "name",
|
|
8207
|
-
title: "
|
|
8208
|
-
sortable: true
|
|
8622
|
+
title: "Name",
|
|
8623
|
+
sortable: true,
|
|
8624
|
+
width: "40%",
|
|
8625
|
+
render: (value, row) => /* @__PURE__ */ jsx(
|
|
8626
|
+
Link,
|
|
8627
|
+
{
|
|
8628
|
+
to: `/customer/${row.customerId}`,
|
|
8629
|
+
className: "text-primary hover:underline font-medium",
|
|
8630
|
+
children: value
|
|
8631
|
+
}
|
|
8632
|
+
)
|
|
8209
8633
|
},
|
|
8210
8634
|
{
|
|
8211
|
-
key: "
|
|
8212
|
-
title: "
|
|
8635
|
+
key: "title",
|
|
8636
|
+
title: "Title",
|
|
8213
8637
|
sortable: true,
|
|
8214
|
-
|
|
8638
|
+
width: "40%"
|
|
8215
8639
|
},
|
|
8216
8640
|
{
|
|
8217
|
-
key: "
|
|
8218
|
-
title: "
|
|
8219
|
-
|
|
8641
|
+
key: "ownershipPercentage",
|
|
8642
|
+
title: "Ownership %",
|
|
8643
|
+
sortable: true,
|
|
8644
|
+
width: "20%",
|
|
8645
|
+
align: "right",
|
|
8646
|
+
render: (value) => `${value}%`
|
|
8220
8647
|
}
|
|
8221
8648
|
];
|
|
8222
|
-
|
|
8223
|
-
|
|
8224
|
-
/* @__PURE__ */ jsx(
|
|
8225
|
-
/* @__PURE__ */
|
|
8226
|
-
|
|
8227
|
-
|
|
8228
|
-
return /* @__PURE__ */ jsx(
|
|
8229
|
-
PageLayout,
|
|
8230
|
-
{
|
|
8231
|
-
title: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
8232
|
-
/* @__PURE__ */ jsx("span", { children: business.businessName }),
|
|
8233
|
-
/* @__PURE__ */ jsx(
|
|
8234
|
-
EditableInfoField,
|
|
8235
|
-
{
|
|
8236
|
-
label: "",
|
|
8237
|
-
value: currentStatus,
|
|
8238
|
-
options: [
|
|
8239
|
-
{ value: "active", label: "Active" },
|
|
8240
|
-
{ value: "inactive", label: "Inactive" },
|
|
8241
|
-
{ value: "suspended", label: "Suspended" }
|
|
8242
|
-
],
|
|
8243
|
-
onChange: (newStatus) => setCurrentStatus(newStatus),
|
|
8244
|
-
renderValue: (value) => /* @__PURE__ */ jsx(StatusBadge, { status: value.toUpperCase() }),
|
|
8245
|
-
className: "inline-block"
|
|
8246
|
-
}
|
|
8247
|
-
)
|
|
8248
|
-
] }),
|
|
8249
|
-
maxWidth: "full",
|
|
8250
|
-
children: /* @__PURE__ */ jsxs(Tabs, { defaultValue: "profile", className: "space-y-6", children: [
|
|
8251
|
-
/* @__PURE__ */ jsxs(TabsList, { className: "inline-flex gap-8 h-auto bg-transparent border-b border-border w-full p-0 rounded-none justify-start", children: [
|
|
8252
|
-
/* @__PURE__ */ jsx(
|
|
8253
|
-
TabsTrigger,
|
|
8254
|
-
{
|
|
8255
|
-
value: "profile",
|
|
8256
|
-
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",
|
|
8257
|
-
children: "Profile"
|
|
8258
|
-
}
|
|
8259
|
-
),
|
|
8260
|
-
/* @__PURE__ */ jsx(
|
|
8261
|
-
TabsTrigger,
|
|
8262
|
-
{
|
|
8263
|
-
value: "kyc",
|
|
8264
|
-
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",
|
|
8265
|
-
children: "KYC"
|
|
8266
|
-
}
|
|
8267
|
-
),
|
|
8268
|
-
/* @__PURE__ */ jsx(
|
|
8269
|
-
TabsTrigger,
|
|
8270
|
-
{
|
|
8271
|
-
value: "counterparty",
|
|
8272
|
-
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",
|
|
8273
|
-
children: "Counterparty"
|
|
8274
|
-
}
|
|
8275
|
-
)
|
|
8276
|
-
] }),
|
|
8277
|
-
/* @__PURE__ */ jsx(TabsContent, { value: "profile", className: "space-y-0", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-6", children: [
|
|
8278
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-6", children: [
|
|
8279
|
-
/* @__PURE__ */ jsx(BusinessProfileCard, { isEditing: false, onToggleEdit: () => {
|
|
8280
|
-
} }),
|
|
8281
|
-
/* @__PURE__ */ jsxs(Card, { children: [
|
|
8282
|
-
/* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
8283
|
-
/* @__PURE__ */ jsx(CardTitle, { children: "Accounts" }),
|
|
8284
|
-
/* @__PURE__ */ jsx(Button, { size: "sm", children: "+ New Account" })
|
|
8285
|
-
] }),
|
|
8286
|
-
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
|
|
8287
|
-
DataTable,
|
|
8288
|
-
{
|
|
8289
|
-
columns: accountColumns,
|
|
8290
|
-
data: businessAccounts,
|
|
8291
|
-
emptyMessage: "No accounts found"
|
|
8292
|
-
}
|
|
8293
|
-
) })
|
|
8294
|
-
] })
|
|
8295
|
-
] }),
|
|
8296
|
-
/* @__PURE__ */ jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsx(BusinessStatusCard, { isEditing: false, onToggleEdit: () => {
|
|
8297
|
-
} }) })
|
|
8298
|
-
] }) }),
|
|
8299
|
-
/* @__PURE__ */ jsx(TabsContent, { value: "kyc", className: "space-y-0", children: /* @__PURE__ */ jsx("div", { className: "p-8 text-center text-muted-foreground", children: "KYC content coming soon" }) }),
|
|
8300
|
-
/* @__PURE__ */ jsx(TabsContent, { value: "counterparty", className: "space-y-0", children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6", children: businessCounterparties.map((counterparty) => /* @__PURE__ */ jsxs(Card, { children: [
|
|
8301
|
-
/* @__PURE__ */ jsxs(CardHeader, { children: [
|
|
8302
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
8303
|
-
/* @__PURE__ */ jsx(CardTitle, { className: "text-lg", children: counterparty.name }),
|
|
8304
|
-
/* @__PURE__ */ jsx(CounterpartyTypeBadge, { type: counterparty.type })
|
|
8305
|
-
] }),
|
|
8306
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-2 mt-2", children: /* @__PURE__ */ jsx(Badge, { variant: counterparty.status === "active" ? "default" : "secondary", children: counterparty.status }) })
|
|
8307
|
-
] }),
|
|
8308
|
-
/* @__PURE__ */ jsxs(CardContent, { className: "space-y-3", children: [
|
|
8309
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: counterparty.description }),
|
|
8310
|
-
/* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center text-sm", children: [
|
|
8311
|
-
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Last Transaction" }),
|
|
8312
|
-
/* @__PURE__ */ jsx("span", { className: "font-medium", children: counterparty.lastTransaction })
|
|
8313
|
-
] })
|
|
8314
|
-
] })
|
|
8315
|
-
] }, counterparty.id)) }) })
|
|
8649
|
+
return /* @__PURE__ */ jsxs(Card, { children: [
|
|
8650
|
+
/* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
8651
|
+
/* @__PURE__ */ jsx(CardTitle, { children: "Ultimate Beneficial Owners (UBO)" }),
|
|
8652
|
+
/* @__PURE__ */ jsxs(Button, { size: "sm", variant: "ghost", children: [
|
|
8653
|
+
/* @__PURE__ */ jsx(Plus, { className: "h-4 w-4 mr-1" }),
|
|
8654
|
+
"Add UBO"
|
|
8316
8655
|
] })
|
|
8317
|
-
}
|
|
8318
|
-
|
|
8656
|
+
] }),
|
|
8657
|
+
/* @__PURE__ */ jsx(CardContent, { children: ubos.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
8658
|
+
/* @__PURE__ */ jsx(Users, { className: "h-5 w-5 opacity-50" }),
|
|
8659
|
+
/* @__PURE__ */ jsx("p", { children: "No UBOs recorded" })
|
|
8660
|
+
] }) : /* @__PURE__ */ jsx(
|
|
8661
|
+
DataTable,
|
|
8662
|
+
{
|
|
8663
|
+
columns: columns2,
|
|
8664
|
+
data: ubos
|
|
8665
|
+
}
|
|
8666
|
+
) })
|
|
8667
|
+
] });
|
|
8319
8668
|
};
|
|
8320
|
-
var
|
|
8321
|
-
|
|
8322
|
-
const [
|
|
8323
|
-
|
|
8324
|
-
|
|
8325
|
-
|
|
8326
|
-
|
|
8327
|
-
|
|
8328
|
-
|
|
8329
|
-
|
|
8330
|
-
|
|
8331
|
-
|
|
8332
|
-
|
|
8333
|
-
|
|
8334
|
-
|
|
8335
|
-
|
|
8336
|
-
|
|
8337
|
-
|
|
8338
|
-
|
|
8339
|
-
|
|
8340
|
-
|
|
8341
|
-
|
|
8342
|
-
|
|
8343
|
-
|
|
8344
|
-
|
|
8345
|
-
|
|
8346
|
-
|
|
8347
|
-
|
|
8348
|
-
|
|
8349
|
-
|
|
8350
|
-
|
|
8351
|
-
|
|
8352
|
-
|
|
8353
|
-
|
|
8354
|
-
|
|
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
|
-
|
|
8669
|
+
var BusinessDocuments = ({ businessId, documents }) => {
|
|
8670
|
+
const [isUploading, setIsUploading] = useState(false);
|
|
8671
|
+
const [showUploadDialog, setShowUploadDialog] = useState(false);
|
|
8672
|
+
const [selectedFile, setSelectedFile] = useState(null);
|
|
8673
|
+
const [documentName, setDocumentName] = useState("");
|
|
8674
|
+
const [description, setDescription] = useState("");
|
|
8675
|
+
const [documentType, setDocumentType] = useState("");
|
|
8676
|
+
const handleFileSelect = (e) => {
|
|
8677
|
+
const file = e.target.files?.[0];
|
|
8678
|
+
if (!file) return;
|
|
8679
|
+
setSelectedFile(file);
|
|
8680
|
+
setDocumentName(file.name);
|
|
8681
|
+
};
|
|
8682
|
+
const handleUploadSubmit = () => {
|
|
8683
|
+
if (!selectedFile || !documentName || !documentType) {
|
|
8684
|
+
toast({
|
|
8685
|
+
title: "Missing Information",
|
|
8686
|
+
description: "Please fill in all required fields",
|
|
8687
|
+
variant: "destructive"
|
|
8688
|
+
});
|
|
8689
|
+
return;
|
|
8690
|
+
}
|
|
8691
|
+
setIsUploading(true);
|
|
8692
|
+
setTimeout(() => {
|
|
8693
|
+
toast({
|
|
8694
|
+
title: "Upload Successful",
|
|
8695
|
+
description: `${documentName} uploaded successfully`
|
|
8696
|
+
});
|
|
8697
|
+
setIsUploading(false);
|
|
8698
|
+
setShowUploadDialog(false);
|
|
8699
|
+
resetForm();
|
|
8700
|
+
}, 1e3);
|
|
8701
|
+
};
|
|
8702
|
+
const resetForm = () => {
|
|
8703
|
+
setSelectedFile(null);
|
|
8704
|
+
setDocumentName("");
|
|
8705
|
+
setDescription("");
|
|
8706
|
+
setDocumentType("");
|
|
8707
|
+
const fileInput = document.getElementById("file-upload");
|
|
8708
|
+
if (fileInput) fileInput.value = "";
|
|
8709
|
+
};
|
|
8710
|
+
const handleCancelUpload = () => {
|
|
8711
|
+
setShowUploadDialog(false);
|
|
8712
|
+
resetForm();
|
|
8713
|
+
};
|
|
8714
|
+
const isImageType = (name) => {
|
|
8715
|
+
const imageExtensions = [".jpg", ".jpeg", ".png", ".gif", ".webp", ".bmp"];
|
|
8716
|
+
return imageExtensions.some((ext) => name.toLowerCase().endsWith(ext));
|
|
8717
|
+
};
|
|
8718
|
+
const getFileIcon = (type) => {
|
|
8719
|
+
return /* @__PURE__ */ jsx(FileText, { className: "h-5 w-5" });
|
|
8720
|
+
};
|
|
8721
|
+
const getFileTypeColor = (type) => {
|
|
8722
|
+
switch (type.toUpperCase()) {
|
|
8723
|
+
case "PDF":
|
|
8724
|
+
return "text-red-500";
|
|
8725
|
+
case "DOCX":
|
|
8726
|
+
case "DOC":
|
|
8727
|
+
return "text-blue-500";
|
|
8728
|
+
case "XLSX":
|
|
8729
|
+
case "XLS":
|
|
8730
|
+
return "text-green-500";
|
|
8731
|
+
case "JPG":
|
|
8732
|
+
case "JPEG":
|
|
8733
|
+
case "PNG":
|
|
8734
|
+
return "text-purple-500";
|
|
8735
|
+
default:
|
|
8736
|
+
return "text-muted-foreground";
|
|
8737
|
+
}
|
|
8738
|
+
};
|
|
8739
|
+
const documentTypeOptions = [
|
|
8740
|
+
{ value: "BUSINESS_LICENSE", label: "Business License" },
|
|
8741
|
+
{ value: "TAX_DOCUMENT", label: "Tax Document" },
|
|
8742
|
+
{ value: "PROOF_OF_ADDRESS", label: "Proof of Address" },
|
|
8743
|
+
{ value: "BANK_STATEMENT", label: "Bank Statement" },
|
|
8744
|
+
{ value: "INCORPORATION_DOCS", label: "Incorporation Documents" },
|
|
8745
|
+
{ value: "OPERATING_AGREEMENT", label: "Operating Agreement" },
|
|
8746
|
+
{ value: "OTHER", label: "Other" }
|
|
8747
|
+
];
|
|
8748
|
+
return /* @__PURE__ */ jsxs(Card, { children: [
|
|
8749
|
+
/* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
8750
|
+
/* @__PURE__ */ jsx(CardTitle, { children: "Documents" }),
|
|
8751
|
+
/* @__PURE__ */ jsxs(
|
|
8752
|
+
Button,
|
|
8753
|
+
{
|
|
8754
|
+
onClick: () => setShowUploadDialog(true),
|
|
8755
|
+
size: "sm",
|
|
8756
|
+
variant: "ghost",
|
|
8757
|
+
className: "gap-2",
|
|
8758
|
+
children: [
|
|
8759
|
+
/* @__PURE__ */ jsx(Upload, { className: "h-4 w-4" }),
|
|
8760
|
+
"Upload"
|
|
8761
|
+
]
|
|
8762
|
+
}
|
|
8763
|
+
)
|
|
8764
|
+
] }),
|
|
8765
|
+
/* @__PURE__ */ jsxs(CardContent, { children: [
|
|
8766
|
+
showUploadDialog && createPortal(
|
|
8767
|
+
/* @__PURE__ */ jsxs("div", { className: "fixed inset-0 z-[100] flex items-center justify-center p-4", children: [
|
|
8768
|
+
/* @__PURE__ */ jsx(
|
|
8769
|
+
"div",
|
|
8770
|
+
{
|
|
8771
|
+
className: "fixed inset-0 bg-background/80 backdrop-blur-sm",
|
|
8772
|
+
onClick: handleCancelUpload
|
|
8773
|
+
}
|
|
8774
|
+
),
|
|
8775
|
+
/* @__PURE__ */ jsxs("div", { className: "relative bg-card border rounded-lg shadow-lg max-w-lg w-full p-6 z-[101]", children: [
|
|
8776
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-6", children: [
|
|
8777
|
+
/* @__PURE__ */ jsx("h2", { className: "text-2xl font-bold", children: "Upload Document" }),
|
|
8778
|
+
/* @__PURE__ */ jsx(
|
|
8779
|
+
Button,
|
|
8780
|
+
{
|
|
8781
|
+
variant: "ghost",
|
|
8782
|
+
size: "sm",
|
|
8783
|
+
className: "h-8 w-8 p-0",
|
|
8784
|
+
onClick: handleCancelUpload,
|
|
8785
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
|
|
8786
|
+
}
|
|
8787
|
+
)
|
|
8788
|
+
] }),
|
|
8789
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
8790
|
+
/* @__PURE__ */ jsxs("div", { className: "border-2 border-dashed rounded-lg p-6 text-center hover:border-primary/50 transition-colors", children: [
|
|
8791
|
+
/* @__PURE__ */ jsx(
|
|
8792
|
+
"input",
|
|
8793
|
+
{
|
|
8794
|
+
type: "file",
|
|
8795
|
+
id: "file-upload-dialog",
|
|
8796
|
+
className: "hidden",
|
|
8797
|
+
onChange: handleFileSelect,
|
|
8798
|
+
disabled: isUploading
|
|
8799
|
+
}
|
|
8800
|
+
),
|
|
8801
|
+
/* @__PURE__ */ jsxs(
|
|
8802
|
+
"label",
|
|
8803
|
+
{
|
|
8804
|
+
htmlFor: "file-upload-dialog",
|
|
8805
|
+
className: cn(
|
|
8806
|
+
"cursor-pointer flex flex-col items-center gap-2",
|
|
8807
|
+
isUploading && "opacity-50 cursor-not-allowed"
|
|
8808
|
+
),
|
|
8809
|
+
children: [
|
|
8810
|
+
/* @__PURE__ */ jsx(Upload, { className: "h-8 w-8 text-muted-foreground" }),
|
|
8811
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
8812
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-foreground", children: selectedFile ? "Change file" : "Click to upload or drag and drop" }),
|
|
8813
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-1", children: "PDF, DOC, DOCX, JPG, PNG up to 10MB" })
|
|
8814
|
+
] })
|
|
8815
|
+
]
|
|
8816
|
+
}
|
|
8817
|
+
)
|
|
8818
|
+
] }),
|
|
8819
|
+
selectedFile && /* @__PURE__ */ jsxs("div", { className: "p-3 bg-muted/50 rounded-lg", children: [
|
|
8820
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Selected file:" }),
|
|
8821
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: selectedFile.name }),
|
|
8822
|
+
/* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
8823
|
+
(selectedFile.size / 1024 / 1024).toFixed(2),
|
|
8824
|
+
" MB"
|
|
8825
|
+
] })
|
|
8826
|
+
] }),
|
|
8827
|
+
/* @__PURE__ */ jsx(
|
|
8828
|
+
EnhancedInput,
|
|
8829
|
+
{
|
|
8830
|
+
label: "Document name",
|
|
8831
|
+
value: documentName,
|
|
8832
|
+
onChange: (e) => setDocumentName(e.target.value),
|
|
8833
|
+
placeholder: "Enter document name"
|
|
8834
|
+
}
|
|
8835
|
+
),
|
|
8836
|
+
/* @__PURE__ */ jsx(
|
|
8837
|
+
EnhancedTextarea,
|
|
8838
|
+
{
|
|
8839
|
+
label: "Description",
|
|
8840
|
+
value: description,
|
|
8841
|
+
onChange: (e) => setDescription(e.target.value),
|
|
8842
|
+
placeholder: "Enter document description (optional)",
|
|
8843
|
+
rows: 3
|
|
8844
|
+
}
|
|
8845
|
+
),
|
|
8846
|
+
/* @__PURE__ */ jsx(
|
|
8847
|
+
EnhancedSelect,
|
|
8848
|
+
{
|
|
8849
|
+
label: "Document type",
|
|
8850
|
+
value: documentType,
|
|
8851
|
+
onValueChange: setDocumentType,
|
|
8852
|
+
placeholder: "Select document type",
|
|
8853
|
+
options: documentTypeOptions
|
|
8854
|
+
}
|
|
8855
|
+
)
|
|
8856
|
+
] }),
|
|
8857
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-3 mt-6", children: [
|
|
8858
|
+
/* @__PURE__ */ jsx(
|
|
8859
|
+
Button,
|
|
8860
|
+
{
|
|
8861
|
+
variant: "outline",
|
|
8862
|
+
onClick: handleCancelUpload,
|
|
8863
|
+
disabled: isUploading,
|
|
8864
|
+
className: "flex-1",
|
|
8865
|
+
children: "Cancel"
|
|
8866
|
+
}
|
|
8867
|
+
),
|
|
8868
|
+
/* @__PURE__ */ jsx(
|
|
8869
|
+
Button,
|
|
8870
|
+
{
|
|
8871
|
+
onClick: handleUploadSubmit,
|
|
8872
|
+
disabled: isUploading,
|
|
8873
|
+
className: "flex-1",
|
|
8874
|
+
children: isUploading ? "Uploading..." : "Upload"
|
|
8875
|
+
}
|
|
8876
|
+
)
|
|
8877
|
+
] })
|
|
8410
8878
|
] })
|
|
8411
8879
|
] }),
|
|
8412
|
-
|
|
8413
|
-
|
|
8414
|
-
|
|
8415
|
-
|
|
8416
|
-
|
|
8417
|
-
|
|
8418
|
-
|
|
8419
|
-
|
|
8420
|
-
|
|
8421
|
-
|
|
8422
|
-
|
|
8423
|
-
|
|
8424
|
-
}
|
|
8425
|
-
),
|
|
8426
|
-
/* @__PURE__ */ jsx(
|
|
8427
|
-
EnhancedInput,
|
|
8428
|
-
{
|
|
8429
|
-
label: "City",
|
|
8430
|
-
placeholder: "Enter city",
|
|
8431
|
-
required: true
|
|
8432
|
-
}
|
|
8433
|
-
),
|
|
8434
|
-
/* @__PURE__ */ jsx(
|
|
8435
|
-
EnhancedInput,
|
|
8436
|
-
{
|
|
8437
|
-
label: "State",
|
|
8438
|
-
placeholder: "Enter state",
|
|
8439
|
-
required: true
|
|
8440
|
-
}
|
|
8441
|
-
),
|
|
8442
|
-
/* @__PURE__ */ jsx(
|
|
8443
|
-
EnhancedInput,
|
|
8444
|
-
{
|
|
8445
|
-
label: "Postal Code",
|
|
8446
|
-
placeholder: "12345",
|
|
8447
|
-
required: true
|
|
8448
|
-
}
|
|
8449
|
-
),
|
|
8450
|
-
/* @__PURE__ */ jsx(
|
|
8451
|
-
EnhancedSelect,
|
|
8452
|
-
{
|
|
8453
|
-
label: "Country",
|
|
8454
|
-
placeholder: "Select country",
|
|
8455
|
-
options: [
|
|
8456
|
-
{ value: "US", label: "United States" },
|
|
8457
|
-
{ value: "CA", label: "Canada" },
|
|
8458
|
-
{ value: "GB", label: "United Kingdom" },
|
|
8459
|
-
{ value: "DE", label: "Germany" }
|
|
8460
|
-
]
|
|
8461
|
-
}
|
|
8462
|
-
),
|
|
8463
|
-
/* @__PURE__ */ jsx(
|
|
8464
|
-
EnhancedInput,
|
|
8465
|
-
{
|
|
8466
|
-
label: "Phone Number",
|
|
8467
|
-
placeholder: "+1 (555) 123-4567",
|
|
8468
|
-
required: true
|
|
8469
|
-
}
|
|
8470
|
-
),
|
|
8471
|
-
/* @__PURE__ */ jsx(
|
|
8472
|
-
EnhancedInput,
|
|
8473
|
-
{
|
|
8474
|
-
label: "Email Address",
|
|
8475
|
-
placeholder: "contact@business.com",
|
|
8476
|
-
type: "email",
|
|
8477
|
-
required: true
|
|
8478
|
-
}
|
|
8479
|
-
),
|
|
8480
|
-
/* @__PURE__ */ jsx(
|
|
8481
|
-
EnhancedInput,
|
|
8880
|
+
document.body
|
|
8881
|
+
),
|
|
8882
|
+
documents.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
8883
|
+
/* @__PURE__ */ jsx(FileText, { className: "h-5 w-5 opacity-50" }),
|
|
8884
|
+
/* @__PURE__ */ jsx("p", { children: "No documents uploaded yet" })
|
|
8885
|
+
] }) : /* @__PURE__ */ jsx("div", { className: "space-y-2", children: documents.map((doc) => /* @__PURE__ */ jsxs(
|
|
8886
|
+
"div",
|
|
8887
|
+
{
|
|
8888
|
+
className: "border rounded-lg hover:bg-muted/30 transition-colors overflow-hidden",
|
|
8889
|
+
children: [
|
|
8890
|
+
isImageType(doc.name) && doc.url && /* @__PURE__ */ jsx("div", { className: "w-full bg-muted/50", children: /* @__PURE__ */ jsx(
|
|
8891
|
+
"img",
|
|
8482
8892
|
{
|
|
8483
|
-
|
|
8484
|
-
|
|
8485
|
-
|
|
8893
|
+
src: doc.url,
|
|
8894
|
+
alt: doc.name,
|
|
8895
|
+
className: "w-full h-48 object-cover"
|
|
8486
8896
|
}
|
|
8487
|
-
)
|
|
8488
|
-
|
|
8489
|
-
|
|
8490
|
-
|
|
8491
|
-
|
|
8492
|
-
|
|
8493
|
-
|
|
8494
|
-
|
|
8495
|
-
|
|
8496
|
-
|
|
8497
|
-
|
|
8498
|
-
|
|
8499
|
-
|
|
8500
|
-
|
|
8501
|
-
|
|
8502
|
-
|
|
8503
|
-
|
|
8504
|
-
|
|
8897
|
+
) }),
|
|
8898
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between p-3", children: [
|
|
8899
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
8900
|
+
!isImageType(doc.name) && /* @__PURE__ */ jsx("div", { className: cn(getFileTypeColor(doc.type)), children: getFileIcon(doc.type) }),
|
|
8901
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
8902
|
+
/* @__PURE__ */ jsx("h4", { className: "font-medium text-sm truncate", children: doc.name }),
|
|
8903
|
+
/* @__PURE__ */ jsx("span", { className: cn("text-xs px-2 py-0.5 rounded-full bg-muted inline-block mt-1", getFileTypeColor(doc.type)), children: doc.type }),
|
|
8904
|
+
doc.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground mt-1", children: doc.description }),
|
|
8905
|
+
/* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground mt-1", children: [
|
|
8906
|
+
doc.size,
|
|
8907
|
+
" \u2022 Uploaded by ",
|
|
8908
|
+
doc.uploadedBy,
|
|
8909
|
+
" \u2022 ",
|
|
8910
|
+
new Date(doc.uploadedAt).toLocaleDateString()
|
|
8911
|
+
] })
|
|
8912
|
+
] })
|
|
8913
|
+
] }),
|
|
8914
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
8915
|
+
/* @__PURE__ */ jsx(
|
|
8916
|
+
Button,
|
|
8917
|
+
{
|
|
8918
|
+
variant: "ghost",
|
|
8919
|
+
size: "sm",
|
|
8920
|
+
className: "h-8 w-8 p-0",
|
|
8921
|
+
onClick: () => toast({ title: "Preview", description: `Viewing ${doc.name}` }),
|
|
8922
|
+
children: /* @__PURE__ */ jsx(Eye, { className: "h-4 w-4" })
|
|
8923
|
+
}
|
|
8924
|
+
),
|
|
8925
|
+
/* @__PURE__ */ jsx(
|
|
8926
|
+
Button,
|
|
8927
|
+
{
|
|
8928
|
+
variant: "ghost",
|
|
8929
|
+
size: "sm",
|
|
8930
|
+
className: "h-8 w-8 p-0",
|
|
8931
|
+
onClick: () => toast({ title: "Download", description: `Downloading ${doc.name}` }),
|
|
8932
|
+
children: /* @__PURE__ */ jsx(Download, { className: "h-4 w-4" })
|
|
8933
|
+
}
|
|
8934
|
+
),
|
|
8935
|
+
/* @__PURE__ */ jsx(
|
|
8936
|
+
Button,
|
|
8937
|
+
{
|
|
8938
|
+
variant: "ghost",
|
|
8939
|
+
size: "sm",
|
|
8940
|
+
className: "h-8 w-8 p-0 text-muted-foreground hover:text-foreground",
|
|
8941
|
+
onClick: () => toast({ title: "Delete", description: `Deleted ${doc.name}` }),
|
|
8942
|
+
children: /* @__PURE__ */ jsx(Trash2, { className: "h-4 w-4" })
|
|
8943
|
+
}
|
|
8944
|
+
)
|
|
8945
|
+
] })
|
|
8946
|
+
] })
|
|
8947
|
+
]
|
|
8948
|
+
},
|
|
8949
|
+
doc.id
|
|
8950
|
+
)) })
|
|
8951
|
+
] })
|
|
8952
|
+
] });
|
|
8953
|
+
};
|
|
8954
|
+
var Business = () => {
|
|
8955
|
+
const { id } = useParams();
|
|
8956
|
+
const navigate = useNavigate();
|
|
8957
|
+
const business = mockBusinessesList.find((b) => b.id === id);
|
|
8958
|
+
const identityVerification = id ? mockIdentityVerifications[id] : void 0;
|
|
8959
|
+
const businessUBOs = id ? mockBusinessUBOs[id] || [] : [];
|
|
8960
|
+
const businessDocuments = id ? mockBusinessDocuments[id] || [] : [];
|
|
8961
|
+
const businessAccounts = id ? mockBusinessAccounts[id] || [] : [];
|
|
8962
|
+
const [currentStatus, setCurrentStatus] = useState(business?.status || "active");
|
|
8963
|
+
const [isEditingProfile, setIsEditingProfile] = useState(false);
|
|
8964
|
+
const accountColumns = [
|
|
8965
|
+
{
|
|
8966
|
+
key: "number",
|
|
8967
|
+
title: "Account Number",
|
|
8968
|
+
sortable: true,
|
|
8969
|
+
width: "40%"
|
|
8970
|
+
},
|
|
8971
|
+
{
|
|
8972
|
+
key: "routingNumber",
|
|
8973
|
+
title: "Routing Number",
|
|
8974
|
+
sortable: true,
|
|
8975
|
+
width: "40%"
|
|
8976
|
+
},
|
|
8977
|
+
{
|
|
8978
|
+
key: "type",
|
|
8979
|
+
title: "Account Type",
|
|
8980
|
+
sortable: true,
|
|
8981
|
+
width: "20%",
|
|
8982
|
+
align: "right",
|
|
8983
|
+
render: (value) => /* @__PURE__ */ jsx("span", { className: "capitalize", children: value })
|
|
8984
|
+
}
|
|
8985
|
+
];
|
|
8986
|
+
if (!business) {
|
|
8987
|
+
return /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-8", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
8988
|
+
/* @__PURE__ */ jsx("h1", { className: "text-2xl font-bold mb-2", children: "Business Not Found" }),
|
|
8989
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground mb-4", children: "The business could not be found." })
|
|
8990
|
+
] }) });
|
|
8991
|
+
}
|
|
8992
|
+
return /* @__PURE__ */ jsx(
|
|
8993
|
+
PageLayout,
|
|
8994
|
+
{
|
|
8995
|
+
title: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
8996
|
+
/* @__PURE__ */ jsx("span", { children: business.businessName }),
|
|
8997
|
+
/* @__PURE__ */ jsx(
|
|
8998
|
+
EditableInfoField,
|
|
8999
|
+
{
|
|
9000
|
+
label: "",
|
|
9001
|
+
value: currentStatus,
|
|
9002
|
+
options: [
|
|
9003
|
+
{ value: "active", label: "Active" },
|
|
9004
|
+
{ value: "inactive", label: "Inactive" },
|
|
9005
|
+
{ value: "suspended", label: "Suspended" }
|
|
9006
|
+
],
|
|
9007
|
+
onChange: (newStatus) => setCurrentStatus(newStatus),
|
|
9008
|
+
renderValue: (value) => /* @__PURE__ */ jsx(StatusBadge, { status: value.toUpperCase() }),
|
|
9009
|
+
className: "inline-block"
|
|
9010
|
+
}
|
|
9011
|
+
),
|
|
9012
|
+
/* @__PURE__ */ jsx(CIPStatusBadge, { status: business.cipStatus }),
|
|
9013
|
+
/* @__PURE__ */ jsx(EntityTypeBadge, { type: business.type }),
|
|
9014
|
+
/* @__PURE__ */ jsx(SubTypeBadge, { subType: business.subType })
|
|
9015
|
+
] }),
|
|
9016
|
+
actions: [
|
|
9017
|
+
{
|
|
9018
|
+
label: "Account",
|
|
9019
|
+
variant: "outline",
|
|
9020
|
+
onClick: () => navigate(`/business/${id}/accounts`),
|
|
9021
|
+
icon: Wallet
|
|
9022
|
+
},
|
|
9023
|
+
{
|
|
9024
|
+
label: "Counterparty",
|
|
9025
|
+
variant: "outline",
|
|
9026
|
+
onClick: () => navigate(`/business/${id}/counterparties`),
|
|
9027
|
+
icon: Users
|
|
9028
|
+
}
|
|
9029
|
+
],
|
|
9030
|
+
maxWidth: "full",
|
|
9031
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-4", children: [
|
|
9032
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-4", children: [
|
|
9033
|
+
/* @__PURE__ */ jsx(
|
|
9034
|
+
BusinessProfileCard,
|
|
9035
|
+
{
|
|
9036
|
+
identityVerification,
|
|
9037
|
+
isEditing: isEditingProfile,
|
|
9038
|
+
onToggleEdit: () => setIsEditingProfile(!isEditingProfile)
|
|
9039
|
+
}
|
|
9040
|
+
),
|
|
9041
|
+
/* @__PURE__ */ jsx(UBOCard, { ubos: businessUBOs }),
|
|
9042
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
9043
|
+
/* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
9044
|
+
/* @__PURE__ */ jsx(CardTitle, { children: "External Accounts" }),
|
|
9045
|
+
/* @__PURE__ */ jsxs(Button, { size: "sm", variant: "ghost", children: [
|
|
9046
|
+
/* @__PURE__ */ jsx(Plus, { className: "h-4 w-4 mr-1" }),
|
|
9047
|
+
"Account"
|
|
9048
|
+
] })
|
|
9049
|
+
] }),
|
|
9050
|
+
/* @__PURE__ */ jsx(CardContent, { children: businessAccounts.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
9051
|
+
/* @__PURE__ */ jsx(Wallet, { className: "h-5 w-5 opacity-50" }),
|
|
9052
|
+
/* @__PURE__ */ jsx("p", { children: "No external accounts found" })
|
|
9053
|
+
] }) : /* @__PURE__ */ jsx(
|
|
9054
|
+
DataTable,
|
|
9055
|
+
{
|
|
9056
|
+
columns: accountColumns,
|
|
9057
|
+
data: businessAccounts
|
|
9058
|
+
}
|
|
9059
|
+
) })
|
|
9060
|
+
] }),
|
|
9061
|
+
/* @__PURE__ */ jsx(BusinessDocuments, { businessId: id || "", documents: businessDocuments })
|
|
9062
|
+
] }),
|
|
9063
|
+
/* @__PURE__ */ jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsx(BusinessStatusCard, { isEditing: false, onToggleEdit: () => {
|
|
9064
|
+
} }) })
|
|
9065
|
+
] })
|
|
9066
|
+
}
|
|
9067
|
+
);
|
|
9068
|
+
};
|
|
9069
|
+
var BusinessDetail_default = Business;
|
|
9070
|
+
var CreateBusiness = () => {
|
|
9071
|
+
const navigate = useNavigate();
|
|
9072
|
+
const [businessType, setBusinessType] = useState("");
|
|
9073
|
+
const form = useForm({
|
|
9074
|
+
resolver: zodResolver(businessProfileSchema),
|
|
9075
|
+
defaultValues: {
|
|
9076
|
+
legalName: "",
|
|
9077
|
+
dbaName: "",
|
|
9078
|
+
businessType: "",
|
|
9079
|
+
taxId: "",
|
|
9080
|
+
formationDate: "",
|
|
9081
|
+
idType: "EIN",
|
|
9082
|
+
incorporationState: "",
|
|
9083
|
+
website: "",
|
|
9084
|
+
email: "",
|
|
9085
|
+
mobilePhone: "",
|
|
9086
|
+
mcc: "",
|
|
9087
|
+
naics: "",
|
|
9088
|
+
achCompanyId: "",
|
|
9089
|
+
achCompanyName: "",
|
|
9090
|
+
externalId: "",
|
|
9091
|
+
contactFirstName: "",
|
|
9092
|
+
contactLastName: "",
|
|
9093
|
+
contactEmail: "",
|
|
9094
|
+
contactPhone: "",
|
|
9095
|
+
address: {
|
|
9096
|
+
streetAddress: "",
|
|
9097
|
+
apartment: "",
|
|
9098
|
+
city: "",
|
|
9099
|
+
state: "",
|
|
9100
|
+
postalCode: "",
|
|
9101
|
+
country: "US",
|
|
9102
|
+
addressType: "business"
|
|
9103
|
+
}
|
|
9104
|
+
}
|
|
9105
|
+
});
|
|
9106
|
+
const onSubmit = (data) => {
|
|
9107
|
+
console.log("Business data:", data);
|
|
9108
|
+
navigate("/business");
|
|
9109
|
+
};
|
|
9110
|
+
return /* @__PURE__ */ jsx(
|
|
9111
|
+
PageLayout,
|
|
9112
|
+
{
|
|
9113
|
+
title: "Create Business",
|
|
9114
|
+
actions: [
|
|
9115
|
+
{ label: "Cancel", variant: "outline", onClick: () => navigate("/business") },
|
|
9116
|
+
{ label: "Create Business", variant: "default", onClick: form.handleSubmit(onSubmit) }
|
|
9117
|
+
],
|
|
9118
|
+
children: /* @__PURE__ */ jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "space-y-6", children: [
|
|
9119
|
+
/* @__PURE__ */ jsxs(Card, { className: "p-6", children: [
|
|
9120
|
+
/* @__PURE__ */ jsx("div", { className: "border-b border-border pb-4 mb-6", children: /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Business Information" }) }),
|
|
9121
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
|
|
9122
|
+
/* @__PURE__ */ jsx(
|
|
9123
|
+
EnhancedInput,
|
|
9124
|
+
{
|
|
9125
|
+
label: "Legal Name",
|
|
9126
|
+
placeholder: "Enter legal business name",
|
|
9127
|
+
required: true,
|
|
9128
|
+
...form.register("legalName")
|
|
9129
|
+
}
|
|
9130
|
+
),
|
|
9131
|
+
/* @__PURE__ */ jsx(
|
|
9132
|
+
EnhancedInput,
|
|
9133
|
+
{
|
|
9134
|
+
label: "DBA Name",
|
|
9135
|
+
placeholder: "Enter DBA name",
|
|
9136
|
+
hint: "Doing Business As name",
|
|
9137
|
+
...form.register("dbaName")
|
|
9138
|
+
}
|
|
9139
|
+
),
|
|
9140
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
9141
|
+
/* @__PURE__ */ jsx(
|
|
9142
|
+
EnhancedSelect,
|
|
9143
|
+
{
|
|
9144
|
+
label: "Business Type",
|
|
9145
|
+
placeholder: "Select business type",
|
|
9146
|
+
value: businessType,
|
|
9147
|
+
onValueChange: (value) => {
|
|
9148
|
+
setBusinessType(value);
|
|
9149
|
+
form.setValue("businessType", value);
|
|
9150
|
+
},
|
|
9151
|
+
options: [
|
|
9152
|
+
{ value: "corporation", label: "Corporation" },
|
|
9153
|
+
{ value: "llc", label: "LLC" },
|
|
9154
|
+
{ value: "partnership", label: "Partnership" },
|
|
9155
|
+
{ value: "sole_proprietorship", label: "Sole Proprietorship" }
|
|
9156
|
+
]
|
|
9157
|
+
}
|
|
9158
|
+
),
|
|
9159
|
+
businessType && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
9160
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: "Preview:" }),
|
|
9161
|
+
/* @__PURE__ */ jsx(BusinessTypeBadge, { type: businessType })
|
|
9162
|
+
] })
|
|
9163
|
+
] }),
|
|
9164
|
+
/* @__PURE__ */ jsx(
|
|
9165
|
+
EnhancedInput,
|
|
9166
|
+
{
|
|
9167
|
+
label: "Tax ID (EIN)",
|
|
9168
|
+
placeholder: "12-3456789",
|
|
9169
|
+
hint: "Employer Identification Number",
|
|
9170
|
+
required: true,
|
|
9171
|
+
...form.register("taxId")
|
|
9172
|
+
}
|
|
9173
|
+
),
|
|
9174
|
+
/* @__PURE__ */ jsx(
|
|
9175
|
+
EnhancedInput,
|
|
9176
|
+
{
|
|
9177
|
+
label: "Formation Date",
|
|
9178
|
+
placeholder: "YYYY-MM-DD",
|
|
9179
|
+
type: "date",
|
|
9180
|
+
...form.register("formationDate")
|
|
9181
|
+
}
|
|
9182
|
+
),
|
|
9183
|
+
/* @__PURE__ */ jsx(
|
|
9184
|
+
EnhancedInput,
|
|
9185
|
+
{
|
|
9186
|
+
label: "Incorporation State",
|
|
9187
|
+
placeholder: "Enter state",
|
|
9188
|
+
...form.register("incorporationState")
|
|
9189
|
+
}
|
|
9190
|
+
),
|
|
9191
|
+
/* @__PURE__ */ jsx(
|
|
9192
|
+
EnhancedInput,
|
|
9193
|
+
{
|
|
9194
|
+
label: "Website",
|
|
9195
|
+
placeholder: "https://www.business.com",
|
|
9196
|
+
type: "url",
|
|
9197
|
+
...form.register("website")
|
|
9198
|
+
}
|
|
9199
|
+
),
|
|
9200
|
+
/* @__PURE__ */ jsx(
|
|
9201
|
+
EnhancedInput,
|
|
9202
|
+
{
|
|
9203
|
+
label: "Email Address",
|
|
9204
|
+
placeholder: "contact@business.com",
|
|
9205
|
+
type: "email",
|
|
9206
|
+
...form.register("email")
|
|
9207
|
+
}
|
|
9208
|
+
),
|
|
9209
|
+
/* @__PURE__ */ jsx(
|
|
9210
|
+
EnhancedInput,
|
|
9211
|
+
{
|
|
9212
|
+
label: "Mobile Phone",
|
|
9213
|
+
placeholder: "+1 (555) 123-4567",
|
|
9214
|
+
...form.register("mobilePhone")
|
|
9215
|
+
}
|
|
9216
|
+
),
|
|
9217
|
+
/* @__PURE__ */ jsx(
|
|
9218
|
+
EnhancedInput,
|
|
9219
|
+
{
|
|
9220
|
+
label: "MCC",
|
|
9221
|
+
placeholder: "1234",
|
|
9222
|
+
hint: "4-digit Merchant Category Code",
|
|
9223
|
+
...form.register("mcc")
|
|
9224
|
+
}
|
|
9225
|
+
),
|
|
9226
|
+
/* @__PURE__ */ jsx(
|
|
9227
|
+
EnhancedInput,
|
|
9228
|
+
{
|
|
9229
|
+
label: "NAICS",
|
|
9230
|
+
placeholder: "123456",
|
|
9231
|
+
hint: "6-digit industry classification",
|
|
9232
|
+
...form.register("naics")
|
|
9233
|
+
}
|
|
9234
|
+
),
|
|
9235
|
+
/* @__PURE__ */ jsx(
|
|
9236
|
+
EnhancedInput,
|
|
9237
|
+
{
|
|
9238
|
+
label: "ACH Company ID",
|
|
9239
|
+
placeholder: "1234567890",
|
|
9240
|
+
hint: "10-digit ACH identifier",
|
|
9241
|
+
...form.register("achCompanyId")
|
|
9242
|
+
}
|
|
9243
|
+
),
|
|
9244
|
+
/* @__PURE__ */ jsx(
|
|
9245
|
+
EnhancedInput,
|
|
9246
|
+
{
|
|
9247
|
+
label: "ACH Company Name",
|
|
9248
|
+
placeholder: "Enter ACH company name",
|
|
9249
|
+
...form.register("achCompanyName")
|
|
9250
|
+
}
|
|
9251
|
+
),
|
|
9252
|
+
/* @__PURE__ */ jsx(
|
|
9253
|
+
EnhancedInput,
|
|
9254
|
+
{
|
|
9255
|
+
label: "External ID",
|
|
9256
|
+
placeholder: "UUID format",
|
|
9257
|
+
hint: "External system identifier",
|
|
9258
|
+
...form.register("externalId")
|
|
9259
|
+
}
|
|
9260
|
+
)
|
|
9261
|
+
] })
|
|
9262
|
+
] }),
|
|
9263
|
+
/* @__PURE__ */ jsxs(Card, { className: "p-6", children: [
|
|
9264
|
+
/* @__PURE__ */ jsx("div", { className: "border-b border-border pb-4 mb-6", children: /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Business Address" }) }),
|
|
9265
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
|
|
9266
|
+
/* @__PURE__ */ jsx(
|
|
9267
|
+
EnhancedInput,
|
|
9268
|
+
{
|
|
9269
|
+
label: "Street Address",
|
|
9270
|
+
placeholder: "Enter street address",
|
|
9271
|
+
required: true,
|
|
9272
|
+
...form.register("address.streetAddress")
|
|
9273
|
+
}
|
|
9274
|
+
),
|
|
9275
|
+
/* @__PURE__ */ jsx(
|
|
9276
|
+
EnhancedInput,
|
|
9277
|
+
{
|
|
9278
|
+
label: "Apartment/Suite",
|
|
9279
|
+
placeholder: "Enter apartment or suite number",
|
|
9280
|
+
...form.register("address.apartment")
|
|
9281
|
+
}
|
|
9282
|
+
),
|
|
9283
|
+
/* @__PURE__ */ jsx(
|
|
9284
|
+
EnhancedInput,
|
|
9285
|
+
{
|
|
9286
|
+
label: "City",
|
|
9287
|
+
placeholder: "Enter city",
|
|
9288
|
+
required: true,
|
|
9289
|
+
...form.register("address.city")
|
|
9290
|
+
}
|
|
9291
|
+
),
|
|
9292
|
+
/* @__PURE__ */ jsx(
|
|
9293
|
+
EnhancedInput,
|
|
9294
|
+
{
|
|
9295
|
+
label: "State",
|
|
9296
|
+
placeholder: "Enter state",
|
|
9297
|
+
required: true,
|
|
9298
|
+
...form.register("address.state")
|
|
9299
|
+
}
|
|
9300
|
+
),
|
|
9301
|
+
/* @__PURE__ */ jsx(
|
|
9302
|
+
EnhancedInput,
|
|
9303
|
+
{
|
|
9304
|
+
label: "Postal Code",
|
|
9305
|
+
placeholder: "12345",
|
|
9306
|
+
required: true,
|
|
9307
|
+
...form.register("address.postalCode")
|
|
9308
|
+
}
|
|
9309
|
+
),
|
|
9310
|
+
/* @__PURE__ */ jsx(
|
|
9311
|
+
EnhancedSelect,
|
|
9312
|
+
{
|
|
9313
|
+
label: "Country",
|
|
9314
|
+
placeholder: "Select country",
|
|
9315
|
+
value: form.watch("address.country"),
|
|
9316
|
+
onValueChange: (value) => form.setValue("address.country", value),
|
|
9317
|
+
options: [
|
|
9318
|
+
{ value: "US", label: "United States" },
|
|
9319
|
+
{ value: "CA", label: "Canada" },
|
|
9320
|
+
{ value: "GB", label: "United Kingdom" },
|
|
9321
|
+
{ value: "DE", label: "Germany" }
|
|
9322
|
+
]
|
|
9323
|
+
}
|
|
9324
|
+
)
|
|
9325
|
+
] })
|
|
9326
|
+
] }),
|
|
9327
|
+
/* @__PURE__ */ jsxs(Card, { className: "p-6", children: [
|
|
9328
|
+
/* @__PURE__ */ jsx("div", { className: "border-b border-border pb-4 mb-6", children: /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Contact Information" }) }),
|
|
9329
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
|
|
9330
|
+
/* @__PURE__ */ jsx(
|
|
9331
|
+
EnhancedInput,
|
|
9332
|
+
{
|
|
9333
|
+
label: "Contact First Name",
|
|
9334
|
+
placeholder: "Enter first name",
|
|
9335
|
+
...form.register("contactFirstName")
|
|
9336
|
+
}
|
|
9337
|
+
),
|
|
9338
|
+
/* @__PURE__ */ jsx(
|
|
9339
|
+
EnhancedInput,
|
|
9340
|
+
{
|
|
9341
|
+
label: "Contact Last Name",
|
|
9342
|
+
placeholder: "Enter last name",
|
|
9343
|
+
...form.register("contactLastName")
|
|
9344
|
+
}
|
|
9345
|
+
),
|
|
9346
|
+
/* @__PURE__ */ jsx(
|
|
9347
|
+
EnhancedInput,
|
|
9348
|
+
{
|
|
9349
|
+
label: "Contact Email",
|
|
9350
|
+
placeholder: "contact@business.com",
|
|
9351
|
+
type: "email",
|
|
9352
|
+
...form.register("contactEmail")
|
|
9353
|
+
}
|
|
9354
|
+
),
|
|
9355
|
+
/* @__PURE__ */ jsx(
|
|
9356
|
+
EnhancedInput,
|
|
9357
|
+
{
|
|
9358
|
+
label: "Contact Phone",
|
|
9359
|
+
placeholder: "+1 (555) 123-4567",
|
|
9360
|
+
...form.register("contactPhone")
|
|
9361
|
+
}
|
|
9362
|
+
)
|
|
9363
|
+
] })
|
|
9364
|
+
] })
|
|
9365
|
+
] })
|
|
9366
|
+
}
|
|
9367
|
+
);
|
|
9368
|
+
};
|
|
9369
|
+
var Create_default = CreateBusiness;
|
|
9370
|
+
var Cases = () => {
|
|
9371
|
+
return /* @__PURE__ */ jsx(
|
|
9372
|
+
PageLayout,
|
|
9373
|
+
{
|
|
9374
|
+
title: "Cases",
|
|
9375
|
+
description: "Manage and track investigation cases",
|
|
9376
|
+
children: /* @__PURE__ */ jsx("div", { className: "text-center py-12 text-muted-foreground", children: "Cases content coming soon" })
|
|
9377
|
+
}
|
|
9378
|
+
);
|
|
9379
|
+
};
|
|
9380
|
+
var Cases_default = Cases;
|
|
9381
|
+
|
|
9382
|
+
// src/lib/mock-data/counterparties-list-data.ts
|
|
9383
|
+
var mockCounterpartiesList = [
|
|
9384
|
+
{
|
|
9385
|
+
id: "cp-001",
|
|
9386
|
+
name: "Acme Corporation",
|
|
9387
|
+
type: "BUSINESS",
|
|
9388
|
+
status: "ACTIVE",
|
|
9389
|
+
productName: "Business Banking Pro",
|
|
9390
|
+
created: "2024-01-15",
|
|
9391
|
+
modified: "2024-01-20"
|
|
9392
|
+
},
|
|
9393
|
+
{
|
|
9394
|
+
id: "cp-002",
|
|
9395
|
+
name: "John Smith",
|
|
9396
|
+
type: "INDIVIDUAL",
|
|
9397
|
+
status: "ACTIVE",
|
|
9398
|
+
productName: "Personal Banking",
|
|
9399
|
+
created: "2024-01-10",
|
|
9400
|
+
modified: "2024-01-18"
|
|
9401
|
+
},
|
|
9402
|
+
{
|
|
9403
|
+
id: "cp-003",
|
|
9404
|
+
name: "Global Tech Solutions",
|
|
9405
|
+
type: "BUSINESS",
|
|
9406
|
+
status: "ACTIVE",
|
|
9407
|
+
productName: "Enterprise Banking",
|
|
9408
|
+
created: "2024-01-08",
|
|
9409
|
+
modified: "2024-01-22"
|
|
9410
|
+
},
|
|
9411
|
+
{
|
|
9412
|
+
id: "cp-004",
|
|
9413
|
+
name: "City Government",
|
|
9414
|
+
type: "GOVERNMENT",
|
|
9415
|
+
status: "ACTIVE",
|
|
9416
|
+
productName: "Government Banking",
|
|
9417
|
+
created: "2024-01-05",
|
|
9418
|
+
modified: "2024-01-15"
|
|
9419
|
+
},
|
|
9420
|
+
{
|
|
9421
|
+
id: "cp-005",
|
|
9422
|
+
name: "Hope Foundation",
|
|
9423
|
+
type: "NONPROFIT",
|
|
9424
|
+
status: "ACTIVE",
|
|
9425
|
+
productName: "Non-Profit Banking",
|
|
9426
|
+
created: "2024-01-03",
|
|
9427
|
+
modified: "2024-01-12"
|
|
9428
|
+
},
|
|
9429
|
+
{
|
|
9430
|
+
id: "cp-006",
|
|
9431
|
+
name: "Sarah Johnson",
|
|
9432
|
+
type: "INDIVIDUAL",
|
|
9433
|
+
status: "PENDING",
|
|
9434
|
+
productName: "Personal Banking",
|
|
9435
|
+
created: "2024-01-25",
|
|
9436
|
+
modified: "2024-01-25"
|
|
9437
|
+
},
|
|
9438
|
+
{
|
|
9439
|
+
id: "cp-007",
|
|
9440
|
+
name: "Tech Innovations LLC",
|
|
9441
|
+
type: "BUSINESS",
|
|
9442
|
+
status: "INACTIVE",
|
|
9443
|
+
productName: "Business Banking",
|
|
9444
|
+
created: "2023-12-20",
|
|
9445
|
+
modified: "2024-01-10"
|
|
9446
|
+
},
|
|
9447
|
+
{
|
|
9448
|
+
id: "cp-008",
|
|
9449
|
+
name: "State Department",
|
|
9450
|
+
type: "GOVERNMENT",
|
|
9451
|
+
status: "ACTIVE",
|
|
9452
|
+
productName: "Government Banking Pro",
|
|
9453
|
+
created: "2023-12-15",
|
|
9454
|
+
modified: "2024-01-08"
|
|
9455
|
+
},
|
|
9456
|
+
{
|
|
9457
|
+
id: "cp-009",
|
|
9458
|
+
name: "Michael Chen",
|
|
9459
|
+
type: "INDIVIDUAL",
|
|
9460
|
+
status: "ACTIVE",
|
|
9461
|
+
productName: "Premium Banking",
|
|
9462
|
+
created: "2023-12-10",
|
|
9463
|
+
modified: "2024-01-05"
|
|
9464
|
+
},
|
|
9465
|
+
{
|
|
9466
|
+
id: "cp-010",
|
|
9467
|
+
name: "Green Earth Initiative",
|
|
9468
|
+
type: "NONPROFIT",
|
|
9469
|
+
status: "ACTIVE",
|
|
9470
|
+
productName: "Non-Profit Banking Plus",
|
|
9471
|
+
created: "2023-12-01",
|
|
9472
|
+
modified: "2023-12-28"
|
|
9473
|
+
}
|
|
9474
|
+
];
|
|
9475
|
+
var Counterparties = () => {
|
|
9476
|
+
const navigate = useNavigate();
|
|
9477
|
+
const [counterparties, setCounterparties] = useState(mockCounterpartiesList);
|
|
9478
|
+
const [filteredCounterparties, setFilteredCounterparties] = useState(mockCounterpartiesList);
|
|
9479
|
+
const [sortBy, setSortBy] = useState("created");
|
|
9480
|
+
const [sortDirection, setSortDirection] = useState("desc");
|
|
9481
|
+
const [filters, setFilters] = useState({
|
|
9482
|
+
name: "",
|
|
9483
|
+
type: "",
|
|
9484
|
+
status: "",
|
|
9485
|
+
createdDateStart: void 0,
|
|
9486
|
+
createdDateEnd: void 0
|
|
9487
|
+
});
|
|
9488
|
+
const handleFilterChange = (field, value) => {
|
|
9489
|
+
setFilters((prev) => ({ ...prev, [field]: value }));
|
|
9490
|
+
};
|
|
9491
|
+
const applyFilters = () => {
|
|
9492
|
+
let filtered = counterparties;
|
|
9493
|
+
if (filters.name) {
|
|
9494
|
+
filtered = filtered.filter(
|
|
9495
|
+
(counterparty) => counterparty.name.toLowerCase().includes(filters.name.toLowerCase())
|
|
9496
|
+
);
|
|
9497
|
+
}
|
|
9498
|
+
if (filters.type) {
|
|
9499
|
+
filtered = filtered.filter((counterparty) => counterparty.type === filters.type);
|
|
9500
|
+
}
|
|
9501
|
+
if (filters.status) {
|
|
9502
|
+
filtered = filtered.filter((counterparty) => counterparty.status === filters.status);
|
|
9503
|
+
}
|
|
9504
|
+
if (filters.createdDateStart) {
|
|
9505
|
+
filtered = filtered.filter(
|
|
9506
|
+
(counterparty) => new Date(counterparty.created) >= filters.createdDateStart
|
|
9507
|
+
);
|
|
9508
|
+
}
|
|
9509
|
+
if (filters.createdDateEnd) {
|
|
9510
|
+
filtered = filtered.filter(
|
|
9511
|
+
(counterparty) => new Date(counterparty.created) <= filters.createdDateEnd
|
|
9512
|
+
);
|
|
9513
|
+
}
|
|
9514
|
+
setFilteredCounterparties(filtered);
|
|
9515
|
+
};
|
|
9516
|
+
const resetFilters = () => {
|
|
9517
|
+
setFilters({
|
|
9518
|
+
name: "",
|
|
9519
|
+
type: "",
|
|
9520
|
+
status: "",
|
|
9521
|
+
createdDateStart: void 0,
|
|
9522
|
+
createdDateEnd: void 0
|
|
9523
|
+
});
|
|
9524
|
+
setFilteredCounterparties(counterparties);
|
|
9525
|
+
};
|
|
9526
|
+
const handleSort = (key) => {
|
|
9527
|
+
if (sortBy === key) {
|
|
9528
|
+
setSortDirection(sortDirection === "asc" ? "desc" : "asc");
|
|
9529
|
+
} else {
|
|
9530
|
+
setSortBy(key);
|
|
9531
|
+
setSortDirection("asc");
|
|
9532
|
+
}
|
|
9533
|
+
};
|
|
9534
|
+
const handleRowClick = (counterparty) => {
|
|
9535
|
+
navigate(`/counterparty/${counterparty.id}`);
|
|
9536
|
+
};
|
|
9537
|
+
const columns2 = [
|
|
9538
|
+
{
|
|
9539
|
+
key: "id",
|
|
9540
|
+
title: "Counterparty ID",
|
|
9541
|
+
sortable: true
|
|
9542
|
+
},
|
|
9543
|
+
{
|
|
9544
|
+
key: "name",
|
|
9545
|
+
title: "Name",
|
|
9546
|
+
sortable: true
|
|
9547
|
+
},
|
|
9548
|
+
{
|
|
9549
|
+
key: "type",
|
|
9550
|
+
title: "Type",
|
|
9551
|
+
sortable: true,
|
|
9552
|
+
render: (value) => /* @__PURE__ */ jsx(CounterpartyTypeBadge, { type: value })
|
|
9553
|
+
},
|
|
9554
|
+
{
|
|
9555
|
+
key: "status",
|
|
9556
|
+
title: "Status",
|
|
9557
|
+
sortable: true,
|
|
9558
|
+
render: (value) => /* @__PURE__ */ jsx(StatusBadge, { status: value })
|
|
9559
|
+
},
|
|
9560
|
+
{
|
|
9561
|
+
key: "productName",
|
|
9562
|
+
title: "Product Name",
|
|
9563
|
+
sortable: true,
|
|
9564
|
+
render: (value) => /* @__PURE__ */ jsx("span", { className: "text-primary hover:underline cursor-pointer", children: value })
|
|
9565
|
+
},
|
|
9566
|
+
{
|
|
9567
|
+
key: "created",
|
|
9568
|
+
title: "Created",
|
|
9569
|
+
sortable: true
|
|
9570
|
+
},
|
|
9571
|
+
{
|
|
9572
|
+
key: "modified",
|
|
9573
|
+
title: "Modified",
|
|
9574
|
+
sortable: true
|
|
9575
|
+
}
|
|
9576
|
+
];
|
|
9577
|
+
const sortedCounterparties = [...filteredCounterparties].sort((a, b) => {
|
|
9578
|
+
const aValue = a[sortBy];
|
|
9579
|
+
const bValue = b[sortBy];
|
|
9580
|
+
if (aValue < bValue) return sortDirection === "asc" ? -1 : 1;
|
|
9581
|
+
if (aValue > bValue) return sortDirection === "asc" ? 1 : -1;
|
|
9582
|
+
return 0;
|
|
9583
|
+
});
|
|
9584
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-screen bg-gradient-subtle", children: [
|
|
9585
|
+
/* @__PURE__ */ jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-6 max-w-none", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
9586
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold text-foreground mb-2", children: "Counterparties" }) }),
|
|
9587
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
9588
|
+
/* @__PURE__ */ jsxs(Sheet, { children: [
|
|
9589
|
+
/* @__PURE__ */ jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", className: "gap-2", children: [
|
|
9590
|
+
/* @__PURE__ */ jsx(Filter, { className: "h-4 w-4" }),
|
|
9591
|
+
"Filters"
|
|
9592
|
+
] }) }),
|
|
9593
|
+
/* @__PURE__ */ jsxs(SheetContent, { side: "right", className: "w-full sm:max-w-xl overflow-y-auto", children: [
|
|
9594
|
+
/* @__PURE__ */ jsx(SheetHeader, { children: /* @__PURE__ */ jsx(SheetTitle, { children: "Counterparty Filters" }) }),
|
|
9595
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-6 py-6", children: [
|
|
9596
|
+
/* @__PURE__ */ jsx(
|
|
9597
|
+
EnhancedInput,
|
|
9598
|
+
{
|
|
9599
|
+
label: "Name",
|
|
9600
|
+
value: filters.name,
|
|
9601
|
+
onChange: (e) => handleFilterChange("name", e.target.value),
|
|
9602
|
+
placeholder: "Enter counterparty name"
|
|
9603
|
+
}
|
|
9604
|
+
),
|
|
9605
|
+
/* @__PURE__ */ jsx(
|
|
9606
|
+
EnhancedSelect,
|
|
9607
|
+
{
|
|
9608
|
+
label: "Type",
|
|
9609
|
+
value: filters.type,
|
|
9610
|
+
onValueChange: (value) => handleFilterChange("type", value),
|
|
9611
|
+
placeholder: "Select type",
|
|
9612
|
+
options: [
|
|
9613
|
+
{ value: "BUSINESS", label: "Business" },
|
|
9614
|
+
{ value: "INDIVIDUAL", label: "Individual" },
|
|
9615
|
+
{ value: "GOVERNMENT", label: "Government" },
|
|
9616
|
+
{ value: "NONPROFIT", label: "Non-Profit" }
|
|
9617
|
+
]
|
|
9618
|
+
}
|
|
9619
|
+
),
|
|
9620
|
+
/* @__PURE__ */ jsx(
|
|
9621
|
+
EnhancedSelect,
|
|
9622
|
+
{
|
|
9623
|
+
label: "Status",
|
|
9624
|
+
value: filters.status,
|
|
9625
|
+
onValueChange: (value) => handleFilterChange("status", value),
|
|
9626
|
+
placeholder: "Select status",
|
|
9627
|
+
options: [
|
|
9628
|
+
{ value: "ACTIVE", label: "Active" },
|
|
9629
|
+
{ value: "INACTIVE", label: "Inactive" },
|
|
9630
|
+
{ value: "PENDING", label: "Pending" },
|
|
9631
|
+
{ value: "SUSPENDED", label: "Suspended" }
|
|
9632
|
+
]
|
|
9633
|
+
}
|
|
9634
|
+
),
|
|
9635
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
9636
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
9637
|
+
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Created Date Start" }),
|
|
9638
|
+
/* @__PURE__ */ jsx(
|
|
9639
|
+
DatePicker,
|
|
9640
|
+
{
|
|
9641
|
+
date: filters.createdDateStart,
|
|
9642
|
+
onDateChange: (date) => handleFilterChange("createdDateStart", date),
|
|
9643
|
+
placeholder: "MM/DD/YYYY",
|
|
9644
|
+
buttonClassName: "w-full",
|
|
9645
|
+
className: "bg-background z-50"
|
|
9646
|
+
}
|
|
9647
|
+
)
|
|
9648
|
+
] }),
|
|
9649
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
9650
|
+
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Created Date End" }),
|
|
9651
|
+
/* @__PURE__ */ jsx(
|
|
9652
|
+
DatePicker,
|
|
9653
|
+
{
|
|
9654
|
+
date: filters.createdDateEnd,
|
|
9655
|
+
onDateChange: (date) => handleFilterChange("createdDateEnd", date),
|
|
9656
|
+
placeholder: "MM/DD/YYYY",
|
|
9657
|
+
buttonClassName: "w-full",
|
|
9658
|
+
className: "bg-background z-50"
|
|
9659
|
+
}
|
|
9660
|
+
)
|
|
9661
|
+
] })
|
|
9662
|
+
] })
|
|
9663
|
+
] }),
|
|
9664
|
+
/* @__PURE__ */ jsxs(SheetFooter, { className: "gap-2", children: [
|
|
9665
|
+
/* @__PURE__ */ jsx(Button, { variant: "outline", onClick: resetFilters, children: "Reset Filters" }),
|
|
9666
|
+
/* @__PURE__ */ jsx(Button, { onClick: applyFilters, children: "Apply Filters" })
|
|
9667
|
+
] })
|
|
9668
|
+
] })
|
|
9669
|
+
] }),
|
|
9670
|
+
/* @__PURE__ */ jsx(Button, { onClick: () => navigate("/counterparty/create"), children: "Create Counterparty" })
|
|
9671
|
+
] })
|
|
9672
|
+
] }) }) }),
|
|
9673
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 h-full max-w-none flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "flex-1 mt-4 overflow-auto", children: /* @__PURE__ */ jsx(
|
|
9674
|
+
DataTable,
|
|
9675
|
+
{
|
|
9676
|
+
columns: columns2,
|
|
9677
|
+
data: sortedCounterparties,
|
|
9678
|
+
sortBy,
|
|
9679
|
+
sortDirection,
|
|
9680
|
+
onSort: handleSort,
|
|
9681
|
+
onRowClick: handleRowClick
|
|
9682
|
+
}
|
|
9683
|
+
) }) }) })
|
|
9684
|
+
] });
|
|
9685
|
+
};
|
|
9686
|
+
var Counterparties_default = Counterparties;
|
|
9687
|
+
var mockCounterpartyTimeline = [
|
|
9688
|
+
{
|
|
9689
|
+
id: "1",
|
|
9690
|
+
action: "Counterparty Created",
|
|
9691
|
+
user: "admin",
|
|
9692
|
+
details: "Initial counterparty setup",
|
|
9693
|
+
status: "Active",
|
|
9694
|
+
timestamp: "2024-01-15 10:30:00"
|
|
9695
|
+
},
|
|
9696
|
+
{
|
|
9697
|
+
id: "2",
|
|
9698
|
+
action: "Profile Updated",
|
|
9699
|
+
user: "admin",
|
|
9700
|
+
details: "Updated counterparty information",
|
|
9701
|
+
timestamp: "2024-01-20 14:22:00"
|
|
9702
|
+
},
|
|
9703
|
+
{
|
|
9704
|
+
id: "3",
|
|
9705
|
+
action: "OFAC Check Completed",
|
|
9706
|
+
user: "System",
|
|
9707
|
+
details: "Automated compliance check",
|
|
9708
|
+
status: "Verified",
|
|
9709
|
+
timestamp: "2024-01-20 14:30:00"
|
|
9710
|
+
}
|
|
9711
|
+
];
|
|
9712
|
+
var CounterpartyStatusCard = ({ isEditing, onToggleEdit, className }) => {
|
|
9713
|
+
const getIcon = (action) => {
|
|
9714
|
+
if (action.includes("Created")) return /* @__PURE__ */ jsx(Circle, { className: "h-4 w-4" });
|
|
9715
|
+
if (action.includes("Assigned")) return /* @__PURE__ */ jsx(UserPlus, { className: "h-4 w-4" });
|
|
9716
|
+
if (action.includes("Updated") || action.includes("Modified") || action.includes("Check")) return /* @__PURE__ */ jsx(Edit, { className: "h-4 w-4" });
|
|
9717
|
+
if (action.includes("Completed") || action.includes("Verified")) return /* @__PURE__ */ jsx(CheckCircle, { className: "h-4 w-4" });
|
|
9718
|
+
return /* @__PURE__ */ jsx(Circle, { className: "h-4 w-4" });
|
|
9719
|
+
};
|
|
9720
|
+
const getStatusColor2 = (status) => {
|
|
9721
|
+
switch (status) {
|
|
9722
|
+
case "Active":
|
|
9723
|
+
case "Verified":
|
|
9724
|
+
return "text-success";
|
|
9725
|
+
case "Pending":
|
|
9726
|
+
return "text-warning";
|
|
9727
|
+
default:
|
|
9728
|
+
return "text-muted-foreground";
|
|
9729
|
+
}
|
|
9730
|
+
};
|
|
9731
|
+
return /* @__PURE__ */ jsx(
|
|
9732
|
+
FormCard,
|
|
9733
|
+
{
|
|
9734
|
+
title: "Timeline",
|
|
9735
|
+
className,
|
|
9736
|
+
children: /* @__PURE__ */ jsx("div", { className: "space-y-3", children: mockCounterpartyTimeline.map((event, index) => /* @__PURE__ */ jsxs("div", { className: "relative pl-6 pb-3", children: [
|
|
9737
|
+
index !== mockCounterpartyTimeline.length - 1 && /* @__PURE__ */ jsx("div", { className: "absolute left-[7px] top-5 bottom-0 w-[2px] bg-border" }),
|
|
9738
|
+
/* @__PURE__ */ jsx("div", { className: cn(
|
|
9739
|
+
"absolute left-0 top-0 flex-none",
|
|
9740
|
+
getStatusColor2(event.status)
|
|
9741
|
+
), children: /* @__PURE__ */ jsx("div", { className: "h-4 w-4", children: getIcon(event.action) }) }),
|
|
9742
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-0.5", children: [
|
|
9743
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-foreground", children: event.action }),
|
|
9744
|
+
/* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
9745
|
+
"by ",
|
|
9746
|
+
event.user
|
|
9747
|
+
] }),
|
|
9748
|
+
event.details && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: event.details }),
|
|
9749
|
+
event.status && /* @__PURE__ */ jsxs("p", { className: cn("text-xs font-medium", getStatusColor2(event.status)), children: [
|
|
9750
|
+
"Status: ",
|
|
9751
|
+
event.status
|
|
9752
|
+
] }),
|
|
9753
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground/70 pt-0.5", children: event.timestamp })
|
|
9754
|
+
] })
|
|
9755
|
+
] }, event.id)) })
|
|
9756
|
+
}
|
|
9757
|
+
);
|
|
9758
|
+
};
|
|
9759
|
+
var mockPaymentMethods = [
|
|
9760
|
+
{
|
|
9761
|
+
id: "pm-001",
|
|
9762
|
+
type: "Wire Transfer",
|
|
9763
|
+
accountNumber: "****1234",
|
|
9764
|
+
status: "active",
|
|
9765
|
+
default: true
|
|
9766
|
+
},
|
|
9767
|
+
{
|
|
9768
|
+
id: "pm-002",
|
|
9769
|
+
type: "ACH",
|
|
9770
|
+
accountNumber: "****5678",
|
|
9771
|
+
status: "active",
|
|
9772
|
+
default: false
|
|
9773
|
+
}
|
|
9774
|
+
];
|
|
9775
|
+
var CounterpartyDetail = () => {
|
|
9776
|
+
const { id } = useParams();
|
|
9777
|
+
const navigate = useNavigate();
|
|
9778
|
+
const counterparty = mockCounterpartiesList.find((c) => c.id === id);
|
|
9779
|
+
const counterpartyDocuments = id ? mockBusinessDocuments[id] || [] : [];
|
|
9780
|
+
const [currentStatus, setCurrentStatus] = useState(counterparty?.status || "ACTIVE");
|
|
9781
|
+
const [isEditingProfile, setIsEditingProfile] = useState(false);
|
|
9782
|
+
const paymentMethodColumns = [
|
|
9783
|
+
{
|
|
9784
|
+
key: "type",
|
|
9785
|
+
title: "Payment Method",
|
|
9786
|
+
sortable: true,
|
|
9787
|
+
width: "30%"
|
|
9788
|
+
},
|
|
9789
|
+
{
|
|
9790
|
+
key: "accountNumber",
|
|
9791
|
+
title: "Account Number",
|
|
9792
|
+
sortable: true,
|
|
9793
|
+
width: "30%"
|
|
9794
|
+
},
|
|
9795
|
+
{
|
|
9796
|
+
key: "status",
|
|
9797
|
+
title: "Status",
|
|
9798
|
+
sortable: true,
|
|
9799
|
+
width: "20%",
|
|
9800
|
+
render: (value) => /* @__PURE__ */ jsx("span", { className: "capitalize", children: value })
|
|
9801
|
+
},
|
|
9802
|
+
{
|
|
9803
|
+
key: "default",
|
|
9804
|
+
title: "Default",
|
|
9805
|
+
sortable: true,
|
|
9806
|
+
width: "20%",
|
|
9807
|
+
align: "right",
|
|
9808
|
+
render: (value) => value ? /* @__PURE__ */ jsx("span", { className: "text-success", children: "Yes" }) : /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "No" })
|
|
9809
|
+
}
|
|
9810
|
+
];
|
|
9811
|
+
const documentColumns = [
|
|
9812
|
+
{
|
|
9813
|
+
key: "name",
|
|
9814
|
+
title: "Document Name",
|
|
9815
|
+
sortable: true,
|
|
9816
|
+
width: "40%"
|
|
9817
|
+
},
|
|
9818
|
+
{
|
|
9819
|
+
key: "type",
|
|
9820
|
+
title: "Type",
|
|
9821
|
+
sortable: true,
|
|
9822
|
+
width: "20%"
|
|
9823
|
+
},
|
|
9824
|
+
{
|
|
9825
|
+
key: "uploadedDate",
|
|
9826
|
+
title: "Uploaded",
|
|
9827
|
+
sortable: true,
|
|
9828
|
+
width: "20%"
|
|
9829
|
+
},
|
|
9830
|
+
{
|
|
9831
|
+
key: "status",
|
|
9832
|
+
title: "Status",
|
|
9833
|
+
sortable: true,
|
|
9834
|
+
width: "20%",
|
|
9835
|
+
align: "right",
|
|
9836
|
+
render: (value) => /* @__PURE__ */ jsx("span", { className: "capitalize", children: value })
|
|
9837
|
+
}
|
|
9838
|
+
];
|
|
9839
|
+
if (!counterparty) {
|
|
9840
|
+
return /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-8", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
9841
|
+
/* @__PURE__ */ jsx("h1", { className: "text-2xl font-bold mb-2", children: "Counterparty Not Found" }),
|
|
9842
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground mb-4", children: "The counterparty could not be found." })
|
|
9843
|
+
] }) });
|
|
9844
|
+
}
|
|
9845
|
+
return /* @__PURE__ */ jsx(
|
|
9846
|
+
PageLayout,
|
|
9847
|
+
{
|
|
9848
|
+
title: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
9849
|
+
/* @__PURE__ */ jsx("span", { children: counterparty.name }),
|
|
9850
|
+
/* @__PURE__ */ jsx(
|
|
9851
|
+
EditableInfoField,
|
|
9852
|
+
{
|
|
9853
|
+
label: "",
|
|
9854
|
+
value: currentStatus,
|
|
9855
|
+
options: [
|
|
9856
|
+
{ value: "ACTIVE", label: "Active" },
|
|
9857
|
+
{ value: "INACTIVE", label: "Inactive" },
|
|
9858
|
+
{ value: "PENDING", label: "Pending" },
|
|
9859
|
+
{ value: "SUSPENDED", label: "Suspended" }
|
|
9860
|
+
],
|
|
9861
|
+
onChange: (newStatus) => setCurrentStatus(newStatus),
|
|
9862
|
+
renderValue: (value) => /* @__PURE__ */ jsx(StatusBadge, { status: value }),
|
|
9863
|
+
className: "inline-block"
|
|
9864
|
+
}
|
|
9865
|
+
),
|
|
9866
|
+
/* @__PURE__ */ jsx(CIPStatusBadge, { status: "verified" }),
|
|
9867
|
+
/* @__PURE__ */ jsx(CounterpartyTypeBadge, { type: counterparty.type })
|
|
9868
|
+
] }),
|
|
9869
|
+
actions: [
|
|
9870
|
+
{
|
|
9871
|
+
label: "View Account",
|
|
9872
|
+
variant: "outline",
|
|
9873
|
+
onClick: () => navigate(`/counterparty/${id}/account`),
|
|
9874
|
+
icon: Wallet
|
|
9875
|
+
},
|
|
9876
|
+
{
|
|
9877
|
+
label: "View Transactions",
|
|
9878
|
+
variant: "outline",
|
|
9879
|
+
onClick: () => navigate(`/counterparty/${id}/transactions`),
|
|
9880
|
+
icon: FileText
|
|
9881
|
+
}
|
|
9882
|
+
],
|
|
9883
|
+
maxWidth: "full",
|
|
9884
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-4", children: [
|
|
9885
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-4", children: [
|
|
9886
|
+
/* @__PURE__ */ jsx(
|
|
9887
|
+
CounterpartyProfileCard,
|
|
9888
|
+
{
|
|
9889
|
+
isEditing: isEditingProfile,
|
|
9890
|
+
onToggleEdit: () => setIsEditingProfile(!isEditingProfile)
|
|
9891
|
+
}
|
|
9892
|
+
),
|
|
9893
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
9894
|
+
/* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
9895
|
+
/* @__PURE__ */ jsx(CardTitle, { children: "Payment Methods" }),
|
|
9896
|
+
/* @__PURE__ */ jsxs(Button, { size: "sm", variant: "ghost", children: [
|
|
9897
|
+
/* @__PURE__ */ jsx(Plus, { className: "h-4 w-4 mr-1" }),
|
|
9898
|
+
"Method"
|
|
9899
|
+
] })
|
|
9900
|
+
] }),
|
|
9901
|
+
/* @__PURE__ */ jsx(CardContent, { children: mockPaymentMethods.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
9902
|
+
/* @__PURE__ */ jsx(Wallet, { className: "h-5 w-5 opacity-50" }),
|
|
9903
|
+
/* @__PURE__ */ jsx("p", { children: "No payment methods configured" })
|
|
9904
|
+
] }) : /* @__PURE__ */ jsx(
|
|
9905
|
+
DataTable,
|
|
9906
|
+
{
|
|
9907
|
+
columns: paymentMethodColumns,
|
|
9908
|
+
data: mockPaymentMethods
|
|
9909
|
+
}
|
|
9910
|
+
) })
|
|
9911
|
+
] }),
|
|
9912
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
9913
|
+
/* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
9914
|
+
/* @__PURE__ */ jsx(CardTitle, { children: "Documents" }),
|
|
9915
|
+
/* @__PURE__ */ jsxs(Button, { size: "sm", variant: "ghost", children: [
|
|
9916
|
+
/* @__PURE__ */ jsx(Plus, { className: "h-4 w-4 mr-1" }),
|
|
9917
|
+
"Document"
|
|
9918
|
+
] })
|
|
9919
|
+
] }),
|
|
9920
|
+
/* @__PURE__ */ jsx(CardContent, { children: counterpartyDocuments.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
9921
|
+
/* @__PURE__ */ jsx(FileText, { className: "h-5 w-5 opacity-50" }),
|
|
9922
|
+
/* @__PURE__ */ jsx("p", { children: "No documents found" })
|
|
9923
|
+
] }) : /* @__PURE__ */ jsx(
|
|
9924
|
+
DataTable,
|
|
9925
|
+
{
|
|
9926
|
+
columns: documentColumns,
|
|
9927
|
+
data: counterpartyDocuments
|
|
9928
|
+
}
|
|
9929
|
+
) })
|
|
9930
|
+
] })
|
|
9931
|
+
] }),
|
|
9932
|
+
/* @__PURE__ */ jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsx(CounterpartyStatusCard, { isEditing: false, onToggleEdit: () => {
|
|
9933
|
+
} }) })
|
|
9934
|
+
] })
|
|
9935
|
+
}
|
|
9936
|
+
);
|
|
9937
|
+
};
|
|
9938
|
+
var CounterpartyDetail_default = CounterpartyDetail;
|
|
9939
|
+
var CreateCounterparty = () => {
|
|
9940
|
+
const navigate = useNavigate();
|
|
9941
|
+
const [counterpartyData, setCounterpartyData] = useState(null);
|
|
9942
|
+
const [paymentMethods, setPaymentMethods] = useState([]);
|
|
9943
|
+
const handlePaymentMethodsChange = (methods) => {
|
|
9944
|
+
setPaymentMethods(methods);
|
|
9945
|
+
};
|
|
9946
|
+
const handleBasicInfoChange = (data) => {
|
|
9947
|
+
setCounterpartyData(data);
|
|
9948
|
+
};
|
|
9949
|
+
const counterpartyType = counterpartyData?.type || "";
|
|
9950
|
+
const handleCancel = () => {
|
|
9951
|
+
navigate("/counterparty");
|
|
9952
|
+
};
|
|
9953
|
+
const handleSubmit = () => {
|
|
9954
|
+
if (!counterpartyType) {
|
|
9955
|
+
toast({
|
|
9956
|
+
title: "Error",
|
|
9957
|
+
description: "Please select a counterparty type",
|
|
9958
|
+
variant: "destructive"
|
|
9959
|
+
});
|
|
9960
|
+
return;
|
|
9961
|
+
}
|
|
9962
|
+
if (paymentMethods.length === 0) {
|
|
9963
|
+
toast({
|
|
9964
|
+
title: "Error",
|
|
9965
|
+
description: "At least one payment method is required",
|
|
9966
|
+
variant: "destructive"
|
|
9967
|
+
});
|
|
9968
|
+
return;
|
|
9969
|
+
}
|
|
9970
|
+
if (paymentMethods.some((m) => m.type === "wire")) {
|
|
9971
|
+
console.log("Address validation required for wire transfers");
|
|
9972
|
+
}
|
|
9973
|
+
console.log("Creating counterparty with data:", {
|
|
9974
|
+
type: counterpartyType,
|
|
9975
|
+
basicInfo: counterpartyData
|
|
9976
|
+
});
|
|
9977
|
+
toast({
|
|
9978
|
+
title: "Success",
|
|
9979
|
+
description: "Counterparty created successfully"
|
|
9980
|
+
});
|
|
9981
|
+
setTimeout(() => {
|
|
9982
|
+
navigate("/counterparty");
|
|
9983
|
+
}, 1e3);
|
|
9984
|
+
};
|
|
9985
|
+
return /* @__PURE__ */ jsx(
|
|
9986
|
+
PageLayout,
|
|
9987
|
+
{
|
|
9988
|
+
title: "Create Counterparty",
|
|
9989
|
+
description: "Create a new counterparty with all required information",
|
|
9990
|
+
actions: [
|
|
9991
|
+
{ label: "Cancel", variant: "outline", onClick: handleCancel },
|
|
9992
|
+
{ label: "Create Counterparty", variant: "default", onClick: handleSubmit }
|
|
9993
|
+
],
|
|
9994
|
+
children: /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
9995
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
9996
|
+
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Basic Information" }) }),
|
|
9997
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(CounterpartyBasicInfo, { onDataChange: handleBasicInfoChange }) })
|
|
9998
|
+
] }),
|
|
9999
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
10000
|
+
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, { children: [
|
|
10001
|
+
"Address",
|
|
10002
|
+
paymentMethods.some((m) => m.type === "wire") && /* @__PURE__ */ jsx("span", { className: "text-destructive ml-1", children: "*" })
|
|
10003
|
+
] }) }),
|
|
10004
|
+
/* @__PURE__ */ jsxs(CardContent, { children: [
|
|
10005
|
+
paymentMethods.length === 0 && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-4", children: "Optional for ACH payments, required for wire transfers" }),
|
|
10006
|
+
paymentMethods.some((m) => m.type === "wire") && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-4", children: "Required because you have wire payment methods" }),
|
|
10007
|
+
/* @__PURE__ */ jsx(
|
|
10008
|
+
AddressForm,
|
|
10009
|
+
{
|
|
10010
|
+
title: "",
|
|
10011
|
+
description: "",
|
|
10012
|
+
showApartment: true
|
|
10013
|
+
}
|
|
10014
|
+
)
|
|
10015
|
+
] })
|
|
10016
|
+
] }),
|
|
10017
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
10018
|
+
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Payment Configuration" }) }),
|
|
10019
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(PaymentInformationSection, { onPaymentMethodsChange: handlePaymentMethodsChange }) })
|
|
10020
|
+
] })
|
|
10021
|
+
] })
|
|
10022
|
+
}
|
|
10023
|
+
);
|
|
10024
|
+
};
|
|
10025
|
+
var Create_default2 = CreateCounterparty;
|
|
10026
|
+
var Dashboard = () => {
|
|
10027
|
+
return /* @__PURE__ */ jsx(
|
|
10028
|
+
PageLayout,
|
|
10029
|
+
{
|
|
10030
|
+
title: "Dashboard",
|
|
10031
|
+
description: "Overview of your system metrics and activity",
|
|
10032
|
+
children: /* @__PURE__ */ jsx("div", { className: "text-center py-12 text-muted-foreground", children: "Dashboard content coming soon" })
|
|
10033
|
+
}
|
|
10034
|
+
);
|
|
10035
|
+
};
|
|
10036
|
+
var Dashboard_default = Dashboard;
|
|
10037
|
+
|
|
10038
|
+
// src/lib/mock-data/individuals-list-data.ts
|
|
10039
|
+
var mockIndividualsListData = [
|
|
10040
|
+
{
|
|
10041
|
+
id: "IND-2024-001",
|
|
10042
|
+
firstName: "John",
|
|
10043
|
+
lastName: "Smith",
|
|
10044
|
+
fullName: "John Smith",
|
|
10045
|
+
productName: "Personal Checking",
|
|
10046
|
+
cipStatus: "verified",
|
|
10047
|
+
status: "active",
|
|
10048
|
+
createdAt: "2024-01-15T10:30:00Z",
|
|
10049
|
+
modifiedAt: "2024-01-20T14:45:00Z"
|
|
10050
|
+
},
|
|
10051
|
+
{
|
|
10052
|
+
id: "IND-2024-002",
|
|
10053
|
+
firstName: "Sarah",
|
|
10054
|
+
lastName: "Johnson",
|
|
10055
|
+
fullName: "Sarah Johnson",
|
|
10056
|
+
productName: "Premium Savings",
|
|
10057
|
+
cipStatus: "verified",
|
|
10058
|
+
status: "active",
|
|
10059
|
+
createdAt: "2024-01-18T09:15:00Z",
|
|
10060
|
+
modifiedAt: "2024-01-22T11:30:00Z"
|
|
10061
|
+
},
|
|
10062
|
+
{
|
|
10063
|
+
id: "IND-2024-003",
|
|
10064
|
+
firstName: "Michael",
|
|
10065
|
+
lastName: "Chen",
|
|
10066
|
+
fullName: "Michael Chen",
|
|
10067
|
+
productName: "Personal Checking",
|
|
10068
|
+
cipStatus: "pending",
|
|
10069
|
+
status: "pending",
|
|
10070
|
+
createdAt: "2024-01-20T13:45:00Z",
|
|
10071
|
+
modifiedAt: "2024-01-20T13:45:00Z"
|
|
10072
|
+
},
|
|
10073
|
+
{
|
|
10074
|
+
id: "IND-2024-004",
|
|
10075
|
+
firstName: "Emily",
|
|
10076
|
+
lastName: "Rodriguez",
|
|
10077
|
+
fullName: "Emily Rodriguez",
|
|
10078
|
+
productName: "Student Checking",
|
|
10079
|
+
cipStatus: "verified",
|
|
10080
|
+
status: "active",
|
|
10081
|
+
createdAt: "2024-01-22T16:20:00Z",
|
|
10082
|
+
modifiedAt: "2024-01-25T10:15:00Z"
|
|
10083
|
+
},
|
|
10084
|
+
{
|
|
10085
|
+
id: "IND-2024-005",
|
|
10086
|
+
firstName: "David",
|
|
10087
|
+
lastName: "Williams",
|
|
10088
|
+
fullName: "David Williams",
|
|
10089
|
+
productName: "Business Checking",
|
|
10090
|
+
cipStatus: "rejected",
|
|
10091
|
+
status: "rejected",
|
|
10092
|
+
createdAt: "2024-01-25T08:30:00Z",
|
|
10093
|
+
modifiedAt: "2024-01-26T14:00:00Z"
|
|
10094
|
+
}
|
|
10095
|
+
];
|
|
10096
|
+
var Individuals = () => {
|
|
10097
|
+
const navigate = useNavigate();
|
|
10098
|
+
const [individuals, setIndividuals] = useState(mockIndividualsListData);
|
|
10099
|
+
const [filteredIndividuals, setFilteredIndividuals] = useState(mockIndividualsListData);
|
|
10100
|
+
const [sortBy, setSortBy] = useState("created");
|
|
10101
|
+
const [sortDirection, setSortDirection] = useState("desc");
|
|
10102
|
+
const [filters, setFilters] = useState({
|
|
10103
|
+
name: "",
|
|
10104
|
+
productName: "",
|
|
10105
|
+
status: "",
|
|
10106
|
+
createdDateStart: void 0,
|
|
10107
|
+
createdDateEnd: void 0
|
|
10108
|
+
});
|
|
10109
|
+
const handleFilterChange = (field, value) => {
|
|
10110
|
+
setFilters((prev) => ({ ...prev, [field]: value }));
|
|
10111
|
+
};
|
|
10112
|
+
const applyFilters = () => {
|
|
10113
|
+
let filtered = individuals;
|
|
10114
|
+
if (filters.name) {
|
|
10115
|
+
filtered = filtered.filter(
|
|
10116
|
+
(individual) => individual.fullName.toLowerCase().includes(filters.name.toLowerCase())
|
|
10117
|
+
);
|
|
10118
|
+
}
|
|
10119
|
+
if (filters.productName) {
|
|
10120
|
+
filtered = filtered.filter(
|
|
10121
|
+
(individual) => individual.productName.toLowerCase().includes(filters.productName.toLowerCase())
|
|
10122
|
+
);
|
|
10123
|
+
}
|
|
10124
|
+
if (filters.status) {
|
|
10125
|
+
filtered = filtered.filter((individual) => individual.status === filters.status);
|
|
10126
|
+
}
|
|
10127
|
+
if (filters.createdDateStart) {
|
|
10128
|
+
filtered = filtered.filter(
|
|
10129
|
+
(individual) => new Date(individual.createdAt) >= filters.createdDateStart
|
|
10130
|
+
);
|
|
10131
|
+
}
|
|
10132
|
+
if (filters.createdDateEnd) {
|
|
10133
|
+
filtered = filtered.filter(
|
|
10134
|
+
(individual) => new Date(individual.createdAt) <= filters.createdDateEnd
|
|
10135
|
+
);
|
|
10136
|
+
}
|
|
10137
|
+
setFilteredIndividuals(filtered);
|
|
10138
|
+
};
|
|
10139
|
+
const resetFilters = () => {
|
|
10140
|
+
setFilters({
|
|
10141
|
+
name: "",
|
|
10142
|
+
productName: "",
|
|
10143
|
+
status: "",
|
|
10144
|
+
createdDateStart: void 0,
|
|
10145
|
+
createdDateEnd: void 0
|
|
10146
|
+
});
|
|
10147
|
+
setFilteredIndividuals(individuals);
|
|
10148
|
+
};
|
|
10149
|
+
const handleSort = (key) => {
|
|
10150
|
+
if (sortBy === key) {
|
|
10151
|
+
setSortDirection(sortDirection === "asc" ? "desc" : "asc");
|
|
10152
|
+
} else {
|
|
10153
|
+
setSortBy(key);
|
|
10154
|
+
setSortDirection("asc");
|
|
10155
|
+
}
|
|
10156
|
+
};
|
|
10157
|
+
const handleRowClick = (row) => {
|
|
10158
|
+
navigate(`/individual/${row.id}`);
|
|
10159
|
+
};
|
|
10160
|
+
const columns2 = [
|
|
10161
|
+
{
|
|
10162
|
+
key: "id",
|
|
10163
|
+
title: "Individual ID",
|
|
10164
|
+
sortable: true
|
|
10165
|
+
},
|
|
10166
|
+
{
|
|
10167
|
+
key: "fullName",
|
|
10168
|
+
title: "Name",
|
|
10169
|
+
sortable: true
|
|
10170
|
+
},
|
|
10171
|
+
{
|
|
10172
|
+
key: "productName",
|
|
10173
|
+
title: "Product Name",
|
|
10174
|
+
sortable: true
|
|
10175
|
+
},
|
|
10176
|
+
{
|
|
10177
|
+
key: "cipStatus",
|
|
10178
|
+
title: "CIP Status",
|
|
10179
|
+
sortable: true,
|
|
10180
|
+
render: (value) => /* @__PURE__ */ jsx(CIPStatusBadge, { status: value })
|
|
10181
|
+
},
|
|
10182
|
+
{
|
|
10183
|
+
key: "status",
|
|
10184
|
+
title: "Status",
|
|
10185
|
+
sortable: true,
|
|
10186
|
+
render: (value) => /* @__PURE__ */ jsx(StatusBadge, { status: value })
|
|
10187
|
+
},
|
|
10188
|
+
{
|
|
10189
|
+
key: "createdAt",
|
|
10190
|
+
title: "Created",
|
|
10191
|
+
sortable: true,
|
|
10192
|
+
render: (value) => new Date(value).toLocaleDateString()
|
|
10193
|
+
},
|
|
10194
|
+
{
|
|
10195
|
+
key: "modifiedAt",
|
|
10196
|
+
title: "Modified",
|
|
10197
|
+
sortable: true,
|
|
10198
|
+
render: (value) => new Date(value).toLocaleDateString()
|
|
10199
|
+
}
|
|
10200
|
+
];
|
|
10201
|
+
const sortedIndividuals = [...filteredIndividuals].sort((a, b) => {
|
|
10202
|
+
const aValue = a[sortBy];
|
|
10203
|
+
const bValue = b[sortBy];
|
|
10204
|
+
if (aValue < bValue) return sortDirection === "asc" ? -1 : 1;
|
|
10205
|
+
if (aValue > bValue) return sortDirection === "asc" ? 1 : -1;
|
|
10206
|
+
return 0;
|
|
10207
|
+
});
|
|
10208
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-screen bg-gradient-subtle", children: [
|
|
10209
|
+
/* @__PURE__ */ jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-6 max-w-none", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
10210
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold text-foreground mb-2", children: "Individuals" }) }),
|
|
10211
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
10212
|
+
/* @__PURE__ */ jsxs(Sheet, { children: [
|
|
10213
|
+
/* @__PURE__ */ jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", className: "gap-2", children: [
|
|
10214
|
+
/* @__PURE__ */ jsx(Filter, { className: "h-4 w-4" }),
|
|
10215
|
+
"Filters"
|
|
10216
|
+
] }) }),
|
|
10217
|
+
/* @__PURE__ */ jsxs(SheetContent, { side: "right", className: "w-full sm:max-w-xl overflow-y-auto", children: [
|
|
10218
|
+
/* @__PURE__ */ jsx(SheetHeader, { children: /* @__PURE__ */ jsx(SheetTitle, { children: "Individual Filters" }) }),
|
|
10219
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-6 py-6", children: [
|
|
10220
|
+
/* @__PURE__ */ jsx(
|
|
10221
|
+
EnhancedInput,
|
|
10222
|
+
{
|
|
10223
|
+
label: "Name",
|
|
10224
|
+
value: filters.name,
|
|
10225
|
+
onChange: (e) => handleFilterChange("name", e.target.value),
|
|
10226
|
+
placeholder: "Enter individual name"
|
|
10227
|
+
}
|
|
10228
|
+
),
|
|
10229
|
+
/* @__PURE__ */ jsx(
|
|
10230
|
+
EnhancedInput,
|
|
10231
|
+
{
|
|
10232
|
+
label: "Product Name",
|
|
10233
|
+
value: filters.productName,
|
|
10234
|
+
onChange: (e) => handleFilterChange("productName", e.target.value),
|
|
10235
|
+
placeholder: "Enter product name"
|
|
10236
|
+
}
|
|
10237
|
+
),
|
|
10238
|
+
/* @__PURE__ */ jsx(
|
|
10239
|
+
EnhancedSelect,
|
|
10240
|
+
{
|
|
10241
|
+
label: "Status",
|
|
10242
|
+
value: filters.status,
|
|
10243
|
+
onValueChange: (value) => handleFilterChange("status", value),
|
|
10244
|
+
placeholder: "Select status",
|
|
10245
|
+
options: [
|
|
10246
|
+
{ value: "active", label: "Active" },
|
|
10247
|
+
{ value: "pending", label: "Pending" },
|
|
10248
|
+
{ value: "rejected", label: "Rejected" },
|
|
10249
|
+
{ value: "suspended", label: "Suspended" }
|
|
10250
|
+
]
|
|
10251
|
+
}
|
|
10252
|
+
),
|
|
10253
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
10254
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
10255
|
+
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Created Date Start" }),
|
|
10256
|
+
/* @__PURE__ */ jsx(
|
|
10257
|
+
DatePicker,
|
|
10258
|
+
{
|
|
10259
|
+
date: filters.createdDateStart,
|
|
10260
|
+
onDateChange: (date) => handleFilterChange("createdDateStart", date),
|
|
10261
|
+
placeholder: "MM/DD/YYYY",
|
|
10262
|
+
buttonClassName: "w-full",
|
|
10263
|
+
className: "bg-background z-50"
|
|
10264
|
+
}
|
|
10265
|
+
)
|
|
10266
|
+
] }),
|
|
10267
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
10268
|
+
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Created Date End" }),
|
|
10269
|
+
/* @__PURE__ */ jsx(
|
|
10270
|
+
DatePicker,
|
|
10271
|
+
{
|
|
10272
|
+
date: filters.createdDateEnd,
|
|
10273
|
+
onDateChange: (date) => handleFilterChange("createdDateEnd", date),
|
|
10274
|
+
placeholder: "MM/DD/YYYY",
|
|
10275
|
+
buttonClassName: "w-full",
|
|
10276
|
+
className: "bg-background z-50"
|
|
10277
|
+
}
|
|
10278
|
+
)
|
|
10279
|
+
] })
|
|
10280
|
+
] })
|
|
10281
|
+
] }),
|
|
10282
|
+
/* @__PURE__ */ jsxs(SheetFooter, { className: "gap-2", children: [
|
|
10283
|
+
/* @__PURE__ */ jsx(Button, { variant: "outline", onClick: resetFilters, children: "Reset Filters" }),
|
|
10284
|
+
/* @__PURE__ */ jsx(Button, { onClick: applyFilters, children: "Apply Filters" })
|
|
10285
|
+
] })
|
|
10286
|
+
] })
|
|
10287
|
+
] }),
|
|
10288
|
+
/* @__PURE__ */ jsx(Button, { onClick: () => navigate("/individual/create"), children: "Create Individual" })
|
|
10289
|
+
] })
|
|
10290
|
+
] }) }) }),
|
|
10291
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 h-full max-w-none flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "flex-1 mt-4 overflow-auto", children: /* @__PURE__ */ jsx(
|
|
10292
|
+
DataTable,
|
|
10293
|
+
{
|
|
10294
|
+
columns: columns2,
|
|
10295
|
+
data: sortedIndividuals,
|
|
10296
|
+
sortBy,
|
|
10297
|
+
sortDirection,
|
|
10298
|
+
onSort: handleSort,
|
|
10299
|
+
onRowClick: handleRowClick
|
|
10300
|
+
}
|
|
10301
|
+
) }) }) })
|
|
10302
|
+
] });
|
|
10303
|
+
};
|
|
10304
|
+
var Individuals_default = Individuals;
|
|
10305
|
+
var individualProfileSchema = z.object({
|
|
10306
|
+
// Personal Information
|
|
10307
|
+
firstName: z.string().min(1, "First name is required"),
|
|
10308
|
+
lastName: z.string().min(1, "Last name is required"),
|
|
10309
|
+
dateOfBirth: z.string().optional(),
|
|
10310
|
+
// Identification
|
|
10311
|
+
idType: z.enum(["SSN", "ITIN", "Passport", "Driver License"]).optional(),
|
|
10312
|
+
ssn: z.string().optional(),
|
|
10313
|
+
// Contact Information
|
|
10314
|
+
email: z.string().email("Invalid email address").optional(),
|
|
10315
|
+
mobilePhone: z.string().optional(),
|
|
10316
|
+
// Address
|
|
10317
|
+
streetAddress: z.string().optional(),
|
|
10318
|
+
apartment: z.string().optional(),
|
|
10319
|
+
city: z.string().optional(),
|
|
10320
|
+
state: z.string().optional(),
|
|
10321
|
+
postalCode: z.string().optional(),
|
|
10322
|
+
country: z.string().optional(),
|
|
10323
|
+
// Integration Fields
|
|
10324
|
+
externalId: z.string().optional(),
|
|
10325
|
+
productId: z.string().optional()
|
|
10326
|
+
});
|
|
10327
|
+
|
|
10328
|
+
// src/lib/mock-data/individual-data.ts
|
|
10329
|
+
var mockIndividualData = {
|
|
10330
|
+
id: "IND-2024-001",
|
|
10331
|
+
firstName: "John",
|
|
10332
|
+
lastName: "Smith",
|
|
10333
|
+
dateOfBirth: "1985-06-15",
|
|
10334
|
+
idType: "SSN",
|
|
10335
|
+
ssn: "***-**-4567",
|
|
10336
|
+
email: "john.smith@email.com",
|
|
10337
|
+
mobilePhone: "+1 (555) 123-4567",
|
|
10338
|
+
// Address
|
|
10339
|
+
streetAddress: "123 Main Street",
|
|
10340
|
+
apartment: "Apt 4B",
|
|
10341
|
+
city: "San Francisco",
|
|
10342
|
+
state: "CA",
|
|
10343
|
+
postalCode: "94102",
|
|
10344
|
+
country: "United States",
|
|
10345
|
+
// Integration
|
|
10346
|
+
externalId: "EXT-IND-001",
|
|
10347
|
+
productId: "PROD-CHECKING-001",
|
|
10348
|
+
productName: "Personal Checking",
|
|
10349
|
+
// Status Information
|
|
10350
|
+
status: "active",
|
|
10351
|
+
cipStatus: "verified",
|
|
10352
|
+
entityType: "individual",
|
|
10353
|
+
subType: "retail",
|
|
10354
|
+
// Dates
|
|
10355
|
+
createdAt: "2024-01-15T10:30:00Z",
|
|
10356
|
+
modifiedAt: "2024-01-20T14:45:00Z",
|
|
10357
|
+
// OFAC
|
|
10358
|
+
ofacStatus: "clear",
|
|
10359
|
+
lastOfacCheck: "2024-01-20T14:45:00Z"
|
|
10360
|
+
};
|
|
10361
|
+
var IndividualProfileCard = ({ isEditing, onToggleEdit, className }) => {
|
|
10362
|
+
const form = useFormWithEditState({
|
|
10363
|
+
schema: individualProfileSchema,
|
|
10364
|
+
defaultValues: {
|
|
10365
|
+
firstName: mockIndividualData.firstName,
|
|
10366
|
+
lastName: mockIndividualData.lastName,
|
|
10367
|
+
dateOfBirth: mockIndividualData.dateOfBirth,
|
|
10368
|
+
idType: mockIndividualData.idType,
|
|
10369
|
+
ssn: mockIndividualData.ssn,
|
|
10370
|
+
email: mockIndividualData.email,
|
|
10371
|
+
mobilePhone: mockIndividualData.mobilePhone,
|
|
10372
|
+
streetAddress: mockIndividualData.streetAddress,
|
|
10373
|
+
apartment: mockIndividualData.apartment,
|
|
10374
|
+
city: mockIndividualData.city,
|
|
10375
|
+
state: mockIndividualData.state,
|
|
10376
|
+
postalCode: mockIndividualData.postalCode,
|
|
10377
|
+
country: mockIndividualData.country,
|
|
10378
|
+
externalId: mockIndividualData.externalId,
|
|
10379
|
+
productId: mockIndividualData.productId
|
|
10380
|
+
},
|
|
10381
|
+
initialEditing: isEditing,
|
|
10382
|
+
onToggleEdit,
|
|
10383
|
+
onSave: async (data) => {
|
|
10384
|
+
console.log("Saving individual profile:", data);
|
|
10385
|
+
}
|
|
10386
|
+
});
|
|
10387
|
+
const editContent = /* @__PURE__ */ jsx(FormProvider, { form, children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
10388
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
10389
|
+
/* @__PURE__ */ jsx(
|
|
10390
|
+
FormInput,
|
|
10391
|
+
{
|
|
10392
|
+
name: "firstName",
|
|
10393
|
+
label: "First Name",
|
|
10394
|
+
placeholder: "Enter first name",
|
|
10395
|
+
required: true
|
|
10396
|
+
}
|
|
10397
|
+
),
|
|
10398
|
+
/* @__PURE__ */ jsx(
|
|
10399
|
+
FormInput,
|
|
10400
|
+
{
|
|
10401
|
+
name: "lastName",
|
|
10402
|
+
label: "Last Name",
|
|
10403
|
+
placeholder: "Enter last name",
|
|
10404
|
+
required: true
|
|
10405
|
+
}
|
|
10406
|
+
),
|
|
10407
|
+
/* @__PURE__ */ jsx(
|
|
10408
|
+
FormInput,
|
|
10409
|
+
{
|
|
10410
|
+
name: "dateOfBirth",
|
|
10411
|
+
label: "Date of Birth",
|
|
10412
|
+
type: "date",
|
|
10413
|
+
placeholder: "Enter date of birth"
|
|
10414
|
+
}
|
|
10415
|
+
),
|
|
10416
|
+
/* @__PURE__ */ jsx(
|
|
10417
|
+
FormSelect,
|
|
10418
|
+
{
|
|
10419
|
+
name: "idType",
|
|
10420
|
+
label: "ID Type",
|
|
10421
|
+
placeholder: "Select ID type",
|
|
10422
|
+
options: [
|
|
10423
|
+
{ value: "SSN", label: "SSN" },
|
|
10424
|
+
{ value: "ITIN", label: "ITIN" },
|
|
10425
|
+
{ value: "Passport", label: "Passport" },
|
|
10426
|
+
{ value: "Driver License", label: "Driver License" }
|
|
10427
|
+
]
|
|
10428
|
+
}
|
|
10429
|
+
),
|
|
10430
|
+
/* @__PURE__ */ jsx(
|
|
10431
|
+
FormInput,
|
|
10432
|
+
{
|
|
10433
|
+
name: "ssn",
|
|
10434
|
+
label: "SSN/ITIN",
|
|
10435
|
+
placeholder: "Enter SSN or ITIN",
|
|
10436
|
+
hint: "Last 4 digits will be masked"
|
|
10437
|
+
}
|
|
10438
|
+
),
|
|
10439
|
+
/* @__PURE__ */ jsx(
|
|
10440
|
+
FormInput,
|
|
10441
|
+
{
|
|
10442
|
+
name: "email",
|
|
10443
|
+
label: "Email",
|
|
10444
|
+
type: "email",
|
|
10445
|
+
placeholder: "Enter email address"
|
|
10446
|
+
}
|
|
10447
|
+
),
|
|
10448
|
+
/* @__PURE__ */ jsx(
|
|
10449
|
+
FormInput,
|
|
10450
|
+
{
|
|
10451
|
+
name: "mobilePhone",
|
|
10452
|
+
label: "Mobile Phone",
|
|
10453
|
+
placeholder: "Enter mobile phone"
|
|
10454
|
+
}
|
|
10455
|
+
)
|
|
10456
|
+
] }),
|
|
10457
|
+
/* @__PURE__ */ jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Address" }),
|
|
10458
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-4", children: [
|
|
10459
|
+
/* @__PURE__ */ jsx(
|
|
10460
|
+
FormInput,
|
|
10461
|
+
{
|
|
10462
|
+
name: "streetAddress",
|
|
10463
|
+
label: "Street Address",
|
|
10464
|
+
placeholder: "Enter street address"
|
|
10465
|
+
}
|
|
10466
|
+
),
|
|
10467
|
+
/* @__PURE__ */ jsx(
|
|
10468
|
+
FormInput,
|
|
10469
|
+
{
|
|
10470
|
+
name: "apartment",
|
|
10471
|
+
label: "Apartment/Unit",
|
|
10472
|
+
placeholder: "Enter apartment or unit number"
|
|
10473
|
+
}
|
|
10474
|
+
)
|
|
10475
|
+
] }),
|
|
10476
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
10477
|
+
/* @__PURE__ */ jsx(
|
|
10478
|
+
FormInput,
|
|
10479
|
+
{
|
|
10480
|
+
name: "city",
|
|
10481
|
+
label: "City",
|
|
10482
|
+
placeholder: "Enter city"
|
|
10483
|
+
}
|
|
10484
|
+
),
|
|
10485
|
+
/* @__PURE__ */ jsx(
|
|
10486
|
+
FormInput,
|
|
10487
|
+
{
|
|
10488
|
+
name: "state",
|
|
10489
|
+
label: "State",
|
|
10490
|
+
placeholder: "Enter state"
|
|
10491
|
+
}
|
|
10492
|
+
),
|
|
10493
|
+
/* @__PURE__ */ jsx(
|
|
10494
|
+
FormInput,
|
|
10495
|
+
{
|
|
10496
|
+
name: "postalCode",
|
|
10497
|
+
label: "Postal Code",
|
|
10498
|
+
placeholder: "Enter postal code"
|
|
10499
|
+
}
|
|
10500
|
+
),
|
|
10501
|
+
/* @__PURE__ */ jsx(
|
|
10502
|
+
FormInput,
|
|
10503
|
+
{
|
|
10504
|
+
name: "country",
|
|
10505
|
+
label: "Country",
|
|
10506
|
+
placeholder: "Enter country"
|
|
10507
|
+
}
|
|
10508
|
+
)
|
|
10509
|
+
] }),
|
|
10510
|
+
/* @__PURE__ */ jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Integration" }),
|
|
10511
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
10512
|
+
/* @__PURE__ */ jsx(
|
|
10513
|
+
FormInput,
|
|
10514
|
+
{
|
|
10515
|
+
name: "externalId",
|
|
10516
|
+
label: "External ID",
|
|
10517
|
+
placeholder: "UUID",
|
|
10518
|
+
hint: "ID from external system",
|
|
10519
|
+
disabled: true
|
|
10520
|
+
}
|
|
10521
|
+
),
|
|
10522
|
+
/* @__PURE__ */ jsx(
|
|
10523
|
+
FormInput,
|
|
10524
|
+
{
|
|
10525
|
+
name: "productId",
|
|
10526
|
+
label: "Product ID",
|
|
10527
|
+
placeholder: "Product ID",
|
|
10528
|
+
disabled: true
|
|
10529
|
+
}
|
|
10530
|
+
)
|
|
10531
|
+
] })
|
|
10532
|
+
] }) });
|
|
10533
|
+
const formValues = form.watch();
|
|
10534
|
+
const viewContent = /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
10535
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
10536
|
+
/* @__PURE__ */ jsx(InfoField, { label: "First Name", value: formValues?.firstName || "-", layout: "horizontal" }),
|
|
10537
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Last Name", value: formValues?.lastName || "-", layout: "horizontal" })
|
|
10538
|
+
] }),
|
|
10539
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
10540
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Date of Birth", value: formValues?.dateOfBirth || "-", layout: "horizontal" }),
|
|
10541
|
+
/* @__PURE__ */ jsx(InfoField, { label: "ID Type", value: formValues?.idType || "-", layout: "horizontal" })
|
|
10542
|
+
] }),
|
|
10543
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
10544
|
+
/* @__PURE__ */ jsx(InfoField, { label: "SSN/ITIN", value: formValues?.ssn || "-", layout: "horizontal" }),
|
|
10545
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Email", value: formValues?.email || "-", layout: "horizontal" })
|
|
10546
|
+
] }),
|
|
10547
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-4", children: /* @__PURE__ */ jsx(InfoField, { label: "Mobile Phone", value: formValues?.mobilePhone || "-", layout: "horizontal" }) }),
|
|
10548
|
+
/* @__PURE__ */ jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Address" }),
|
|
10549
|
+
/* @__PURE__ */ jsx(
|
|
10550
|
+
InfoField,
|
|
10551
|
+
{
|
|
10552
|
+
label: "Address",
|
|
10553
|
+
value: formValues?.streetAddress ? `${formValues.streetAddress}${formValues.apartment ? ", " + formValues.apartment : ""}, ${formValues.city}, ${formValues.state} ${formValues.postalCode}, ${formValues.country}` : "-",
|
|
10554
|
+
layout: "horizontal"
|
|
10555
|
+
}
|
|
10556
|
+
),
|
|
10557
|
+
/* @__PURE__ */ jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Integration" }),
|
|
10558
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
10559
|
+
/* @__PURE__ */ jsx(InfoField, { label: "External ID", value: formValues?.externalId || "-", layout: "horizontal" }),
|
|
10560
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Product ID", value: formValues?.productId || "-", layout: "horizontal" })
|
|
10561
|
+
] })
|
|
10562
|
+
] });
|
|
10563
|
+
return /* @__PURE__ */ jsx(
|
|
10564
|
+
EditableFormCard,
|
|
10565
|
+
{
|
|
10566
|
+
title: "Individual Profile",
|
|
10567
|
+
variant: "subtle",
|
|
10568
|
+
className,
|
|
10569
|
+
isEditing: form.isEditing,
|
|
10570
|
+
onToggleEdit: form.handleToggleEdit,
|
|
10571
|
+
onSave: form.handleSave,
|
|
10572
|
+
onCancel: form.handleCancel,
|
|
10573
|
+
editContent,
|
|
10574
|
+
viewContent
|
|
10575
|
+
}
|
|
10576
|
+
);
|
|
10577
|
+
};
|
|
10578
|
+
var mockIndividualTimeline = [
|
|
10579
|
+
{
|
|
10580
|
+
id: "1",
|
|
10581
|
+
action: "Individual Created",
|
|
10582
|
+
user: "admin",
|
|
10583
|
+
details: "Initial individual setup",
|
|
10584
|
+
status: "Active",
|
|
10585
|
+
timestamp: "2024-01-15 10:30:00"
|
|
10586
|
+
},
|
|
10587
|
+
{
|
|
10588
|
+
id: "2",
|
|
10589
|
+
action: "Identity Documents Uploaded",
|
|
10590
|
+
user: "John Smith",
|
|
10591
|
+
details: "Driver License, Proof of Address",
|
|
10592
|
+
timestamp: "2024-01-18 11:20:00"
|
|
10593
|
+
},
|
|
10594
|
+
{
|
|
10595
|
+
id: "3",
|
|
10596
|
+
action: "CIP Verification Completed",
|
|
10597
|
+
user: "Compliance Team",
|
|
10598
|
+
details: "Identity verification check",
|
|
10599
|
+
status: "Verified",
|
|
10600
|
+
timestamp: "2024-01-20 14:30:00"
|
|
10601
|
+
},
|
|
10602
|
+
{
|
|
10603
|
+
id: "4",
|
|
10604
|
+
action: "OFAC Check Completed",
|
|
10605
|
+
user: "System",
|
|
10606
|
+
details: "Automated compliance check",
|
|
10607
|
+
status: "Verified",
|
|
10608
|
+
timestamp: "2024-01-20 14:45:00"
|
|
10609
|
+
}
|
|
10610
|
+
];
|
|
10611
|
+
var IndividualStatusCard = ({ isEditing, onToggleEdit, className }) => {
|
|
10612
|
+
const getIcon = (action) => {
|
|
10613
|
+
if (action.includes("Created")) return /* @__PURE__ */ jsx(Circle, { className: "h-4 w-4" });
|
|
10614
|
+
if (action.includes("Assigned")) return /* @__PURE__ */ jsx(UserPlus, { className: "h-4 w-4" });
|
|
10615
|
+
if (action.includes("Updated") || action.includes("Modified") || action.includes("Check") || action.includes("Uploaded")) return /* @__PURE__ */ jsx(Edit, { className: "h-4 w-4" });
|
|
10616
|
+
if (action.includes("Completed") || action.includes("Verified")) return /* @__PURE__ */ jsx(CheckCircle, { className: "h-4 w-4" });
|
|
10617
|
+
return /* @__PURE__ */ jsx(Circle, { className: "h-4 w-4" });
|
|
10618
|
+
};
|
|
10619
|
+
const getStatusColor2 = (status) => {
|
|
10620
|
+
switch (status) {
|
|
10621
|
+
case "Active":
|
|
10622
|
+
case "Verified":
|
|
10623
|
+
return "text-success";
|
|
10624
|
+
case "Pending":
|
|
10625
|
+
return "text-warning";
|
|
10626
|
+
default:
|
|
10627
|
+
return "text-muted-foreground";
|
|
8505
10628
|
}
|
|
8506
|
-
|
|
8507
|
-
};
|
|
8508
|
-
var Create_default = CreateBusiness;
|
|
8509
|
-
var Cases = () => {
|
|
10629
|
+
};
|
|
8510
10630
|
return /* @__PURE__ */ jsx(
|
|
8511
|
-
|
|
10631
|
+
FormCard,
|
|
8512
10632
|
{
|
|
8513
|
-
title: "
|
|
8514
|
-
|
|
8515
|
-
children: /* @__PURE__ */ jsx("div", { className: "
|
|
10633
|
+
title: "Timeline",
|
|
10634
|
+
className,
|
|
10635
|
+
children: /* @__PURE__ */ jsx("div", { className: "space-y-3", children: mockIndividualTimeline.map((event, index) => /* @__PURE__ */ jsxs("div", { className: "relative pl-6 pb-3", children: [
|
|
10636
|
+
index !== mockIndividualTimeline.length - 1 && /* @__PURE__ */ jsx("div", { className: "absolute left-[7px] top-5 bottom-0 w-[2px] bg-border" }),
|
|
10637
|
+
/* @__PURE__ */ jsx("div", { className: cn(
|
|
10638
|
+
"absolute left-0 top-0 flex-none",
|
|
10639
|
+
getStatusColor2(event.status)
|
|
10640
|
+
), children: /* @__PURE__ */ jsx("div", { className: "h-4 w-4", children: getIcon(event.action) }) }),
|
|
10641
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-0.5", children: [
|
|
10642
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-foreground", children: event.action }),
|
|
10643
|
+
/* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
10644
|
+
"by ",
|
|
10645
|
+
event.user
|
|
10646
|
+
] }),
|
|
10647
|
+
event.details && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: event.details }),
|
|
10648
|
+
event.status && /* @__PURE__ */ jsxs("p", { className: cn("text-xs font-medium", getStatusColor2(event.status)), children: [
|
|
10649
|
+
"Status: ",
|
|
10650
|
+
event.status
|
|
10651
|
+
] }),
|
|
10652
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground/70 pt-0.5", children: event.timestamp })
|
|
10653
|
+
] })
|
|
10654
|
+
] }, event.id)) })
|
|
8516
10655
|
}
|
|
8517
10656
|
);
|
|
8518
10657
|
};
|
|
8519
|
-
var
|
|
8520
|
-
|
|
8521
|
-
const [
|
|
8522
|
-
const
|
|
8523
|
-
|
|
10658
|
+
var IndividualDetail = () => {
|
|
10659
|
+
const { id } = useParams();
|
|
10660
|
+
const [editingCards, setEditingCards] = useState({});
|
|
10661
|
+
const [status, setStatus] = useState(mockIndividualData.status);
|
|
10662
|
+
const toggleEdit = (cardKey) => {
|
|
10663
|
+
setEditingCards((prev) => ({
|
|
10664
|
+
...prev,
|
|
10665
|
+
[cardKey]: !prev[cardKey]
|
|
10666
|
+
}));
|
|
8524
10667
|
};
|
|
8525
|
-
const
|
|
8526
|
-
|
|
10668
|
+
const handleStatusChange = (newValue) => {
|
|
10669
|
+
setStatus(newValue);
|
|
10670
|
+
console.log("Status changed to:", newValue);
|
|
8527
10671
|
};
|
|
10672
|
+
const mockExternalAccounts = [
|
|
10673
|
+
{
|
|
10674
|
+
id: "1",
|
|
10675
|
+
bankName: "Chase Bank",
|
|
10676
|
+
accountType: "Checking",
|
|
10677
|
+
accountNumber: "1234",
|
|
10678
|
+
status: "ACTIVE"
|
|
10679
|
+
},
|
|
10680
|
+
{
|
|
10681
|
+
id: "2",
|
|
10682
|
+
bankName: "Bank of America",
|
|
10683
|
+
accountType: "Savings",
|
|
10684
|
+
accountNumber: "5678",
|
|
10685
|
+
status: "ACTIVE"
|
|
10686
|
+
}
|
|
10687
|
+
];
|
|
10688
|
+
const mockDocs = [
|
|
10689
|
+
{
|
|
10690
|
+
id: "1",
|
|
10691
|
+
name: "Driver License",
|
|
10692
|
+
type: "Identity Document",
|
|
10693
|
+
uploadedAt: "2024-01-15"
|
|
10694
|
+
},
|
|
10695
|
+
{
|
|
10696
|
+
id: "2",
|
|
10697
|
+
name: "Proof of Address",
|
|
10698
|
+
type: "Address Verification",
|
|
10699
|
+
uploadedAt: "2024-01-15"
|
|
10700
|
+
},
|
|
10701
|
+
{
|
|
10702
|
+
id: "3",
|
|
10703
|
+
name: "SSN Card",
|
|
10704
|
+
type: "Tax Document",
|
|
10705
|
+
uploadedAt: "2024-01-15"
|
|
10706
|
+
}
|
|
10707
|
+
];
|
|
8528
10708
|
return /* @__PURE__ */ jsx(
|
|
8529
10709
|
PageLayout,
|
|
8530
10710
|
{
|
|
8531
|
-
title: "
|
|
8532
|
-
|
|
10711
|
+
title: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
10712
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
10713
|
+
mockIndividualData.firstName,
|
|
10714
|
+
" ",
|
|
10715
|
+
mockIndividualData.lastName
|
|
10716
|
+
] }),
|
|
10717
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
10718
|
+
/* @__PURE__ */ jsx(
|
|
10719
|
+
EditableInfoField,
|
|
10720
|
+
{
|
|
10721
|
+
label: "Status",
|
|
10722
|
+
value: status,
|
|
10723
|
+
onChange: handleStatusChange,
|
|
10724
|
+
options: [
|
|
10725
|
+
{ value: "active", label: "Active" },
|
|
10726
|
+
{ value: "pending", label: "Pending" },
|
|
10727
|
+
{ value: "rejected", label: "Rejected" },
|
|
10728
|
+
{ value: "suspended", label: "Suspended" }
|
|
10729
|
+
],
|
|
10730
|
+
renderValue: (value) => /* @__PURE__ */ jsx(StatusBadge, { status: value })
|
|
10731
|
+
}
|
|
10732
|
+
),
|
|
10733
|
+
/* @__PURE__ */ jsx(CIPStatusBadge, { status: mockIndividualData.cipStatus }),
|
|
10734
|
+
/* @__PURE__ */ jsx(EntityTypeBadge, { type: "Individual" })
|
|
10735
|
+
] })
|
|
10736
|
+
] }),
|
|
10737
|
+
description: `Individual ID: ${id || mockIndividualData.id}`,
|
|
8533
10738
|
actions: [
|
|
8534
|
-
{
|
|
8535
|
-
|
|
8536
|
-
|
|
10739
|
+
{
|
|
10740
|
+
label: "View Account",
|
|
10741
|
+
variant: "outline",
|
|
10742
|
+
onClick: () => console.log("View Account")
|
|
10743
|
+
},
|
|
10744
|
+
{
|
|
10745
|
+
label: "Add as Counterparty",
|
|
10746
|
+
variant: "default",
|
|
10747
|
+
onClick: () => console.log("Add as Counterparty")
|
|
10748
|
+
}
|
|
8537
10749
|
],
|
|
8538
|
-
|
|
8539
|
-
|
|
8540
|
-
/* @__PURE__ */
|
|
10750
|
+
maxWidth: "full",
|
|
10751
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-4", children: [
|
|
10752
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-4", children: [
|
|
10753
|
+
/* @__PURE__ */ jsx(
|
|
10754
|
+
IndividualProfileCard,
|
|
10755
|
+
{
|
|
10756
|
+
isEditing: editingCards["profile"] || false,
|
|
10757
|
+
onToggleEdit: () => toggleEdit("profile")
|
|
10758
|
+
}
|
|
10759
|
+
),
|
|
10760
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
10761
|
+
/* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
10762
|
+
/* @__PURE__ */ jsx(CardTitle, { children: "External Accounts" }),
|
|
10763
|
+
/* @__PURE__ */ jsxs(Button, { size: "sm", variant: "ghost", children: [
|
|
10764
|
+
/* @__PURE__ */ jsx(Plus, { className: "h-4 w-4 mr-1" }),
|
|
10765
|
+
"Account"
|
|
10766
|
+
] })
|
|
10767
|
+
] }),
|
|
10768
|
+
/* @__PURE__ */ jsx(CardContent, { children: mockExternalAccounts.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
10769
|
+
/* @__PURE__ */ jsx(Wallet, { className: "h-5 w-5 opacity-50" }),
|
|
10770
|
+
/* @__PURE__ */ jsx("p", { children: "No external accounts found" })
|
|
10771
|
+
] }) : /* @__PURE__ */ jsx(
|
|
10772
|
+
DataTable,
|
|
10773
|
+
{
|
|
10774
|
+
columns: [
|
|
10775
|
+
{
|
|
10776
|
+
key: "bankName",
|
|
10777
|
+
title: "Bank Name",
|
|
10778
|
+
sortable: true,
|
|
10779
|
+
width: "40%"
|
|
10780
|
+
},
|
|
10781
|
+
{
|
|
10782
|
+
key: "accountType",
|
|
10783
|
+
title: "Account Type",
|
|
10784
|
+
sortable: true,
|
|
10785
|
+
width: "30%"
|
|
10786
|
+
},
|
|
10787
|
+
{
|
|
10788
|
+
key: "accountNumber",
|
|
10789
|
+
title: "Account Number",
|
|
10790
|
+
sortable: true,
|
|
10791
|
+
width: "20%",
|
|
10792
|
+
render: (value) => `\u2022\u2022\u2022\u2022 ${value}`
|
|
10793
|
+
},
|
|
10794
|
+
{
|
|
10795
|
+
key: "status",
|
|
10796
|
+
title: "Status",
|
|
10797
|
+
sortable: true,
|
|
10798
|
+
width: "10%",
|
|
10799
|
+
align: "right",
|
|
10800
|
+
render: (value) => /* @__PURE__ */ jsx(StatusBadge, { status: value })
|
|
10801
|
+
}
|
|
10802
|
+
],
|
|
10803
|
+
data: mockExternalAccounts
|
|
10804
|
+
}
|
|
10805
|
+
) })
|
|
10806
|
+
] }),
|
|
10807
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
10808
|
+
/* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
10809
|
+
/* @__PURE__ */ jsx(CardTitle, { children: "Documents" }),
|
|
10810
|
+
/* @__PURE__ */ jsxs(Button, { size: "sm", variant: "ghost", children: [
|
|
10811
|
+
/* @__PURE__ */ jsx(Upload, { className: "h-4 w-4 mr-1" }),
|
|
10812
|
+
"Upload"
|
|
10813
|
+
] })
|
|
10814
|
+
] }),
|
|
10815
|
+
/* @__PURE__ */ jsx(CardContent, { children: mockDocs.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
10816
|
+
/* @__PURE__ */ jsx(FileText, { className: "h-5 w-5 opacity-50" }),
|
|
10817
|
+
/* @__PURE__ */ jsx("p", { children: "No documents found" })
|
|
10818
|
+
] }) : /* @__PURE__ */ jsx("div", { className: "space-y-2", children: mockDocs.map((doc) => /* @__PURE__ */ jsxs(
|
|
10819
|
+
"div",
|
|
10820
|
+
{
|
|
10821
|
+
className: "flex items-center justify-between p-3 border rounded-lg hover:bg-accent/50 transition-colors",
|
|
10822
|
+
children: [
|
|
10823
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
10824
|
+
/* @__PURE__ */ jsx(FileText, { className: "h-5 w-5 text-muted-foreground" }),
|
|
10825
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
10826
|
+
/* @__PURE__ */ jsx("p", { className: "font-medium text-sm", children: doc.name }),
|
|
10827
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: doc.type })
|
|
10828
|
+
] })
|
|
10829
|
+
] }),
|
|
10830
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
10831
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: new Date(doc.uploadedAt).toLocaleDateString() }),
|
|
10832
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ jsx(Eye, { className: "h-4 w-4" }) }),
|
|
10833
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ jsx(Download, { className: "h-4 w-4" }) })
|
|
10834
|
+
] })
|
|
10835
|
+
]
|
|
10836
|
+
},
|
|
10837
|
+
doc.id
|
|
10838
|
+
)) }) })
|
|
10839
|
+
] })
|
|
10840
|
+
] }),
|
|
10841
|
+
/* @__PURE__ */ jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsx(IndividualStatusCard, { isEditing: false, onToggleEdit: () => {
|
|
10842
|
+
} }) })
|
|
8541
10843
|
] })
|
|
8542
10844
|
}
|
|
8543
10845
|
);
|
|
8544
10846
|
};
|
|
8545
|
-
var
|
|
8546
|
-
var
|
|
8547
|
-
const
|
|
8548
|
-
const
|
|
10847
|
+
var IndividualDetail_default = IndividualDetail;
|
|
10848
|
+
var CreateIndividual = () => {
|
|
10849
|
+
const navigate = useNavigate();
|
|
10850
|
+
const form = useFormWithEditState({
|
|
10851
|
+
schema: individualProfileSchema,
|
|
10852
|
+
defaultValues: {
|
|
10853
|
+
firstName: "",
|
|
10854
|
+
lastName: "",
|
|
10855
|
+
dateOfBirth: "",
|
|
10856
|
+
idType: "SSN",
|
|
10857
|
+
ssn: "",
|
|
10858
|
+
email: "",
|
|
10859
|
+
mobilePhone: "",
|
|
10860
|
+
streetAddress: "",
|
|
10861
|
+
apartment: "",
|
|
10862
|
+
city: "",
|
|
10863
|
+
state: "",
|
|
10864
|
+
postalCode: "",
|
|
10865
|
+
country: "United States",
|
|
10866
|
+
externalId: "",
|
|
10867
|
+
productId: ""
|
|
10868
|
+
},
|
|
10869
|
+
initialEditing: true,
|
|
10870
|
+
onSave: async (data) => {
|
|
10871
|
+
console.log("Creating individual:", data);
|
|
10872
|
+
navigate("/individual");
|
|
10873
|
+
}
|
|
10874
|
+
});
|
|
8549
10875
|
return /* @__PURE__ */ jsx(
|
|
8550
10876
|
PageLayout,
|
|
8551
10877
|
{
|
|
8552
|
-
title: "
|
|
8553
|
-
description: "
|
|
8554
|
-
actions:
|
|
8555
|
-
{
|
|
8556
|
-
|
|
8557
|
-
|
|
8558
|
-
|
|
8559
|
-
|
|
8560
|
-
|
|
8561
|
-
|
|
8562
|
-
/* @__PURE__ */ jsx(Separator, { className: "my-8" }),
|
|
10878
|
+
title: "Create Individual",
|
|
10879
|
+
description: "Add a new individual account",
|
|
10880
|
+
actions: [
|
|
10881
|
+
{
|
|
10882
|
+
label: "Back",
|
|
10883
|
+
variant: "outline",
|
|
10884
|
+
onClick: () => navigate("/individual")
|
|
10885
|
+
}
|
|
10886
|
+
],
|
|
10887
|
+
children: /* @__PURE__ */ jsx(FormProvider, { form, children: /* @__PURE__ */ jsxs("form", { onSubmit: form.handleSubmit(form.handleSave), className: "space-y-6", children: [
|
|
8563
10888
|
/* @__PURE__ */ jsx(
|
|
8564
10889
|
FormCard,
|
|
8565
10890
|
{
|
|
8566
|
-
title: "
|
|
8567
|
-
|
|
8568
|
-
headerActions: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: isEditing ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10891
|
+
title: "Personal Information",
|
|
10892
|
+
children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
8569
10893
|
/* @__PURE__ */ jsx(
|
|
8570
|
-
|
|
10894
|
+
FormInput,
|
|
10895
|
+
{
|
|
10896
|
+
name: "firstName",
|
|
10897
|
+
label: "First Name",
|
|
10898
|
+
placeholder: "Enter first name",
|
|
10899
|
+
required: true
|
|
10900
|
+
}
|
|
10901
|
+
),
|
|
10902
|
+
/* @__PURE__ */ jsx(
|
|
10903
|
+
FormInput,
|
|
10904
|
+
{
|
|
10905
|
+
name: "lastName",
|
|
10906
|
+
label: "Last Name",
|
|
10907
|
+
placeholder: "Enter last name",
|
|
10908
|
+
required: true
|
|
10909
|
+
}
|
|
10910
|
+
),
|
|
10911
|
+
/* @__PURE__ */ jsx(
|
|
10912
|
+
FormInput,
|
|
10913
|
+
{
|
|
10914
|
+
name: "dateOfBirth",
|
|
10915
|
+
label: "Date of Birth",
|
|
10916
|
+
type: "date",
|
|
10917
|
+
placeholder: "Select date of birth"
|
|
10918
|
+
}
|
|
10919
|
+
),
|
|
10920
|
+
/* @__PURE__ */ jsx(
|
|
10921
|
+
FormSelect,
|
|
8571
10922
|
{
|
|
8572
|
-
|
|
8573
|
-
|
|
10923
|
+
name: "idType",
|
|
10924
|
+
label: "ID Type",
|
|
10925
|
+
placeholder: "Select ID type",
|
|
8574
10926
|
options: [
|
|
8575
|
-
{ value: "
|
|
8576
|
-
{ value: "
|
|
8577
|
-
|
|
8578
|
-
|
|
10927
|
+
{ value: "SSN", label: "SSN" },
|
|
10928
|
+
{ value: "ITIN", label: "ITIN" },
|
|
10929
|
+
{ value: "Passport", label: "Passport" },
|
|
10930
|
+
{ value: "Driver License", label: "Driver License" }
|
|
10931
|
+
]
|
|
8579
10932
|
}
|
|
8580
10933
|
),
|
|
8581
|
-
/* @__PURE__ */ jsx(
|
|
8582
|
-
|
|
8583
|
-
|
|
8584
|
-
|
|
8585
|
-
|
|
8586
|
-
|
|
8587
|
-
|
|
8588
|
-
|
|
8589
|
-
|
|
10934
|
+
/* @__PURE__ */ jsx(
|
|
10935
|
+
FormInput,
|
|
10936
|
+
{
|
|
10937
|
+
name: "ssn",
|
|
10938
|
+
label: "SSN/ITIN",
|
|
10939
|
+
placeholder: "Enter SSN or ITIN",
|
|
10940
|
+
hint: "Enter full SSN or ITIN"
|
|
10941
|
+
}
|
|
10942
|
+
),
|
|
10943
|
+
/* @__PURE__ */ jsx(
|
|
10944
|
+
FormInput,
|
|
10945
|
+
{
|
|
10946
|
+
name: "email",
|
|
10947
|
+
label: "Email",
|
|
10948
|
+
type: "email",
|
|
10949
|
+
placeholder: "Enter email address"
|
|
10950
|
+
}
|
|
10951
|
+
),
|
|
10952
|
+
/* @__PURE__ */ jsx(
|
|
10953
|
+
FormInput,
|
|
10954
|
+
{
|
|
10955
|
+
name: "mobilePhone",
|
|
10956
|
+
label: "Mobile Phone",
|
|
10957
|
+
placeholder: "Enter mobile phone"
|
|
10958
|
+
}
|
|
10959
|
+
),
|
|
10960
|
+
/* @__PURE__ */ jsx(
|
|
10961
|
+
FormInput,
|
|
10962
|
+
{
|
|
10963
|
+
name: "externalId",
|
|
10964
|
+
label: "External ID",
|
|
10965
|
+
placeholder: "Optional ID from external system",
|
|
10966
|
+
hint: "Optional ID from external system"
|
|
10967
|
+
}
|
|
10968
|
+
),
|
|
10969
|
+
/* @__PURE__ */ jsx(
|
|
10970
|
+
FormInput,
|
|
10971
|
+
{
|
|
10972
|
+
name: "productId",
|
|
10973
|
+
label: "Product ID",
|
|
10974
|
+
placeholder: "Enter product ID"
|
|
10975
|
+
}
|
|
10976
|
+
)
|
|
8590
10977
|
] })
|
|
8591
10978
|
}
|
|
8592
|
-
)
|
|
8593
|
-
|
|
8594
|
-
|
|
8595
|
-
|
|
8596
|
-
|
|
8597
|
-
|
|
8598
|
-
|
|
8599
|
-
|
|
8600
|
-
|
|
8601
|
-
|
|
8602
|
-
|
|
8603
|
-
|
|
8604
|
-
|
|
8605
|
-
|
|
8606
|
-
|
|
8607
|
-
|
|
8608
|
-
|
|
8609
|
-
|
|
8610
|
-
|
|
8611
|
-
|
|
8612
|
-
|
|
8613
|
-
|
|
8614
|
-
|
|
8615
|
-
|
|
8616
|
-
|
|
8617
|
-
|
|
8618
|
-
|
|
8619
|
-
|
|
8620
|
-
|
|
8621
|
-
|
|
8622
|
-
|
|
8623
|
-
|
|
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
|
-
|
|
10979
|
+
),
|
|
10980
|
+
/* @__PURE__ */ jsxs(
|
|
10981
|
+
FormCard,
|
|
10982
|
+
{
|
|
10983
|
+
title: "Address Information",
|
|
10984
|
+
children: [
|
|
10985
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-4", children: [
|
|
10986
|
+
/* @__PURE__ */ jsx(
|
|
10987
|
+
FormInput,
|
|
10988
|
+
{
|
|
10989
|
+
name: "streetAddress",
|
|
10990
|
+
label: "Street Address",
|
|
10991
|
+
placeholder: "Enter street address"
|
|
10992
|
+
}
|
|
10993
|
+
),
|
|
10994
|
+
/* @__PURE__ */ jsx(
|
|
10995
|
+
FormInput,
|
|
10996
|
+
{
|
|
10997
|
+
name: "apartment",
|
|
10998
|
+
label: "Apartment/Unit",
|
|
10999
|
+
placeholder: "Enter apartment or unit number"
|
|
11000
|
+
}
|
|
11001
|
+
)
|
|
11002
|
+
] }),
|
|
11003
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6 mt-4", children: [
|
|
11004
|
+
/* @__PURE__ */ jsx(
|
|
11005
|
+
FormInput,
|
|
11006
|
+
{
|
|
11007
|
+
name: "city",
|
|
11008
|
+
label: "City",
|
|
11009
|
+
placeholder: "Enter city"
|
|
11010
|
+
}
|
|
11011
|
+
),
|
|
11012
|
+
/* @__PURE__ */ jsx(
|
|
11013
|
+
FormInput,
|
|
11014
|
+
{
|
|
11015
|
+
name: "state",
|
|
11016
|
+
label: "State",
|
|
11017
|
+
placeholder: "Enter state"
|
|
11018
|
+
}
|
|
11019
|
+
),
|
|
11020
|
+
/* @__PURE__ */ jsx(
|
|
11021
|
+
FormInput,
|
|
11022
|
+
{
|
|
11023
|
+
name: "postalCode",
|
|
11024
|
+
label: "Postal Code",
|
|
11025
|
+
placeholder: "Enter postal code"
|
|
11026
|
+
}
|
|
11027
|
+
),
|
|
11028
|
+
/* @__PURE__ */ jsx(
|
|
11029
|
+
FormInput,
|
|
11030
|
+
{
|
|
11031
|
+
name: "country",
|
|
11032
|
+
label: "Country",
|
|
11033
|
+
placeholder: "Enter country"
|
|
11034
|
+
}
|
|
11035
|
+
)
|
|
11036
|
+
] })
|
|
11037
|
+
]
|
|
11038
|
+
}
|
|
11039
|
+
),
|
|
11040
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-3 pt-4 border-t", children: [
|
|
11041
|
+
/* @__PURE__ */ jsx(
|
|
11042
|
+
Button,
|
|
11043
|
+
{
|
|
11044
|
+
type: "button",
|
|
11045
|
+
variant: "outline",
|
|
11046
|
+
onClick: () => navigate("/individual"),
|
|
11047
|
+
children: "Cancel"
|
|
11048
|
+
}
|
|
11049
|
+
),
|
|
11050
|
+
/* @__PURE__ */ jsx(
|
|
11051
|
+
Button,
|
|
11052
|
+
{
|
|
11053
|
+
type: "submit",
|
|
11054
|
+
disabled: !form.isFormValid || form.isLoading,
|
|
11055
|
+
children: form.isLoading ? "Creating..." : "Create Individual"
|
|
11056
|
+
}
|
|
11057
|
+
)
|
|
11058
|
+
] })
|
|
11059
|
+
] }) })
|
|
8672
11060
|
}
|
|
8673
11061
|
);
|
|
8674
11062
|
};
|
|
8675
|
-
var
|
|
11063
|
+
var Create_default3 = CreateIndividual;
|
|
8676
11064
|
var NotFound = () => {
|
|
8677
11065
|
const location = useLocation();
|
|
8678
11066
|
useEffect(() => {
|
|
@@ -8713,7 +11101,12 @@ function Statement() {
|
|
|
8713
11101
|
setProgramsError(null);
|
|
8714
11102
|
try {
|
|
8715
11103
|
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
8716
|
-
|
|
11104
|
+
throw new Error("Network connection timeout - Unable to reach program service");
|
|
11105
|
+
const data = mockPrograms;
|
|
11106
|
+
if (typeof data === "string") {
|
|
11107
|
+
throw new Error(data);
|
|
11108
|
+
}
|
|
11109
|
+
setPrograms(data);
|
|
8717
11110
|
} catch (error) {
|
|
8718
11111
|
const errorMessage = error instanceof Error ? error.message : "Failed to load programs";
|
|
8719
11112
|
setProgramsError(errorMessage);
|
|
@@ -8732,7 +11125,11 @@ function Statement() {
|
|
|
8732
11125
|
setProductsError(null);
|
|
8733
11126
|
try {
|
|
8734
11127
|
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
8735
|
-
|
|
11128
|
+
const data = mockProducts;
|
|
11129
|
+
if (typeof data === "string") {
|
|
11130
|
+
throw new Error(data);
|
|
11131
|
+
}
|
|
11132
|
+
setProducts(data);
|
|
8736
11133
|
} catch (error) {
|
|
8737
11134
|
const errorMessage = error instanceof Error ? error.message : "Failed to load products";
|
|
8738
11135
|
setProductsError(errorMessage);
|
|
@@ -10238,6 +12635,6 @@ function UIKit() {
|
|
|
10238
12635
|
] }) }) });
|
|
10239
12636
|
}
|
|
10240
12637
|
|
|
10241
|
-
export { ACHBankCard, ACHBasicInfoCard, ACHDetailsSection, ACHTransferSection, AccountCard, AddressForm, AlertDetail_default as AlertDetail, AlertDetailRouter, AlertDocuments, AlertHeaderControls, AlertNotes, AlertTimeline, Alerts_default as Alerts, AppSidebar, Badge, BankAddressCard, BankingDetailsCard, BasicInfoCard, BasicInfoSection, BeneficiaryAddress, BeneficiaryCard, BeneficiaryDomesticWire, Breadcrumb, BusinessDetail_default as BusinessDetail, BusinessProfileCard, BusinessStatusCard, BusinessTypeBadge, Businesses_default as Businesses, Button, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Cases_default as Cases, Checkbox, ContactInfoCard, Container, ContextSection,
|
|
12638
|
+
export { ACHBankCard, ACHBasicInfoCard, ACHDetailsSection, ACHTransferSection, AccountCard, AddressForm, AlertDetail_default as AlertDetail, AlertDetailRouter, AlertDocuments, AlertHeaderControls, AlertNotes, AlertTimeline, Alerts_default as Alerts, AppSidebar, Badge, BankAddressCard, BankingDetailsCard, BasicInfoCard, BasicInfoSection, BeneficiaryAddress, BeneficiaryCard, BeneficiaryDomesticWire, Breadcrumb, BusinessDetail_default as BusinessDetail, BusinessProfileCard, BusinessStatusCard, BusinessTypeBadge, Businesses_default as Businesses, Button, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Cases_default as Cases, Checkbox, ContactInfoCard, Container, ContextSection, Counterparties_default as Counterparties, CounterpartyBasicInfo, CounterpartyDetail_default as CounterpartyDetail, CounterpartyProfileCard, CounterpartyRecordsCard, CounterpartyTypeBadge, Create_default as CreateBusiness, Create_default2 as CreateCounterparty, Create_default3 as CreateIndividual, Dashboard_default as Dashboard, DashboardDemo, DataGrid, DataTable, DetailPageLayout, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EditableFormCard, EditableInfoField, EnhancedInput, EnhancedSelect, EnhancedTextarea, EntityCard, FormCard, FormField, FormInput, FormProvider, FormSection, FormSelect, IndividualDetail_default as IndividualDetail, Individuals_default as Individuals, InfoField, IntermediaryCard, IntermediaryFI, IntermediaryFIAddress, JsonViewer, Label, ListPage, MainLayout, MetricCard, NewTransaction, NotFound_default as NotFound, OFACAlertView, OriginatorCard, OriginatorFI, OriginatorFIAddress, PageLayout, PatternLibrary, PaymentInformationSection, Popover, PopoverContent, PopoverTrigger, ReceiverCard, ResolveAlertDialog, ResponsiveGrid, ScrollArea, ScrollBar, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Stack, Statement, StatementHeader, StatementView, StatusBadge, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransactionDetail_default as TransactionDetail, TransactionHistory_default as TransactionHistory, TransactionTypeBadge, UIKit, UIKitShowcase, WireDetailsSection, WireTransferSection, badgeVariants, buttonVariants, cardVariants, inputVariants, reducer, textareaVariants, toast, useAlertDetail, useEditState, useFormWithEditState, useIsMobile, useSidebar, useToast };
|
|
10242
12639
|
//# sourceMappingURL=index.js.map
|
|
10243
12640
|
//# sourceMappingURL=index.js.map
|