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.cjs
CHANGED
|
@@ -13,6 +13,7 @@ var reactRouterDom = require('react-router-dom');
|
|
|
13
13
|
var ScrollAreaPrimitive = require('@radix-ui/react-scroll-area');
|
|
14
14
|
var DialogPrimitive = require('@radix-ui/react-dialog');
|
|
15
15
|
var reactHookForm = require('react-hook-form');
|
|
16
|
+
var lodash = require('lodash');
|
|
16
17
|
var zod$1 = require('@hookform/resolvers/zod');
|
|
17
18
|
var zod = require('zod');
|
|
18
19
|
var reactCollapsible = require('@radix-ui/react-collapsible');
|
|
@@ -1858,7 +1859,7 @@ var FormInput = ({
|
|
|
1858
1859
|
...props
|
|
1859
1860
|
}) => {
|
|
1860
1861
|
const { control, formState } = reactHookForm.useFormContext();
|
|
1861
|
-
const error = formState.errors
|
|
1862
|
+
const error = lodash.get(formState.errors, name)?.message;
|
|
1862
1863
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1863
1864
|
reactHookForm.Controller,
|
|
1864
1865
|
{
|
|
@@ -1880,7 +1881,7 @@ var FormSelect = ({
|
|
|
1880
1881
|
...props
|
|
1881
1882
|
}) => {
|
|
1882
1883
|
const { control, formState } = reactHookForm.useFormContext();
|
|
1883
|
-
const error = formState.errors
|
|
1884
|
+
const error = lodash.get(formState.errors, name)?.message;
|
|
1884
1885
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1885
1886
|
reactHookForm.Controller,
|
|
1886
1887
|
{
|
|
@@ -3427,180 +3428,144 @@ var PageLayout = React15__namespace.forwardRef(
|
|
|
3427
3428
|
}
|
|
3428
3429
|
);
|
|
3429
3430
|
PageLayout.displayName = "PageLayout";
|
|
3430
|
-
var typeConfig = {
|
|
3431
|
-
corporation: {
|
|
3432
|
-
variant: "corporation",
|
|
3433
|
-
label: "Corporation",
|
|
3434
|
-
icon: lucideReact.Building
|
|
3435
|
-
},
|
|
3436
|
-
llc: {
|
|
3437
|
-
variant: "llc",
|
|
3438
|
-
label: "LLC",
|
|
3439
|
-
icon: lucideReact.Briefcase
|
|
3440
|
-
},
|
|
3441
|
-
partnership: {
|
|
3442
|
-
variant: "partnership",
|
|
3443
|
-
label: "Partnership",
|
|
3444
|
-
icon: lucideReact.Users
|
|
3445
|
-
},
|
|
3446
|
-
sole_proprietorship: {
|
|
3447
|
-
variant: "sole_proprietorship",
|
|
3448
|
-
label: "Sole Proprietorship",
|
|
3449
|
-
icon: lucideReact.User
|
|
3450
|
-
}
|
|
3451
|
-
};
|
|
3452
|
-
var BusinessTypeBadge = ({ type, className }) => {
|
|
3453
|
-
const config = typeConfig[type];
|
|
3454
|
-
const Icon2 = config.icon;
|
|
3455
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: config.variant, className, children: [
|
|
3456
|
-
/* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "w-3 h-3 mr-1" }),
|
|
3457
|
-
config.label
|
|
3458
|
-
] });
|
|
3459
|
-
};
|
|
3460
3431
|
var BusinessForm = ({
|
|
3461
3432
|
form,
|
|
3462
3433
|
businessType,
|
|
3463
3434
|
onBusinessTypeChange,
|
|
3464
3435
|
onSubmit
|
|
3465
3436
|
}) => {
|
|
3466
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "space-y-6", children: [
|
|
3437
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FormProvider, { form, children: /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "space-y-6", children: [
|
|
3467
3438
|
/* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "p-6", children: [
|
|
3468
3439
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b border-border pb-4 mb-6", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Business Information" }) }),
|
|
3469
3440
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
|
|
3470
3441
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3471
|
-
|
|
3442
|
+
FormInput,
|
|
3472
3443
|
{
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3444
|
+
name: "name",
|
|
3445
|
+
label: "Business Name",
|
|
3446
|
+
placeholder: "Enter business name",
|
|
3447
|
+
required: true
|
|
3477
3448
|
}
|
|
3478
3449
|
),
|
|
3479
3450
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3480
|
-
|
|
3451
|
+
FormInput,
|
|
3481
3452
|
{
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3453
|
+
name: "productId",
|
|
3454
|
+
label: "Product ID",
|
|
3455
|
+
placeholder: "Enter product ID",
|
|
3456
|
+
type: "number",
|
|
3457
|
+
required: true
|
|
3486
3458
|
}
|
|
3487
3459
|
),
|
|
3488
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
3489
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3490
|
-
EnhancedSelect,
|
|
3491
|
-
{
|
|
3492
|
-
label: "Business Type",
|
|
3493
|
-
placeholder: "Select business type",
|
|
3494
|
-
value: businessType,
|
|
3495
|
-
onValueChange: onBusinessTypeChange,
|
|
3496
|
-
options: [
|
|
3497
|
-
{ value: "corporation", label: "Corporation" },
|
|
3498
|
-
{ value: "llc", label: "LLC" },
|
|
3499
|
-
{ value: "partnership", label: "Partnership" },
|
|
3500
|
-
{ value: "sole_proprietorship", label: "Sole Proprietorship" }
|
|
3501
|
-
]
|
|
3502
|
-
}
|
|
3503
|
-
),
|
|
3504
|
-
businessType && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3505
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: "Preview:" }),
|
|
3506
|
-
/* @__PURE__ */ jsxRuntime.jsx(BusinessTypeBadge, { type: businessType })
|
|
3507
|
-
] })
|
|
3508
|
-
] }),
|
|
3509
3460
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3510
|
-
|
|
3461
|
+
FormSelect,
|
|
3511
3462
|
{
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3463
|
+
name: "businessIdType",
|
|
3464
|
+
label: "ID Number Type",
|
|
3465
|
+
placeholder: "Select ID type",
|
|
3466
|
+
options: [
|
|
3467
|
+
{ value: "EIN", label: "EIN" },
|
|
3468
|
+
{ value: "SSN", label: "SSN" },
|
|
3469
|
+
{ value: "TIN", label: "TIN" },
|
|
3470
|
+
{ value: "OTHER_ID", label: "Other ID" }
|
|
3471
|
+
]
|
|
3517
3472
|
}
|
|
3518
3473
|
),
|
|
3519
3474
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3520
|
-
|
|
3475
|
+
FormInput,
|
|
3521
3476
|
{
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3477
|
+
name: "idNumber",
|
|
3478
|
+
label: "ID Number",
|
|
3479
|
+
placeholder: "Enter ID number",
|
|
3480
|
+
required: true
|
|
3526
3481
|
}
|
|
3527
3482
|
),
|
|
3528
3483
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3529
|
-
|
|
3484
|
+
FormInput,
|
|
3530
3485
|
{
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3486
|
+
name: "dba",
|
|
3487
|
+
label: "DBA Name",
|
|
3488
|
+
placeholder: "Enter DBA name",
|
|
3489
|
+
hint: "Doing Business As name"
|
|
3534
3490
|
}
|
|
3535
3491
|
),
|
|
3536
3492
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3537
|
-
|
|
3493
|
+
FormSelect,
|
|
3538
3494
|
{
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3495
|
+
name: "businessEntityType",
|
|
3496
|
+
label: "Business Entity Type",
|
|
3497
|
+
placeholder: "Select business type",
|
|
3498
|
+
options: [
|
|
3499
|
+
{ value: "SOLE_PROPRIETOR", label: "Sole Proprietor" },
|
|
3500
|
+
{ value: "LIMITED_LIABILITY_COMPANY", label: "Limited Liability Company (LLC)" },
|
|
3501
|
+
{ value: "CORPORATION", label: "S or C Corporation" },
|
|
3502
|
+
{ value: "GENERAL_PARTNERSHIP", label: "General Partnership" },
|
|
3503
|
+
{ value: "LIMITED_LIABILITY_PARTNERSHIP", label: "Limited Liability Partnership" },
|
|
3504
|
+
{ value: "NON_PROFIT", label: "Non-Profit Corporation" },
|
|
3505
|
+
{ value: "GOVERNMENT_ORGANIZATION", label: "Government Organization" },
|
|
3506
|
+
{ value: "PUBLICLY_TRADED_COMPANY", label: "Publicly Traded Company" },
|
|
3507
|
+
{ value: "TRUSTS", label: "Trusts" }
|
|
3508
|
+
]
|
|
3543
3509
|
}
|
|
3544
3510
|
),
|
|
3545
3511
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3546
|
-
|
|
3512
|
+
FormInput,
|
|
3547
3513
|
{
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
...form.register("email")
|
|
3514
|
+
name: "incorporationState",
|
|
3515
|
+
label: "Incorporation State",
|
|
3516
|
+
placeholder: "Enter state"
|
|
3552
3517
|
}
|
|
3553
3518
|
),
|
|
3554
3519
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3555
|
-
|
|
3520
|
+
FormInput,
|
|
3556
3521
|
{
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3522
|
+
name: "formationDate",
|
|
3523
|
+
label: "Formation Date",
|
|
3524
|
+
placeholder: "YYYY-MM-DD",
|
|
3525
|
+
type: "date"
|
|
3560
3526
|
}
|
|
3561
3527
|
),
|
|
3562
3528
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3563
|
-
|
|
3529
|
+
FormInput,
|
|
3564
3530
|
{
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
...form.register("mcc")
|
|
3531
|
+
name: "website",
|
|
3532
|
+
label: "Website",
|
|
3533
|
+
placeholder: "https://www.business.com"
|
|
3569
3534
|
}
|
|
3570
3535
|
),
|
|
3571
3536
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3572
|
-
|
|
3537
|
+
FormInput,
|
|
3573
3538
|
{
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3539
|
+
name: "mobilePhone",
|
|
3540
|
+
label: "Mobile Phone",
|
|
3541
|
+
placeholder: "+1 (555) 123-4567",
|
|
3542
|
+
hint: "Format: +1 (555) 123-4567"
|
|
3578
3543
|
}
|
|
3579
3544
|
),
|
|
3580
3545
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3581
|
-
|
|
3546
|
+
FormInput,
|
|
3582
3547
|
{
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3548
|
+
name: "mcc",
|
|
3549
|
+
label: "MCC",
|
|
3550
|
+
placeholder: "1234",
|
|
3551
|
+
hint: "4-digit Merchant Category Code"
|
|
3587
3552
|
}
|
|
3588
3553
|
),
|
|
3589
3554
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3590
|
-
|
|
3555
|
+
FormInput,
|
|
3591
3556
|
{
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3557
|
+
name: "naics",
|
|
3558
|
+
label: "NAICS",
|
|
3559
|
+
placeholder: "123456",
|
|
3560
|
+
hint: "6-digit industry classification"
|
|
3595
3561
|
}
|
|
3596
3562
|
),
|
|
3597
3563
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3598
|
-
|
|
3564
|
+
FormInput,
|
|
3599
3565
|
{
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
...form.register("externalId")
|
|
3566
|
+
name: "achCompanyId",
|
|
3567
|
+
label: "ACH Company ID",
|
|
3568
|
+
placeholder: "Enter ACH company ID"
|
|
3604
3569
|
}
|
|
3605
3570
|
)
|
|
3606
3571
|
] })
|
|
@@ -3609,62 +3574,60 @@ var BusinessForm = ({
|
|
|
3609
3574
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b border-border pb-4 mb-6", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Business Address" }) }),
|
|
3610
3575
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
|
|
3611
3576
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3612
|
-
|
|
3577
|
+
FormInput,
|
|
3613
3578
|
{
|
|
3579
|
+
name: "address.line1",
|
|
3614
3580
|
label: "Street Address",
|
|
3615
|
-
placeholder: "Enter street address"
|
|
3616
|
-
required: true,
|
|
3617
|
-
...form.register("address.streetAddress")
|
|
3581
|
+
placeholder: "Enter street address"
|
|
3618
3582
|
}
|
|
3619
3583
|
),
|
|
3620
3584
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3621
|
-
|
|
3585
|
+
FormInput,
|
|
3622
3586
|
{
|
|
3587
|
+
name: "address.line2",
|
|
3623
3588
|
label: "Apartment/Suite",
|
|
3624
|
-
placeholder: "Enter apartment or suite number"
|
|
3625
|
-
...form.register("address.apartment")
|
|
3589
|
+
placeholder: "Enter apartment or suite number"
|
|
3626
3590
|
}
|
|
3627
3591
|
),
|
|
3628
3592
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3629
|
-
|
|
3593
|
+
FormInput,
|
|
3630
3594
|
{
|
|
3595
|
+
name: "address.city",
|
|
3631
3596
|
label: "City",
|
|
3632
|
-
placeholder: "Enter city"
|
|
3633
|
-
required: true,
|
|
3634
|
-
...form.register("address.city")
|
|
3597
|
+
placeholder: "Enter city"
|
|
3635
3598
|
}
|
|
3636
3599
|
),
|
|
3637
3600
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3638
|
-
|
|
3601
|
+
FormInput,
|
|
3639
3602
|
{
|
|
3603
|
+
name: "address.state",
|
|
3640
3604
|
label: "State",
|
|
3641
|
-
placeholder: "Enter state"
|
|
3642
|
-
required: true,
|
|
3643
|
-
...form.register("address.state")
|
|
3605
|
+
placeholder: "Enter state"
|
|
3644
3606
|
}
|
|
3645
3607
|
),
|
|
3646
3608
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3647
|
-
|
|
3609
|
+
FormInput,
|
|
3648
3610
|
{
|
|
3611
|
+
name: "address.postalCode",
|
|
3649
3612
|
label: "Postal Code",
|
|
3650
|
-
placeholder: "12345"
|
|
3651
|
-
required: true,
|
|
3652
|
-
...form.register("address.postalCode")
|
|
3613
|
+
placeholder: "12345"
|
|
3653
3614
|
}
|
|
3654
3615
|
),
|
|
3655
3616
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3656
|
-
|
|
3617
|
+
FormInput,
|
|
3657
3618
|
{
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3619
|
+
name: "address.countryCode",
|
|
3620
|
+
label: "Country Code",
|
|
3621
|
+
placeholder: "e.g., US",
|
|
3622
|
+
required: true
|
|
3623
|
+
}
|
|
3624
|
+
),
|
|
3625
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3626
|
+
FormInput,
|
|
3627
|
+
{
|
|
3628
|
+
name: "address.type",
|
|
3629
|
+
label: "Address Type",
|
|
3630
|
+
placeholder: "e.g., MAILING"
|
|
3668
3631
|
}
|
|
3669
3632
|
)
|
|
3670
3633
|
] })
|
|
@@ -3673,41 +3636,41 @@ var BusinessForm = ({
|
|
|
3673
3636
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b border-border pb-4 mb-6", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Contact Information" }) }),
|
|
3674
3637
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
|
|
3675
3638
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3676
|
-
|
|
3639
|
+
FormInput,
|
|
3677
3640
|
{
|
|
3641
|
+
name: "contactPersonFirstName",
|
|
3678
3642
|
label: "Contact First Name",
|
|
3679
|
-
placeholder: "Enter first name"
|
|
3680
|
-
...form.register("contactFirstName")
|
|
3643
|
+
placeholder: "Enter first name"
|
|
3681
3644
|
}
|
|
3682
3645
|
),
|
|
3683
3646
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3684
|
-
|
|
3647
|
+
FormInput,
|
|
3685
3648
|
{
|
|
3649
|
+
name: "contactPersonLastName",
|
|
3686
3650
|
label: "Contact Last Name",
|
|
3687
|
-
placeholder: "Enter last name"
|
|
3688
|
-
...form.register("contactLastName")
|
|
3651
|
+
placeholder: "Enter last name"
|
|
3689
3652
|
}
|
|
3690
3653
|
),
|
|
3691
3654
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3692
|
-
|
|
3655
|
+
FormInput,
|
|
3693
3656
|
{
|
|
3657
|
+
name: "contactPersonEmail",
|
|
3694
3658
|
label: "Contact Email",
|
|
3695
3659
|
placeholder: "contact@business.com",
|
|
3696
|
-
type: "email"
|
|
3697
|
-
...form.register("contactEmail")
|
|
3660
|
+
type: "email"
|
|
3698
3661
|
}
|
|
3699
3662
|
),
|
|
3700
3663
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3701
|
-
|
|
3664
|
+
FormInput,
|
|
3702
3665
|
{
|
|
3666
|
+
name: "contactPersonPhone",
|
|
3703
3667
|
label: "Contact Phone",
|
|
3704
|
-
placeholder: "+1 (555) 123-4567"
|
|
3705
|
-
...form.register("contactPhone")
|
|
3668
|
+
placeholder: "+1 (555) 123-4567"
|
|
3706
3669
|
}
|
|
3707
3670
|
)
|
|
3708
3671
|
] })
|
|
3709
3672
|
] })
|
|
3710
|
-
] });
|
|
3673
|
+
] }) });
|
|
3711
3674
|
};
|
|
3712
3675
|
var CreateBusinessView = ({
|
|
3713
3676
|
form,
|
|
@@ -4083,13 +4046,17 @@ zod.z.object({
|
|
|
4083
4046
|
website: zod.z.string().url("Invalid URL format").optional().or(zod.z.literal(""))
|
|
4084
4047
|
});
|
|
4085
4048
|
var addressSchema = zod.z.object({
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4049
|
+
line1: zod.z.string().optional(),
|
|
4050
|
+
// Street address
|
|
4051
|
+
line2: zod.z.string().optional(),
|
|
4052
|
+
// Apartment, suite, or floor
|
|
4053
|
+
city: zod.z.string().optional(),
|
|
4054
|
+
state: zod.z.string().optional(),
|
|
4055
|
+
postalCode: zod.z.string().optional(),
|
|
4056
|
+
countryCode: zod.z.string().min(1, "Country code is required"),
|
|
4057
|
+
// Required field
|
|
4058
|
+
type: zod.z.string().optional()
|
|
4059
|
+
// Address type (e.g., "MAILING")
|
|
4093
4060
|
});
|
|
4094
4061
|
zod.z.object({
|
|
4095
4062
|
id: zod.z.string(),
|
|
@@ -4139,27 +4106,41 @@ zod.z.object({
|
|
|
4139
4106
|
intermediaryFI: intermediaryFISchema.optional()
|
|
4140
4107
|
});
|
|
4141
4108
|
var businessProfileSchema = zod.z.object({
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4109
|
+
// Required fields
|
|
4110
|
+
name: zod.z.string().min(1, "Business name is required"),
|
|
4111
|
+
productId: zod.z.number().min(1, "Product ID is required"),
|
|
4112
|
+
businessIdType: zod.z.string().min(1, "ID Number type is required"),
|
|
4113
|
+
// EIN, SSN, TIN, OTHER_ID
|
|
4114
|
+
idNumber: zod.z.string().min(1, "ID Number is required"),
|
|
4115
|
+
// Optional fields
|
|
4116
|
+
dba: zod.z.string().optional(),
|
|
4117
|
+
businessEntityType: zod.z.string().optional(),
|
|
4118
|
+
// Company type
|
|
4148
4119
|
incorporationState: zod.z.string().optional(),
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4120
|
+
formationDate: zod.z.string().optional(),
|
|
4121
|
+
website: zod.z.string().optional(),
|
|
4122
|
+
achCompanyId: zod.z.string().optional(),
|
|
4123
|
+
// Optional fields with pattern validation
|
|
4152
4124
|
mcc: zod.z.string().regex(/^\d{4}$/, "MCC must be 4 digits").optional().or(zod.z.literal("")),
|
|
4153
4125
|
naics: zod.z.string().regex(/^\d{6}$/, "NAICS must be 6 digits").optional().or(zod.z.literal("")),
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4126
|
+
mobilePhone: zod.z.string().regex(
|
|
4127
|
+
/^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/im,
|
|
4128
|
+
"Invalid phone number format"
|
|
4129
|
+
).optional().or(zod.z.literal("")),
|
|
4130
|
+
// Contact person information (optional)
|
|
4131
|
+
contactPersonFirstName: zod.z.string().optional(),
|
|
4132
|
+
contactPersonLastName: zod.z.string().optional(),
|
|
4133
|
+
contactPersonEmail: zod.z.string().optional(),
|
|
4134
|
+
contactPersonPhone: zod.z.string().optional(),
|
|
4135
|
+
// Address (optional)
|
|
4136
|
+
address: addressSchema.optional(),
|
|
4137
|
+
// Submitted by object (optional)
|
|
4138
|
+
submittedBy: zod.z.object({
|
|
4139
|
+
contactPersonEmail: zod.z.string().optional(),
|
|
4140
|
+
contactPersonFirstName: zod.z.string().optional(),
|
|
4141
|
+
contactPersonLastName: zod.z.string().optional(),
|
|
4142
|
+
contactPersonPhone: zod.z.string().optional()
|
|
4143
|
+
}).optional()
|
|
4163
4144
|
});
|
|
4164
4145
|
zod.z.object({
|
|
4165
4146
|
status: zod.z.string().min(1, "Status is required"),
|
|
@@ -4197,7 +4178,7 @@ var BankAddressCard = ({
|
|
|
4197
4178
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4198
4179
|
FormInput,
|
|
4199
4180
|
{
|
|
4200
|
-
name: "
|
|
4181
|
+
name: "line1",
|
|
4201
4182
|
label: "Street Address",
|
|
4202
4183
|
placeholder: "Enter street address",
|
|
4203
4184
|
required: true
|
|
@@ -4233,7 +4214,7 @@ var BankAddressCard = ({
|
|
|
4233
4214
|
] }) }) });
|
|
4234
4215
|
const formValues = form.watch();
|
|
4235
4216
|
const viewContent = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
4236
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Street Address", value: formValues?.
|
|
4217
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Street Address", value: formValues?.line1, layout: "horizontal" }),
|
|
4237
4218
|
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "City", value: formValues?.city, layout: "horizontal" }),
|
|
4238
4219
|
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "State", value: formValues?.state, layout: "horizontal" }),
|
|
4239
4220
|
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Postal Code", value: formValues?.postalCode, layout: "horizontal" })
|
|
@@ -4394,7 +4375,7 @@ var BankingDetailsCard = ({ isEditing, onToggleEdit, className }) => {
|
|
|
4394
4375
|
}
|
|
4395
4376
|
);
|
|
4396
4377
|
};
|
|
4397
|
-
var
|
|
4378
|
+
var typeConfig = {
|
|
4398
4379
|
BUSINESS: {
|
|
4399
4380
|
variant: "business",
|
|
4400
4381
|
label: "Business",
|
|
@@ -4417,7 +4398,7 @@ var typeConfig2 = {
|
|
|
4417
4398
|
}
|
|
4418
4399
|
};
|
|
4419
4400
|
var CounterpartyTypeBadge = ({ type, className }) => {
|
|
4420
|
-
const config =
|
|
4401
|
+
const config = typeConfig[type];
|
|
4421
4402
|
if (!config) {
|
|
4422
4403
|
return /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "secondary", className, children: [
|
|
4423
4404
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Building2, { className: "w-3 h-3 mr-1" }),
|
|
@@ -4894,16 +4875,16 @@ var BusinessProfileCard = ({
|
|
|
4894
4875
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4895
4876
|
FormInput,
|
|
4896
4877
|
{
|
|
4897
|
-
name: "
|
|
4898
|
-
label: "
|
|
4899
|
-
placeholder: "Enter
|
|
4878
|
+
name: "name",
|
|
4879
|
+
label: "Business Name",
|
|
4880
|
+
placeholder: "Enter business name",
|
|
4900
4881
|
required: true
|
|
4901
4882
|
}
|
|
4902
4883
|
),
|
|
4903
4884
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4904
4885
|
FormInput,
|
|
4905
4886
|
{
|
|
4906
|
-
name: "
|
|
4887
|
+
name: "dba",
|
|
4907
4888
|
label: "DBA Name",
|
|
4908
4889
|
placeholder: "Enter doing business as name"
|
|
4909
4890
|
}
|
|
@@ -4911,23 +4892,28 @@ var BusinessProfileCard = ({
|
|
|
4911
4892
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4912
4893
|
FormSelect,
|
|
4913
4894
|
{
|
|
4914
|
-
name: "
|
|
4915
|
-
label: "Business Type",
|
|
4895
|
+
name: "businessEntityType",
|
|
4896
|
+
label: "Business Entity Type",
|
|
4916
4897
|
placeholder: "Select business type",
|
|
4917
4898
|
options: [
|
|
4918
|
-
{ value: "
|
|
4919
|
-
{ value: "
|
|
4920
|
-
{ value: "
|
|
4921
|
-
{ value: "
|
|
4899
|
+
{ value: "SOLE_PROPRIETOR", label: "Sole Proprietor" },
|
|
4900
|
+
{ value: "LIMITED_LIABILITY_COMPANY", label: "Limited Liability Company (LLC)" },
|
|
4901
|
+
{ value: "CORPORATION", label: "S or C Corporation" },
|
|
4902
|
+
{ value: "GENERAL_PARTNERSHIP", label: "General Partnership" },
|
|
4903
|
+
{ value: "LIMITED_LIABILITY_PARTNERSHIP", label: "Limited Liability Partnership" },
|
|
4904
|
+
{ value: "NON_PROFIT", label: "Non-Profit Corporation" },
|
|
4905
|
+
{ value: "GOVERNMENT_ORGANIZATION", label: "Government Organization" },
|
|
4906
|
+
{ value: "PUBLICLY_TRADED_COMPANY", label: "Publicly Traded Company" },
|
|
4907
|
+
{ value: "TRUSTS", label: "Trusts" }
|
|
4922
4908
|
]
|
|
4923
4909
|
}
|
|
4924
4910
|
),
|
|
4925
4911
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4926
4912
|
FormInput,
|
|
4927
4913
|
{
|
|
4928
|
-
name: "
|
|
4929
|
-
label: "
|
|
4930
|
-
placeholder: "Enter
|
|
4914
|
+
name: "idNumber",
|
|
4915
|
+
label: "ID Number",
|
|
4916
|
+
placeholder: "Enter ID number",
|
|
4931
4917
|
required: true
|
|
4932
4918
|
}
|
|
4933
4919
|
),
|
|
@@ -4943,13 +4929,14 @@ var BusinessProfileCard = ({
|
|
|
4943
4929
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4944
4930
|
FormSelect,
|
|
4945
4931
|
{
|
|
4946
|
-
name: "
|
|
4932
|
+
name: "businessIdType",
|
|
4947
4933
|
label: "ID Type",
|
|
4948
4934
|
placeholder: "Select ID type",
|
|
4949
4935
|
options: [
|
|
4950
|
-
{ value: "
|
|
4951
|
-
{ value: "
|
|
4952
|
-
{ value: "
|
|
4936
|
+
{ value: "EIN", label: "EIN" },
|
|
4937
|
+
{ value: "SSN", label: "SSN" },
|
|
4938
|
+
{ value: "TIN", label: "TIN" },
|
|
4939
|
+
{ value: "OTHER_ID", label: "Other ID" }
|
|
4953
4940
|
]
|
|
4954
4941
|
}
|
|
4955
4942
|
),
|
|
@@ -4970,30 +4957,19 @@ var BusinessProfileCard = ({
|
|
|
4970
4957
|
}
|
|
4971
4958
|
)
|
|
4972
4959
|
] }),
|
|
4973
|
-
/* @__PURE__ */ jsxRuntime.
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
}
|
|
4982
|
-
),
|
|
4983
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4984
|
-
FormInput,
|
|
4985
|
-
{
|
|
4986
|
-
name: "mobilePhone",
|
|
4987
|
-
label: "Business Phone",
|
|
4988
|
-
placeholder: "Enter business phone"
|
|
4989
|
-
}
|
|
4990
|
-
)
|
|
4991
|
-
] }),
|
|
4960
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4961
|
+
FormInput,
|
|
4962
|
+
{
|
|
4963
|
+
name: "mobilePhone",
|
|
4964
|
+
label: "Business Phone",
|
|
4965
|
+
placeholder: "Enter business phone"
|
|
4966
|
+
}
|
|
4967
|
+
) }),
|
|
4992
4968
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4", children: [
|
|
4993
4969
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4994
4970
|
FormInput,
|
|
4995
4971
|
{
|
|
4996
|
-
name: "address.
|
|
4972
|
+
name: "address.line1",
|
|
4997
4973
|
label: "Street Address",
|
|
4998
4974
|
placeholder: "Enter street address"
|
|
4999
4975
|
}
|
|
@@ -5001,7 +4977,7 @@ var BusinessProfileCard = ({
|
|
|
5001
4977
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5002
4978
|
FormInput,
|
|
5003
4979
|
{
|
|
5004
|
-
name: "address.
|
|
4980
|
+
name: "address.line2",
|
|
5005
4981
|
label: "Apartment, suite, or floor",
|
|
5006
4982
|
placeholder: "Enter apartment, suite, or floor"
|
|
5007
4983
|
}
|
|
@@ -5035,9 +5011,9 @@ var BusinessProfileCard = ({
|
|
|
5035
5011
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5036
5012
|
FormInput,
|
|
5037
5013
|
{
|
|
5038
|
-
name: "address.
|
|
5014
|
+
name: "address.countryCode",
|
|
5039
5015
|
label: "Country Code",
|
|
5040
|
-
placeholder: "
|
|
5016
|
+
placeholder: "e.g., US"
|
|
5041
5017
|
}
|
|
5042
5018
|
)
|
|
5043
5019
|
] }),
|
|
@@ -5061,51 +5037,30 @@ var BusinessProfileCard = ({
|
|
|
5061
5037
|
}
|
|
5062
5038
|
)
|
|
5063
5039
|
] }),
|
|
5064
|
-
/* @__PURE__ */ jsxRuntime.
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
5083
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5084
|
-
FormInput,
|
|
5085
|
-
{
|
|
5086
|
-
name: "externalId",
|
|
5087
|
-
label: "External ID",
|
|
5088
|
-
placeholder: "UUID",
|
|
5089
|
-
disabled: true
|
|
5090
|
-
}
|
|
5091
|
-
),
|
|
5092
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5093
|
-
FormInput,
|
|
5094
|
-
{
|
|
5095
|
-
name: "productId",
|
|
5096
|
-
label: "Product ID",
|
|
5097
|
-
type: "number",
|
|
5098
|
-
placeholder: "Product ID",
|
|
5099
|
-
disabled: true
|
|
5100
|
-
}
|
|
5101
|
-
)
|
|
5102
|
-
] }),
|
|
5040
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5041
|
+
FormInput,
|
|
5042
|
+
{
|
|
5043
|
+
name: "achCompanyId",
|
|
5044
|
+
label: "ACH Company ID",
|
|
5045
|
+
placeholder: "10-digit company ID"
|
|
5046
|
+
}
|
|
5047
|
+
) }),
|
|
5048
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5049
|
+
FormInput,
|
|
5050
|
+
{
|
|
5051
|
+
name: "productId",
|
|
5052
|
+
label: "Product ID",
|
|
5053
|
+
type: "number",
|
|
5054
|
+
placeholder: "Product ID",
|
|
5055
|
+
disabled: true
|
|
5056
|
+
}
|
|
5057
|
+
) }),
|
|
5103
5058
|
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Contact Person" }),
|
|
5104
5059
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
5105
5060
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5106
5061
|
FormInput,
|
|
5107
5062
|
{
|
|
5108
|
-
name: "
|
|
5063
|
+
name: "contactPersonFirstName",
|
|
5109
5064
|
label: "First Name",
|
|
5110
5065
|
placeholder: "Enter first name"
|
|
5111
5066
|
}
|
|
@@ -5113,7 +5068,7 @@ var BusinessProfileCard = ({
|
|
|
5113
5068
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5114
5069
|
FormInput,
|
|
5115
5070
|
{
|
|
5116
|
-
name: "
|
|
5071
|
+
name: "contactPersonLastName",
|
|
5117
5072
|
label: "Last Name",
|
|
5118
5073
|
placeholder: "Enter last name"
|
|
5119
5074
|
}
|
|
@@ -5121,7 +5076,7 @@ var BusinessProfileCard = ({
|
|
|
5121
5076
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5122
5077
|
FormInput,
|
|
5123
5078
|
{
|
|
5124
|
-
name: "
|
|
5079
|
+
name: "contactPersonEmail",
|
|
5125
5080
|
label: "Email",
|
|
5126
5081
|
type: "email",
|
|
5127
5082
|
placeholder: "Enter email"
|
|
@@ -5130,7 +5085,7 @@ var BusinessProfileCard = ({
|
|
|
5130
5085
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5131
5086
|
FormInput,
|
|
5132
5087
|
{
|
|
5133
|
-
name: "
|
|
5088
|
+
name: "contactPersonPhone",
|
|
5134
5089
|
label: "Phone Number",
|
|
5135
5090
|
placeholder: "Enter phone number"
|
|
5136
5091
|
}
|
|
@@ -5142,25 +5097,22 @@ var BusinessProfileCard = ({
|
|
|
5142
5097
|
const viewContent = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5143
5098
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
5144
5099
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5145
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "
|
|
5146
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "DBA Name", value: formValues?.
|
|
5100
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Business Name", value: formValues?.name || "-", layout: "horizontal" }),
|
|
5101
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "DBA Name", value: formValues?.dba || "-", layout: "horizontal" })
|
|
5147
5102
|
] }),
|
|
5148
5103
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5149
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Business Type", value: formValues?.
|
|
5150
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "
|
|
5104
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Business Entity Type", value: formValues?.businessEntityType || "-", layout: "horizontal" }),
|
|
5105
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ID Number", value: formValues?.idNumber || "-", layout: "horizontal" })
|
|
5151
5106
|
] }),
|
|
5152
5107
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5153
5108
|
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Formation Date", value: formValues?.formationDate || "-", layout: "horizontal" }),
|
|
5154
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ID Type", value: formValues?.
|
|
5109
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ID Type", value: formValues?.businessIdType || "-", layout: "horizontal" })
|
|
5155
5110
|
] }),
|
|
5156
5111
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5157
5112
|
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Incorporation State", value: formValues?.incorporationState || "-", layout: "horizontal" }),
|
|
5158
5113
|
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Website", value: formValues?.website || "-", layout: "horizontal" })
|
|
5159
5114
|
] }),
|
|
5160
|
-
/* @__PURE__ */ jsxRuntime.
|
|
5161
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Business Email", value: formValues?.email || "-", layout: "horizontal" }),
|
|
5162
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Business Phone", value: formValues?.mobilePhone || "-", layout: "horizontal" })
|
|
5163
|
-
] }),
|
|
5115
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-4", children: /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Business Phone", value: formValues?.mobilePhone || "-", layout: "horizontal" }) }),
|
|
5164
5116
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5165
5117
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5166
5118
|
InfoField,
|
|
@@ -5190,7 +5142,7 @@ var BusinessProfileCard = ({
|
|
|
5190
5142
|
InfoField,
|
|
5191
5143
|
{
|
|
5192
5144
|
label: "Address",
|
|
5193
|
-
value: formValues?.address ? `${formValues.address.
|
|
5145
|
+
value: formValues?.address ? `${formValues.address.line1 || ""}${formValues.address.line2 ? ", " + formValues.address.line2 : ""}, ${formValues.address.city || ""}, ${formValues.address.state || ""} ${formValues.address.postalCode || ""}, ${formValues.address.countryCode || ""}` : "-",
|
|
5194
5146
|
layout: "horizontal"
|
|
5195
5147
|
}
|
|
5196
5148
|
),
|
|
@@ -5198,22 +5150,16 @@ var BusinessProfileCard = ({
|
|
|
5198
5150
|
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "MCC", value: formValues?.mcc || "-", layout: "horizontal" }),
|
|
5199
5151
|
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "NAICS", value: formValues?.naics || "-", layout: "horizontal" })
|
|
5200
5152
|
] }),
|
|
5201
|
-
/* @__PURE__ */ jsxRuntime.
|
|
5202
|
-
|
|
5203
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ACH Company Name", value: formValues?.achCompanyName || "-", layout: "horizontal" })
|
|
5204
|
-
] }),
|
|
5205
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5206
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "External ID", value: formValues?.externalId || "-", layout: "horizontal" }),
|
|
5207
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Product ID", value: formValues?.productId?.toString() || "-", layout: "horizontal" })
|
|
5208
|
-
] }),
|
|
5153
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-4", children: /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ACH Company ID", value: formValues?.achCompanyId || "-", layout: "horizontal" }) }),
|
|
5154
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-4", children: /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Product ID", value: formValues?.productId?.toString() || "-", layout: "horizontal" }) }),
|
|
5209
5155
|
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Contact Person" }),
|
|
5210
5156
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5211
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "First Name", value: formValues?.
|
|
5212
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Last Name", value: formValues?.
|
|
5157
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "First Name", value: formValues?.contactPersonFirstName || "-", layout: "horizontal" }),
|
|
5158
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Last Name", value: formValues?.contactPersonLastName || "-", layout: "horizontal" })
|
|
5213
5159
|
] }),
|
|
5214
5160
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5215
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Email", value: formValues?.
|
|
5216
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Phone Number", value: formValues?.
|
|
5161
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Email", value: formValues?.contactPersonEmail || "-", layout: "horizontal" }),
|
|
5162
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Phone Number", value: formValues?.contactPersonPhone || "-", layout: "horizontal" })
|
|
5217
5163
|
] })
|
|
5218
5164
|
] }),
|
|
5219
5165
|
/* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: showResultDialog, onOpenChange: setShowResultDialog, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "max-w-3xl max-h-[80vh] overflow-y-auto", children: [
|
|
@@ -5642,7 +5588,7 @@ var IntermediaryCard = ({
|
|
|
5642
5588
|
] }),
|
|
5643
5589
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pt-3 border-t border-border", children: [
|
|
5644
5590
|
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium text-foreground mb-2", children: "FI Address" }),
|
|
5645
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { value: formValues?.address ? `${formValues.address.
|
|
5591
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { value: formValues?.address ? `${formValues.address.line1}, ${formValues.address.city}, ${formValues.address.postalCode}, ${formValues.address.countryCode}` : "" })
|
|
5646
5592
|
] })
|
|
5647
5593
|
] });
|
|
5648
5594
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6875,6 +6821,36 @@ var AccountCard = React15__namespace.forwardRef(
|
|
|
6875
6821
|
}
|
|
6876
6822
|
);
|
|
6877
6823
|
AccountCard.displayName = "AccountCard";
|
|
6824
|
+
var typeConfig2 = {
|
|
6825
|
+
corporation: {
|
|
6826
|
+
variant: "corporation",
|
|
6827
|
+
label: "Corporation",
|
|
6828
|
+
icon: lucideReact.Building
|
|
6829
|
+
},
|
|
6830
|
+
llc: {
|
|
6831
|
+
variant: "llc",
|
|
6832
|
+
label: "LLC",
|
|
6833
|
+
icon: lucideReact.Briefcase
|
|
6834
|
+
},
|
|
6835
|
+
partnership: {
|
|
6836
|
+
variant: "partnership",
|
|
6837
|
+
label: "Partnership",
|
|
6838
|
+
icon: lucideReact.Users
|
|
6839
|
+
},
|
|
6840
|
+
sole_proprietorship: {
|
|
6841
|
+
variant: "sole_proprietorship",
|
|
6842
|
+
label: "Sole Proprietorship",
|
|
6843
|
+
icon: lucideReact.User
|
|
6844
|
+
}
|
|
6845
|
+
};
|
|
6846
|
+
var BusinessTypeBadge = ({ type, className }) => {
|
|
6847
|
+
const config = typeConfig2[type];
|
|
6848
|
+
const Icon2 = config.icon;
|
|
6849
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: config.variant, className, children: [
|
|
6850
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "w-3 h-3 mr-1" }),
|
|
6851
|
+
config.label
|
|
6852
|
+
] });
|
|
6853
|
+
};
|
|
6878
6854
|
var Checkbox = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6879
6855
|
CheckboxPrimitive__namespace.Root,
|
|
6880
6856
|
{
|
|
@@ -9553,33 +9529,31 @@ var Business = () => {
|
|
|
9553
9529
|
};
|
|
9554
9530
|
var BusinessDetail_default = Business;
|
|
9555
9531
|
var defaultBusinessFormValues = {
|
|
9556
|
-
|
|
9557
|
-
|
|
9558
|
-
|
|
9559
|
-
|
|
9560
|
-
|
|
9561
|
-
|
|
9532
|
+
name: "",
|
|
9533
|
+
productId: 0,
|
|
9534
|
+
businessIdType: "",
|
|
9535
|
+
idNumber: "",
|
|
9536
|
+
dba: "",
|
|
9537
|
+
businessEntityType: "",
|
|
9562
9538
|
incorporationState: "",
|
|
9539
|
+
formationDate: "",
|
|
9563
9540
|
website: "",
|
|
9564
|
-
|
|
9541
|
+
achCompanyId: "",
|
|
9565
9542
|
mobilePhone: "",
|
|
9566
9543
|
mcc: "",
|
|
9567
9544
|
naics: "",
|
|
9568
|
-
|
|
9569
|
-
|
|
9570
|
-
|
|
9571
|
-
|
|
9572
|
-
contactLastName: "",
|
|
9573
|
-
contactEmail: "",
|
|
9574
|
-
contactPhone: "",
|
|
9545
|
+
contactPersonFirstName: "",
|
|
9546
|
+
contactPersonLastName: "",
|
|
9547
|
+
contactPersonEmail: "",
|
|
9548
|
+
contactPersonPhone: "",
|
|
9575
9549
|
address: {
|
|
9576
|
-
|
|
9577
|
-
|
|
9550
|
+
line1: "",
|
|
9551
|
+
line2: "",
|
|
9578
9552
|
city: "",
|
|
9579
9553
|
state: "",
|
|
9580
9554
|
postalCode: "",
|
|
9581
|
-
|
|
9582
|
-
|
|
9555
|
+
countryCode: "US",
|
|
9556
|
+
type: "MAILING"
|
|
9583
9557
|
}
|
|
9584
9558
|
};
|
|
9585
9559
|
var CreateBusiness = () => {
|
|
@@ -9598,7 +9572,7 @@ var CreateBusiness = () => {
|
|
|
9598
9572
|
}, [navigate]);
|
|
9599
9573
|
const handleBusinessTypeChange = React15.useCallback((value) => {
|
|
9600
9574
|
setBusinessType(value);
|
|
9601
|
-
form.setValue("
|
|
9575
|
+
form.setValue("businessEntityType", value, { shouldValidate: true });
|
|
9602
9576
|
}, [form]);
|
|
9603
9577
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9604
9578
|
CreateBusinessView,
|