braid-ui 1.0.27 → 1.0.29
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 +292 -332
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +135 -116
- package/dist/index.d.ts +135 -116
- package/dist/index.js +293 -333
- package/dist/index.js.map +1 -1
- package/package.json +4 -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, Shield, AlertCircle, RefreshCw, Landmark, Search, Repeat, Zap, Box, Settings, BarChart3, Key, Filter,
|
|
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, Filter, Heart, User, AlertTriangle, XCircle, CheckCircle, Clock, Ban, Loader2, Circle, ArrowDownRight, ArrowUpRight, ChevronLeft, Wallet, CheckCircle2, StickyNote, FileUp, RotateCcw, Send, PlayCircle, 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';
|
|
@@ -12,6 +12,7 @@ import { NavLink, useLocation, useParams, useNavigate, Link } from 'react-router
|
|
|
12
12
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
13
13
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
14
14
|
import { FormProvider as FormProvider$1, useFormContext, Controller, useForm } from 'react-hook-form';
|
|
15
|
+
import { get } from 'lodash';
|
|
15
16
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
16
17
|
import { z } from 'zod';
|
|
17
18
|
import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '@radix-ui/react-collapsible';
|
|
@@ -1826,7 +1827,7 @@ var FormInput = ({
|
|
|
1826
1827
|
...props
|
|
1827
1828
|
}) => {
|
|
1828
1829
|
const { control, formState } = useFormContext();
|
|
1829
|
-
const error = formState.errors
|
|
1830
|
+
const error = get(formState.errors, name)?.message;
|
|
1830
1831
|
return /* @__PURE__ */ jsx(
|
|
1831
1832
|
Controller,
|
|
1832
1833
|
{
|
|
@@ -1848,7 +1849,7 @@ var FormSelect = ({
|
|
|
1848
1849
|
...props
|
|
1849
1850
|
}) => {
|
|
1850
1851
|
const { control, formState } = useFormContext();
|
|
1851
|
-
const error = formState.errors
|
|
1852
|
+
const error = get(formState.errors, name)?.message;
|
|
1852
1853
|
return /* @__PURE__ */ jsx(
|
|
1853
1854
|
Controller,
|
|
1854
1855
|
{
|
|
@@ -3345,12 +3346,9 @@ var PageLayout = React15.forwardRef(
|
|
|
3345
3346
|
});
|
|
3346
3347
|
};
|
|
3347
3348
|
return /* @__PURE__ */ jsxs("div", { ref, className: "flex flex-col h-screen bg-gradient-subtle", children: [
|
|
3348
|
-
/* @__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(
|
|
3349
|
-
"container mx-auto px-4 py-6",
|
|
3350
|
-
maxWidthClasses[maxWidth]
|
|
3351
|
-
), children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4", children: [
|
|
3349
|
+
/* @__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("container mx-auto px-4 py-6", maxWidthClasses[maxWidth]), children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4", children: [
|
|
3352
3350
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-h-[2.5rem]", children: [
|
|
3353
|
-
/* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold text-foreground
|
|
3351
|
+
/* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold text-foreground", children: title }),
|
|
3354
3352
|
description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: description })
|
|
3355
3353
|
] }),
|
|
3356
3354
|
headerContent && /* @__PURE__ */ jsx("div", { className: "flex items-center", children: headerContent }),
|
|
@@ -3379,11 +3377,7 @@ var PageLayout = React15.forwardRef(
|
|
|
3379
3377
|
);
|
|
3380
3378
|
}) })
|
|
3381
3379
|
] }) }) }),
|
|
3382
|
-
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx("div", { className: cn(
|
|
3383
|
-
"container mx-auto px-4 py-6",
|
|
3384
|
-
maxWidthClasses[maxWidth],
|
|
3385
|
-
className
|
|
3386
|
-
), children: mode === "cards" && cards.length > 0 ? /* @__PURE__ */ jsx("div", { className: cn("grid gap-6", getGridClasses(gridCols, responsive)), children: cards.map((card) => {
|
|
3380
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx("div", { className: cn("container mx-auto px-4 py-6", maxWidthClasses[maxWidth], className), children: mode === "cards" && cards.length > 0 ? /* @__PURE__ */ jsx("div", { className: cn("grid gap-6", getGridClasses(gridCols, responsive)), children: cards.map((card) => {
|
|
3387
3381
|
const isEditing = editingCards.has(card.key);
|
|
3388
3382
|
const shouldExpand = card.expandOnEdit && isEditing;
|
|
3389
3383
|
return /* @__PURE__ */ jsx(
|
|
@@ -3393,14 +3387,7 @@ var PageLayout = React15.forwardRef(
|
|
|
3393
3387
|
"transition-all duration-300",
|
|
3394
3388
|
shouldExpand && (gridCols > 1 ? "col-span-full" : "")
|
|
3395
3389
|
),
|
|
3396
|
-
children: /* @__PURE__ */ jsx(
|
|
3397
|
-
card.component,
|
|
3398
|
-
{
|
|
3399
|
-
...card.props,
|
|
3400
|
-
isEditing,
|
|
3401
|
-
onToggleEdit: () => toggleEdit(card.key)
|
|
3402
|
-
}
|
|
3403
|
-
)
|
|
3390
|
+
children: /* @__PURE__ */ jsx(card.component, { ...card.props, isEditing, onToggleEdit: () => toggleEdit(card.key) })
|
|
3404
3391
|
},
|
|
3405
3392
|
card.key
|
|
3406
3393
|
);
|
|
@@ -3409,180 +3396,144 @@ var PageLayout = React15.forwardRef(
|
|
|
3409
3396
|
}
|
|
3410
3397
|
);
|
|
3411
3398
|
PageLayout.displayName = "PageLayout";
|
|
3412
|
-
var typeConfig = {
|
|
3413
|
-
corporation: {
|
|
3414
|
-
variant: "corporation",
|
|
3415
|
-
label: "Corporation",
|
|
3416
|
-
icon: Building
|
|
3417
|
-
},
|
|
3418
|
-
llc: {
|
|
3419
|
-
variant: "llc",
|
|
3420
|
-
label: "LLC",
|
|
3421
|
-
icon: Briefcase
|
|
3422
|
-
},
|
|
3423
|
-
partnership: {
|
|
3424
|
-
variant: "partnership",
|
|
3425
|
-
label: "Partnership",
|
|
3426
|
-
icon: Users
|
|
3427
|
-
},
|
|
3428
|
-
sole_proprietorship: {
|
|
3429
|
-
variant: "sole_proprietorship",
|
|
3430
|
-
label: "Sole Proprietorship",
|
|
3431
|
-
icon: User
|
|
3432
|
-
}
|
|
3433
|
-
};
|
|
3434
|
-
var BusinessTypeBadge = ({ type, className }) => {
|
|
3435
|
-
const config = typeConfig[type];
|
|
3436
|
-
const Icon2 = config.icon;
|
|
3437
|
-
return /* @__PURE__ */ jsxs(Badge, { variant: config.variant, className, children: [
|
|
3438
|
-
/* @__PURE__ */ jsx(Icon2, { className: "w-3 h-3 mr-1" }),
|
|
3439
|
-
config.label
|
|
3440
|
-
] });
|
|
3441
|
-
};
|
|
3442
3399
|
var BusinessForm = ({
|
|
3443
3400
|
form,
|
|
3444
3401
|
businessType,
|
|
3445
3402
|
onBusinessTypeChange,
|
|
3446
3403
|
onSubmit
|
|
3447
3404
|
}) => {
|
|
3448
|
-
return /* @__PURE__ */ jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "space-y-6", children: [
|
|
3405
|
+
return /* @__PURE__ */ jsx(FormProvider, { form, children: /* @__PURE__ */ jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "space-y-6", children: [
|
|
3449
3406
|
/* @__PURE__ */ jsxs(Card, { className: "p-6", children: [
|
|
3450
3407
|
/* @__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" }) }),
|
|
3451
3408
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
|
|
3452
3409
|
/* @__PURE__ */ jsx(
|
|
3453
|
-
|
|
3410
|
+
FormInput,
|
|
3454
3411
|
{
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3412
|
+
name: "name",
|
|
3413
|
+
label: "Business Name",
|
|
3414
|
+
placeholder: "Enter business name",
|
|
3415
|
+
required: true
|
|
3459
3416
|
}
|
|
3460
3417
|
),
|
|
3461
3418
|
/* @__PURE__ */ jsx(
|
|
3462
|
-
|
|
3419
|
+
FormInput,
|
|
3463
3420
|
{
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3421
|
+
name: "productId",
|
|
3422
|
+
label: "Product ID",
|
|
3423
|
+
placeholder: "Enter product ID",
|
|
3424
|
+
type: "number",
|
|
3425
|
+
required: true
|
|
3468
3426
|
}
|
|
3469
3427
|
),
|
|
3470
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
3471
|
-
/* @__PURE__ */ jsx(
|
|
3472
|
-
EnhancedSelect,
|
|
3473
|
-
{
|
|
3474
|
-
label: "Business Type",
|
|
3475
|
-
placeholder: "Select business type",
|
|
3476
|
-
value: businessType,
|
|
3477
|
-
onValueChange: onBusinessTypeChange,
|
|
3478
|
-
options: [
|
|
3479
|
-
{ value: "corporation", label: "Corporation" },
|
|
3480
|
-
{ value: "llc", label: "LLC" },
|
|
3481
|
-
{ value: "partnership", label: "Partnership" },
|
|
3482
|
-
{ value: "sole_proprietorship", label: "Sole Proprietorship" }
|
|
3483
|
-
]
|
|
3484
|
-
}
|
|
3485
|
-
),
|
|
3486
|
-
businessType && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3487
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: "Preview:" }),
|
|
3488
|
-
/* @__PURE__ */ jsx(BusinessTypeBadge, { type: businessType })
|
|
3489
|
-
] })
|
|
3490
|
-
] }),
|
|
3491
3428
|
/* @__PURE__ */ jsx(
|
|
3492
|
-
|
|
3429
|
+
FormSelect,
|
|
3493
3430
|
{
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3431
|
+
name: "businessIdType",
|
|
3432
|
+
label: "ID Number Type",
|
|
3433
|
+
placeholder: "Select ID type",
|
|
3434
|
+
options: [
|
|
3435
|
+
{ value: "EIN", label: "EIN" },
|
|
3436
|
+
{ value: "SSN", label: "SSN" },
|
|
3437
|
+
{ value: "TIN", label: "TIN" },
|
|
3438
|
+
{ value: "OTHER_ID", label: "Other ID" }
|
|
3439
|
+
]
|
|
3499
3440
|
}
|
|
3500
3441
|
),
|
|
3501
3442
|
/* @__PURE__ */ jsx(
|
|
3502
|
-
|
|
3443
|
+
FormInput,
|
|
3503
3444
|
{
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3445
|
+
name: "idNumber",
|
|
3446
|
+
label: "ID Number",
|
|
3447
|
+
placeholder: "Enter ID number",
|
|
3448
|
+
required: true
|
|
3508
3449
|
}
|
|
3509
3450
|
),
|
|
3510
3451
|
/* @__PURE__ */ jsx(
|
|
3511
|
-
|
|
3452
|
+
FormInput,
|
|
3512
3453
|
{
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3454
|
+
name: "dba",
|
|
3455
|
+
label: "DBA Name",
|
|
3456
|
+
placeholder: "Enter DBA name",
|
|
3457
|
+
hint: "Doing Business As name"
|
|
3516
3458
|
}
|
|
3517
3459
|
),
|
|
3518
3460
|
/* @__PURE__ */ jsx(
|
|
3519
|
-
|
|
3461
|
+
FormSelect,
|
|
3520
3462
|
{
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3463
|
+
name: "businessEntityType",
|
|
3464
|
+
label: "Business Entity Type",
|
|
3465
|
+
placeholder: "Select business type",
|
|
3466
|
+
options: [
|
|
3467
|
+
{ value: "SOLE_PROPRIETOR", label: "Sole Proprietor" },
|
|
3468
|
+
{ value: "LIMITED_LIABILITY_COMPANY", label: "Limited Liability Company (LLC)" },
|
|
3469
|
+
{ value: "CORPORATION", label: "S or C Corporation" },
|
|
3470
|
+
{ value: "GENERAL_PARTNERSHIP", label: "General Partnership" },
|
|
3471
|
+
{ value: "LIMITED_LIABILITY_PARTNERSHIP", label: "Limited Liability Partnership" },
|
|
3472
|
+
{ value: "NON_PROFIT", label: "Non-Profit Corporation" },
|
|
3473
|
+
{ value: "GOVERNMENT_ORGANIZATION", label: "Government Organization" },
|
|
3474
|
+
{ value: "PUBLICLY_TRADED_COMPANY", label: "Publicly Traded Company" },
|
|
3475
|
+
{ value: "TRUSTS", label: "Trusts" }
|
|
3476
|
+
]
|
|
3525
3477
|
}
|
|
3526
3478
|
),
|
|
3527
3479
|
/* @__PURE__ */ jsx(
|
|
3528
|
-
|
|
3480
|
+
FormInput,
|
|
3529
3481
|
{
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
...form.register("email")
|
|
3482
|
+
name: "incorporationState",
|
|
3483
|
+
label: "Incorporation State",
|
|
3484
|
+
placeholder: "Enter state"
|
|
3534
3485
|
}
|
|
3535
3486
|
),
|
|
3536
3487
|
/* @__PURE__ */ jsx(
|
|
3537
|
-
|
|
3488
|
+
FormInput,
|
|
3538
3489
|
{
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3490
|
+
name: "formationDate",
|
|
3491
|
+
label: "Formation Date",
|
|
3492
|
+
placeholder: "YYYY-MM-DD",
|
|
3493
|
+
type: "date"
|
|
3542
3494
|
}
|
|
3543
3495
|
),
|
|
3544
3496
|
/* @__PURE__ */ jsx(
|
|
3545
|
-
|
|
3497
|
+
FormInput,
|
|
3546
3498
|
{
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
...form.register("mcc")
|
|
3499
|
+
name: "website",
|
|
3500
|
+
label: "Website",
|
|
3501
|
+
placeholder: "https://www.business.com"
|
|
3551
3502
|
}
|
|
3552
3503
|
),
|
|
3553
3504
|
/* @__PURE__ */ jsx(
|
|
3554
|
-
|
|
3505
|
+
FormInput,
|
|
3555
3506
|
{
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3507
|
+
name: "mobilePhone",
|
|
3508
|
+
label: "Mobile Phone",
|
|
3509
|
+
placeholder: "+1 (555) 123-4567",
|
|
3510
|
+
hint: "Format: +1 (555) 123-4567"
|
|
3560
3511
|
}
|
|
3561
3512
|
),
|
|
3562
3513
|
/* @__PURE__ */ jsx(
|
|
3563
|
-
|
|
3514
|
+
FormInput,
|
|
3564
3515
|
{
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3516
|
+
name: "mcc",
|
|
3517
|
+
label: "MCC",
|
|
3518
|
+
placeholder: "1234",
|
|
3519
|
+
hint: "4-digit Merchant Category Code"
|
|
3569
3520
|
}
|
|
3570
3521
|
),
|
|
3571
3522
|
/* @__PURE__ */ jsx(
|
|
3572
|
-
|
|
3523
|
+
FormInput,
|
|
3573
3524
|
{
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3525
|
+
name: "naics",
|
|
3526
|
+
label: "NAICS",
|
|
3527
|
+
placeholder: "123456",
|
|
3528
|
+
hint: "6-digit industry classification"
|
|
3577
3529
|
}
|
|
3578
3530
|
),
|
|
3579
3531
|
/* @__PURE__ */ jsx(
|
|
3580
|
-
|
|
3532
|
+
FormInput,
|
|
3581
3533
|
{
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
...form.register("externalId")
|
|
3534
|
+
name: "achCompanyId",
|
|
3535
|
+
label: "ACH Company ID",
|
|
3536
|
+
placeholder: "Enter ACH company ID"
|
|
3586
3537
|
}
|
|
3587
3538
|
)
|
|
3588
3539
|
] })
|
|
@@ -3591,62 +3542,60 @@ var BusinessForm = ({
|
|
|
3591
3542
|
/* @__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" }) }),
|
|
3592
3543
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
|
|
3593
3544
|
/* @__PURE__ */ jsx(
|
|
3594
|
-
|
|
3545
|
+
FormInput,
|
|
3595
3546
|
{
|
|
3547
|
+
name: "address.line1",
|
|
3596
3548
|
label: "Street Address",
|
|
3597
|
-
placeholder: "Enter street address"
|
|
3598
|
-
required: true,
|
|
3599
|
-
...form.register("address.streetAddress")
|
|
3549
|
+
placeholder: "Enter street address"
|
|
3600
3550
|
}
|
|
3601
3551
|
),
|
|
3602
3552
|
/* @__PURE__ */ jsx(
|
|
3603
|
-
|
|
3553
|
+
FormInput,
|
|
3604
3554
|
{
|
|
3555
|
+
name: "address.line2",
|
|
3605
3556
|
label: "Apartment/Suite",
|
|
3606
|
-
placeholder: "Enter apartment or suite number"
|
|
3607
|
-
...form.register("address.apartment")
|
|
3557
|
+
placeholder: "Enter apartment or suite number"
|
|
3608
3558
|
}
|
|
3609
3559
|
),
|
|
3610
3560
|
/* @__PURE__ */ jsx(
|
|
3611
|
-
|
|
3561
|
+
FormInput,
|
|
3612
3562
|
{
|
|
3563
|
+
name: "address.city",
|
|
3613
3564
|
label: "City",
|
|
3614
|
-
placeholder: "Enter city"
|
|
3615
|
-
required: true,
|
|
3616
|
-
...form.register("address.city")
|
|
3565
|
+
placeholder: "Enter city"
|
|
3617
3566
|
}
|
|
3618
3567
|
),
|
|
3619
3568
|
/* @__PURE__ */ jsx(
|
|
3620
|
-
|
|
3569
|
+
FormInput,
|
|
3621
3570
|
{
|
|
3571
|
+
name: "address.state",
|
|
3622
3572
|
label: "State",
|
|
3623
|
-
placeholder: "Enter state"
|
|
3624
|
-
required: true,
|
|
3625
|
-
...form.register("address.state")
|
|
3573
|
+
placeholder: "Enter state"
|
|
3626
3574
|
}
|
|
3627
3575
|
),
|
|
3628
3576
|
/* @__PURE__ */ jsx(
|
|
3629
|
-
|
|
3577
|
+
FormInput,
|
|
3630
3578
|
{
|
|
3579
|
+
name: "address.postalCode",
|
|
3631
3580
|
label: "Postal Code",
|
|
3632
|
-
placeholder: "12345"
|
|
3633
|
-
required: true,
|
|
3634
|
-
...form.register("address.postalCode")
|
|
3581
|
+
placeholder: "12345"
|
|
3635
3582
|
}
|
|
3636
3583
|
),
|
|
3637
3584
|
/* @__PURE__ */ jsx(
|
|
3638
|
-
|
|
3585
|
+
FormInput,
|
|
3639
3586
|
{
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3587
|
+
name: "address.countryCode",
|
|
3588
|
+
label: "Country Code",
|
|
3589
|
+
placeholder: "e.g., US",
|
|
3590
|
+
required: true
|
|
3591
|
+
}
|
|
3592
|
+
),
|
|
3593
|
+
/* @__PURE__ */ jsx(
|
|
3594
|
+
FormInput,
|
|
3595
|
+
{
|
|
3596
|
+
name: "address.type",
|
|
3597
|
+
label: "Address Type",
|
|
3598
|
+
placeholder: "e.g., MAILING"
|
|
3650
3599
|
}
|
|
3651
3600
|
)
|
|
3652
3601
|
] })
|
|
@@ -3655,41 +3604,41 @@ var BusinessForm = ({
|
|
|
3655
3604
|
/* @__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" }) }),
|
|
3656
3605
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
|
|
3657
3606
|
/* @__PURE__ */ jsx(
|
|
3658
|
-
|
|
3607
|
+
FormInput,
|
|
3659
3608
|
{
|
|
3609
|
+
name: "contactPersonFirstName",
|
|
3660
3610
|
label: "Contact First Name",
|
|
3661
|
-
placeholder: "Enter first name"
|
|
3662
|
-
...form.register("contactFirstName")
|
|
3611
|
+
placeholder: "Enter first name"
|
|
3663
3612
|
}
|
|
3664
3613
|
),
|
|
3665
3614
|
/* @__PURE__ */ jsx(
|
|
3666
|
-
|
|
3615
|
+
FormInput,
|
|
3667
3616
|
{
|
|
3617
|
+
name: "contactPersonLastName",
|
|
3668
3618
|
label: "Contact Last Name",
|
|
3669
|
-
placeholder: "Enter last name"
|
|
3670
|
-
...form.register("contactLastName")
|
|
3619
|
+
placeholder: "Enter last name"
|
|
3671
3620
|
}
|
|
3672
3621
|
),
|
|
3673
3622
|
/* @__PURE__ */ jsx(
|
|
3674
|
-
|
|
3623
|
+
FormInput,
|
|
3675
3624
|
{
|
|
3625
|
+
name: "contactPersonEmail",
|
|
3676
3626
|
label: "Contact Email",
|
|
3677
3627
|
placeholder: "contact@business.com",
|
|
3678
|
-
type: "email"
|
|
3679
|
-
...form.register("contactEmail")
|
|
3628
|
+
type: "email"
|
|
3680
3629
|
}
|
|
3681
3630
|
),
|
|
3682
3631
|
/* @__PURE__ */ jsx(
|
|
3683
|
-
|
|
3632
|
+
FormInput,
|
|
3684
3633
|
{
|
|
3634
|
+
name: "contactPersonPhone",
|
|
3685
3635
|
label: "Contact Phone",
|
|
3686
|
-
placeholder: "+1 (555) 123-4567"
|
|
3687
|
-
...form.register("contactPhone")
|
|
3636
|
+
placeholder: "+1 (555) 123-4567"
|
|
3688
3637
|
}
|
|
3689
3638
|
)
|
|
3690
3639
|
] })
|
|
3691
3640
|
] })
|
|
3692
|
-
] });
|
|
3641
|
+
] }) });
|
|
3693
3642
|
};
|
|
3694
3643
|
var CreateBusinessView = ({
|
|
3695
3644
|
form,
|
|
@@ -4065,13 +4014,17 @@ z.object({
|
|
|
4065
4014
|
website: z.string().url("Invalid URL format").optional().or(z.literal(""))
|
|
4066
4015
|
});
|
|
4067
4016
|
var addressSchema = z.object({
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4017
|
+
line1: z.string().optional(),
|
|
4018
|
+
// Street address
|
|
4019
|
+
line2: z.string().optional(),
|
|
4020
|
+
// Apartment, suite, or floor
|
|
4021
|
+
city: z.string().optional(),
|
|
4022
|
+
state: z.string().optional(),
|
|
4023
|
+
postalCode: z.string().optional(),
|
|
4024
|
+
countryCode: z.string().min(1, "Country code is required"),
|
|
4025
|
+
// Required field
|
|
4026
|
+
type: z.string().optional()
|
|
4027
|
+
// Address type (e.g., "MAILING")
|
|
4075
4028
|
});
|
|
4076
4029
|
z.object({
|
|
4077
4030
|
id: z.string(),
|
|
@@ -4121,27 +4074,41 @@ z.object({
|
|
|
4121
4074
|
intermediaryFI: intermediaryFISchema.optional()
|
|
4122
4075
|
});
|
|
4123
4076
|
var businessProfileSchema = z.object({
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4077
|
+
// Required fields
|
|
4078
|
+
name: z.string().min(1, "Business name is required"),
|
|
4079
|
+
productId: z.number().min(1, "Product ID is required"),
|
|
4080
|
+
businessIdType: z.string().min(1, "ID Number type is required"),
|
|
4081
|
+
// EIN, SSN, TIN, OTHER_ID
|
|
4082
|
+
idNumber: z.string().min(1, "ID Number is required"),
|
|
4083
|
+
// Optional fields
|
|
4084
|
+
dba: z.string().optional(),
|
|
4085
|
+
businessEntityType: z.string().optional(),
|
|
4086
|
+
// Company type
|
|
4130
4087
|
incorporationState: z.string().optional(),
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4088
|
+
formationDate: z.string().optional(),
|
|
4089
|
+
website: z.string().optional(),
|
|
4090
|
+
achCompanyId: z.string().optional(),
|
|
4091
|
+
// Optional fields with pattern validation
|
|
4134
4092
|
mcc: z.string().regex(/^\d{4}$/, "MCC must be 4 digits").optional().or(z.literal("")),
|
|
4135
4093
|
naics: z.string().regex(/^\d{6}$/, "NAICS must be 6 digits").optional().or(z.literal("")),
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4094
|
+
mobilePhone: z.string().regex(
|
|
4095
|
+
/^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/im,
|
|
4096
|
+
"Invalid phone number format"
|
|
4097
|
+
).optional().or(z.literal("")),
|
|
4098
|
+
// Contact person information (optional)
|
|
4099
|
+
contactPersonFirstName: z.string().optional(),
|
|
4100
|
+
contactPersonLastName: z.string().optional(),
|
|
4101
|
+
contactPersonEmail: z.string().optional(),
|
|
4102
|
+
contactPersonPhone: z.string().optional(),
|
|
4103
|
+
// Address (optional)
|
|
4104
|
+
address: addressSchema.optional(),
|
|
4105
|
+
// Submitted by object (optional)
|
|
4106
|
+
submittedBy: z.object({
|
|
4107
|
+
contactPersonEmail: z.string().optional(),
|
|
4108
|
+
contactPersonFirstName: z.string().optional(),
|
|
4109
|
+
contactPersonLastName: z.string().optional(),
|
|
4110
|
+
contactPersonPhone: z.string().optional()
|
|
4111
|
+
}).optional()
|
|
4145
4112
|
});
|
|
4146
4113
|
z.object({
|
|
4147
4114
|
status: z.string().min(1, "Status is required"),
|
|
@@ -4179,7 +4146,7 @@ var BankAddressCard = ({
|
|
|
4179
4146
|
/* @__PURE__ */ jsx(
|
|
4180
4147
|
FormInput,
|
|
4181
4148
|
{
|
|
4182
|
-
name: "
|
|
4149
|
+
name: "line1",
|
|
4183
4150
|
label: "Street Address",
|
|
4184
4151
|
placeholder: "Enter street address",
|
|
4185
4152
|
required: true
|
|
@@ -4215,7 +4182,7 @@ var BankAddressCard = ({
|
|
|
4215
4182
|
] }) }) });
|
|
4216
4183
|
const formValues = form.watch();
|
|
4217
4184
|
const viewContent = /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
4218
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Street Address", value: formValues?.
|
|
4185
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Street Address", value: formValues?.line1, layout: "horizontal" }),
|
|
4219
4186
|
/* @__PURE__ */ jsx(InfoField, { label: "City", value: formValues?.city, layout: "horizontal" }),
|
|
4220
4187
|
/* @__PURE__ */ jsx(InfoField, { label: "State", value: formValues?.state, layout: "horizontal" }),
|
|
4221
4188
|
/* @__PURE__ */ jsx(InfoField, { label: "Postal Code", value: formValues?.postalCode, layout: "horizontal" })
|
|
@@ -4376,7 +4343,7 @@ var BankingDetailsCard = ({ isEditing, onToggleEdit, className }) => {
|
|
|
4376
4343
|
}
|
|
4377
4344
|
);
|
|
4378
4345
|
};
|
|
4379
|
-
var
|
|
4346
|
+
var typeConfig = {
|
|
4380
4347
|
BUSINESS: {
|
|
4381
4348
|
variant: "business",
|
|
4382
4349
|
label: "Business",
|
|
@@ -4399,7 +4366,7 @@ var typeConfig2 = {
|
|
|
4399
4366
|
}
|
|
4400
4367
|
};
|
|
4401
4368
|
var CounterpartyTypeBadge = ({ type, className }) => {
|
|
4402
|
-
const config =
|
|
4369
|
+
const config = typeConfig[type];
|
|
4403
4370
|
if (!config) {
|
|
4404
4371
|
return /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className, children: [
|
|
4405
4372
|
/* @__PURE__ */ jsx(Building2, { className: "w-3 h-3 mr-1" }),
|
|
@@ -4876,16 +4843,16 @@ var BusinessProfileCard = ({
|
|
|
4876
4843
|
/* @__PURE__ */ jsx(
|
|
4877
4844
|
FormInput,
|
|
4878
4845
|
{
|
|
4879
|
-
name: "
|
|
4880
|
-
label: "
|
|
4881
|
-
placeholder: "Enter
|
|
4846
|
+
name: "name",
|
|
4847
|
+
label: "Business Name",
|
|
4848
|
+
placeholder: "Enter business name",
|
|
4882
4849
|
required: true
|
|
4883
4850
|
}
|
|
4884
4851
|
),
|
|
4885
4852
|
/* @__PURE__ */ jsx(
|
|
4886
4853
|
FormInput,
|
|
4887
4854
|
{
|
|
4888
|
-
name: "
|
|
4855
|
+
name: "dba",
|
|
4889
4856
|
label: "DBA Name",
|
|
4890
4857
|
placeholder: "Enter doing business as name"
|
|
4891
4858
|
}
|
|
@@ -4893,23 +4860,28 @@ var BusinessProfileCard = ({
|
|
|
4893
4860
|
/* @__PURE__ */ jsx(
|
|
4894
4861
|
FormSelect,
|
|
4895
4862
|
{
|
|
4896
|
-
name: "
|
|
4897
|
-
label: "Business Type",
|
|
4863
|
+
name: "businessEntityType",
|
|
4864
|
+
label: "Business Entity Type",
|
|
4898
4865
|
placeholder: "Select business type",
|
|
4899
4866
|
options: [
|
|
4900
|
-
{ value: "
|
|
4901
|
-
{ value: "
|
|
4902
|
-
{ value: "
|
|
4903
|
-
{ value: "
|
|
4867
|
+
{ value: "SOLE_PROPRIETOR", label: "Sole Proprietor" },
|
|
4868
|
+
{ value: "LIMITED_LIABILITY_COMPANY", label: "Limited Liability Company (LLC)" },
|
|
4869
|
+
{ value: "CORPORATION", label: "S or C Corporation" },
|
|
4870
|
+
{ value: "GENERAL_PARTNERSHIP", label: "General Partnership" },
|
|
4871
|
+
{ value: "LIMITED_LIABILITY_PARTNERSHIP", label: "Limited Liability Partnership" },
|
|
4872
|
+
{ value: "NON_PROFIT", label: "Non-Profit Corporation" },
|
|
4873
|
+
{ value: "GOVERNMENT_ORGANIZATION", label: "Government Organization" },
|
|
4874
|
+
{ value: "PUBLICLY_TRADED_COMPANY", label: "Publicly Traded Company" },
|
|
4875
|
+
{ value: "TRUSTS", label: "Trusts" }
|
|
4904
4876
|
]
|
|
4905
4877
|
}
|
|
4906
4878
|
),
|
|
4907
4879
|
/* @__PURE__ */ jsx(
|
|
4908
4880
|
FormInput,
|
|
4909
4881
|
{
|
|
4910
|
-
name: "
|
|
4911
|
-
label: "
|
|
4912
|
-
placeholder: "Enter
|
|
4882
|
+
name: "idNumber",
|
|
4883
|
+
label: "ID Number",
|
|
4884
|
+
placeholder: "Enter ID number",
|
|
4913
4885
|
required: true
|
|
4914
4886
|
}
|
|
4915
4887
|
),
|
|
@@ -4925,13 +4897,14 @@ var BusinessProfileCard = ({
|
|
|
4925
4897
|
/* @__PURE__ */ jsx(
|
|
4926
4898
|
FormSelect,
|
|
4927
4899
|
{
|
|
4928
|
-
name: "
|
|
4900
|
+
name: "businessIdType",
|
|
4929
4901
|
label: "ID Type",
|
|
4930
4902
|
placeholder: "Select ID type",
|
|
4931
4903
|
options: [
|
|
4932
|
-
{ value: "
|
|
4933
|
-
{ value: "
|
|
4934
|
-
{ value: "
|
|
4904
|
+
{ value: "EIN", label: "EIN" },
|
|
4905
|
+
{ value: "SSN", label: "SSN" },
|
|
4906
|
+
{ value: "TIN", label: "TIN" },
|
|
4907
|
+
{ value: "OTHER_ID", label: "Other ID" }
|
|
4935
4908
|
]
|
|
4936
4909
|
}
|
|
4937
4910
|
),
|
|
@@ -4952,30 +4925,19 @@ var BusinessProfileCard = ({
|
|
|
4952
4925
|
}
|
|
4953
4926
|
)
|
|
4954
4927
|
] }),
|
|
4955
|
-
/* @__PURE__ */
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
}
|
|
4964
|
-
),
|
|
4965
|
-
/* @__PURE__ */ jsx(
|
|
4966
|
-
FormInput,
|
|
4967
|
-
{
|
|
4968
|
-
name: "mobilePhone",
|
|
4969
|
-
label: "Business Phone",
|
|
4970
|
-
placeholder: "Enter business phone"
|
|
4971
|
-
}
|
|
4972
|
-
)
|
|
4973
|
-
] }),
|
|
4928
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: /* @__PURE__ */ jsx(
|
|
4929
|
+
FormInput,
|
|
4930
|
+
{
|
|
4931
|
+
name: "mobilePhone",
|
|
4932
|
+
label: "Business Phone",
|
|
4933
|
+
placeholder: "Enter business phone"
|
|
4934
|
+
}
|
|
4935
|
+
) }),
|
|
4974
4936
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-4", children: [
|
|
4975
4937
|
/* @__PURE__ */ jsx(
|
|
4976
4938
|
FormInput,
|
|
4977
4939
|
{
|
|
4978
|
-
name: "address.
|
|
4940
|
+
name: "address.line1",
|
|
4979
4941
|
label: "Street Address",
|
|
4980
4942
|
placeholder: "Enter street address"
|
|
4981
4943
|
}
|
|
@@ -4983,7 +4945,7 @@ var BusinessProfileCard = ({
|
|
|
4983
4945
|
/* @__PURE__ */ jsx(
|
|
4984
4946
|
FormInput,
|
|
4985
4947
|
{
|
|
4986
|
-
name: "address.
|
|
4948
|
+
name: "address.line2",
|
|
4987
4949
|
label: "Apartment, suite, or floor",
|
|
4988
4950
|
placeholder: "Enter apartment, suite, or floor"
|
|
4989
4951
|
}
|
|
@@ -5017,9 +4979,9 @@ var BusinessProfileCard = ({
|
|
|
5017
4979
|
/* @__PURE__ */ jsx(
|
|
5018
4980
|
FormInput,
|
|
5019
4981
|
{
|
|
5020
|
-
name: "address.
|
|
4982
|
+
name: "address.countryCode",
|
|
5021
4983
|
label: "Country Code",
|
|
5022
|
-
placeholder: "
|
|
4984
|
+
placeholder: "e.g., US"
|
|
5023
4985
|
}
|
|
5024
4986
|
)
|
|
5025
4987
|
] }),
|
|
@@ -5043,51 +5005,30 @@ var BusinessProfileCard = ({
|
|
|
5043
5005
|
}
|
|
5044
5006
|
)
|
|
5045
5007
|
] }),
|
|
5046
|
-
/* @__PURE__ */
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
5065
|
-
/* @__PURE__ */ jsx(
|
|
5066
|
-
FormInput,
|
|
5067
|
-
{
|
|
5068
|
-
name: "externalId",
|
|
5069
|
-
label: "External ID",
|
|
5070
|
-
placeholder: "UUID",
|
|
5071
|
-
disabled: true
|
|
5072
|
-
}
|
|
5073
|
-
),
|
|
5074
|
-
/* @__PURE__ */ jsx(
|
|
5075
|
-
FormInput,
|
|
5076
|
-
{
|
|
5077
|
-
name: "productId",
|
|
5078
|
-
label: "Product ID",
|
|
5079
|
-
type: "number",
|
|
5080
|
-
placeholder: "Product ID",
|
|
5081
|
-
disabled: true
|
|
5082
|
-
}
|
|
5083
|
-
)
|
|
5084
|
-
] }),
|
|
5008
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: /* @__PURE__ */ jsx(
|
|
5009
|
+
FormInput,
|
|
5010
|
+
{
|
|
5011
|
+
name: "achCompanyId",
|
|
5012
|
+
label: "ACH Company ID",
|
|
5013
|
+
placeholder: "10-digit company ID"
|
|
5014
|
+
}
|
|
5015
|
+
) }),
|
|
5016
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: /* @__PURE__ */ jsx(
|
|
5017
|
+
FormInput,
|
|
5018
|
+
{
|
|
5019
|
+
name: "productId",
|
|
5020
|
+
label: "Product ID",
|
|
5021
|
+
type: "number",
|
|
5022
|
+
placeholder: "Product ID",
|
|
5023
|
+
disabled: true
|
|
5024
|
+
}
|
|
5025
|
+
) }),
|
|
5085
5026
|
/* @__PURE__ */ jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Contact Person" }),
|
|
5086
5027
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
5087
5028
|
/* @__PURE__ */ jsx(
|
|
5088
5029
|
FormInput,
|
|
5089
5030
|
{
|
|
5090
|
-
name: "
|
|
5031
|
+
name: "contactPersonFirstName",
|
|
5091
5032
|
label: "First Name",
|
|
5092
5033
|
placeholder: "Enter first name"
|
|
5093
5034
|
}
|
|
@@ -5095,7 +5036,7 @@ var BusinessProfileCard = ({
|
|
|
5095
5036
|
/* @__PURE__ */ jsx(
|
|
5096
5037
|
FormInput,
|
|
5097
5038
|
{
|
|
5098
|
-
name: "
|
|
5039
|
+
name: "contactPersonLastName",
|
|
5099
5040
|
label: "Last Name",
|
|
5100
5041
|
placeholder: "Enter last name"
|
|
5101
5042
|
}
|
|
@@ -5103,7 +5044,7 @@ var BusinessProfileCard = ({
|
|
|
5103
5044
|
/* @__PURE__ */ jsx(
|
|
5104
5045
|
FormInput,
|
|
5105
5046
|
{
|
|
5106
|
-
name: "
|
|
5047
|
+
name: "contactPersonEmail",
|
|
5107
5048
|
label: "Email",
|
|
5108
5049
|
type: "email",
|
|
5109
5050
|
placeholder: "Enter email"
|
|
@@ -5112,7 +5053,7 @@ var BusinessProfileCard = ({
|
|
|
5112
5053
|
/* @__PURE__ */ jsx(
|
|
5113
5054
|
FormInput,
|
|
5114
5055
|
{
|
|
5115
|
-
name: "
|
|
5056
|
+
name: "contactPersonPhone",
|
|
5116
5057
|
label: "Phone Number",
|
|
5117
5058
|
placeholder: "Enter phone number"
|
|
5118
5059
|
}
|
|
@@ -5124,25 +5065,22 @@ var BusinessProfileCard = ({
|
|
|
5124
5065
|
const viewContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5125
5066
|
/* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
5126
5067
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5127
|
-
/* @__PURE__ */ jsx(InfoField, { label: "
|
|
5128
|
-
/* @__PURE__ */ jsx(InfoField, { label: "DBA Name", value: formValues?.
|
|
5068
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Business Name", value: formValues?.name || "-", layout: "horizontal" }),
|
|
5069
|
+
/* @__PURE__ */ jsx(InfoField, { label: "DBA Name", value: formValues?.dba || "-", layout: "horizontal" })
|
|
5129
5070
|
] }),
|
|
5130
5071
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5131
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Business Type", value: formValues?.
|
|
5132
|
-
/* @__PURE__ */ jsx(InfoField, { label: "
|
|
5072
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Business Entity Type", value: formValues?.businessEntityType || "-", layout: "horizontal" }),
|
|
5073
|
+
/* @__PURE__ */ jsx(InfoField, { label: "ID Number", value: formValues?.idNumber || "-", layout: "horizontal" })
|
|
5133
5074
|
] }),
|
|
5134
5075
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5135
5076
|
/* @__PURE__ */ jsx(InfoField, { label: "Formation Date", value: formValues?.formationDate || "-", layout: "horizontal" }),
|
|
5136
|
-
/* @__PURE__ */ jsx(InfoField, { label: "ID Type", value: formValues?.
|
|
5077
|
+
/* @__PURE__ */ jsx(InfoField, { label: "ID Type", value: formValues?.businessIdType || "-", layout: "horizontal" })
|
|
5137
5078
|
] }),
|
|
5138
5079
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5139
5080
|
/* @__PURE__ */ jsx(InfoField, { label: "Incorporation State", value: formValues?.incorporationState || "-", layout: "horizontal" }),
|
|
5140
5081
|
/* @__PURE__ */ jsx(InfoField, { label: "Website", value: formValues?.website || "-", layout: "horizontal" })
|
|
5141
5082
|
] }),
|
|
5142
|
-
/* @__PURE__ */
|
|
5143
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Business Email", value: formValues?.email || "-", layout: "horizontal" }),
|
|
5144
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Business Phone", value: formValues?.mobilePhone || "-", layout: "horizontal" })
|
|
5145
|
-
] }),
|
|
5083
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-4", children: /* @__PURE__ */ jsx(InfoField, { label: "Business Phone", value: formValues?.mobilePhone || "-", layout: "horizontal" }) }),
|
|
5146
5084
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5147
5085
|
/* @__PURE__ */ jsx(
|
|
5148
5086
|
InfoField,
|
|
@@ -5172,7 +5110,7 @@ var BusinessProfileCard = ({
|
|
|
5172
5110
|
InfoField,
|
|
5173
5111
|
{
|
|
5174
5112
|
label: "Address",
|
|
5175
|
-
value: formValues?.address ? `${formValues.address.
|
|
5113
|
+
value: formValues?.address ? `${formValues.address.line1 || ""}${formValues.address.line2 ? ", " + formValues.address.line2 : ""}, ${formValues.address.city || ""}, ${formValues.address.state || ""} ${formValues.address.postalCode || ""}, ${formValues.address.countryCode || ""}` : "-",
|
|
5176
5114
|
layout: "horizontal"
|
|
5177
5115
|
}
|
|
5178
5116
|
),
|
|
@@ -5180,22 +5118,16 @@ var BusinessProfileCard = ({
|
|
|
5180
5118
|
/* @__PURE__ */ jsx(InfoField, { label: "MCC", value: formValues?.mcc || "-", layout: "horizontal" }),
|
|
5181
5119
|
/* @__PURE__ */ jsx(InfoField, { label: "NAICS", value: formValues?.naics || "-", layout: "horizontal" })
|
|
5182
5120
|
] }),
|
|
5183
|
-
/* @__PURE__ */
|
|
5184
|
-
|
|
5185
|
-
/* @__PURE__ */ jsx(InfoField, { label: "ACH Company Name", value: formValues?.achCompanyName || "-", layout: "horizontal" })
|
|
5186
|
-
] }),
|
|
5187
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5188
|
-
/* @__PURE__ */ jsx(InfoField, { label: "External ID", value: formValues?.externalId || "-", layout: "horizontal" }),
|
|
5189
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Product ID", value: formValues?.productId?.toString() || "-", layout: "horizontal" })
|
|
5190
|
-
] }),
|
|
5121
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-4", children: /* @__PURE__ */ jsx(InfoField, { label: "ACH Company ID", value: formValues?.achCompanyId || "-", layout: "horizontal" }) }),
|
|
5122
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-4", children: /* @__PURE__ */ jsx(InfoField, { label: "Product ID", value: formValues?.productId?.toString() || "-", layout: "horizontal" }) }),
|
|
5191
5123
|
/* @__PURE__ */ jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Contact Person" }),
|
|
5192
5124
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5193
|
-
/* @__PURE__ */ jsx(InfoField, { label: "First Name", value: formValues?.
|
|
5194
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Last Name", value: formValues?.
|
|
5125
|
+
/* @__PURE__ */ jsx(InfoField, { label: "First Name", value: formValues?.contactPersonFirstName || "-", layout: "horizontal" }),
|
|
5126
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Last Name", value: formValues?.contactPersonLastName || "-", layout: "horizontal" })
|
|
5195
5127
|
] }),
|
|
5196
5128
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5197
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Email", value: formValues?.
|
|
5198
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Phone Number", value: formValues?.
|
|
5129
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Email", value: formValues?.contactPersonEmail || "-", layout: "horizontal" }),
|
|
5130
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Phone Number", value: formValues?.contactPersonPhone || "-", layout: "horizontal" })
|
|
5199
5131
|
] })
|
|
5200
5132
|
] }),
|
|
5201
5133
|
/* @__PURE__ */ jsx(Dialog, { open: showResultDialog, onOpenChange: setShowResultDialog, children: /* @__PURE__ */ jsxs(DialogContent, { className: "max-w-3xl max-h-[80vh] overflow-y-auto", children: [
|
|
@@ -5624,7 +5556,7 @@ var IntermediaryCard = ({
|
|
|
5624
5556
|
] }),
|
|
5625
5557
|
/* @__PURE__ */ jsxs("div", { className: "pt-3 border-t border-border", children: [
|
|
5626
5558
|
/* @__PURE__ */ jsx("h4", { className: "text-sm font-medium text-foreground mb-2", children: "FI Address" }),
|
|
5627
|
-
/* @__PURE__ */ jsx(InfoField, { value: formValues?.address ? `${formValues.address.
|
|
5559
|
+
/* @__PURE__ */ jsx(InfoField, { value: formValues?.address ? `${formValues.address.line1}, ${formValues.address.city}, ${formValues.address.postalCode}, ${formValues.address.countryCode}` : "" })
|
|
5628
5560
|
] })
|
|
5629
5561
|
] });
|
|
5630
5562
|
return /* @__PURE__ */ jsx(
|
|
@@ -6857,6 +6789,36 @@ var AccountCard = React15.forwardRef(
|
|
|
6857
6789
|
}
|
|
6858
6790
|
);
|
|
6859
6791
|
AccountCard.displayName = "AccountCard";
|
|
6792
|
+
var typeConfig2 = {
|
|
6793
|
+
corporation: {
|
|
6794
|
+
variant: "corporation",
|
|
6795
|
+
label: "Corporation",
|
|
6796
|
+
icon: Building
|
|
6797
|
+
},
|
|
6798
|
+
llc: {
|
|
6799
|
+
variant: "llc",
|
|
6800
|
+
label: "LLC",
|
|
6801
|
+
icon: Briefcase
|
|
6802
|
+
},
|
|
6803
|
+
partnership: {
|
|
6804
|
+
variant: "partnership",
|
|
6805
|
+
label: "Partnership",
|
|
6806
|
+
icon: Users
|
|
6807
|
+
},
|
|
6808
|
+
sole_proprietorship: {
|
|
6809
|
+
variant: "sole_proprietorship",
|
|
6810
|
+
label: "Sole Proprietorship",
|
|
6811
|
+
icon: User
|
|
6812
|
+
}
|
|
6813
|
+
};
|
|
6814
|
+
var BusinessTypeBadge = ({ type, className }) => {
|
|
6815
|
+
const config = typeConfig2[type];
|
|
6816
|
+
const Icon2 = config.icon;
|
|
6817
|
+
return /* @__PURE__ */ jsxs(Badge, { variant: config.variant, className, children: [
|
|
6818
|
+
/* @__PURE__ */ jsx(Icon2, { className: "w-3 h-3 mr-1" }),
|
|
6819
|
+
config.label
|
|
6820
|
+
] });
|
|
6821
|
+
};
|
|
6860
6822
|
var Checkbox = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6861
6823
|
CheckboxPrimitive.Root,
|
|
6862
6824
|
{
|
|
@@ -9535,33 +9497,31 @@ var Business = () => {
|
|
|
9535
9497
|
};
|
|
9536
9498
|
var BusinessDetail_default = Business;
|
|
9537
9499
|
var defaultBusinessFormValues = {
|
|
9538
|
-
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
|
|
9542
|
-
|
|
9543
|
-
|
|
9500
|
+
name: "",
|
|
9501
|
+
productId: 0,
|
|
9502
|
+
businessIdType: "",
|
|
9503
|
+
idNumber: "",
|
|
9504
|
+
dba: "",
|
|
9505
|
+
businessEntityType: "",
|
|
9544
9506
|
incorporationState: "",
|
|
9507
|
+
formationDate: "",
|
|
9545
9508
|
website: "",
|
|
9546
|
-
|
|
9509
|
+
achCompanyId: "",
|
|
9547
9510
|
mobilePhone: "",
|
|
9548
9511
|
mcc: "",
|
|
9549
9512
|
naics: "",
|
|
9550
|
-
|
|
9551
|
-
|
|
9552
|
-
|
|
9553
|
-
|
|
9554
|
-
contactLastName: "",
|
|
9555
|
-
contactEmail: "",
|
|
9556
|
-
contactPhone: "",
|
|
9513
|
+
contactPersonFirstName: "",
|
|
9514
|
+
contactPersonLastName: "",
|
|
9515
|
+
contactPersonEmail: "",
|
|
9516
|
+
contactPersonPhone: "",
|
|
9557
9517
|
address: {
|
|
9558
|
-
|
|
9559
|
-
|
|
9518
|
+
line1: "",
|
|
9519
|
+
line2: "",
|
|
9560
9520
|
city: "",
|
|
9561
9521
|
state: "",
|
|
9562
9522
|
postalCode: "",
|
|
9563
|
-
|
|
9564
|
-
|
|
9523
|
+
countryCode: "US",
|
|
9524
|
+
type: "MAILING"
|
|
9565
9525
|
}
|
|
9566
9526
|
};
|
|
9567
9527
|
var CreateBusiness = () => {
|
|
@@ -9580,7 +9540,7 @@ var CreateBusiness = () => {
|
|
|
9580
9540
|
}, [navigate]);
|
|
9581
9541
|
const handleBusinessTypeChange = useCallback((value) => {
|
|
9582
9542
|
setBusinessType(value);
|
|
9583
|
-
form.setValue("
|
|
9543
|
+
form.setValue("businessEntityType", value, { shouldValidate: true });
|
|
9584
9544
|
}, [form]);
|
|
9585
9545
|
return /* @__PURE__ */ jsx(
|
|
9586
9546
|
CreateBusinessView,
|