braid-ui 1.0.1 → 1.0.3
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 +1244 -268
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -8
- package/dist/index.d.ts +28 -8
- package/dist/index.js +1244 -270
- package/dist/index.js.map +1 -1
- package/package.json +59 -63
package/dist/index.cjs
CHANGED
|
@@ -868,7 +868,7 @@ var AlertTimeline = ({ events }) => {
|
|
|
868
868
|
if (action.includes("Rejected")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XCircle, { className: "h-4 w-4" });
|
|
869
869
|
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-4 w-4" });
|
|
870
870
|
};
|
|
871
|
-
const
|
|
871
|
+
const getStatusColor2 = (status) => {
|
|
872
872
|
switch (status) {
|
|
873
873
|
case "Unassigned":
|
|
874
874
|
return "text-destructive";
|
|
@@ -887,7 +887,7 @@ var AlertTimeline = ({ events }) => {
|
|
|
887
887
|
index !== events.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-[7px] top-5 bottom-0 w-[2px] bg-border" }),
|
|
888
888
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
|
|
889
889
|
"absolute left-0 top-0 flex-none",
|
|
890
|
-
|
|
890
|
+
getStatusColor2(event.status)
|
|
891
891
|
), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-4", children: getIcon(event.action) }) }),
|
|
892
892
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-0.5", children: [
|
|
893
893
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-foreground", children: event.action }),
|
|
@@ -896,7 +896,7 @@ var AlertTimeline = ({ events }) => {
|
|
|
896
896
|
event.user
|
|
897
897
|
] }),
|
|
898
898
|
event.details && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: event.details }),
|
|
899
|
-
event.status && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cn("text-xs font-medium",
|
|
899
|
+
event.status && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cn("text-xs font-medium", getStatusColor2(event.status)), children: [
|
|
900
900
|
"Status: ",
|
|
901
901
|
event.status
|
|
902
902
|
] }),
|
|
@@ -2941,9 +2941,14 @@ var businessProfileSchema = zod.z.object({
|
|
|
2941
2941
|
dbaName: zod.z.string().optional(),
|
|
2942
2942
|
businessType: zod.z.string().min(1, "Business type is required"),
|
|
2943
2943
|
taxId: zod.z.string().min(1, "Tax ID is required"),
|
|
2944
|
-
|
|
2945
|
-
|
|
2944
|
+
formationDate: zod.z.string().optional(),
|
|
2945
|
+
idType: zod.z.string().optional(),
|
|
2946
|
+
incorporationState: zod.z.string().optional(),
|
|
2946
2947
|
website: zod.z.string().url("Invalid URL format").optional().or(zod.z.literal("")),
|
|
2948
|
+
contactFirstName: zod.z.string().optional(),
|
|
2949
|
+
contactLastName: zod.z.string().optional(),
|
|
2950
|
+
contactEmail: zod.z.string().optional(),
|
|
2951
|
+
contactPhone: zod.z.string().optional(),
|
|
2947
2952
|
address: addressSchema
|
|
2948
2953
|
});
|
|
2949
2954
|
zod.z.object({
|
|
@@ -3110,6 +3115,18 @@ var ADDRESS_TYPE_OPTIONS = {
|
|
|
3110
3115
|
{ value: "correspondent", label: "Correspondent Bank" }
|
|
3111
3116
|
]
|
|
3112
3117
|
};
|
|
3118
|
+
var RFI_STATUS_OPTIONS = [
|
|
3119
|
+
{ value: "Completed", label: "Completed" },
|
|
3120
|
+
{ value: "Provided", label: "Provided" },
|
|
3121
|
+
{ value: "Pending", label: "Pending" }
|
|
3122
|
+
];
|
|
3123
|
+
var ASSIGNEE_OPTIONS = [
|
|
3124
|
+
{ value: "John Smith", label: "John Smith" },
|
|
3125
|
+
{ value: "Sarah Johnson", label: "Sarah Johnson" },
|
|
3126
|
+
{ value: "Michael Chen", label: "Michael Chen" },
|
|
3127
|
+
{ value: "approverdev", label: "approverdev" },
|
|
3128
|
+
{ value: "Unassigned", label: "Unassigned" }
|
|
3129
|
+
];
|
|
3113
3130
|
var AddressForm = ({
|
|
3114
3131
|
title,
|
|
3115
3132
|
description,
|
|
@@ -3654,8 +3671,9 @@ var defaultBusinessProfile = {
|
|
|
3654
3671
|
dbaName: "ACME Tech",
|
|
3655
3672
|
businessType: "corporation",
|
|
3656
3673
|
taxId: "12-3456789",
|
|
3657
|
-
|
|
3658
|
-
|
|
3674
|
+
formationDate: "2020-01-15",
|
|
3675
|
+
idType: "EIN",
|
|
3676
|
+
incorporationState: "Delaware",
|
|
3659
3677
|
website: "https://acme.com",
|
|
3660
3678
|
address: {
|
|
3661
3679
|
streetAddress: "123 Business Avenue",
|
|
@@ -3682,75 +3700,176 @@ var BusinessProfileCard = ({
|
|
|
3682
3700
|
onToggleEdit,
|
|
3683
3701
|
onSave: onDataChange
|
|
3684
3702
|
});
|
|
3685
|
-
const editContent = /* @__PURE__ */ jsxRuntime.jsx(FormProvider, { form, children: /* @__PURE__ */ jsxRuntime.
|
|
3686
|
-
/* @__PURE__ */ jsxRuntime.
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3703
|
+
const editContent = /* @__PURE__ */ jsxRuntime.jsx(FormProvider, { form, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
3704
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
3705
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3706
|
+
FormInput,
|
|
3707
|
+
{
|
|
3708
|
+
name: "legalName",
|
|
3709
|
+
label: "Legal Name",
|
|
3710
|
+
placeholder: "Enter legal business name",
|
|
3711
|
+
required: true
|
|
3712
|
+
}
|
|
3713
|
+
),
|
|
3714
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3715
|
+
FormInput,
|
|
3716
|
+
{
|
|
3717
|
+
name: "dbaName",
|
|
3718
|
+
label: "DBA Name",
|
|
3719
|
+
placeholder: "Enter doing business as name"
|
|
3720
|
+
}
|
|
3721
|
+
),
|
|
3722
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3723
|
+
FormSelect,
|
|
3724
|
+
{
|
|
3725
|
+
name: "businessType",
|
|
3726
|
+
label: "Business Type",
|
|
3727
|
+
placeholder: "Select business type",
|
|
3728
|
+
options: [
|
|
3729
|
+
{ value: "corporation", label: "Corporation" },
|
|
3730
|
+
{ value: "llc", label: "LLC" },
|
|
3731
|
+
{ value: "partnership", label: "Partnership" },
|
|
3732
|
+
{ value: "sole_proprietorship", label: "Sole Proprietorship" }
|
|
3733
|
+
]
|
|
3734
|
+
}
|
|
3735
|
+
),
|
|
3736
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3737
|
+
FormInput,
|
|
3738
|
+
{
|
|
3739
|
+
name: "taxId",
|
|
3740
|
+
label: "Tax ID",
|
|
3741
|
+
placeholder: "Enter tax identification number",
|
|
3742
|
+
required: true
|
|
3743
|
+
}
|
|
3744
|
+
),
|
|
3745
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3746
|
+
FormInput,
|
|
3747
|
+
{
|
|
3748
|
+
name: "formationDate",
|
|
3749
|
+
label: "Formation Date",
|
|
3750
|
+
type: "date",
|
|
3751
|
+
placeholder: "Enter formation date"
|
|
3752
|
+
}
|
|
3753
|
+
),
|
|
3754
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3755
|
+
FormSelect,
|
|
3756
|
+
{
|
|
3757
|
+
name: "idType",
|
|
3758
|
+
label: "ID Type",
|
|
3759
|
+
placeholder: "Select ID type",
|
|
3760
|
+
options: [
|
|
3761
|
+
{ value: "ein", label: "EIN" },
|
|
3762
|
+
{ value: "ssn", label: "SSN" },
|
|
3763
|
+
{ value: "itin", label: "ITIN" }
|
|
3764
|
+
]
|
|
3765
|
+
}
|
|
3766
|
+
),
|
|
3767
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3768
|
+
FormInput,
|
|
3769
|
+
{
|
|
3770
|
+
name: "incorporationState",
|
|
3771
|
+
label: "Incorporation State",
|
|
3772
|
+
placeholder: "Enter incorporation state"
|
|
3773
|
+
}
|
|
3774
|
+
),
|
|
3775
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3776
|
+
FormInput,
|
|
3777
|
+
{
|
|
3778
|
+
name: "website",
|
|
3779
|
+
label: "Website",
|
|
3780
|
+
placeholder: "Enter website URL"
|
|
3781
|
+
}
|
|
3782
|
+
)
|
|
3783
|
+
] }),
|
|
3784
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4", children: [
|
|
3785
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3786
|
+
FormInput,
|
|
3787
|
+
{
|
|
3788
|
+
name: "address.streetAddress",
|
|
3789
|
+
label: "Street Address",
|
|
3790
|
+
placeholder: "Enter street address"
|
|
3791
|
+
}
|
|
3792
|
+
),
|
|
3793
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3794
|
+
FormInput,
|
|
3795
|
+
{
|
|
3796
|
+
name: "address.apartment",
|
|
3797
|
+
label: "Apartment, suite, or floor",
|
|
3798
|
+
placeholder: "Enter apartment, suite, or floor"
|
|
3799
|
+
}
|
|
3800
|
+
)
|
|
3801
|
+
] }),
|
|
3802
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
3803
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3804
|
+
FormInput,
|
|
3805
|
+
{
|
|
3806
|
+
name: "address.city",
|
|
3807
|
+
label: "City",
|
|
3808
|
+
placeholder: "Enter city"
|
|
3809
|
+
}
|
|
3810
|
+
),
|
|
3811
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3812
|
+
FormInput,
|
|
3813
|
+
{
|
|
3814
|
+
name: "address.state",
|
|
3815
|
+
label: "State",
|
|
3816
|
+
placeholder: "Enter state"
|
|
3817
|
+
}
|
|
3818
|
+
),
|
|
3819
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3820
|
+
FormInput,
|
|
3821
|
+
{
|
|
3822
|
+
name: "address.postalCode",
|
|
3823
|
+
label: "Postal Code",
|
|
3824
|
+
placeholder: "Enter postal code"
|
|
3825
|
+
}
|
|
3826
|
+
),
|
|
3827
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3828
|
+
FormInput,
|
|
3829
|
+
{
|
|
3830
|
+
name: "address.country",
|
|
3831
|
+
label: "Country Code",
|
|
3832
|
+
placeholder: "Enter country code"
|
|
3833
|
+
}
|
|
3834
|
+
)
|
|
3835
|
+
] }),
|
|
3836
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Contact Person" }),
|
|
3837
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
3838
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3839
|
+
FormInput,
|
|
3840
|
+
{
|
|
3841
|
+
name: "contactFirstName",
|
|
3842
|
+
label: "First Name",
|
|
3843
|
+
placeholder: "Enter first name"
|
|
3844
|
+
}
|
|
3845
|
+
),
|
|
3846
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3847
|
+
FormInput,
|
|
3848
|
+
{
|
|
3849
|
+
name: "contactLastName",
|
|
3850
|
+
label: "Last Name",
|
|
3851
|
+
placeholder: "Enter last name"
|
|
3852
|
+
}
|
|
3853
|
+
),
|
|
3854
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3855
|
+
FormInput,
|
|
3856
|
+
{
|
|
3857
|
+
name: "contactEmail",
|
|
3858
|
+
label: "Email",
|
|
3859
|
+
type: "email",
|
|
3860
|
+
placeholder: "Enter email"
|
|
3861
|
+
}
|
|
3862
|
+
),
|
|
3863
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3864
|
+
FormInput,
|
|
3865
|
+
{
|
|
3866
|
+
name: "contactPhone",
|
|
3867
|
+
label: "Phone Number",
|
|
3868
|
+
placeholder: "Enter phone number"
|
|
3869
|
+
}
|
|
3870
|
+
)
|
|
3871
|
+
] })
|
|
3872
|
+
] }) });
|
|
3754
3873
|
const formValues = form.watch();
|
|
3755
3874
|
const viewContent = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
3756
3875
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
@@ -3762,10 +3881,30 @@ var BusinessProfileCard = ({
|
|
|
3762
3881
|
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Tax ID", value: formValues?.taxId, layout: "horizontal" })
|
|
3763
3882
|
] }),
|
|
3764
3883
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
3765
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "
|
|
3766
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "
|
|
3884
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Formation Date", value: formValues?.formationDate || "2020-01-15", layout: "horizontal" }),
|
|
3885
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ID Type", value: formValues?.idType || "EIN", layout: "horizontal" })
|
|
3886
|
+
] }),
|
|
3887
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
3888
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Incorporation State", value: formValues?.incorporationState || "Delaware", layout: "horizontal" }),
|
|
3889
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Website", value: formValues?.website, layout: "horizontal" })
|
|
3890
|
+
] }),
|
|
3891
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3892
|
+
InfoField,
|
|
3893
|
+
{
|
|
3894
|
+
label: "Address",
|
|
3895
|
+
value: formValues?.address ? `${formValues.address.streetAddress}${formValues.address.apartment ? ", " + formValues.address.apartment : ""}, ${formValues.address.city}, ${formValues.address.state} ${formValues.address.postalCode}, ${formValues.address.country}` : "123 Business Avenue, Suite 100, New York, NY 10001, US",
|
|
3896
|
+
layout: "horizontal"
|
|
3897
|
+
}
|
|
3898
|
+
),
|
|
3899
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Contact Person" }),
|
|
3900
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
3901
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "First Name", value: formValues?.contactFirstName || "John", layout: "horizontal" }),
|
|
3902
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Last Name", value: formValues?.contactLastName || "Smith", layout: "horizontal" })
|
|
3767
3903
|
] }),
|
|
3768
|
-
/* @__PURE__ */ jsxRuntime.
|
|
3904
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
3905
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Email", value: formValues?.contactEmail || "john.smith@acme.com", layout: "horizontal" }),
|
|
3906
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Phone Number", value: formValues?.contactPhone || "+1 (555) 123-4567", layout: "horizontal" })
|
|
3907
|
+
] })
|
|
3769
3908
|
] });
|
|
3770
3909
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3771
3910
|
EditableFormCard,
|
|
@@ -3783,30 +3922,75 @@ var BusinessProfileCard = ({
|
|
|
3783
3922
|
}
|
|
3784
3923
|
);
|
|
3785
3924
|
};
|
|
3925
|
+
var mockBusinessTimeline = [
|
|
3926
|
+
{
|
|
3927
|
+
id: "1",
|
|
3928
|
+
action: "Business Created",
|
|
3929
|
+
user: "admin",
|
|
3930
|
+
details: "Initial business setup",
|
|
3931
|
+
status: "Active",
|
|
3932
|
+
timestamp: "2025-08-03 10:30:00"
|
|
3933
|
+
},
|
|
3934
|
+
{
|
|
3935
|
+
id: "2",
|
|
3936
|
+
action: "Profile Updated",
|
|
3937
|
+
user: "admin",
|
|
3938
|
+
details: "Updated business information",
|
|
3939
|
+
timestamp: "2025-09-05 14:22:00"
|
|
3940
|
+
},
|
|
3941
|
+
{
|
|
3942
|
+
id: "3",
|
|
3943
|
+
action: "OFAC Check Completed",
|
|
3944
|
+
user: "System",
|
|
3945
|
+
details: "Automated compliance check",
|
|
3946
|
+
status: "Verified",
|
|
3947
|
+
timestamp: "2025-09-05 14:30:00"
|
|
3948
|
+
}
|
|
3949
|
+
];
|
|
3786
3950
|
var BusinessStatusCard = ({ isEditing, onToggleEdit, className }) => {
|
|
3951
|
+
const getIcon = (action) => {
|
|
3952
|
+
if (action.includes("Created")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-4 w-4" });
|
|
3953
|
+
if (action.includes("Assigned")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserPlus, { className: "h-4 w-4" });
|
|
3954
|
+
if (action.includes("Updated") || action.includes("Modified") || action.includes("Check")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Edit, { className: "h-4 w-4" });
|
|
3955
|
+
if (action.includes("Completed") || action.includes("Verified")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle, { className: "h-4 w-4" });
|
|
3956
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-4 w-4" });
|
|
3957
|
+
};
|
|
3958
|
+
const getStatusColor2 = (status) => {
|
|
3959
|
+
switch (status) {
|
|
3960
|
+
case "Active":
|
|
3961
|
+
case "Verified":
|
|
3962
|
+
return "text-success";
|
|
3963
|
+
case "Pending":
|
|
3964
|
+
return "text-warning";
|
|
3965
|
+
default:
|
|
3966
|
+
return "text-muted-foreground";
|
|
3967
|
+
}
|
|
3968
|
+
};
|
|
3787
3969
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3788
3970
|
FormCard,
|
|
3789
3971
|
{
|
|
3790
|
-
title: "
|
|
3972
|
+
title: "Timeline",
|
|
3791
3973
|
className,
|
|
3792
|
-
|
|
3793
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3794
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
/* @__PURE__ */ jsxRuntime.
|
|
3798
|
-
|
|
3799
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3974
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: mockBusinessTimeline.map((event, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative pl-6 pb-3", children: [
|
|
3975
|
+
index !== mockBusinessTimeline.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-[7px] top-5 bottom-0 w-[2px] bg-border" }),
|
|
3976
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
|
|
3977
|
+
"absolute left-0 top-0 flex-none",
|
|
3978
|
+
getStatusColor2(event.status)
|
|
3979
|
+
), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-4", children: getIcon(event.action) }) }),
|
|
3980
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-0.5", children: [
|
|
3981
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-foreground", children: event.action }),
|
|
3982
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
3983
|
+
"by ",
|
|
3984
|
+
event.user
|
|
3985
|
+
] }),
|
|
3986
|
+
event.details && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: event.details }),
|
|
3987
|
+
event.status && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cn("text-xs font-medium", getStatusColor2(event.status)), children: [
|
|
3988
|
+
"Status: ",
|
|
3989
|
+
event.status
|
|
3990
|
+
] }),
|
|
3991
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground/70 pt-0.5", children: event.timestamp })
|
|
3808
3992
|
] })
|
|
3809
|
-
] })
|
|
3993
|
+
] }, event.id)) })
|
|
3810
3994
|
}
|
|
3811
3995
|
);
|
|
3812
3996
|
};
|
|
@@ -3831,18 +4015,27 @@ var ContactInfoCard = ({ isEditing, onToggleEdit, className }) => {
|
|
|
3831
4015
|
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Phone Number", value: "", layout: "horizontal" })
|
|
3832
4016
|
] }),
|
|
3833
4017
|
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Mailing Address" }),
|
|
3834
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3835
|
-
/* @__PURE__ */ jsxRuntime.
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
/* @__PURE__ */ jsxRuntime.
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
/* @__PURE__ */ jsxRuntime.
|
|
3844
|
-
|
|
3845
|
-
|
|
4018
|
+
isEditing ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4019
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3", children: [
|
|
4020
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Street Address", value: "", layout: "horizontal" }),
|
|
4021
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Apartment, suite, or floor", value: "", layout: "horizontal" })
|
|
4022
|
+
] }),
|
|
4023
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
4024
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "City", value: "", layout: "horizontal" }),
|
|
4025
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "State", value: "Alabama", layout: "horizontal" })
|
|
4026
|
+
] }),
|
|
4027
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
4028
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Postal Code", value: "", layout: "horizontal" }),
|
|
4029
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Country Code", value: "US", layout: "horizontal" })
|
|
4030
|
+
] })
|
|
4031
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
4032
|
+
InfoField,
|
|
4033
|
+
{
|
|
4034
|
+
label: "Address",
|
|
4035
|
+
value: "123 Business Avenue, Suite 100, New York, NY 10001, US",
|
|
4036
|
+
layout: "horizontal"
|
|
4037
|
+
}
|
|
4038
|
+
)
|
|
3846
4039
|
] })
|
|
3847
4040
|
}
|
|
3848
4041
|
);
|
|
@@ -4871,6 +5064,7 @@ function DataTable({
|
|
|
4871
5064
|
sortBy,
|
|
4872
5065
|
sortDirection,
|
|
4873
5066
|
onSort,
|
|
5067
|
+
onRowClick,
|
|
4874
5068
|
loading = false,
|
|
4875
5069
|
emptyMessage = "No data available",
|
|
4876
5070
|
className
|
|
@@ -4908,7 +5102,7 @@ function DataTable({
|
|
|
4908
5102
|
"th",
|
|
4909
5103
|
{
|
|
4910
5104
|
className: cn(
|
|
4911
|
-
"
|
|
5105
|
+
"px-3 py-2 text-left align-middle text-sm font-medium bg-muted/50",
|
|
4912
5106
|
column.align === "center" && "text-center",
|
|
4913
5107
|
column.align === "right" && "text-right",
|
|
4914
5108
|
column.width && `w-[${column.width}]`
|
|
@@ -4918,7 +5112,7 @@ function DataTable({
|
|
|
4918
5112
|
{
|
|
4919
5113
|
variant: "ghost",
|
|
4920
5114
|
size: "sm",
|
|
4921
|
-
className: "h-auto p-0 font-medium hover:bg-transparent",
|
|
5115
|
+
className: "h-auto p-0 text-sm font-medium hover:bg-transparent",
|
|
4922
5116
|
onClick: () => handleSort(column.key),
|
|
4923
5117
|
children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center", children: [
|
|
4924
5118
|
column.title,
|
|
@@ -4932,12 +5126,16 @@ function DataTable({
|
|
|
4932
5126
|
/* @__PURE__ */ jsxRuntime.jsx("tbody", { children: data.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: columns.length, className: "h-24 text-center text-muted-foreground", children: emptyMessage }) }) : data.map((row, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4933
5127
|
"tr",
|
|
4934
5128
|
{
|
|
4935
|
-
className:
|
|
5129
|
+
className: cn(
|
|
5130
|
+
"border-b transition-colors hover:bg-muted/50",
|
|
5131
|
+
onRowClick && "cursor-pointer"
|
|
5132
|
+
),
|
|
5133
|
+
onClick: () => onRowClick?.(row),
|
|
4936
5134
|
children: columns.map((column) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4937
5135
|
"td",
|
|
4938
5136
|
{
|
|
4939
5137
|
className: cn(
|
|
4940
|
-
"
|
|
5138
|
+
"px-3 py-2 align-middle text-sm",
|
|
4941
5139
|
column.align === "center" && "text-center",
|
|
4942
5140
|
column.align === "right" && "text-right"
|
|
4943
5141
|
),
|
|
@@ -6335,22 +6533,10 @@ var mockAlerts = [
|
|
|
6335
6533
|
description: "Transaction WIRE_DOMESTIC_CREDIT of $30,000.00 is flagged for velocity limit ..."
|
|
6336
6534
|
}
|
|
6337
6535
|
];
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
];
|
|
6343
|
-
var ASSIGNEE_OPTIONS = [
|
|
6344
|
-
{ value: "John Smith", label: "John Smith" },
|
|
6345
|
-
{ value: "Sarah Johnson", label: "Sarah Johnson" },
|
|
6346
|
-
{ value: "Michael Chen", label: "Michael Chen" },
|
|
6347
|
-
{ value: "approverdev", label: "approverdev" },
|
|
6348
|
-
{ value: "Unassigned", label: "Unassigned" }
|
|
6349
|
-
];
|
|
6350
|
-
var AlertDetail = () => {
|
|
6351
|
-
const { id } = reactRouterDom.useParams();
|
|
6352
|
-
const navigate = reactRouterDom.useNavigate();
|
|
6353
|
-
const alert = mockAlerts.find((a) => a.id === id);
|
|
6536
|
+
|
|
6537
|
+
// src/hooks/useAlertDetail.ts
|
|
6538
|
+
var useAlertDetail = (id) => {
|
|
6539
|
+
const alert = React13.useMemo(() => mockAlerts.find((a) => a.id === id), [id]);
|
|
6354
6540
|
const [rfiStatus, setRfiStatus] = React13.useState(alert?.rfiStatus || "");
|
|
6355
6541
|
const [assignee, setAssignee] = React13.useState(alert?.assignee || "Unassigned");
|
|
6356
6542
|
const handleRfiStatusChange = (newStatus) => {
|
|
@@ -6361,43 +6547,136 @@ var AlertDetail = () => {
|
|
|
6361
6547
|
setAssignee(newAssignee);
|
|
6362
6548
|
console.log("Assignee updated to:", newAssignee);
|
|
6363
6549
|
};
|
|
6364
|
-
|
|
6365
|
-
|
|
6366
|
-
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6550
|
+
return {
|
|
6551
|
+
alert,
|
|
6552
|
+
isLoading: false,
|
|
6553
|
+
// Set to true when implementing real data fetching
|
|
6554
|
+
rfiStatus,
|
|
6555
|
+
assignee,
|
|
6556
|
+
handleRfiStatusChange,
|
|
6557
|
+
handleAssigneeChange
|
|
6558
|
+
};
|
|
6559
|
+
};
|
|
6560
|
+
|
|
6561
|
+
// src/lib/utils/alert-utils.ts
|
|
6562
|
+
var getTypeBadgeVariant = (type) => {
|
|
6563
|
+
switch (type) {
|
|
6564
|
+
case "Ofac":
|
|
6565
|
+
return "alert-ofac";
|
|
6566
|
+
case "Dual Approval":
|
|
6567
|
+
return "alert-dual";
|
|
6568
|
+
case "Transaction Monitoring":
|
|
6569
|
+
return "alert-monitoring";
|
|
6570
|
+
case "Transaction Processing Error":
|
|
6571
|
+
return "alert-error";
|
|
6572
|
+
default:
|
|
6573
|
+
return "outline";
|
|
6574
|
+
}
|
|
6575
|
+
};
|
|
6576
|
+
var getStatusColor = (status) => {
|
|
6577
|
+
switch (status) {
|
|
6578
|
+
case "Unassigned":
|
|
6579
|
+
return "text-destructive";
|
|
6580
|
+
case "Closed":
|
|
6581
|
+
return "text-success";
|
|
6582
|
+
case "In Progress":
|
|
6583
|
+
return "text-warning";
|
|
6584
|
+
default:
|
|
6585
|
+
return "";
|
|
6586
|
+
}
|
|
6587
|
+
};
|
|
6588
|
+
var AlertDetailView = ({
|
|
6589
|
+
alert,
|
|
6590
|
+
rfiStatus,
|
|
6591
|
+
assignee,
|
|
6592
|
+
onRfiStatusChange,
|
|
6593
|
+
onAssigneeChange
|
|
6594
|
+
}) => {
|
|
6595
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col lg:flex-row gap-6", children: [
|
|
6596
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
|
|
6597
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6598
|
+
FormCard,
|
|
6599
|
+
{
|
|
6600
|
+
title: "Alert Information",
|
|
6601
|
+
headerActions: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Edit, { className: "h-4 w-4" }) }),
|
|
6602
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
6603
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Alert ID", value: alert.id }),
|
|
6604
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6605
|
+
InfoField,
|
|
6606
|
+
{
|
|
6607
|
+
label: "Type",
|
|
6608
|
+
value: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: getTypeBadgeVariant(alert.type), children: alert.type })
|
|
6609
|
+
}
|
|
6610
|
+
),
|
|
6611
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6612
|
+
InfoField,
|
|
6613
|
+
{
|
|
6614
|
+
label: "Status",
|
|
6615
|
+
value: /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("font-medium", getStatusColor(alert.status)), children: alert.status })
|
|
6616
|
+
}
|
|
6617
|
+
),
|
|
6618
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Created At", value: alert.createdAt }),
|
|
6619
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6620
|
+
InfoField,
|
|
6621
|
+
{
|
|
6622
|
+
label: "Context Type",
|
|
6623
|
+
value: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "outline", children: alert.contextType })
|
|
6624
|
+
}
|
|
6625
|
+
),
|
|
6626
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Context ID", value: alert.contextId || "N/A" }),
|
|
6627
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6628
|
+
EditableInfoField,
|
|
6629
|
+
{
|
|
6630
|
+
label: "Assignee",
|
|
6631
|
+
value: assignee,
|
|
6632
|
+
options: ASSIGNEE_OPTIONS,
|
|
6633
|
+
onChange: onAssigneeChange,
|
|
6634
|
+
placeholder: "Unassigned"
|
|
6635
|
+
}
|
|
6636
|
+
),
|
|
6637
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6638
|
+
EditableInfoField,
|
|
6639
|
+
{
|
|
6640
|
+
label: "RFI Status",
|
|
6641
|
+
value: rfiStatus,
|
|
6642
|
+
options: RFI_STATUS_OPTIONS,
|
|
6643
|
+
onChange: onRfiStatusChange,
|
|
6644
|
+
placeholder: "Select status",
|
|
6645
|
+
renderValue: (value) => /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "success", children: value })
|
|
6646
|
+
}
|
|
6647
|
+
),
|
|
6648
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-2", children: /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Description", value: alert.description }) })
|
|
6649
|
+
] })
|
|
6650
|
+
}
|
|
6651
|
+
),
|
|
6652
|
+
/* @__PURE__ */ jsxRuntime.jsx(ContextSection, { alert }),
|
|
6653
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormCard, { title: "Notes", children: /* @__PURE__ */ jsxRuntime.jsx(AlertNotes, { alertId: alert.id, notes: alert.notes || [] }) }),
|
|
6654
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormCard, { title: "Documents", children: /* @__PURE__ */ jsxRuntime.jsx(AlertDocuments, { alertId: alert.id, documents: alert.documents || [] }) })
|
|
6655
|
+
] }),
|
|
6656
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsxRuntime.jsx(FormCard, { title: "Status Timeline", className: "h-full", children: /* @__PURE__ */ jsxRuntime.jsx(AlertTimeline, { events: alert.timeline || [] }) }) })
|
|
6657
|
+
] });
|
|
6658
|
+
};
|
|
6659
|
+
var AlertDetail = () => {
|
|
6660
|
+
const { id } = reactRouterDom.useParams();
|
|
6661
|
+
const navigate = reactRouterDom.useNavigate();
|
|
6662
|
+
const {
|
|
6663
|
+
alert,
|
|
6664
|
+
rfiStatus,
|
|
6665
|
+
assignee,
|
|
6666
|
+
handleRfiStatusChange,
|
|
6667
|
+
handleAssigneeChange
|
|
6668
|
+
} = useAlertDetail(id);
|
|
6669
|
+
if (!alert) {
|
|
6670
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container mx-auto px-4 py-8", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
|
|
6671
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-2xl font-bold mb-2", children: "Alert Not Found" }),
|
|
6672
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-muted-foreground mb-4", children: [
|
|
6673
|
+
"The alert #",
|
|
6674
|
+
id,
|
|
6675
|
+
" could not be found."
|
|
6371
6676
|
] }),
|
|
6372
6677
|
/* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: () => navigate("/alerts"), children: "Back to Alerts" })
|
|
6373
6678
|
] }) });
|
|
6374
6679
|
}
|
|
6375
|
-
const getTypeBadgeVariant = (type) => {
|
|
6376
|
-
switch (type) {
|
|
6377
|
-
case "Ofac":
|
|
6378
|
-
return "alert-ofac";
|
|
6379
|
-
case "Dual Approval":
|
|
6380
|
-
return "alert-dual";
|
|
6381
|
-
case "Transaction Monitoring":
|
|
6382
|
-
return "alert-monitoring";
|
|
6383
|
-
case "Transaction Processing Error":
|
|
6384
|
-
return "alert-error";
|
|
6385
|
-
default:
|
|
6386
|
-
return "outline";
|
|
6387
|
-
}
|
|
6388
|
-
};
|
|
6389
|
-
const getStatusColor = (status) => {
|
|
6390
|
-
switch (status) {
|
|
6391
|
-
case "Unassigned":
|
|
6392
|
-
return "text-destructive";
|
|
6393
|
-
case "Closed":
|
|
6394
|
-
return "text-success";
|
|
6395
|
-
case "In Progress":
|
|
6396
|
-
return "text-warning";
|
|
6397
|
-
default:
|
|
6398
|
-
return "";
|
|
6399
|
-
}
|
|
6400
|
-
};
|
|
6401
6680
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6402
6681
|
PageLayout,
|
|
6403
6682
|
{
|
|
@@ -6421,69 +6700,16 @@ var AlertDetail = () => {
|
|
|
6421
6700
|
onClick: () => console.log("Close alert")
|
|
6422
6701
|
}
|
|
6423
6702
|
],
|
|
6424
|
-
children: /* @__PURE__ */ jsxRuntime.
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
|
|
6431
|
-
|
|
6432
|
-
|
|
6433
|
-
|
|
6434
|
-
InfoField,
|
|
6435
|
-
{
|
|
6436
|
-
label: "Type",
|
|
6437
|
-
value: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: getTypeBadgeVariant(alert.type), children: alert.type })
|
|
6438
|
-
}
|
|
6439
|
-
),
|
|
6440
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6441
|
-
InfoField,
|
|
6442
|
-
{
|
|
6443
|
-
label: "Status",
|
|
6444
|
-
value: /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("font-medium", getStatusColor(alert.status)), children: alert.status })
|
|
6445
|
-
}
|
|
6446
|
-
),
|
|
6447
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Created At", value: alert.createdAt }),
|
|
6448
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6449
|
-
InfoField,
|
|
6450
|
-
{
|
|
6451
|
-
label: "Context Type",
|
|
6452
|
-
value: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "outline", children: alert.contextType })
|
|
6453
|
-
}
|
|
6454
|
-
),
|
|
6455
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Context ID", value: alert.contextId || "N/A" }),
|
|
6456
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6457
|
-
EditableInfoField,
|
|
6458
|
-
{
|
|
6459
|
-
label: "Assignee",
|
|
6460
|
-
value: assignee,
|
|
6461
|
-
options: ASSIGNEE_OPTIONS,
|
|
6462
|
-
onChange: handleAssigneeChange,
|
|
6463
|
-
placeholder: "Unassigned"
|
|
6464
|
-
}
|
|
6465
|
-
),
|
|
6466
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6467
|
-
EditableInfoField,
|
|
6468
|
-
{
|
|
6469
|
-
label: "RFI Status",
|
|
6470
|
-
value: rfiStatus,
|
|
6471
|
-
options: RFI_STATUS_OPTIONS,
|
|
6472
|
-
onChange: handleRfiStatusChange,
|
|
6473
|
-
placeholder: "Select status",
|
|
6474
|
-
renderValue: (value) => /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "success", children: value })
|
|
6475
|
-
}
|
|
6476
|
-
),
|
|
6477
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-2", children: /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Description", value: alert.description }) })
|
|
6478
|
-
] })
|
|
6479
|
-
}
|
|
6480
|
-
),
|
|
6481
|
-
/* @__PURE__ */ jsxRuntime.jsx(ContextSection, { alert }),
|
|
6482
|
-
/* @__PURE__ */ jsxRuntime.jsx(FormCard, { title: "Notes", children: /* @__PURE__ */ jsxRuntime.jsx(AlertNotes, { alertId: alert.id, notes: alert.notes || [] }) }),
|
|
6483
|
-
/* @__PURE__ */ jsxRuntime.jsx(FormCard, { title: "Documents", children: /* @__PURE__ */ jsxRuntime.jsx(AlertDocuments, { alertId: alert.id, documents: alert.documents || [] }) })
|
|
6484
|
-
] }),
|
|
6485
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsxRuntime.jsx(FormCard, { title: "Status Timeline", className: "h-full", children: /* @__PURE__ */ jsxRuntime.jsx(AlertTimeline, { events: alert.timeline || [] }) }) })
|
|
6486
|
-
] })
|
|
6703
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6704
|
+
AlertDetailView,
|
|
6705
|
+
{
|
|
6706
|
+
alert,
|
|
6707
|
+
rfiStatus,
|
|
6708
|
+
assignee,
|
|
6709
|
+
onRfiStatusChange: handleRfiStatusChange,
|
|
6710
|
+
onAssigneeChange: handleAssigneeChange
|
|
6711
|
+
}
|
|
6712
|
+
)
|
|
6487
6713
|
}
|
|
6488
6714
|
);
|
|
6489
6715
|
};
|
|
@@ -6542,7 +6768,7 @@ var Alerts = () => {
|
|
|
6542
6768
|
setFilteredAlerts(mockAlerts);
|
|
6543
6769
|
setCurrentPage(1);
|
|
6544
6770
|
};
|
|
6545
|
-
const
|
|
6771
|
+
const getTypeBadgeVariant2 = (type) => {
|
|
6546
6772
|
switch (type) {
|
|
6547
6773
|
case "Ofac":
|
|
6548
6774
|
return "alert-ofac";
|
|
@@ -6556,7 +6782,7 @@ var Alerts = () => {
|
|
|
6556
6782
|
return "outline";
|
|
6557
6783
|
}
|
|
6558
6784
|
};
|
|
6559
|
-
const
|
|
6785
|
+
const getStatusColor2 = (status) => {
|
|
6560
6786
|
switch (status) {
|
|
6561
6787
|
case "Unassigned":
|
|
6562
6788
|
return "text-destructive";
|
|
@@ -6733,8 +6959,8 @@ var Alerts = () => {
|
|
|
6733
6959
|
children: [
|
|
6734
6960
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2 text-xs", children: alert.id }),
|
|
6735
6961
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2 text-xs", children: alert.createdAt }),
|
|
6736
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2", children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant:
|
|
6737
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-xs font-medium",
|
|
6962
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2", children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: getTypeBadgeVariant2(alert.type), className: "whitespace-nowrap", children: alert.type }) }),
|
|
6963
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-xs font-medium", getStatusColor2(alert.status)), children: alert.status }) }),
|
|
6738
6964
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2", children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "outline", className: "whitespace-nowrap", children: alert.contextType }) }),
|
|
6739
6965
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2", children: alert.rfiStatus && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "success", className: "whitespace-nowrap", children: alert.rfiStatus }) }),
|
|
6740
6966
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2 text-xs truncate", children: alert.description })
|
|
@@ -6795,48 +7021,475 @@ var Alerts = () => {
|
|
|
6795
7021
|
] });
|
|
6796
7022
|
};
|
|
6797
7023
|
var Alerts_default = Alerts;
|
|
7024
|
+
|
|
7025
|
+
// src/lib/mock-data/businesses-list-data.ts
|
|
7026
|
+
var mockBusinessesList = [
|
|
7027
|
+
{
|
|
7028
|
+
id: "8112488",
|
|
7029
|
+
businessName: "RAPIDZ PAY INC",
|
|
7030
|
+
productName: "Fiat Republic Canada Inc. FBO Rapidz Pay",
|
|
7031
|
+
cipStatus: "verified",
|
|
7032
|
+
status: "active",
|
|
7033
|
+
created: "2025-10-05",
|
|
7034
|
+
modified: "2025-10-05"
|
|
7035
|
+
},
|
|
7036
|
+
{
|
|
7037
|
+
id: "8111609",
|
|
7038
|
+
businessName: "Fern Hyper Growth Llc",
|
|
7039
|
+
productName: "Atomic Brokerage FBO Atomic Brokerage Clients",
|
|
7040
|
+
cipStatus: "verified",
|
|
7041
|
+
status: "active",
|
|
7042
|
+
created: "2025-10-04",
|
|
7043
|
+
modified: "2025-10-04"
|
|
7044
|
+
},
|
|
7045
|
+
{
|
|
7046
|
+
id: "8111026",
|
|
7047
|
+
businessName: "ACEROSGALVANISADOS & PREPINTADOS",
|
|
7048
|
+
productName: "SendFriend Inc FBO Conduit Pay Agent",
|
|
7049
|
+
cipStatus: "not_start",
|
|
7050
|
+
status: "active",
|
|
7051
|
+
created: "2025-10-03",
|
|
7052
|
+
modified: "2025-10-03"
|
|
7053
|
+
},
|
|
7054
|
+
{
|
|
7055
|
+
id: "8110892",
|
|
7056
|
+
businessName: "Tech Solutions Corp",
|
|
7057
|
+
productName: "Digital Finance Inc FBO Tech Solutions",
|
|
7058
|
+
cipStatus: "pending",
|
|
7059
|
+
status: "active",
|
|
7060
|
+
created: "2025-10-02",
|
|
7061
|
+
modified: "2025-10-02"
|
|
7062
|
+
},
|
|
7063
|
+
{
|
|
7064
|
+
id: "8110654",
|
|
7065
|
+
businessName: "Global Trade Partners LLC",
|
|
7066
|
+
productName: "Swift Transfer FBO Global Trade",
|
|
7067
|
+
cipStatus: "verified",
|
|
7068
|
+
status: "active",
|
|
7069
|
+
created: "2025-10-01",
|
|
7070
|
+
modified: "2025-10-01"
|
|
7071
|
+
}
|
|
7072
|
+
];
|
|
7073
|
+
var Businesses = () => {
|
|
7074
|
+
const navigate = reactRouterDom.useNavigate();
|
|
7075
|
+
const [businesses, setBusinesses] = React13.useState(mockBusinessesList);
|
|
7076
|
+
const [filteredBusinesses, setFilteredBusinesses] = React13.useState(mockBusinessesList);
|
|
7077
|
+
const [sortBy, setSortBy] = React13.useState("created");
|
|
7078
|
+
const [sortDirection, setSortDirection] = React13.useState("desc");
|
|
7079
|
+
const [filters, setFilters] = React13.useState({
|
|
7080
|
+
name: "",
|
|
7081
|
+
productName: "",
|
|
7082
|
+
status: "",
|
|
7083
|
+
createdDateStart: void 0,
|
|
7084
|
+
createdDateEnd: void 0
|
|
7085
|
+
});
|
|
7086
|
+
const handleFilterChange = (field, value) => {
|
|
7087
|
+
setFilters((prev) => ({ ...prev, [field]: value }));
|
|
7088
|
+
};
|
|
7089
|
+
const applyFilters = () => {
|
|
7090
|
+
let filtered = businesses;
|
|
7091
|
+
if (filters.name) {
|
|
7092
|
+
filtered = filtered.filter(
|
|
7093
|
+
(business) => business.businessName.toLowerCase().includes(filters.name.toLowerCase())
|
|
7094
|
+
);
|
|
7095
|
+
}
|
|
7096
|
+
if (filters.productName) {
|
|
7097
|
+
filtered = filtered.filter(
|
|
7098
|
+
(business) => business.productName.toLowerCase().includes(filters.productName.toLowerCase())
|
|
7099
|
+
);
|
|
7100
|
+
}
|
|
7101
|
+
if (filters.status) {
|
|
7102
|
+
filtered = filtered.filter((business) => business.status === filters.status);
|
|
7103
|
+
}
|
|
7104
|
+
if (filters.createdDateStart) {
|
|
7105
|
+
filtered = filtered.filter(
|
|
7106
|
+
(business) => new Date(business.created) >= filters.createdDateStart
|
|
7107
|
+
);
|
|
7108
|
+
}
|
|
7109
|
+
if (filters.createdDateEnd) {
|
|
7110
|
+
filtered = filtered.filter(
|
|
7111
|
+
(business) => new Date(business.created) <= filters.createdDateEnd
|
|
7112
|
+
);
|
|
7113
|
+
}
|
|
7114
|
+
setFilteredBusinesses(filtered);
|
|
7115
|
+
};
|
|
7116
|
+
const resetFilters = () => {
|
|
7117
|
+
setFilters({
|
|
7118
|
+
name: "",
|
|
7119
|
+
productName: "",
|
|
7120
|
+
status: "",
|
|
7121
|
+
createdDateStart: void 0,
|
|
7122
|
+
createdDateEnd: void 0
|
|
7123
|
+
});
|
|
7124
|
+
setFilteredBusinesses(businesses);
|
|
7125
|
+
};
|
|
7126
|
+
const handleSort = (key) => {
|
|
7127
|
+
if (sortBy === key) {
|
|
7128
|
+
setSortDirection(sortDirection === "asc" ? "desc" : "asc");
|
|
7129
|
+
} else {
|
|
7130
|
+
setSortBy(key);
|
|
7131
|
+
setSortDirection("asc");
|
|
7132
|
+
}
|
|
7133
|
+
};
|
|
7134
|
+
const handleRowClick = (business) => {
|
|
7135
|
+
navigate(`/business/${business.id}`);
|
|
7136
|
+
};
|
|
7137
|
+
const columns = [
|
|
7138
|
+
{
|
|
7139
|
+
key: "id",
|
|
7140
|
+
title: "Business ID",
|
|
7141
|
+
sortable: true
|
|
7142
|
+
},
|
|
7143
|
+
{
|
|
7144
|
+
key: "businessName",
|
|
7145
|
+
title: "Business Name",
|
|
7146
|
+
sortable: true
|
|
7147
|
+
},
|
|
7148
|
+
{
|
|
7149
|
+
key: "productName",
|
|
7150
|
+
title: "Product Name",
|
|
7151
|
+
sortable: true,
|
|
7152
|
+
render: (value) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary hover:underline cursor-pointer", children: value })
|
|
7153
|
+
},
|
|
7154
|
+
{
|
|
7155
|
+
key: "cipStatus",
|
|
7156
|
+
title: "CIP status",
|
|
7157
|
+
sortable: true,
|
|
7158
|
+
render: (value) => {
|
|
7159
|
+
const status = value;
|
|
7160
|
+
const variant = status === "verified" ? "success" : status === "pending" ? "warning" : "default";
|
|
7161
|
+
const label = status === "verified" ? "Verified" : status === "pending" ? "Pending" : "Not Start";
|
|
7162
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant, children: label });
|
|
7163
|
+
}
|
|
7164
|
+
},
|
|
7165
|
+
{
|
|
7166
|
+
key: "status",
|
|
7167
|
+
title: "Status",
|
|
7168
|
+
sortable: true,
|
|
7169
|
+
render: (value) => {
|
|
7170
|
+
const status = value;
|
|
7171
|
+
const variant = status === "active" ? "success" : "default";
|
|
7172
|
+
const label = status.charAt(0).toUpperCase() + status.slice(1);
|
|
7173
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant, children: label });
|
|
7174
|
+
}
|
|
7175
|
+
},
|
|
7176
|
+
{
|
|
7177
|
+
key: "created",
|
|
7178
|
+
title: "Created",
|
|
7179
|
+
sortable: true
|
|
7180
|
+
},
|
|
7181
|
+
{
|
|
7182
|
+
key: "modified",
|
|
7183
|
+
title: "Modified",
|
|
7184
|
+
sortable: true
|
|
7185
|
+
}
|
|
7186
|
+
];
|
|
7187
|
+
const sortedBusinesses = [...filteredBusinesses].sort((a, b) => {
|
|
7188
|
+
const aValue = a[sortBy];
|
|
7189
|
+
const bValue = b[sortBy];
|
|
7190
|
+
if (aValue < bValue) return sortDirection === "asc" ? -1 : 1;
|
|
7191
|
+
if (aValue > bValue) return sortDirection === "asc" ? 1 : -1;
|
|
7192
|
+
return 0;
|
|
7193
|
+
});
|
|
7194
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col h-screen bg-gradient-subtle", children: [
|
|
7195
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container mx-auto px-4 py-4 max-w-none", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
7196
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
7197
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-bold text-foreground", children: "Businesses" }),
|
|
7198
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mt-1", children: "Manage business entities and their configurations" })
|
|
7199
|
+
] }),
|
|
7200
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
7201
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Sheet, { children: [
|
|
7202
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", className: "gap-2", children: [
|
|
7203
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Filter, { className: "h-4 w-4" }),
|
|
7204
|
+
"Filters"
|
|
7205
|
+
] }) }),
|
|
7206
|
+
/* @__PURE__ */ jsxRuntime.jsxs(SheetContent, { side: "right", className: "w-full sm:max-w-xl overflow-y-auto", children: [
|
|
7207
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { children: "Business Filters" }) }),
|
|
7208
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6 py-6", children: [
|
|
7209
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7210
|
+
EnhancedInput,
|
|
7211
|
+
{
|
|
7212
|
+
label: "Name",
|
|
7213
|
+
value: filters.name,
|
|
7214
|
+
onChange: (e) => handleFilterChange("name", e.target.value),
|
|
7215
|
+
placeholder: "Enter business name"
|
|
7216
|
+
}
|
|
7217
|
+
),
|
|
7218
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7219
|
+
EnhancedInput,
|
|
7220
|
+
{
|
|
7221
|
+
label: "Product Name",
|
|
7222
|
+
value: filters.productName,
|
|
7223
|
+
onChange: (e) => handleFilterChange("productName", e.target.value),
|
|
7224
|
+
placeholder: "Enter product name"
|
|
7225
|
+
}
|
|
7226
|
+
),
|
|
7227
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7228
|
+
EnhancedSelect,
|
|
7229
|
+
{
|
|
7230
|
+
label: "Status",
|
|
7231
|
+
value: filters.status,
|
|
7232
|
+
onValueChange: (value) => handleFilterChange("status", value),
|
|
7233
|
+
placeholder: "Select status",
|
|
7234
|
+
options: [
|
|
7235
|
+
{ value: "active", label: "Active" },
|
|
7236
|
+
{ value: "inactive", label: "Inactive" },
|
|
7237
|
+
{ value: "suspended", label: "Suspended" }
|
|
7238
|
+
]
|
|
7239
|
+
}
|
|
7240
|
+
),
|
|
7241
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
7242
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
7243
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "Created Date Start" }),
|
|
7244
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
|
|
7245
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7246
|
+
Button,
|
|
7247
|
+
{
|
|
7248
|
+
variant: "outline",
|
|
7249
|
+
className: cn(
|
|
7250
|
+
"w-full justify-start text-left font-normal",
|
|
7251
|
+
!filters.createdDateStart && "text-muted-foreground"
|
|
7252
|
+
),
|
|
7253
|
+
children: [
|
|
7254
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Calendar, { className: "mr-2 h-4 w-4" }),
|
|
7255
|
+
filters.createdDateStart ? dateFns.format(filters.createdDateStart, "MM/dd/yyyy") : /* @__PURE__ */ jsxRuntime.jsx("span", { children: "MM/DD/YYYY" })
|
|
7256
|
+
]
|
|
7257
|
+
}
|
|
7258
|
+
) }),
|
|
7259
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-auto p-0 bg-background z-50", align: "start", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7260
|
+
Calendar,
|
|
7261
|
+
{
|
|
7262
|
+
mode: "single",
|
|
7263
|
+
selected: filters.createdDateStart,
|
|
7264
|
+
onSelect: (date) => handleFilterChange("createdDateStart", date),
|
|
7265
|
+
initialFocus: true,
|
|
7266
|
+
className: "pointer-events-auto"
|
|
7267
|
+
}
|
|
7268
|
+
) })
|
|
7269
|
+
] })
|
|
7270
|
+
] }),
|
|
7271
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
7272
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "Created Date End" }),
|
|
7273
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
|
|
7274
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7275
|
+
Button,
|
|
7276
|
+
{
|
|
7277
|
+
variant: "outline",
|
|
7278
|
+
className: cn(
|
|
7279
|
+
"w-full justify-start text-left font-normal",
|
|
7280
|
+
!filters.createdDateEnd && "text-muted-foreground"
|
|
7281
|
+
),
|
|
7282
|
+
children: [
|
|
7283
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Calendar, { className: "mr-2 h-4 w-4" }),
|
|
7284
|
+
filters.createdDateEnd ? dateFns.format(filters.createdDateEnd, "MM/dd/yyyy") : /* @__PURE__ */ jsxRuntime.jsx("span", { children: "MM/DD/YYYY" })
|
|
7285
|
+
]
|
|
7286
|
+
}
|
|
7287
|
+
) }),
|
|
7288
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-auto p-0 bg-background z-50", align: "start", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7289
|
+
Calendar,
|
|
7290
|
+
{
|
|
7291
|
+
mode: "single",
|
|
7292
|
+
selected: filters.createdDateEnd,
|
|
7293
|
+
onSelect: (date) => handleFilterChange("createdDateEnd", date),
|
|
7294
|
+
initialFocus: true,
|
|
7295
|
+
className: "pointer-events-auto"
|
|
7296
|
+
}
|
|
7297
|
+
) })
|
|
7298
|
+
] })
|
|
7299
|
+
] })
|
|
7300
|
+
] })
|
|
7301
|
+
] }),
|
|
7302
|
+
/* @__PURE__ */ jsxRuntime.jsxs(SheetFooter, { className: "gap-2", children: [
|
|
7303
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", onClick: resetFilters, children: "Reset Filters" }),
|
|
7304
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: applyFilters, children: "Apply Filters" })
|
|
7305
|
+
] })
|
|
7306
|
+
] })
|
|
7307
|
+
] }),
|
|
7308
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: () => navigate("/business/create"), children: "Create Business" })
|
|
7309
|
+
] })
|
|
7310
|
+
] }) }) }),
|
|
7311
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container mx-auto px-4 h-full max-w-none flex flex-col", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 mt-4 overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7312
|
+
DataTable,
|
|
7313
|
+
{
|
|
7314
|
+
columns,
|
|
7315
|
+
data: sortedBusinesses,
|
|
7316
|
+
sortBy,
|
|
7317
|
+
sortDirection,
|
|
7318
|
+
onSort: handleSort,
|
|
7319
|
+
onRowClick: handleRowClick
|
|
7320
|
+
}
|
|
7321
|
+
) }) }) })
|
|
7322
|
+
] });
|
|
7323
|
+
};
|
|
7324
|
+
var Businesses_default = Businesses;
|
|
7325
|
+
var businessAccounts = [
|
|
7326
|
+
{
|
|
7327
|
+
id: "acc-001",
|
|
7328
|
+
name: "Primary Operating Account",
|
|
7329
|
+
number: "****7890",
|
|
7330
|
+
type: "checking",
|
|
7331
|
+
status: "active",
|
|
7332
|
+
balance: "$125,450.00",
|
|
7333
|
+
currency: "USD",
|
|
7334
|
+
institution: "Chase Bank",
|
|
7335
|
+
routingNumber: "021000021",
|
|
7336
|
+
country: "US"
|
|
7337
|
+
},
|
|
7338
|
+
{
|
|
7339
|
+
id: "acc-002",
|
|
7340
|
+
name: "Business Savings",
|
|
7341
|
+
number: "****4567",
|
|
7342
|
+
type: "savings",
|
|
7343
|
+
status: "active",
|
|
7344
|
+
balance: "$45,230.00",
|
|
7345
|
+
currency: "USD",
|
|
7346
|
+
institution: "Chase Bank",
|
|
7347
|
+
routingNumber: "021000021",
|
|
7348
|
+
country: "US"
|
|
7349
|
+
},
|
|
7350
|
+
{
|
|
7351
|
+
id: "acc-003",
|
|
7352
|
+
name: "Payroll Account",
|
|
7353
|
+
number: "****1234",
|
|
7354
|
+
type: "checking",
|
|
7355
|
+
status: "active",
|
|
7356
|
+
balance: "$78,900.00",
|
|
7357
|
+
currency: "USD",
|
|
7358
|
+
institution: "Wells Fargo",
|
|
7359
|
+
routingNumber: "121000248",
|
|
7360
|
+
country: "US"
|
|
7361
|
+
}
|
|
7362
|
+
];
|
|
7363
|
+
var businessCounterparties = [
|
|
7364
|
+
{
|
|
7365
|
+
id: "cp-001",
|
|
7366
|
+
name: "Tech Solutions Inc",
|
|
7367
|
+
type: "BUSINESS",
|
|
7368
|
+
status: "active",
|
|
7369
|
+
description: "Technology vendor and service provider",
|
|
7370
|
+
lastTransaction: "2024-01-15"
|
|
7371
|
+
},
|
|
7372
|
+
{
|
|
7373
|
+
id: "cp-002",
|
|
7374
|
+
name: "Global Logistics LLC",
|
|
7375
|
+
type: "BUSINESS",
|
|
7376
|
+
status: "active",
|
|
7377
|
+
description: "Shipping and logistics partner",
|
|
7378
|
+
lastTransaction: "2024-01-10"
|
|
7379
|
+
},
|
|
7380
|
+
{
|
|
7381
|
+
id: "cp-003",
|
|
7382
|
+
name: "Marketing Pros Agency",
|
|
7383
|
+
type: "BUSINESS",
|
|
7384
|
+
status: "active",
|
|
7385
|
+
description: "Marketing and advertising services",
|
|
7386
|
+
lastTransaction: "2024-01-08"
|
|
7387
|
+
},
|
|
7388
|
+
{
|
|
7389
|
+
id: "cp-004",
|
|
7390
|
+
name: "John Smith Consulting",
|
|
7391
|
+
type: "INDIVIDUAL",
|
|
7392
|
+
status: "active",
|
|
7393
|
+
description: "Independent business consultant",
|
|
7394
|
+
lastTransaction: "2023-12-20"
|
|
7395
|
+
}
|
|
7396
|
+
];
|
|
6798
7397
|
var Business = () => {
|
|
6799
|
-
|
|
6800
|
-
DetailPageLayout,
|
|
7398
|
+
const accountColumns = [
|
|
6801
7399
|
{
|
|
6802
|
-
|
|
6803
|
-
|
|
6804
|
-
|
|
6805
|
-
|
|
6806
|
-
|
|
6807
|
-
|
|
6808
|
-
|
|
6809
|
-
|
|
6810
|
-
|
|
6811
|
-
|
|
6812
|
-
|
|
6813
|
-
|
|
6814
|
-
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
key: "banking",
|
|
6822
|
-
component: BankingDetailsCard,
|
|
6823
|
-
expandOnEdit: true
|
|
6824
|
-
}
|
|
6825
|
-
],
|
|
6826
|
-
actions: [
|
|
6827
|
-
{
|
|
6828
|
-
label: "Export Data",
|
|
6829
|
-
variant: "outline"
|
|
6830
|
-
},
|
|
6831
|
-
{
|
|
6832
|
-
label: "Edit Business",
|
|
6833
|
-
className: "bg-gradient-primary hover:opacity-90"
|
|
6834
|
-
}
|
|
6835
|
-
]
|
|
7400
|
+
key: "number",
|
|
7401
|
+
title: "Account Number",
|
|
7402
|
+
sortable: true
|
|
7403
|
+
},
|
|
7404
|
+
{
|
|
7405
|
+
key: "name",
|
|
7406
|
+
title: "Account Name",
|
|
7407
|
+
sortable: true
|
|
7408
|
+
},
|
|
7409
|
+
{
|
|
7410
|
+
key: "balance",
|
|
7411
|
+
title: "Available Balance",
|
|
7412
|
+
sortable: true,
|
|
7413
|
+
align: "right"
|
|
7414
|
+
},
|
|
7415
|
+
{
|
|
7416
|
+
key: "status",
|
|
7417
|
+
title: "Status",
|
|
7418
|
+
render: (value) => /* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status: value })
|
|
6836
7419
|
}
|
|
6837
|
-
|
|
7420
|
+
];
|
|
7421
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "container mx-auto p-6 space-y-6", children: [
|
|
7422
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-bold tracking-tight", children: "Business Management" }) }),
|
|
7423
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Tabs, { defaultValue: "profile", className: "space-y-6", children: [
|
|
7424
|
+
/* @__PURE__ */ jsxRuntime.jsxs(TabsList, { className: "inline-flex gap-8 h-auto bg-transparent border-b border-border w-full p-0 rounded-none justify-start", children: [
|
|
7425
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7426
|
+
TabsTrigger,
|
|
7427
|
+
{
|
|
7428
|
+
value: "profile",
|
|
7429
|
+
className: "rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:shadow-none pb-3",
|
|
7430
|
+
children: "Profile"
|
|
7431
|
+
}
|
|
7432
|
+
),
|
|
7433
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7434
|
+
TabsTrigger,
|
|
7435
|
+
{
|
|
7436
|
+
value: "kyc",
|
|
7437
|
+
className: "rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:shadow-none pb-3",
|
|
7438
|
+
children: "KYC"
|
|
7439
|
+
}
|
|
7440
|
+
),
|
|
7441
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7442
|
+
TabsTrigger,
|
|
7443
|
+
{
|
|
7444
|
+
value: "counterparty",
|
|
7445
|
+
className: "rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:shadow-none pb-3",
|
|
7446
|
+
children: "Counterparty"
|
|
7447
|
+
}
|
|
7448
|
+
)
|
|
7449
|
+
] }),
|
|
7450
|
+
/* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "profile", className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-6", children: [
|
|
7451
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-6", children: [
|
|
7452
|
+
/* @__PURE__ */ jsxRuntime.jsx(BusinessProfileCard, { isEditing: false, onToggleEdit: () => {
|
|
7453
|
+
} }),
|
|
7454
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
7455
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
7456
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Accounts" }),
|
|
7457
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", children: "+ New Account" })
|
|
7458
|
+
] }),
|
|
7459
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7460
|
+
DataTable,
|
|
7461
|
+
{
|
|
7462
|
+
columns: accountColumns,
|
|
7463
|
+
data: businessAccounts,
|
|
7464
|
+
emptyMessage: "No accounts found"
|
|
7465
|
+
}
|
|
7466
|
+
) })
|
|
7467
|
+
] })
|
|
7468
|
+
] }),
|
|
7469
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsxRuntime.jsx(BusinessStatusCard, { isEditing: false, onToggleEdit: () => {
|
|
7470
|
+
} }) })
|
|
7471
|
+
] }) }),
|
|
7472
|
+
/* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "kyc", className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-8 text-center text-muted-foreground", children: "KYC content coming soon" }) }),
|
|
7473
|
+
/* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "counterparty", className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6", children: businessCounterparties.map((counterparty) => /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
7474
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { children: [
|
|
7475
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
7476
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { className: "text-lg", children: counterparty.name }),
|
|
7477
|
+
/* @__PURE__ */ jsxRuntime.jsx(CounterpartyTypeBadge, { type: counterparty.type })
|
|
7478
|
+
] }),
|
|
7479
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2 mt-2", children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: counterparty.status === "active" ? "default" : "secondary", children: counterparty.status }) })
|
|
7480
|
+
] }),
|
|
7481
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "space-y-3", children: [
|
|
7482
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: counterparty.description }),
|
|
7483
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center text-sm", children: [
|
|
7484
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Last Transaction" }),
|
|
7485
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: counterparty.lastTransaction })
|
|
7486
|
+
] })
|
|
7487
|
+
] })
|
|
7488
|
+
] }, counterparty.id)) }) })
|
|
7489
|
+
] })
|
|
7490
|
+
] });
|
|
6838
7491
|
};
|
|
6839
|
-
var
|
|
7492
|
+
var BusinessDetail_default = Business;
|
|
6840
7493
|
var CreateBusiness = () => {
|
|
6841
7494
|
const [businessType, setBusinessType] = React13.useState("");
|
|
6842
7495
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7207,6 +7860,327 @@ var NotFound = () => {
|
|
|
7207
7860
|
] }) });
|
|
7208
7861
|
};
|
|
7209
7862
|
var NotFound_default = NotFound;
|
|
7863
|
+
var StatementHeader = ({ data, onEdit }) => {
|
|
7864
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
7865
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { direction: "row", children: [
|
|
7866
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { size: "md", children: "Statement Summary" }),
|
|
7867
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "sm", onClick: onEdit, children: [
|
|
7868
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Edit, { className: "h-4 w-4 mr-2" }),
|
|
7869
|
+
"Edit"
|
|
7870
|
+
] })
|
|
7871
|
+
] }),
|
|
7872
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
|
|
7873
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7874
|
+
InfoField,
|
|
7875
|
+
{
|
|
7876
|
+
label: "Account",
|
|
7877
|
+
value: data.account,
|
|
7878
|
+
layout: "horizontal"
|
|
7879
|
+
}
|
|
7880
|
+
),
|
|
7881
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7882
|
+
InfoField,
|
|
7883
|
+
{
|
|
7884
|
+
label: "Product ID",
|
|
7885
|
+
value: data.productId,
|
|
7886
|
+
layout: "horizontal"
|
|
7887
|
+
}
|
|
7888
|
+
),
|
|
7889
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7890
|
+
InfoField,
|
|
7891
|
+
{
|
|
7892
|
+
label: "Program ID",
|
|
7893
|
+
value: data.programId,
|
|
7894
|
+
layout: "horizontal"
|
|
7895
|
+
}
|
|
7896
|
+
),
|
|
7897
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7898
|
+
InfoField,
|
|
7899
|
+
{
|
|
7900
|
+
label: "Start Date",
|
|
7901
|
+
value: data.startDate,
|
|
7902
|
+
layout: "horizontal"
|
|
7903
|
+
}
|
|
7904
|
+
),
|
|
7905
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7906
|
+
InfoField,
|
|
7907
|
+
{
|
|
7908
|
+
label: "End Date",
|
|
7909
|
+
value: data.endDate,
|
|
7910
|
+
layout: "horizontal"
|
|
7911
|
+
}
|
|
7912
|
+
),
|
|
7913
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7914
|
+
InfoField,
|
|
7915
|
+
{
|
|
7916
|
+
label: "Starting Balance",
|
|
7917
|
+
value: data.startingBalance,
|
|
7918
|
+
layout: "horizontal"
|
|
7919
|
+
}
|
|
7920
|
+
),
|
|
7921
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7922
|
+
InfoField,
|
|
7923
|
+
{
|
|
7924
|
+
label: "Ending Balance",
|
|
7925
|
+
value: data.endingBalance,
|
|
7926
|
+
layout: "horizontal"
|
|
7927
|
+
}
|
|
7928
|
+
)
|
|
7929
|
+
] }) })
|
|
7930
|
+
] });
|
|
7931
|
+
};
|
|
7932
|
+
|
|
7933
|
+
// src/lib/mock-data/statement-data.ts
|
|
7934
|
+
var mockStatementHeader = {
|
|
7935
|
+
account: "1234567890",
|
|
7936
|
+
productId: "PROD-001",
|
|
7937
|
+
programId: "PROG-001",
|
|
7938
|
+
startDate: "01/01/2024 00:00:00",
|
|
7939
|
+
endDate: "01/31/2024 23:59:59",
|
|
7940
|
+
startingBalance: "$125,450.00",
|
|
7941
|
+
endingBalance: "$158,320.50"
|
|
7942
|
+
};
|
|
7943
|
+
var mockStatementTransactions = [
|
|
7944
|
+
{ transactionType: "ACH Credit", direction: "CREDIT", amount: 45e3, count: 12 },
|
|
7945
|
+
{ transactionType: "ACH Debit", direction: "DEBIT", amount: 23500, count: 8 },
|
|
7946
|
+
{ transactionType: "Wire Transfer In", direction: "CREDIT", amount: 15e3, count: 3 },
|
|
7947
|
+
{ transactionType: "Wire Transfer Out", direction: "DEBIT", amount: 8200, count: 2 },
|
|
7948
|
+
{ transactionType: "Card Purchase", direction: "DEBIT", amount: 5430.5, count: 45 },
|
|
7949
|
+
{ transactionType: "Direct Deposit", direction: "CREDIT", amount: 12500, count: 5 },
|
|
7950
|
+
{ transactionType: "ATM Withdrawal", direction: "DEBIT", amount: 3200, count: 16 },
|
|
7951
|
+
{ transactionType: "Check Deposit", direction: "CREDIT", amount: 8900, count: 4 },
|
|
7952
|
+
{ transactionType: "Bill Payment", direction: "DEBIT", amount: 6780, count: 18 },
|
|
7953
|
+
{ transactionType: "Transfer In", direction: "CREDIT", amount: 5200, count: 7 },
|
|
7954
|
+
{ transactionType: "Transfer Out", direction: "DEBIT", amount: 4350, count: 6 },
|
|
7955
|
+
{ transactionType: "Fee", direction: "DEBIT", amount: 125, count: 3 },
|
|
7956
|
+
{ transactionType: "Interest", direction: "CREDIT", amount: 85.5, count: 1 },
|
|
7957
|
+
{ transactionType: "Refund", direction: "CREDIT", amount: 450, count: 2 }
|
|
7958
|
+
];
|
|
7959
|
+
var mockPrograms = [
|
|
7960
|
+
{ value: "PROG-001", label: "Consumer Banking Program" },
|
|
7961
|
+
{ value: "PROG-002", label: "Business Banking Program" },
|
|
7962
|
+
{ value: "PROG-003", label: "Premium Rewards Program" }
|
|
7963
|
+
];
|
|
7964
|
+
var mockProducts = [
|
|
7965
|
+
{ value: "PROD-001", label: "Checking Account" },
|
|
7966
|
+
{ value: "PROD-002", label: "Savings Account" },
|
|
7967
|
+
{ value: "PROD-003", label: "Money Market Account" },
|
|
7968
|
+
{ value: "PROD-004", label: "Business Checking" }
|
|
7969
|
+
];
|
|
7970
|
+
var statementTypes = [
|
|
7971
|
+
{ value: "root", label: "Root" },
|
|
7972
|
+
{ value: "program", label: "Program" },
|
|
7973
|
+
{ value: "product", label: "Product" },
|
|
7974
|
+
{ value: "account", label: "Account" }
|
|
7975
|
+
];
|
|
7976
|
+
function Statement() {
|
|
7977
|
+
const [statementType, setStatementType] = React13.useState("");
|
|
7978
|
+
const [selectedProgram, setSelectedProgram] = React13.useState("");
|
|
7979
|
+
const [selectedProduct, setSelectedProduct] = React13.useState("");
|
|
7980
|
+
const [accountNumber, setAccountNumber] = React13.useState("");
|
|
7981
|
+
const [startDate, setStartDate] = React13.useState();
|
|
7982
|
+
const [endDate, setEndDate] = React13.useState();
|
|
7983
|
+
const [statementGenerated, setStatementGenerated] = React13.useState(false);
|
|
7984
|
+
const handleStatementTypeChange = (value) => {
|
|
7985
|
+
setStatementType(value);
|
|
7986
|
+
setSelectedProgram("");
|
|
7987
|
+
setSelectedProduct("");
|
|
7988
|
+
setAccountNumber("");
|
|
7989
|
+
};
|
|
7990
|
+
const handleGenerateStatement = () => {
|
|
7991
|
+
if (!statementType || !startDate || !endDate) return;
|
|
7992
|
+
if (statementType === "program" && !selectedProgram) return;
|
|
7993
|
+
if (statementType === "product" && !selectedProduct) return;
|
|
7994
|
+
if (statementType === "account" && !accountNumber) return;
|
|
7995
|
+
setStatementGenerated(true);
|
|
7996
|
+
};
|
|
7997
|
+
const isGenerateDisabled = () => {
|
|
7998
|
+
if (!statementType || !startDate || !endDate) return true;
|
|
7999
|
+
if (statementType === "program" && !selectedProgram) return true;
|
|
8000
|
+
if (statementType === "product" && !selectedProduct) return true;
|
|
8001
|
+
if (statementType === "account" && !accountNumber) return true;
|
|
8002
|
+
return false;
|
|
8003
|
+
};
|
|
8004
|
+
const columns = [
|
|
8005
|
+
{
|
|
8006
|
+
key: "transactionType",
|
|
8007
|
+
title: "Transaction Type",
|
|
8008
|
+
sortable: true,
|
|
8009
|
+
align: "left"
|
|
8010
|
+
},
|
|
8011
|
+
{
|
|
8012
|
+
key: "direction",
|
|
8013
|
+
title: "Direction",
|
|
8014
|
+
sortable: true,
|
|
8015
|
+
align: "left",
|
|
8016
|
+
render: (value) => /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: value === "CREDIT" ? "success" : "secondary", children: value })
|
|
8017
|
+
},
|
|
8018
|
+
{
|
|
8019
|
+
key: "amount",
|
|
8020
|
+
title: "Amount",
|
|
8021
|
+
sortable: true,
|
|
8022
|
+
align: "right",
|
|
8023
|
+
render: (value) => `$${value.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`
|
|
8024
|
+
},
|
|
8025
|
+
{
|
|
8026
|
+
key: "count",
|
|
8027
|
+
title: "Count",
|
|
8028
|
+
sortable: true,
|
|
8029
|
+
align: "right"
|
|
8030
|
+
}
|
|
8031
|
+
];
|
|
8032
|
+
const handleDownloadCSV = () => {
|
|
8033
|
+
console.log("Downloading CSV...");
|
|
8034
|
+
};
|
|
8035
|
+
const handlePrintPDF = () => {
|
|
8036
|
+
console.log("Printing PDF...");
|
|
8037
|
+
};
|
|
8038
|
+
const handleEdit = () => {
|
|
8039
|
+
setStatementGenerated(false);
|
|
8040
|
+
};
|
|
8041
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "container mx-auto p-6 space-y-6", children: [
|
|
8042
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
8043
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-bold tracking-tight", children: "Statement" }),
|
|
8044
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mt-1", children: "Generate and view statement reports" })
|
|
8045
|
+
] }),
|
|
8046
|
+
!statementGenerated && /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
8047
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { size: "md", children: "Statement Parameters" }) }),
|
|
8048
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "space-y-4", children: [
|
|
8049
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4", children: [
|
|
8050
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8051
|
+
EnhancedSelect,
|
|
8052
|
+
{
|
|
8053
|
+
label: "Statement Type",
|
|
8054
|
+
placeholder: "Select type",
|
|
8055
|
+
options: statementTypes,
|
|
8056
|
+
value: statementType,
|
|
8057
|
+
onValueChange: handleStatementTypeChange
|
|
8058
|
+
}
|
|
8059
|
+
),
|
|
8060
|
+
statementType === "program" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8061
|
+
EnhancedSelect,
|
|
8062
|
+
{
|
|
8063
|
+
label: "Program Name",
|
|
8064
|
+
placeholder: "Select program",
|
|
8065
|
+
options: mockPrograms,
|
|
8066
|
+
value: selectedProgram,
|
|
8067
|
+
onValueChange: setSelectedProgram
|
|
8068
|
+
}
|
|
8069
|
+
),
|
|
8070
|
+
statementType === "product" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8071
|
+
EnhancedSelect,
|
|
8072
|
+
{
|
|
8073
|
+
label: "Product Name",
|
|
8074
|
+
placeholder: "Select product",
|
|
8075
|
+
options: mockProducts,
|
|
8076
|
+
value: selectedProduct,
|
|
8077
|
+
onValueChange: setSelectedProduct
|
|
8078
|
+
}
|
|
8079
|
+
),
|
|
8080
|
+
statementType === "account" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8081
|
+
EnhancedInput,
|
|
8082
|
+
{
|
|
8083
|
+
label: "Account Number",
|
|
8084
|
+
placeholder: "Enter account number",
|
|
8085
|
+
value: accountNumber,
|
|
8086
|
+
onChange: (e) => setAccountNumber(e.target.value)
|
|
8087
|
+
}
|
|
8088
|
+
),
|
|
8089
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
8090
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "Start Date" }),
|
|
8091
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
|
|
8092
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8093
|
+
Button,
|
|
8094
|
+
{
|
|
8095
|
+
variant: "outline",
|
|
8096
|
+
className: cn(
|
|
8097
|
+
"justify-start text-left font-normal",
|
|
8098
|
+
!startDate && "text-muted-foreground"
|
|
8099
|
+
),
|
|
8100
|
+
children: [
|
|
8101
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CalendarIcon, { className: "mr-2 h-4 w-4" }),
|
|
8102
|
+
startDate ? dateFns.format(startDate, "MM/dd/yyyy") : "Select date"
|
|
8103
|
+
]
|
|
8104
|
+
}
|
|
8105
|
+
) }),
|
|
8106
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8107
|
+
Calendar,
|
|
8108
|
+
{
|
|
8109
|
+
mode: "single",
|
|
8110
|
+
selected: startDate,
|
|
8111
|
+
onSelect: setStartDate,
|
|
8112
|
+
initialFocus: true
|
|
8113
|
+
}
|
|
8114
|
+
) })
|
|
8115
|
+
] })
|
|
8116
|
+
] }),
|
|
8117
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
8118
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "End Date" }),
|
|
8119
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
|
|
8120
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8121
|
+
Button,
|
|
8122
|
+
{
|
|
8123
|
+
variant: "outline",
|
|
8124
|
+
className: cn(
|
|
8125
|
+
"justify-start text-left font-normal",
|
|
8126
|
+
!endDate && "text-muted-foreground"
|
|
8127
|
+
),
|
|
8128
|
+
children: [
|
|
8129
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CalendarIcon, { className: "mr-2 h-4 w-4" }),
|
|
8130
|
+
endDate ? dateFns.format(endDate, "MM/dd/yyyy") : "Select date"
|
|
8131
|
+
]
|
|
8132
|
+
}
|
|
8133
|
+
) }),
|
|
8134
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8135
|
+
Calendar,
|
|
8136
|
+
{
|
|
8137
|
+
mode: "single",
|
|
8138
|
+
selected: endDate,
|
|
8139
|
+
onSelect: setEndDate,
|
|
8140
|
+
initialFocus: true
|
|
8141
|
+
}
|
|
8142
|
+
) })
|
|
8143
|
+
] })
|
|
8144
|
+
] })
|
|
8145
|
+
] }),
|
|
8146
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8147
|
+
Button,
|
|
8148
|
+
{
|
|
8149
|
+
onClick: handleGenerateStatement,
|
|
8150
|
+
disabled: isGenerateDisabled(),
|
|
8151
|
+
children: "Generate Statement"
|
|
8152
|
+
}
|
|
8153
|
+
) })
|
|
8154
|
+
] })
|
|
8155
|
+
] }),
|
|
8156
|
+
statementGenerated && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8157
|
+
/* @__PURE__ */ jsxRuntime.jsx(StatementHeader, { data: mockStatementHeader, onEdit: handleEdit }),
|
|
8158
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
8159
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { direction: "row", children: [
|
|
8160
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { size: "md", children: "Transaction Summary" }),
|
|
8161
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
8162
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", onClick: handleDownloadCSV, children: [
|
|
8163
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Download, { className: "h-4 w-4 mr-2" }),
|
|
8164
|
+
"Download CSV"
|
|
8165
|
+
] }),
|
|
8166
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", onClick: handlePrintPDF, children: [
|
|
8167
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { className: "h-4 w-4 mr-2" }),
|
|
8168
|
+
"Print PDF"
|
|
8169
|
+
] })
|
|
8170
|
+
] })
|
|
8171
|
+
] }),
|
|
8172
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8173
|
+
DataTable,
|
|
8174
|
+
{
|
|
8175
|
+
columns,
|
|
8176
|
+
data: mockStatementTransactions,
|
|
8177
|
+
emptyMessage: "No transactions found"
|
|
8178
|
+
}
|
|
8179
|
+
) })
|
|
8180
|
+
] })
|
|
8181
|
+
] })
|
|
8182
|
+
] });
|
|
8183
|
+
}
|
|
7210
8184
|
|
|
7211
8185
|
// src/lib/mock-data/transaction-data.ts
|
|
7212
8186
|
var mockTransactions = [
|
|
@@ -8638,10 +9612,11 @@ exports.BeneficiaryAddress = BeneficiaryAddress;
|
|
|
8638
9612
|
exports.BeneficiaryCard = BeneficiaryCard;
|
|
8639
9613
|
exports.BeneficiaryDomesticWire = BeneficiaryDomesticWire;
|
|
8640
9614
|
exports.Breadcrumb = Breadcrumb;
|
|
8641
|
-
exports.
|
|
9615
|
+
exports.BusinessDetail = BusinessDetail_default;
|
|
8642
9616
|
exports.BusinessProfileCard = BusinessProfileCard;
|
|
8643
9617
|
exports.BusinessStatusCard = BusinessStatusCard;
|
|
8644
9618
|
exports.BusinessTypeBadge = BusinessTypeBadge;
|
|
9619
|
+
exports.Businesses = Businesses_default;
|
|
8645
9620
|
exports.Button = Button;
|
|
8646
9621
|
exports.Calendar = Calendar;
|
|
8647
9622
|
exports.Card = Card;
|
|
@@ -8752,6 +9727,7 @@ exports.SidebarRail = SidebarRail;
|
|
|
8752
9727
|
exports.SidebarSeparator = SidebarSeparator;
|
|
8753
9728
|
exports.SidebarTrigger = SidebarTrigger;
|
|
8754
9729
|
exports.Stack = Stack;
|
|
9730
|
+
exports.Statement = Statement;
|
|
8755
9731
|
exports.StatusBadge = StatusBadge;
|
|
8756
9732
|
exports.Tabs = Tabs;
|
|
8757
9733
|
exports.TabsContent = TabsContent;
|