braid-ui 1.0.28 → 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 +288 -314
- 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 +289 -315
- 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
|
{
|
|
@@ -3395,180 +3396,144 @@ var PageLayout = React15.forwardRef(
|
|
|
3395
3396
|
}
|
|
3396
3397
|
);
|
|
3397
3398
|
PageLayout.displayName = "PageLayout";
|
|
3398
|
-
var typeConfig = {
|
|
3399
|
-
corporation: {
|
|
3400
|
-
variant: "corporation",
|
|
3401
|
-
label: "Corporation",
|
|
3402
|
-
icon: Building
|
|
3403
|
-
},
|
|
3404
|
-
llc: {
|
|
3405
|
-
variant: "llc",
|
|
3406
|
-
label: "LLC",
|
|
3407
|
-
icon: Briefcase
|
|
3408
|
-
},
|
|
3409
|
-
partnership: {
|
|
3410
|
-
variant: "partnership",
|
|
3411
|
-
label: "Partnership",
|
|
3412
|
-
icon: Users
|
|
3413
|
-
},
|
|
3414
|
-
sole_proprietorship: {
|
|
3415
|
-
variant: "sole_proprietorship",
|
|
3416
|
-
label: "Sole Proprietorship",
|
|
3417
|
-
icon: User
|
|
3418
|
-
}
|
|
3419
|
-
};
|
|
3420
|
-
var BusinessTypeBadge = ({ type, className }) => {
|
|
3421
|
-
const config = typeConfig[type];
|
|
3422
|
-
const Icon2 = config.icon;
|
|
3423
|
-
return /* @__PURE__ */ jsxs(Badge, { variant: config.variant, className, children: [
|
|
3424
|
-
/* @__PURE__ */ jsx(Icon2, { className: "w-3 h-3 mr-1" }),
|
|
3425
|
-
config.label
|
|
3426
|
-
] });
|
|
3427
|
-
};
|
|
3428
3399
|
var BusinessForm = ({
|
|
3429
3400
|
form,
|
|
3430
3401
|
businessType,
|
|
3431
3402
|
onBusinessTypeChange,
|
|
3432
3403
|
onSubmit
|
|
3433
3404
|
}) => {
|
|
3434
|
-
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: [
|
|
3435
3406
|
/* @__PURE__ */ jsxs(Card, { className: "p-6", children: [
|
|
3436
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" }) }),
|
|
3437
3408
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
|
|
3438
3409
|
/* @__PURE__ */ jsx(
|
|
3439
|
-
|
|
3410
|
+
FormInput,
|
|
3440
3411
|
{
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3412
|
+
name: "name",
|
|
3413
|
+
label: "Business Name",
|
|
3414
|
+
placeholder: "Enter business name",
|
|
3415
|
+
required: true
|
|
3445
3416
|
}
|
|
3446
3417
|
),
|
|
3447
3418
|
/* @__PURE__ */ jsx(
|
|
3448
|
-
|
|
3419
|
+
FormInput,
|
|
3449
3420
|
{
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3421
|
+
name: "productId",
|
|
3422
|
+
label: "Product ID",
|
|
3423
|
+
placeholder: "Enter product ID",
|
|
3424
|
+
type: "number",
|
|
3425
|
+
required: true
|
|
3454
3426
|
}
|
|
3455
3427
|
),
|
|
3456
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
3457
|
-
/* @__PURE__ */ jsx(
|
|
3458
|
-
EnhancedSelect,
|
|
3459
|
-
{
|
|
3460
|
-
label: "Business Type",
|
|
3461
|
-
placeholder: "Select business type",
|
|
3462
|
-
value: businessType,
|
|
3463
|
-
onValueChange: onBusinessTypeChange,
|
|
3464
|
-
options: [
|
|
3465
|
-
{ value: "corporation", label: "Corporation" },
|
|
3466
|
-
{ value: "llc", label: "LLC" },
|
|
3467
|
-
{ value: "partnership", label: "Partnership" },
|
|
3468
|
-
{ value: "sole_proprietorship", label: "Sole Proprietorship" }
|
|
3469
|
-
]
|
|
3470
|
-
}
|
|
3471
|
-
),
|
|
3472
|
-
businessType && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3473
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: "Preview:" }),
|
|
3474
|
-
/* @__PURE__ */ jsx(BusinessTypeBadge, { type: businessType })
|
|
3475
|
-
] })
|
|
3476
|
-
] }),
|
|
3477
3428
|
/* @__PURE__ */ jsx(
|
|
3478
|
-
|
|
3429
|
+
FormSelect,
|
|
3479
3430
|
{
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
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
|
+
]
|
|
3485
3440
|
}
|
|
3486
3441
|
),
|
|
3487
3442
|
/* @__PURE__ */ jsx(
|
|
3488
|
-
|
|
3443
|
+
FormInput,
|
|
3489
3444
|
{
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3445
|
+
name: "idNumber",
|
|
3446
|
+
label: "ID Number",
|
|
3447
|
+
placeholder: "Enter ID number",
|
|
3448
|
+
required: true
|
|
3494
3449
|
}
|
|
3495
3450
|
),
|
|
3496
3451
|
/* @__PURE__ */ jsx(
|
|
3497
|
-
|
|
3452
|
+
FormInput,
|
|
3498
3453
|
{
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3454
|
+
name: "dba",
|
|
3455
|
+
label: "DBA Name",
|
|
3456
|
+
placeholder: "Enter DBA name",
|
|
3457
|
+
hint: "Doing Business As name"
|
|
3502
3458
|
}
|
|
3503
3459
|
),
|
|
3504
3460
|
/* @__PURE__ */ jsx(
|
|
3505
|
-
|
|
3461
|
+
FormSelect,
|
|
3506
3462
|
{
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
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
|
+
]
|
|
3511
3477
|
}
|
|
3512
3478
|
),
|
|
3513
3479
|
/* @__PURE__ */ jsx(
|
|
3514
|
-
|
|
3480
|
+
FormInput,
|
|
3515
3481
|
{
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
...form.register("email")
|
|
3482
|
+
name: "incorporationState",
|
|
3483
|
+
label: "Incorporation State",
|
|
3484
|
+
placeholder: "Enter state"
|
|
3520
3485
|
}
|
|
3521
3486
|
),
|
|
3522
3487
|
/* @__PURE__ */ jsx(
|
|
3523
|
-
|
|
3488
|
+
FormInput,
|
|
3524
3489
|
{
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3490
|
+
name: "formationDate",
|
|
3491
|
+
label: "Formation Date",
|
|
3492
|
+
placeholder: "YYYY-MM-DD",
|
|
3493
|
+
type: "date"
|
|
3528
3494
|
}
|
|
3529
3495
|
),
|
|
3530
3496
|
/* @__PURE__ */ jsx(
|
|
3531
|
-
|
|
3497
|
+
FormInput,
|
|
3532
3498
|
{
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
...form.register("mcc")
|
|
3499
|
+
name: "website",
|
|
3500
|
+
label: "Website",
|
|
3501
|
+
placeholder: "https://www.business.com"
|
|
3537
3502
|
}
|
|
3538
3503
|
),
|
|
3539
3504
|
/* @__PURE__ */ jsx(
|
|
3540
|
-
|
|
3505
|
+
FormInput,
|
|
3541
3506
|
{
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3507
|
+
name: "mobilePhone",
|
|
3508
|
+
label: "Mobile Phone",
|
|
3509
|
+
placeholder: "+1 (555) 123-4567",
|
|
3510
|
+
hint: "Format: +1 (555) 123-4567"
|
|
3546
3511
|
}
|
|
3547
3512
|
),
|
|
3548
3513
|
/* @__PURE__ */ jsx(
|
|
3549
|
-
|
|
3514
|
+
FormInput,
|
|
3550
3515
|
{
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3516
|
+
name: "mcc",
|
|
3517
|
+
label: "MCC",
|
|
3518
|
+
placeholder: "1234",
|
|
3519
|
+
hint: "4-digit Merchant Category Code"
|
|
3555
3520
|
}
|
|
3556
3521
|
),
|
|
3557
3522
|
/* @__PURE__ */ jsx(
|
|
3558
|
-
|
|
3523
|
+
FormInput,
|
|
3559
3524
|
{
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3525
|
+
name: "naics",
|
|
3526
|
+
label: "NAICS",
|
|
3527
|
+
placeholder: "123456",
|
|
3528
|
+
hint: "6-digit industry classification"
|
|
3563
3529
|
}
|
|
3564
3530
|
),
|
|
3565
3531
|
/* @__PURE__ */ jsx(
|
|
3566
|
-
|
|
3532
|
+
FormInput,
|
|
3567
3533
|
{
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
...form.register("externalId")
|
|
3534
|
+
name: "achCompanyId",
|
|
3535
|
+
label: "ACH Company ID",
|
|
3536
|
+
placeholder: "Enter ACH company ID"
|
|
3572
3537
|
}
|
|
3573
3538
|
)
|
|
3574
3539
|
] })
|
|
@@ -3577,62 +3542,60 @@ var BusinessForm = ({
|
|
|
3577
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" }) }),
|
|
3578
3543
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
|
|
3579
3544
|
/* @__PURE__ */ jsx(
|
|
3580
|
-
|
|
3545
|
+
FormInput,
|
|
3581
3546
|
{
|
|
3547
|
+
name: "address.line1",
|
|
3582
3548
|
label: "Street Address",
|
|
3583
|
-
placeholder: "Enter street address"
|
|
3584
|
-
required: true,
|
|
3585
|
-
...form.register("address.streetAddress")
|
|
3549
|
+
placeholder: "Enter street address"
|
|
3586
3550
|
}
|
|
3587
3551
|
),
|
|
3588
3552
|
/* @__PURE__ */ jsx(
|
|
3589
|
-
|
|
3553
|
+
FormInput,
|
|
3590
3554
|
{
|
|
3555
|
+
name: "address.line2",
|
|
3591
3556
|
label: "Apartment/Suite",
|
|
3592
|
-
placeholder: "Enter apartment or suite number"
|
|
3593
|
-
...form.register("address.apartment")
|
|
3557
|
+
placeholder: "Enter apartment or suite number"
|
|
3594
3558
|
}
|
|
3595
3559
|
),
|
|
3596
3560
|
/* @__PURE__ */ jsx(
|
|
3597
|
-
|
|
3561
|
+
FormInput,
|
|
3598
3562
|
{
|
|
3563
|
+
name: "address.city",
|
|
3599
3564
|
label: "City",
|
|
3600
|
-
placeholder: "Enter city"
|
|
3601
|
-
required: true,
|
|
3602
|
-
...form.register("address.city")
|
|
3565
|
+
placeholder: "Enter city"
|
|
3603
3566
|
}
|
|
3604
3567
|
),
|
|
3605
3568
|
/* @__PURE__ */ jsx(
|
|
3606
|
-
|
|
3569
|
+
FormInput,
|
|
3607
3570
|
{
|
|
3571
|
+
name: "address.state",
|
|
3608
3572
|
label: "State",
|
|
3609
|
-
placeholder: "Enter state"
|
|
3610
|
-
required: true,
|
|
3611
|
-
...form.register("address.state")
|
|
3573
|
+
placeholder: "Enter state"
|
|
3612
3574
|
}
|
|
3613
3575
|
),
|
|
3614
3576
|
/* @__PURE__ */ jsx(
|
|
3615
|
-
|
|
3577
|
+
FormInput,
|
|
3616
3578
|
{
|
|
3579
|
+
name: "address.postalCode",
|
|
3617
3580
|
label: "Postal Code",
|
|
3618
|
-
placeholder: "12345"
|
|
3619
|
-
required: true,
|
|
3620
|
-
...form.register("address.postalCode")
|
|
3581
|
+
placeholder: "12345"
|
|
3621
3582
|
}
|
|
3622
3583
|
),
|
|
3623
3584
|
/* @__PURE__ */ jsx(
|
|
3624
|
-
|
|
3585
|
+
FormInput,
|
|
3625
3586
|
{
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
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"
|
|
3636
3599
|
}
|
|
3637
3600
|
)
|
|
3638
3601
|
] })
|
|
@@ -3641,41 +3604,41 @@ var BusinessForm = ({
|
|
|
3641
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" }) }),
|
|
3642
3605
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
|
|
3643
3606
|
/* @__PURE__ */ jsx(
|
|
3644
|
-
|
|
3607
|
+
FormInput,
|
|
3645
3608
|
{
|
|
3609
|
+
name: "contactPersonFirstName",
|
|
3646
3610
|
label: "Contact First Name",
|
|
3647
|
-
placeholder: "Enter first name"
|
|
3648
|
-
...form.register("contactFirstName")
|
|
3611
|
+
placeholder: "Enter first name"
|
|
3649
3612
|
}
|
|
3650
3613
|
),
|
|
3651
3614
|
/* @__PURE__ */ jsx(
|
|
3652
|
-
|
|
3615
|
+
FormInput,
|
|
3653
3616
|
{
|
|
3617
|
+
name: "contactPersonLastName",
|
|
3654
3618
|
label: "Contact Last Name",
|
|
3655
|
-
placeholder: "Enter last name"
|
|
3656
|
-
...form.register("contactLastName")
|
|
3619
|
+
placeholder: "Enter last name"
|
|
3657
3620
|
}
|
|
3658
3621
|
),
|
|
3659
3622
|
/* @__PURE__ */ jsx(
|
|
3660
|
-
|
|
3623
|
+
FormInput,
|
|
3661
3624
|
{
|
|
3625
|
+
name: "contactPersonEmail",
|
|
3662
3626
|
label: "Contact Email",
|
|
3663
3627
|
placeholder: "contact@business.com",
|
|
3664
|
-
type: "email"
|
|
3665
|
-
...form.register("contactEmail")
|
|
3628
|
+
type: "email"
|
|
3666
3629
|
}
|
|
3667
3630
|
),
|
|
3668
3631
|
/* @__PURE__ */ jsx(
|
|
3669
|
-
|
|
3632
|
+
FormInput,
|
|
3670
3633
|
{
|
|
3634
|
+
name: "contactPersonPhone",
|
|
3671
3635
|
label: "Contact Phone",
|
|
3672
|
-
placeholder: "+1 (555) 123-4567"
|
|
3673
|
-
...form.register("contactPhone")
|
|
3636
|
+
placeholder: "+1 (555) 123-4567"
|
|
3674
3637
|
}
|
|
3675
3638
|
)
|
|
3676
3639
|
] })
|
|
3677
3640
|
] })
|
|
3678
|
-
] });
|
|
3641
|
+
] }) });
|
|
3679
3642
|
};
|
|
3680
3643
|
var CreateBusinessView = ({
|
|
3681
3644
|
form,
|
|
@@ -4051,13 +4014,17 @@ z.object({
|
|
|
4051
4014
|
website: z.string().url("Invalid URL format").optional().or(z.literal(""))
|
|
4052
4015
|
});
|
|
4053
4016
|
var addressSchema = z.object({
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
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")
|
|
4061
4028
|
});
|
|
4062
4029
|
z.object({
|
|
4063
4030
|
id: z.string(),
|
|
@@ -4107,27 +4074,41 @@ z.object({
|
|
|
4107
4074
|
intermediaryFI: intermediaryFISchema.optional()
|
|
4108
4075
|
});
|
|
4109
4076
|
var businessProfileSchema = z.object({
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
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
|
|
4116
4087
|
incorporationState: z.string().optional(),
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4088
|
+
formationDate: z.string().optional(),
|
|
4089
|
+
website: z.string().optional(),
|
|
4090
|
+
achCompanyId: z.string().optional(),
|
|
4091
|
+
// Optional fields with pattern validation
|
|
4120
4092
|
mcc: z.string().regex(/^\d{4}$/, "MCC must be 4 digits").optional().or(z.literal("")),
|
|
4121
4093
|
naics: z.string().regex(/^\d{6}$/, "NAICS must be 6 digits").optional().or(z.literal("")),
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
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()
|
|
4131
4112
|
});
|
|
4132
4113
|
z.object({
|
|
4133
4114
|
status: z.string().min(1, "Status is required"),
|
|
@@ -4165,7 +4146,7 @@ var BankAddressCard = ({
|
|
|
4165
4146
|
/* @__PURE__ */ jsx(
|
|
4166
4147
|
FormInput,
|
|
4167
4148
|
{
|
|
4168
|
-
name: "
|
|
4149
|
+
name: "line1",
|
|
4169
4150
|
label: "Street Address",
|
|
4170
4151
|
placeholder: "Enter street address",
|
|
4171
4152
|
required: true
|
|
@@ -4201,7 +4182,7 @@ var BankAddressCard = ({
|
|
|
4201
4182
|
] }) }) });
|
|
4202
4183
|
const formValues = form.watch();
|
|
4203
4184
|
const viewContent = /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
4204
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Street Address", value: formValues?.
|
|
4185
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Street Address", value: formValues?.line1, layout: "horizontal" }),
|
|
4205
4186
|
/* @__PURE__ */ jsx(InfoField, { label: "City", value: formValues?.city, layout: "horizontal" }),
|
|
4206
4187
|
/* @__PURE__ */ jsx(InfoField, { label: "State", value: formValues?.state, layout: "horizontal" }),
|
|
4207
4188
|
/* @__PURE__ */ jsx(InfoField, { label: "Postal Code", value: formValues?.postalCode, layout: "horizontal" })
|
|
@@ -4362,7 +4343,7 @@ var BankingDetailsCard = ({ isEditing, onToggleEdit, className }) => {
|
|
|
4362
4343
|
}
|
|
4363
4344
|
);
|
|
4364
4345
|
};
|
|
4365
|
-
var
|
|
4346
|
+
var typeConfig = {
|
|
4366
4347
|
BUSINESS: {
|
|
4367
4348
|
variant: "business",
|
|
4368
4349
|
label: "Business",
|
|
@@ -4385,7 +4366,7 @@ var typeConfig2 = {
|
|
|
4385
4366
|
}
|
|
4386
4367
|
};
|
|
4387
4368
|
var CounterpartyTypeBadge = ({ type, className }) => {
|
|
4388
|
-
const config =
|
|
4369
|
+
const config = typeConfig[type];
|
|
4389
4370
|
if (!config) {
|
|
4390
4371
|
return /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className, children: [
|
|
4391
4372
|
/* @__PURE__ */ jsx(Building2, { className: "w-3 h-3 mr-1" }),
|
|
@@ -4862,16 +4843,16 @@ var BusinessProfileCard = ({
|
|
|
4862
4843
|
/* @__PURE__ */ jsx(
|
|
4863
4844
|
FormInput,
|
|
4864
4845
|
{
|
|
4865
|
-
name: "
|
|
4866
|
-
label: "
|
|
4867
|
-
placeholder: "Enter
|
|
4846
|
+
name: "name",
|
|
4847
|
+
label: "Business Name",
|
|
4848
|
+
placeholder: "Enter business name",
|
|
4868
4849
|
required: true
|
|
4869
4850
|
}
|
|
4870
4851
|
),
|
|
4871
4852
|
/* @__PURE__ */ jsx(
|
|
4872
4853
|
FormInput,
|
|
4873
4854
|
{
|
|
4874
|
-
name: "
|
|
4855
|
+
name: "dba",
|
|
4875
4856
|
label: "DBA Name",
|
|
4876
4857
|
placeholder: "Enter doing business as name"
|
|
4877
4858
|
}
|
|
@@ -4879,23 +4860,28 @@ var BusinessProfileCard = ({
|
|
|
4879
4860
|
/* @__PURE__ */ jsx(
|
|
4880
4861
|
FormSelect,
|
|
4881
4862
|
{
|
|
4882
|
-
name: "
|
|
4883
|
-
label: "Business Type",
|
|
4863
|
+
name: "businessEntityType",
|
|
4864
|
+
label: "Business Entity Type",
|
|
4884
4865
|
placeholder: "Select business type",
|
|
4885
4866
|
options: [
|
|
4886
|
-
{ value: "
|
|
4887
|
-
{ value: "
|
|
4888
|
-
{ value: "
|
|
4889
|
-
{ 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" }
|
|
4890
4876
|
]
|
|
4891
4877
|
}
|
|
4892
4878
|
),
|
|
4893
4879
|
/* @__PURE__ */ jsx(
|
|
4894
4880
|
FormInput,
|
|
4895
4881
|
{
|
|
4896
|
-
name: "
|
|
4897
|
-
label: "
|
|
4898
|
-
placeholder: "Enter
|
|
4882
|
+
name: "idNumber",
|
|
4883
|
+
label: "ID Number",
|
|
4884
|
+
placeholder: "Enter ID number",
|
|
4899
4885
|
required: true
|
|
4900
4886
|
}
|
|
4901
4887
|
),
|
|
@@ -4911,13 +4897,14 @@ var BusinessProfileCard = ({
|
|
|
4911
4897
|
/* @__PURE__ */ jsx(
|
|
4912
4898
|
FormSelect,
|
|
4913
4899
|
{
|
|
4914
|
-
name: "
|
|
4900
|
+
name: "businessIdType",
|
|
4915
4901
|
label: "ID Type",
|
|
4916
4902
|
placeholder: "Select ID type",
|
|
4917
4903
|
options: [
|
|
4918
|
-
{ value: "
|
|
4919
|
-
{ value: "
|
|
4920
|
-
{ value: "
|
|
4904
|
+
{ value: "EIN", label: "EIN" },
|
|
4905
|
+
{ value: "SSN", label: "SSN" },
|
|
4906
|
+
{ value: "TIN", label: "TIN" },
|
|
4907
|
+
{ value: "OTHER_ID", label: "Other ID" }
|
|
4921
4908
|
]
|
|
4922
4909
|
}
|
|
4923
4910
|
),
|
|
@@ -4938,30 +4925,19 @@ var BusinessProfileCard = ({
|
|
|
4938
4925
|
}
|
|
4939
4926
|
)
|
|
4940
4927
|
] }),
|
|
4941
|
-
/* @__PURE__ */
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
}
|
|
4950
|
-
),
|
|
4951
|
-
/* @__PURE__ */ jsx(
|
|
4952
|
-
FormInput,
|
|
4953
|
-
{
|
|
4954
|
-
name: "mobilePhone",
|
|
4955
|
-
label: "Business Phone",
|
|
4956
|
-
placeholder: "Enter business phone"
|
|
4957
|
-
}
|
|
4958
|
-
)
|
|
4959
|
-
] }),
|
|
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
|
+
) }),
|
|
4960
4936
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-4", children: [
|
|
4961
4937
|
/* @__PURE__ */ jsx(
|
|
4962
4938
|
FormInput,
|
|
4963
4939
|
{
|
|
4964
|
-
name: "address.
|
|
4940
|
+
name: "address.line1",
|
|
4965
4941
|
label: "Street Address",
|
|
4966
4942
|
placeholder: "Enter street address"
|
|
4967
4943
|
}
|
|
@@ -4969,7 +4945,7 @@ var BusinessProfileCard = ({
|
|
|
4969
4945
|
/* @__PURE__ */ jsx(
|
|
4970
4946
|
FormInput,
|
|
4971
4947
|
{
|
|
4972
|
-
name: "address.
|
|
4948
|
+
name: "address.line2",
|
|
4973
4949
|
label: "Apartment, suite, or floor",
|
|
4974
4950
|
placeholder: "Enter apartment, suite, or floor"
|
|
4975
4951
|
}
|
|
@@ -5003,9 +4979,9 @@ var BusinessProfileCard = ({
|
|
|
5003
4979
|
/* @__PURE__ */ jsx(
|
|
5004
4980
|
FormInput,
|
|
5005
4981
|
{
|
|
5006
|
-
name: "address.
|
|
4982
|
+
name: "address.countryCode",
|
|
5007
4983
|
label: "Country Code",
|
|
5008
|
-
placeholder: "
|
|
4984
|
+
placeholder: "e.g., US"
|
|
5009
4985
|
}
|
|
5010
4986
|
)
|
|
5011
4987
|
] }),
|
|
@@ -5029,51 +5005,30 @@ var BusinessProfileCard = ({
|
|
|
5029
5005
|
}
|
|
5030
5006
|
)
|
|
5031
5007
|
] }),
|
|
5032
|
-
/* @__PURE__ */
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
5051
|
-
/* @__PURE__ */ jsx(
|
|
5052
|
-
FormInput,
|
|
5053
|
-
{
|
|
5054
|
-
name: "externalId",
|
|
5055
|
-
label: "External ID",
|
|
5056
|
-
placeholder: "UUID",
|
|
5057
|
-
disabled: true
|
|
5058
|
-
}
|
|
5059
|
-
),
|
|
5060
|
-
/* @__PURE__ */ jsx(
|
|
5061
|
-
FormInput,
|
|
5062
|
-
{
|
|
5063
|
-
name: "productId",
|
|
5064
|
-
label: "Product ID",
|
|
5065
|
-
type: "number",
|
|
5066
|
-
placeholder: "Product ID",
|
|
5067
|
-
disabled: true
|
|
5068
|
-
}
|
|
5069
|
-
)
|
|
5070
|
-
] }),
|
|
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
|
+
) }),
|
|
5071
5026
|
/* @__PURE__ */ jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Contact Person" }),
|
|
5072
5027
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
5073
5028
|
/* @__PURE__ */ jsx(
|
|
5074
5029
|
FormInput,
|
|
5075
5030
|
{
|
|
5076
|
-
name: "
|
|
5031
|
+
name: "contactPersonFirstName",
|
|
5077
5032
|
label: "First Name",
|
|
5078
5033
|
placeholder: "Enter first name"
|
|
5079
5034
|
}
|
|
@@ -5081,7 +5036,7 @@ var BusinessProfileCard = ({
|
|
|
5081
5036
|
/* @__PURE__ */ jsx(
|
|
5082
5037
|
FormInput,
|
|
5083
5038
|
{
|
|
5084
|
-
name: "
|
|
5039
|
+
name: "contactPersonLastName",
|
|
5085
5040
|
label: "Last Name",
|
|
5086
5041
|
placeholder: "Enter last name"
|
|
5087
5042
|
}
|
|
@@ -5089,7 +5044,7 @@ var BusinessProfileCard = ({
|
|
|
5089
5044
|
/* @__PURE__ */ jsx(
|
|
5090
5045
|
FormInput,
|
|
5091
5046
|
{
|
|
5092
|
-
name: "
|
|
5047
|
+
name: "contactPersonEmail",
|
|
5093
5048
|
label: "Email",
|
|
5094
5049
|
type: "email",
|
|
5095
5050
|
placeholder: "Enter email"
|
|
@@ -5098,7 +5053,7 @@ var BusinessProfileCard = ({
|
|
|
5098
5053
|
/* @__PURE__ */ jsx(
|
|
5099
5054
|
FormInput,
|
|
5100
5055
|
{
|
|
5101
|
-
name: "
|
|
5056
|
+
name: "contactPersonPhone",
|
|
5102
5057
|
label: "Phone Number",
|
|
5103
5058
|
placeholder: "Enter phone number"
|
|
5104
5059
|
}
|
|
@@ -5110,25 +5065,22 @@ var BusinessProfileCard = ({
|
|
|
5110
5065
|
const viewContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5111
5066
|
/* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
5112
5067
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5113
|
-
/* @__PURE__ */ jsx(InfoField, { label: "
|
|
5114
|
-
/* @__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" })
|
|
5115
5070
|
] }),
|
|
5116
5071
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5117
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Business Type", value: formValues?.
|
|
5118
|
-
/* @__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" })
|
|
5119
5074
|
] }),
|
|
5120
5075
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5121
5076
|
/* @__PURE__ */ jsx(InfoField, { label: "Formation Date", value: formValues?.formationDate || "-", layout: "horizontal" }),
|
|
5122
|
-
/* @__PURE__ */ jsx(InfoField, { label: "ID Type", value: formValues?.
|
|
5077
|
+
/* @__PURE__ */ jsx(InfoField, { label: "ID Type", value: formValues?.businessIdType || "-", layout: "horizontal" })
|
|
5123
5078
|
] }),
|
|
5124
5079
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5125
5080
|
/* @__PURE__ */ jsx(InfoField, { label: "Incorporation State", value: formValues?.incorporationState || "-", layout: "horizontal" }),
|
|
5126
5081
|
/* @__PURE__ */ jsx(InfoField, { label: "Website", value: formValues?.website || "-", layout: "horizontal" })
|
|
5127
5082
|
] }),
|
|
5128
|
-
/* @__PURE__ */
|
|
5129
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Business Email", value: formValues?.email || "-", layout: "horizontal" }),
|
|
5130
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Business Phone", value: formValues?.mobilePhone || "-", layout: "horizontal" })
|
|
5131
|
-
] }),
|
|
5083
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-4", children: /* @__PURE__ */ jsx(InfoField, { label: "Business Phone", value: formValues?.mobilePhone || "-", layout: "horizontal" }) }),
|
|
5132
5084
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5133
5085
|
/* @__PURE__ */ jsx(
|
|
5134
5086
|
InfoField,
|
|
@@ -5158,7 +5110,7 @@ var BusinessProfileCard = ({
|
|
|
5158
5110
|
InfoField,
|
|
5159
5111
|
{
|
|
5160
5112
|
label: "Address",
|
|
5161
|
-
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 || ""}` : "-",
|
|
5162
5114
|
layout: "horizontal"
|
|
5163
5115
|
}
|
|
5164
5116
|
),
|
|
@@ -5166,22 +5118,16 @@ var BusinessProfileCard = ({
|
|
|
5166
5118
|
/* @__PURE__ */ jsx(InfoField, { label: "MCC", value: formValues?.mcc || "-", layout: "horizontal" }),
|
|
5167
5119
|
/* @__PURE__ */ jsx(InfoField, { label: "NAICS", value: formValues?.naics || "-", layout: "horizontal" })
|
|
5168
5120
|
] }),
|
|
5169
|
-
/* @__PURE__ */
|
|
5170
|
-
|
|
5171
|
-
/* @__PURE__ */ jsx(InfoField, { label: "ACH Company Name", value: formValues?.achCompanyName || "-", layout: "horizontal" })
|
|
5172
|
-
] }),
|
|
5173
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5174
|
-
/* @__PURE__ */ jsx(InfoField, { label: "External ID", value: formValues?.externalId || "-", layout: "horizontal" }),
|
|
5175
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Product ID", value: formValues?.productId?.toString() || "-", layout: "horizontal" })
|
|
5176
|
-
] }),
|
|
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" }) }),
|
|
5177
5123
|
/* @__PURE__ */ jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Contact Person" }),
|
|
5178
5124
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5179
|
-
/* @__PURE__ */ jsx(InfoField, { label: "First Name", value: formValues?.
|
|
5180
|
-
/* @__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" })
|
|
5181
5127
|
] }),
|
|
5182
5128
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5183
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Email", value: formValues?.
|
|
5184
|
-
/* @__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" })
|
|
5185
5131
|
] })
|
|
5186
5132
|
] }),
|
|
5187
5133
|
/* @__PURE__ */ jsx(Dialog, { open: showResultDialog, onOpenChange: setShowResultDialog, children: /* @__PURE__ */ jsxs(DialogContent, { className: "max-w-3xl max-h-[80vh] overflow-y-auto", children: [
|
|
@@ -5610,7 +5556,7 @@ var IntermediaryCard = ({
|
|
|
5610
5556
|
] }),
|
|
5611
5557
|
/* @__PURE__ */ jsxs("div", { className: "pt-3 border-t border-border", children: [
|
|
5612
5558
|
/* @__PURE__ */ jsx("h4", { className: "text-sm font-medium text-foreground mb-2", children: "FI Address" }),
|
|
5613
|
-
/* @__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}` : "" })
|
|
5614
5560
|
] })
|
|
5615
5561
|
] });
|
|
5616
5562
|
return /* @__PURE__ */ jsx(
|
|
@@ -6843,6 +6789,36 @@ var AccountCard = React15.forwardRef(
|
|
|
6843
6789
|
}
|
|
6844
6790
|
);
|
|
6845
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
|
+
};
|
|
6846
6822
|
var Checkbox = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6847
6823
|
CheckboxPrimitive.Root,
|
|
6848
6824
|
{
|
|
@@ -9521,33 +9497,31 @@ var Business = () => {
|
|
|
9521
9497
|
};
|
|
9522
9498
|
var BusinessDetail_default = Business;
|
|
9523
9499
|
var defaultBusinessFormValues = {
|
|
9524
|
-
|
|
9525
|
-
|
|
9526
|
-
|
|
9527
|
-
|
|
9528
|
-
|
|
9529
|
-
|
|
9500
|
+
name: "",
|
|
9501
|
+
productId: 0,
|
|
9502
|
+
businessIdType: "",
|
|
9503
|
+
idNumber: "",
|
|
9504
|
+
dba: "",
|
|
9505
|
+
businessEntityType: "",
|
|
9530
9506
|
incorporationState: "",
|
|
9507
|
+
formationDate: "",
|
|
9531
9508
|
website: "",
|
|
9532
|
-
|
|
9509
|
+
achCompanyId: "",
|
|
9533
9510
|
mobilePhone: "",
|
|
9534
9511
|
mcc: "",
|
|
9535
9512
|
naics: "",
|
|
9536
|
-
|
|
9537
|
-
|
|
9538
|
-
|
|
9539
|
-
|
|
9540
|
-
contactLastName: "",
|
|
9541
|
-
contactEmail: "",
|
|
9542
|
-
contactPhone: "",
|
|
9513
|
+
contactPersonFirstName: "",
|
|
9514
|
+
contactPersonLastName: "",
|
|
9515
|
+
contactPersonEmail: "",
|
|
9516
|
+
contactPersonPhone: "",
|
|
9543
9517
|
address: {
|
|
9544
|
-
|
|
9545
|
-
|
|
9518
|
+
line1: "",
|
|
9519
|
+
line2: "",
|
|
9546
9520
|
city: "",
|
|
9547
9521
|
state: "",
|
|
9548
9522
|
postalCode: "",
|
|
9549
|
-
|
|
9550
|
-
|
|
9523
|
+
countryCode: "US",
|
|
9524
|
+
type: "MAILING"
|
|
9551
9525
|
}
|
|
9552
9526
|
};
|
|
9553
9527
|
var CreateBusiness = () => {
|
|
@@ -9566,7 +9540,7 @@ var CreateBusiness = () => {
|
|
|
9566
9540
|
}, [navigate]);
|
|
9567
9541
|
const handleBusinessTypeChange = useCallback((value) => {
|
|
9568
9542
|
setBusinessType(value);
|
|
9569
|
-
form.setValue("
|
|
9543
|
+
form.setValue("businessEntityType", value, { shouldValidate: true });
|
|
9570
9544
|
}, [form]);
|
|
9571
9545
|
return /* @__PURE__ */ jsx(
|
|
9572
9546
|
CreateBusinessView,
|