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.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import * as React13 from 'react';
2
- import { useState, useEffect, useCallback } from 'react';
2
+ import { useState, useEffect, useCallback, useMemo } from 'react';
3
3
  import { createPortal } from 'react-dom';
4
4
  import { Slot } from '@radix-ui/react-slot';
5
5
  import { cva } from 'class-variance-authority';
6
6
  import { clsx } from 'clsx';
7
7
  import { twMerge } from 'tailwind-merge';
8
8
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
9
- import { ChevronDown, ChevronUp, Check, X, PanelLeft, Edit, Home, Globe, CreditCard, Building, MoreVertical, Minus, TrendingDown, TrendingUp, ChevronRight, Eye, Trash2, Upload, FileText, Download, Plus, MessageSquare, Copy, LayoutDashboard, Bell, Briefcase, FileCheck, Receipt, ArrowLeftRight, Users, Building2, Zap, Shield, AlertCircle, RefreshCw, Landmark, Search, Repeat, Box, Settings, BarChart3, Key, Heart, User, AlertTriangle, XCircle, CheckCircle, Clock, Filter, ChevronLeft, Calendar as Calendar$1, CheckCircle2, Circle, UserPlus, ChevronsUpDown } from 'lucide-react';
9
+ import { ChevronDown, ChevronUp, Check, X, PanelLeft, Edit, Home, Globe, CreditCard, Building, MoreVertical, Minus, TrendingDown, TrendingUp, ChevronRight, Eye, Trash2, Upload, FileText, Download, Plus, MessageSquare, Copy, LayoutDashboard, Bell, Briefcase, FileCheck, Receipt, ArrowLeftRight, Users, Building2, Zap, Shield, AlertCircle, RefreshCw, Landmark, Search, Repeat, Box, Settings, BarChart3, Key, Heart, User, AlertTriangle, XCircle, CheckCircle, Clock, Filter, ChevronLeft, Calendar as Calendar$1, CalendarIcon, CheckCircle2, Circle, UserPlus, ChevronsUpDown } from 'lucide-react';
10
10
  import * as SelectPrimitive from '@radix-ui/react-select';
11
11
  import * as DialogPrimitive from '@radix-ui/react-dialog';
12
12
  import { NavLink, useLocation, useParams, useNavigate } from 'react-router-dom';
@@ -838,7 +838,7 @@ var AlertTimeline = ({ events }) => {
838
838
  if (action.includes("Rejected")) return /* @__PURE__ */ jsx(XCircle, { className: "h-4 w-4" });
839
839
  return /* @__PURE__ */ jsx(Circle, { className: "h-4 w-4" });
840
840
  };
841
- const getStatusColor = (status) => {
841
+ const getStatusColor2 = (status) => {
842
842
  switch (status) {
843
843
  case "Unassigned":
844
844
  return "text-destructive";
@@ -857,7 +857,7 @@ var AlertTimeline = ({ events }) => {
857
857
  index !== events.length - 1 && /* @__PURE__ */ jsx("div", { className: "absolute left-[7px] top-5 bottom-0 w-[2px] bg-border" }),
858
858
  /* @__PURE__ */ jsx("div", { className: cn(
859
859
  "absolute left-0 top-0 flex-none",
860
- getStatusColor(event.status)
860
+ getStatusColor2(event.status)
861
861
  ), children: /* @__PURE__ */ jsx("div", { className: "h-4 w-4", children: getIcon(event.action) }) }),
862
862
  /* @__PURE__ */ jsxs("div", { className: "space-y-0.5", children: [
863
863
  /* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-foreground", children: event.action }),
@@ -866,7 +866,7 @@ var AlertTimeline = ({ events }) => {
866
866
  event.user
867
867
  ] }),
868
868
  event.details && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: event.details }),
869
- event.status && /* @__PURE__ */ jsxs("p", { className: cn("text-xs font-medium", getStatusColor(event.status)), children: [
869
+ event.status && /* @__PURE__ */ jsxs("p", { className: cn("text-xs font-medium", getStatusColor2(event.status)), children: [
870
870
  "Status: ",
871
871
  event.status
872
872
  ] }),
@@ -2911,9 +2911,14 @@ var businessProfileSchema = z.object({
2911
2911
  dbaName: z.string().optional(),
2912
2912
  businessType: z.string().min(1, "Business type is required"),
2913
2913
  taxId: z.string().min(1, "Tax ID is required"),
2914
- businessPhone: z.string().min(1, "Business phone is required"),
2915
- businessEmail: z.string().email("Invalid email format"),
2914
+ formationDate: z.string().optional(),
2915
+ idType: z.string().optional(),
2916
+ incorporationState: z.string().optional(),
2916
2917
  website: z.string().url("Invalid URL format").optional().or(z.literal("")),
2918
+ contactFirstName: z.string().optional(),
2919
+ contactLastName: z.string().optional(),
2920
+ contactEmail: z.string().optional(),
2921
+ contactPhone: z.string().optional(),
2917
2922
  address: addressSchema
2918
2923
  });
2919
2924
  z.object({
@@ -3080,6 +3085,18 @@ var ADDRESS_TYPE_OPTIONS = {
3080
3085
  { value: "correspondent", label: "Correspondent Bank" }
3081
3086
  ]
3082
3087
  };
3088
+ var RFI_STATUS_OPTIONS = [
3089
+ { value: "Completed", label: "Completed" },
3090
+ { value: "Provided", label: "Provided" },
3091
+ { value: "Pending", label: "Pending" }
3092
+ ];
3093
+ var ASSIGNEE_OPTIONS = [
3094
+ { value: "John Smith", label: "John Smith" },
3095
+ { value: "Sarah Johnson", label: "Sarah Johnson" },
3096
+ { value: "Michael Chen", label: "Michael Chen" },
3097
+ { value: "approverdev", label: "approverdev" },
3098
+ { value: "Unassigned", label: "Unassigned" }
3099
+ ];
3083
3100
  var AddressForm = ({
3084
3101
  title,
3085
3102
  description,
@@ -3624,8 +3641,9 @@ var defaultBusinessProfile = {
3624
3641
  dbaName: "ACME Tech",
3625
3642
  businessType: "corporation",
3626
3643
  taxId: "12-3456789",
3627
- businessPhone: "+1 (555) 123-4567",
3628
- businessEmail: "contact@acme.com",
3644
+ formationDate: "2020-01-15",
3645
+ idType: "EIN",
3646
+ incorporationState: "Delaware",
3629
3647
  website: "https://acme.com",
3630
3648
  address: {
3631
3649
  streetAddress: "123 Business Avenue",
@@ -3652,75 +3670,176 @@ var BusinessProfileCard = ({
3652
3670
  onToggleEdit,
3653
3671
  onSave: onDataChange
3654
3672
  });
3655
- const editContent = /* @__PURE__ */ jsx(FormProvider, { form, children: /* @__PURE__ */ jsx("div", { className: "space-y-6", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
3656
- /* @__PURE__ */ jsx(
3657
- FormInput,
3658
- {
3659
- name: "legalName",
3660
- label: "Legal Name",
3661
- placeholder: "Enter legal business name",
3662
- required: true
3663
- }
3664
- ),
3665
- /* @__PURE__ */ jsx(
3666
- FormInput,
3667
- {
3668
- name: "dbaName",
3669
- label: "DBA Name",
3670
- placeholder: "Enter doing business as name"
3671
- }
3672
- ),
3673
- /* @__PURE__ */ jsx(
3674
- FormSelect,
3675
- {
3676
- name: "businessType",
3677
- label: "Business Type",
3678
- placeholder: "Select business type",
3679
- options: [
3680
- { value: "corporation", label: "Corporation" },
3681
- { value: "llc", label: "LLC" },
3682
- { value: "partnership", label: "Partnership" },
3683
- { value: "sole_proprietorship", label: "Sole Proprietorship" }
3684
- ]
3685
- }
3686
- ),
3687
- /* @__PURE__ */ jsx(
3688
- FormInput,
3689
- {
3690
- name: "taxId",
3691
- label: "Tax ID",
3692
- placeholder: "Enter tax identification number",
3693
- required: true
3694
- }
3695
- ),
3696
- /* @__PURE__ */ jsx(
3697
- FormInput,
3698
- {
3699
- name: "businessPhone",
3700
- label: "Business Phone",
3701
- placeholder: "Enter business phone number",
3702
- required: true
3703
- }
3704
- ),
3705
- /* @__PURE__ */ jsx(
3706
- FormInput,
3707
- {
3708
- name: "businessEmail",
3709
- label: "Business Email",
3710
- type: "email",
3711
- placeholder: "Enter business email",
3712
- required: true
3713
- }
3714
- ),
3715
- /* @__PURE__ */ jsx(
3716
- FormInput,
3717
- {
3718
- name: "website",
3719
- label: "Website",
3720
- placeholder: "Enter website URL"
3721
- }
3722
- )
3723
- ] }) }) });
3673
+ const editContent = /* @__PURE__ */ jsx(FormProvider, { form, children: /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
3674
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
3675
+ /* @__PURE__ */ jsx(
3676
+ FormInput,
3677
+ {
3678
+ name: "legalName",
3679
+ label: "Legal Name",
3680
+ placeholder: "Enter legal business name",
3681
+ required: true
3682
+ }
3683
+ ),
3684
+ /* @__PURE__ */ jsx(
3685
+ FormInput,
3686
+ {
3687
+ name: "dbaName",
3688
+ label: "DBA Name",
3689
+ placeholder: "Enter doing business as name"
3690
+ }
3691
+ ),
3692
+ /* @__PURE__ */ jsx(
3693
+ FormSelect,
3694
+ {
3695
+ name: "businessType",
3696
+ label: "Business Type",
3697
+ placeholder: "Select business type",
3698
+ options: [
3699
+ { value: "corporation", label: "Corporation" },
3700
+ { value: "llc", label: "LLC" },
3701
+ { value: "partnership", label: "Partnership" },
3702
+ { value: "sole_proprietorship", label: "Sole Proprietorship" }
3703
+ ]
3704
+ }
3705
+ ),
3706
+ /* @__PURE__ */ jsx(
3707
+ FormInput,
3708
+ {
3709
+ name: "taxId",
3710
+ label: "Tax ID",
3711
+ placeholder: "Enter tax identification number",
3712
+ required: true
3713
+ }
3714
+ ),
3715
+ /* @__PURE__ */ jsx(
3716
+ FormInput,
3717
+ {
3718
+ name: "formationDate",
3719
+ label: "Formation Date",
3720
+ type: "date",
3721
+ placeholder: "Enter formation date"
3722
+ }
3723
+ ),
3724
+ /* @__PURE__ */ jsx(
3725
+ FormSelect,
3726
+ {
3727
+ name: "idType",
3728
+ label: "ID Type",
3729
+ placeholder: "Select ID type",
3730
+ options: [
3731
+ { value: "ein", label: "EIN" },
3732
+ { value: "ssn", label: "SSN" },
3733
+ { value: "itin", label: "ITIN" }
3734
+ ]
3735
+ }
3736
+ ),
3737
+ /* @__PURE__ */ jsx(
3738
+ FormInput,
3739
+ {
3740
+ name: "incorporationState",
3741
+ label: "Incorporation State",
3742
+ placeholder: "Enter incorporation state"
3743
+ }
3744
+ ),
3745
+ /* @__PURE__ */ jsx(
3746
+ FormInput,
3747
+ {
3748
+ name: "website",
3749
+ label: "Website",
3750
+ placeholder: "Enter website URL"
3751
+ }
3752
+ )
3753
+ ] }),
3754
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-4", children: [
3755
+ /* @__PURE__ */ jsx(
3756
+ FormInput,
3757
+ {
3758
+ name: "address.streetAddress",
3759
+ label: "Street Address",
3760
+ placeholder: "Enter street address"
3761
+ }
3762
+ ),
3763
+ /* @__PURE__ */ jsx(
3764
+ FormInput,
3765
+ {
3766
+ name: "address.apartment",
3767
+ label: "Apartment, suite, or floor",
3768
+ placeholder: "Enter apartment, suite, or floor"
3769
+ }
3770
+ )
3771
+ ] }),
3772
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
3773
+ /* @__PURE__ */ jsx(
3774
+ FormInput,
3775
+ {
3776
+ name: "address.city",
3777
+ label: "City",
3778
+ placeholder: "Enter city"
3779
+ }
3780
+ ),
3781
+ /* @__PURE__ */ jsx(
3782
+ FormInput,
3783
+ {
3784
+ name: "address.state",
3785
+ label: "State",
3786
+ placeholder: "Enter state"
3787
+ }
3788
+ ),
3789
+ /* @__PURE__ */ jsx(
3790
+ FormInput,
3791
+ {
3792
+ name: "address.postalCode",
3793
+ label: "Postal Code",
3794
+ placeholder: "Enter postal code"
3795
+ }
3796
+ ),
3797
+ /* @__PURE__ */ jsx(
3798
+ FormInput,
3799
+ {
3800
+ name: "address.country",
3801
+ label: "Country Code",
3802
+ placeholder: "Enter country code"
3803
+ }
3804
+ )
3805
+ ] }),
3806
+ /* @__PURE__ */ jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Contact Person" }),
3807
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
3808
+ /* @__PURE__ */ jsx(
3809
+ FormInput,
3810
+ {
3811
+ name: "contactFirstName",
3812
+ label: "First Name",
3813
+ placeholder: "Enter first name"
3814
+ }
3815
+ ),
3816
+ /* @__PURE__ */ jsx(
3817
+ FormInput,
3818
+ {
3819
+ name: "contactLastName",
3820
+ label: "Last Name",
3821
+ placeholder: "Enter last name"
3822
+ }
3823
+ ),
3824
+ /* @__PURE__ */ jsx(
3825
+ FormInput,
3826
+ {
3827
+ name: "contactEmail",
3828
+ label: "Email",
3829
+ type: "email",
3830
+ placeholder: "Enter email"
3831
+ }
3832
+ ),
3833
+ /* @__PURE__ */ jsx(
3834
+ FormInput,
3835
+ {
3836
+ name: "contactPhone",
3837
+ label: "Phone Number",
3838
+ placeholder: "Enter phone number"
3839
+ }
3840
+ )
3841
+ ] })
3842
+ ] }) });
3724
3843
  const formValues = form.watch();
3725
3844
  const viewContent = /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
3726
3845
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
@@ -3732,10 +3851,30 @@ var BusinessProfileCard = ({
3732
3851
  /* @__PURE__ */ jsx(InfoField, { label: "Tax ID", value: formValues?.taxId, layout: "horizontal" })
3733
3852
  ] }),
3734
3853
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
3735
- /* @__PURE__ */ jsx(InfoField, { label: "Business Phone", value: formValues?.businessPhone, layout: "horizontal" }),
3736
- /* @__PURE__ */ jsx(InfoField, { label: "Business Email", value: formValues?.businessEmail, layout: "horizontal" })
3854
+ /* @__PURE__ */ jsx(InfoField, { label: "Formation Date", value: formValues?.formationDate || "2020-01-15", layout: "horizontal" }),
3855
+ /* @__PURE__ */ jsx(InfoField, { label: "ID Type", value: formValues?.idType || "EIN", layout: "horizontal" })
3856
+ ] }),
3857
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
3858
+ /* @__PURE__ */ jsx(InfoField, { label: "Incorporation State", value: formValues?.incorporationState || "Delaware", layout: "horizontal" }),
3859
+ /* @__PURE__ */ jsx(InfoField, { label: "Website", value: formValues?.website, layout: "horizontal" })
3860
+ ] }),
3861
+ /* @__PURE__ */ jsx(
3862
+ InfoField,
3863
+ {
3864
+ label: "Address",
3865
+ 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",
3866
+ layout: "horizontal"
3867
+ }
3868
+ ),
3869
+ /* @__PURE__ */ jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Contact Person" }),
3870
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
3871
+ /* @__PURE__ */ jsx(InfoField, { label: "First Name", value: formValues?.contactFirstName || "John", layout: "horizontal" }),
3872
+ /* @__PURE__ */ jsx(InfoField, { label: "Last Name", value: formValues?.contactLastName || "Smith", layout: "horizontal" })
3737
3873
  ] }),
3738
- /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-4", children: /* @__PURE__ */ jsx(InfoField, { label: "Website", value: formValues?.website, layout: "horizontal" }) })
3874
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
3875
+ /* @__PURE__ */ jsx(InfoField, { label: "Email", value: formValues?.contactEmail || "john.smith@acme.com", layout: "horizontal" }),
3876
+ /* @__PURE__ */ jsx(InfoField, { label: "Phone Number", value: formValues?.contactPhone || "+1 (555) 123-4567", layout: "horizontal" })
3877
+ ] })
3739
3878
  ] });
3740
3879
  return /* @__PURE__ */ jsx(
3741
3880
  EditableFormCard,
@@ -3753,30 +3892,75 @@ var BusinessProfileCard = ({
3753
3892
  }
3754
3893
  );
3755
3894
  };
3895
+ var mockBusinessTimeline = [
3896
+ {
3897
+ id: "1",
3898
+ action: "Business Created",
3899
+ user: "admin",
3900
+ details: "Initial business setup",
3901
+ status: "Active",
3902
+ timestamp: "2025-08-03 10:30:00"
3903
+ },
3904
+ {
3905
+ id: "2",
3906
+ action: "Profile Updated",
3907
+ user: "admin",
3908
+ details: "Updated business information",
3909
+ timestamp: "2025-09-05 14:22:00"
3910
+ },
3911
+ {
3912
+ id: "3",
3913
+ action: "OFAC Check Completed",
3914
+ user: "System",
3915
+ details: "Automated compliance check",
3916
+ status: "Verified",
3917
+ timestamp: "2025-09-05 14:30:00"
3918
+ }
3919
+ ];
3756
3920
  var BusinessStatusCard = ({ isEditing, onToggleEdit, className }) => {
3921
+ const getIcon = (action) => {
3922
+ if (action.includes("Created")) return /* @__PURE__ */ jsx(Circle, { className: "h-4 w-4" });
3923
+ if (action.includes("Assigned")) return /* @__PURE__ */ jsx(UserPlus, { className: "h-4 w-4" });
3924
+ if (action.includes("Updated") || action.includes("Modified") || action.includes("Check")) return /* @__PURE__ */ jsx(Edit, { className: "h-4 w-4" });
3925
+ if (action.includes("Completed") || action.includes("Verified")) return /* @__PURE__ */ jsx(CheckCircle, { className: "h-4 w-4" });
3926
+ return /* @__PURE__ */ jsx(Circle, { className: "h-4 w-4" });
3927
+ };
3928
+ const getStatusColor2 = (status) => {
3929
+ switch (status) {
3930
+ case "Active":
3931
+ case "Verified":
3932
+ return "text-success";
3933
+ case "Pending":
3934
+ return "text-warning";
3935
+ default:
3936
+ return "text-muted-foreground";
3937
+ }
3938
+ };
3757
3939
  return /* @__PURE__ */ jsx(
3758
3940
  FormCard,
3759
3941
  {
3760
- title: "Business Status & Records",
3942
+ title: "Timeline",
3761
3943
  className,
3762
- headerActions: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: isEditing ? /* @__PURE__ */ jsxs(Fragment, { children: [
3763
- /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", onClick: onToggleEdit, children: "Cancel" }),
3764
- /* @__PURE__ */ jsx(Button, { size: "sm", onClick: onToggleEdit, children: "Save" })
3765
- ] }) : /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon", onClick: onToggleEdit, className: "text-primary hover:text-primary/80 hover:bg-primary/10", children: /* @__PURE__ */ jsx(Edit, { className: "h-4 w-4" }) }) }),
3766
- children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
3767
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
3768
- /* @__PURE__ */ jsx(InfoField, { label: "Status", value: /* @__PURE__ */ jsx(StatusBadge, { status: "ACTIVE" }), layout: "horizontal" }),
3769
- /* @__PURE__ */ jsx(InfoField, { label: "CIP Status", value: "NOT_START", layout: "horizontal" })
3770
- ] }),
3771
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
3772
- /* @__PURE__ */ jsx(InfoField, { label: "Created Date", value: "2025-08-03", layout: "horizontal" }),
3773
- /* @__PURE__ */ jsx(InfoField, { label: "Updated Date", value: "2025-09-05", layout: "horizontal" })
3774
- ] }),
3775
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
3776
- /* @__PURE__ */ jsx(InfoField, { label: "Last OFAC Date", value: "2025-09-05", layout: "horizontal" }),
3777
- /* @__PURE__ */ jsx(InfoField, { label: "Last OFAC Status", value: "View Status", layout: "horizontal", className: "text-primary cursor-pointer" })
3944
+ children: /* @__PURE__ */ jsx("div", { className: "space-y-3", children: mockBusinessTimeline.map((event, index) => /* @__PURE__ */ jsxs("div", { className: "relative pl-6 pb-3", children: [
3945
+ index !== mockBusinessTimeline.length - 1 && /* @__PURE__ */ jsx("div", { className: "absolute left-[7px] top-5 bottom-0 w-[2px] bg-border" }),
3946
+ /* @__PURE__ */ jsx("div", { className: cn(
3947
+ "absolute left-0 top-0 flex-none",
3948
+ getStatusColor2(event.status)
3949
+ ), children: /* @__PURE__ */ jsx("div", { className: "h-4 w-4", children: getIcon(event.action) }) }),
3950
+ /* @__PURE__ */ jsxs("div", { className: "space-y-0.5", children: [
3951
+ /* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-foreground", children: event.action }),
3952
+ /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
3953
+ "by ",
3954
+ event.user
3955
+ ] }),
3956
+ event.details && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: event.details }),
3957
+ event.status && /* @__PURE__ */ jsxs("p", { className: cn("text-xs font-medium", getStatusColor2(event.status)), children: [
3958
+ "Status: ",
3959
+ event.status
3960
+ ] }),
3961
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground/70 pt-0.5", children: event.timestamp })
3778
3962
  ] })
3779
- ] })
3963
+ ] }, event.id)) })
3780
3964
  }
3781
3965
  );
3782
3966
  };
@@ -3801,18 +3985,27 @@ var ContactInfoCard = ({ isEditing, onToggleEdit, className }) => {
3801
3985
  /* @__PURE__ */ jsx(InfoField, { label: "Phone Number", value: "", layout: "horizontal" })
3802
3986
  ] }),
3803
3987
  /* @__PURE__ */ jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Mailing Address" }),
3804
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-3", children: [
3805
- /* @__PURE__ */ jsx(InfoField, { label: "Street Address", value: "", layout: "horizontal" }),
3806
- /* @__PURE__ */ jsx(InfoField, { label: "Apartment, suite, or floor", value: "", layout: "horizontal" })
3807
- ] }),
3808
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
3809
- /* @__PURE__ */ jsx(InfoField, { label: "City", value: "", layout: "horizontal" }),
3810
- /* @__PURE__ */ jsx(InfoField, { label: "State", value: "Alabama", layout: "horizontal" })
3811
- ] }),
3812
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
3813
- /* @__PURE__ */ jsx(InfoField, { label: "Postal Code", value: "", layout: "horizontal" }),
3814
- /* @__PURE__ */ jsx(InfoField, { label: "Country Code", value: "US", layout: "horizontal" })
3815
- ] })
3988
+ isEditing ? /* @__PURE__ */ jsxs(Fragment, { children: [
3989
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-3", children: [
3990
+ /* @__PURE__ */ jsx(InfoField, { label: "Street Address", value: "", layout: "horizontal" }),
3991
+ /* @__PURE__ */ jsx(InfoField, { label: "Apartment, suite, or floor", value: "", layout: "horizontal" })
3992
+ ] }),
3993
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
3994
+ /* @__PURE__ */ jsx(InfoField, { label: "City", value: "", layout: "horizontal" }),
3995
+ /* @__PURE__ */ jsx(InfoField, { label: "State", value: "Alabama", layout: "horizontal" })
3996
+ ] }),
3997
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
3998
+ /* @__PURE__ */ jsx(InfoField, { label: "Postal Code", value: "", layout: "horizontal" }),
3999
+ /* @__PURE__ */ jsx(InfoField, { label: "Country Code", value: "US", layout: "horizontal" })
4000
+ ] })
4001
+ ] }) : /* @__PURE__ */ jsx(
4002
+ InfoField,
4003
+ {
4004
+ label: "Address",
4005
+ value: "123 Business Avenue, Suite 100, New York, NY 10001, US",
4006
+ layout: "horizontal"
4007
+ }
4008
+ )
3816
4009
  ] })
3817
4010
  }
3818
4011
  );
@@ -4841,6 +5034,7 @@ function DataTable({
4841
5034
  sortBy,
4842
5035
  sortDirection,
4843
5036
  onSort,
5037
+ onRowClick,
4844
5038
  loading = false,
4845
5039
  emptyMessage = "No data available",
4846
5040
  className
@@ -4878,7 +5072,7 @@ function DataTable({
4878
5072
  "th",
4879
5073
  {
4880
5074
  className: cn(
4881
- "h-12 px-4 text-left align-middle font-medium text-muted-foreground",
5075
+ "px-3 py-2 text-left align-middle text-sm font-medium bg-muted/50",
4882
5076
  column.align === "center" && "text-center",
4883
5077
  column.align === "right" && "text-right",
4884
5078
  column.width && `w-[${column.width}]`
@@ -4888,7 +5082,7 @@ function DataTable({
4888
5082
  {
4889
5083
  variant: "ghost",
4890
5084
  size: "sm",
4891
- className: "h-auto p-0 font-medium hover:bg-transparent",
5085
+ className: "h-auto p-0 text-sm font-medium hover:bg-transparent",
4892
5086
  onClick: () => handleSort(column.key),
4893
5087
  children: /* @__PURE__ */ jsxs("span", { className: "flex items-center", children: [
4894
5088
  column.title,
@@ -4902,12 +5096,16 @@ function DataTable({
4902
5096
  /* @__PURE__ */ jsx("tbody", { children: data.length === 0 ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: columns.length, className: "h-24 text-center text-muted-foreground", children: emptyMessage }) }) : data.map((row, index) => /* @__PURE__ */ jsx(
4903
5097
  "tr",
4904
5098
  {
4905
- className: "border-b transition-colors hover:bg-muted/50",
5099
+ className: cn(
5100
+ "border-b transition-colors hover:bg-muted/50",
5101
+ onRowClick && "cursor-pointer"
5102
+ ),
5103
+ onClick: () => onRowClick?.(row),
4906
5104
  children: columns.map((column) => /* @__PURE__ */ jsx(
4907
5105
  "td",
4908
5106
  {
4909
5107
  className: cn(
4910
- "p-4 align-middle",
5108
+ "px-3 py-2 align-middle text-sm",
4911
5109
  column.align === "center" && "text-center",
4912
5110
  column.align === "right" && "text-right"
4913
5111
  ),
@@ -6305,22 +6503,10 @@ var mockAlerts = [
6305
6503
  description: "Transaction WIRE_DOMESTIC_CREDIT of $30,000.00 is flagged for velocity limit ..."
6306
6504
  }
6307
6505
  ];
6308
- var RFI_STATUS_OPTIONS = [
6309
- { value: "Completed", label: "Completed" },
6310
- { value: "Provided", label: "Provided" },
6311
- { value: "Pending", label: "Pending" }
6312
- ];
6313
- var ASSIGNEE_OPTIONS = [
6314
- { value: "John Smith", label: "John Smith" },
6315
- { value: "Sarah Johnson", label: "Sarah Johnson" },
6316
- { value: "Michael Chen", label: "Michael Chen" },
6317
- { value: "approverdev", label: "approverdev" },
6318
- { value: "Unassigned", label: "Unassigned" }
6319
- ];
6320
- var AlertDetail = () => {
6321
- const { id } = useParams();
6322
- const navigate = useNavigate();
6323
- const alert = mockAlerts.find((a) => a.id === id);
6506
+
6507
+ // src/hooks/useAlertDetail.ts
6508
+ var useAlertDetail = (id) => {
6509
+ const alert = useMemo(() => mockAlerts.find((a) => a.id === id), [id]);
6324
6510
  const [rfiStatus, setRfiStatus] = useState(alert?.rfiStatus || "");
6325
6511
  const [assignee, setAssignee] = useState(alert?.assignee || "Unassigned");
6326
6512
  const handleRfiStatusChange = (newStatus) => {
@@ -6331,43 +6517,136 @@ var AlertDetail = () => {
6331
6517
  setAssignee(newAssignee);
6332
6518
  console.log("Assignee updated to:", newAssignee);
6333
6519
  };
6334
- if (!alert) {
6335
- return /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-8", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
6336
- /* @__PURE__ */ jsx("h1", { className: "text-2xl font-bold mb-2", children: "Alert Not Found" }),
6337
- /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground mb-4", children: [
6338
- "The alert #",
6339
- id,
6340
- " could not be found."
6520
+ return {
6521
+ alert,
6522
+ isLoading: false,
6523
+ // Set to true when implementing real data fetching
6524
+ rfiStatus,
6525
+ assignee,
6526
+ handleRfiStatusChange,
6527
+ handleAssigneeChange
6528
+ };
6529
+ };
6530
+
6531
+ // src/lib/utils/alert-utils.ts
6532
+ var getTypeBadgeVariant = (type) => {
6533
+ switch (type) {
6534
+ case "Ofac":
6535
+ return "alert-ofac";
6536
+ case "Dual Approval":
6537
+ return "alert-dual";
6538
+ case "Transaction Monitoring":
6539
+ return "alert-monitoring";
6540
+ case "Transaction Processing Error":
6541
+ return "alert-error";
6542
+ default:
6543
+ return "outline";
6544
+ }
6545
+ };
6546
+ var getStatusColor = (status) => {
6547
+ switch (status) {
6548
+ case "Unassigned":
6549
+ return "text-destructive";
6550
+ case "Closed":
6551
+ return "text-success";
6552
+ case "In Progress":
6553
+ return "text-warning";
6554
+ default:
6555
+ return "";
6556
+ }
6557
+ };
6558
+ var AlertDetailView = ({
6559
+ alert,
6560
+ rfiStatus,
6561
+ assignee,
6562
+ onRfiStatusChange,
6563
+ onAssigneeChange
6564
+ }) => {
6565
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col lg:flex-row gap-6", children: [
6566
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
6567
+ /* @__PURE__ */ jsx(
6568
+ FormCard,
6569
+ {
6570
+ title: "Alert Information",
6571
+ headerActions: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", children: /* @__PURE__ */ jsx(Edit, { className: "h-4 w-4" }) }),
6572
+ children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
6573
+ /* @__PURE__ */ jsx(InfoField, { label: "Alert ID", value: alert.id }),
6574
+ /* @__PURE__ */ jsx(
6575
+ InfoField,
6576
+ {
6577
+ label: "Type",
6578
+ value: /* @__PURE__ */ jsx(Badge, { variant: getTypeBadgeVariant(alert.type), children: alert.type })
6579
+ }
6580
+ ),
6581
+ /* @__PURE__ */ jsx(
6582
+ InfoField,
6583
+ {
6584
+ label: "Status",
6585
+ value: /* @__PURE__ */ jsx("span", { className: cn("font-medium", getStatusColor(alert.status)), children: alert.status })
6586
+ }
6587
+ ),
6588
+ /* @__PURE__ */ jsx(InfoField, { label: "Created At", value: alert.createdAt }),
6589
+ /* @__PURE__ */ jsx(
6590
+ InfoField,
6591
+ {
6592
+ label: "Context Type",
6593
+ value: /* @__PURE__ */ jsx(Badge, { variant: "outline", children: alert.contextType })
6594
+ }
6595
+ ),
6596
+ /* @__PURE__ */ jsx(InfoField, { label: "Context ID", value: alert.contextId || "N/A" }),
6597
+ /* @__PURE__ */ jsx(
6598
+ EditableInfoField,
6599
+ {
6600
+ label: "Assignee",
6601
+ value: assignee,
6602
+ options: ASSIGNEE_OPTIONS,
6603
+ onChange: onAssigneeChange,
6604
+ placeholder: "Unassigned"
6605
+ }
6606
+ ),
6607
+ /* @__PURE__ */ jsx(
6608
+ EditableInfoField,
6609
+ {
6610
+ label: "RFI Status",
6611
+ value: rfiStatus,
6612
+ options: RFI_STATUS_OPTIONS,
6613
+ onChange: onRfiStatusChange,
6614
+ placeholder: "Select status",
6615
+ renderValue: (value) => /* @__PURE__ */ jsx(Badge, { variant: "success", children: value })
6616
+ }
6617
+ ),
6618
+ /* @__PURE__ */ jsx("div", { className: "col-span-2", children: /* @__PURE__ */ jsx(InfoField, { label: "Description", value: alert.description }) })
6619
+ ] })
6620
+ }
6621
+ ),
6622
+ /* @__PURE__ */ jsx(ContextSection, { alert }),
6623
+ /* @__PURE__ */ jsx(FormCard, { title: "Notes", children: /* @__PURE__ */ jsx(AlertNotes, { alertId: alert.id, notes: alert.notes || [] }) }),
6624
+ /* @__PURE__ */ jsx(FormCard, { title: "Documents", children: /* @__PURE__ */ jsx(AlertDocuments, { alertId: alert.id, documents: alert.documents || [] }) })
6625
+ ] }),
6626
+ /* @__PURE__ */ jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsx(FormCard, { title: "Status Timeline", className: "h-full", children: /* @__PURE__ */ jsx(AlertTimeline, { events: alert.timeline || [] }) }) })
6627
+ ] });
6628
+ };
6629
+ var AlertDetail = () => {
6630
+ const { id } = useParams();
6631
+ const navigate = useNavigate();
6632
+ const {
6633
+ alert,
6634
+ rfiStatus,
6635
+ assignee,
6636
+ handleRfiStatusChange,
6637
+ handleAssigneeChange
6638
+ } = useAlertDetail(id);
6639
+ if (!alert) {
6640
+ return /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-8", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
6641
+ /* @__PURE__ */ jsx("h1", { className: "text-2xl font-bold mb-2", children: "Alert Not Found" }),
6642
+ /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground mb-4", children: [
6643
+ "The alert #",
6644
+ id,
6645
+ " could not be found."
6341
6646
  ] }),
6342
6647
  /* @__PURE__ */ jsx(Button, { onClick: () => navigate("/alerts"), children: "Back to Alerts" })
6343
6648
  ] }) });
6344
6649
  }
6345
- const getTypeBadgeVariant = (type) => {
6346
- switch (type) {
6347
- case "Ofac":
6348
- return "alert-ofac";
6349
- case "Dual Approval":
6350
- return "alert-dual";
6351
- case "Transaction Monitoring":
6352
- return "alert-monitoring";
6353
- case "Transaction Processing Error":
6354
- return "alert-error";
6355
- default:
6356
- return "outline";
6357
- }
6358
- };
6359
- const getStatusColor = (status) => {
6360
- switch (status) {
6361
- case "Unassigned":
6362
- return "text-destructive";
6363
- case "Closed":
6364
- return "text-success";
6365
- case "In Progress":
6366
- return "text-warning";
6367
- default:
6368
- return "";
6369
- }
6370
- };
6371
6650
  return /* @__PURE__ */ jsx(
6372
6651
  PageLayout,
6373
6652
  {
@@ -6391,69 +6670,16 @@ var AlertDetail = () => {
6391
6670
  onClick: () => console.log("Close alert")
6392
6671
  }
6393
6672
  ],
6394
- children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col lg:flex-row gap-6", children: [
6395
- /* @__PURE__ */ jsxs("div", { className: "flex-1 grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
6396
- /* @__PURE__ */ jsx(
6397
- FormCard,
6398
- {
6399
- title: "Alert Information",
6400
- headerActions: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", children: /* @__PURE__ */ jsx(Edit, { className: "h-4 w-4" }) }),
6401
- children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
6402
- /* @__PURE__ */ jsx(InfoField, { label: "Alert ID", value: alert.id }),
6403
- /* @__PURE__ */ jsx(
6404
- InfoField,
6405
- {
6406
- label: "Type",
6407
- value: /* @__PURE__ */ jsx(Badge, { variant: getTypeBadgeVariant(alert.type), children: alert.type })
6408
- }
6409
- ),
6410
- /* @__PURE__ */ jsx(
6411
- InfoField,
6412
- {
6413
- label: "Status",
6414
- value: /* @__PURE__ */ jsx("span", { className: cn("font-medium", getStatusColor(alert.status)), children: alert.status })
6415
- }
6416
- ),
6417
- /* @__PURE__ */ jsx(InfoField, { label: "Created At", value: alert.createdAt }),
6418
- /* @__PURE__ */ jsx(
6419
- InfoField,
6420
- {
6421
- label: "Context Type",
6422
- value: /* @__PURE__ */ jsx(Badge, { variant: "outline", children: alert.contextType })
6423
- }
6424
- ),
6425
- /* @__PURE__ */ jsx(InfoField, { label: "Context ID", value: alert.contextId || "N/A" }),
6426
- /* @__PURE__ */ jsx(
6427
- EditableInfoField,
6428
- {
6429
- label: "Assignee",
6430
- value: assignee,
6431
- options: ASSIGNEE_OPTIONS,
6432
- onChange: handleAssigneeChange,
6433
- placeholder: "Unassigned"
6434
- }
6435
- ),
6436
- /* @__PURE__ */ jsx(
6437
- EditableInfoField,
6438
- {
6439
- label: "RFI Status",
6440
- value: rfiStatus,
6441
- options: RFI_STATUS_OPTIONS,
6442
- onChange: handleRfiStatusChange,
6443
- placeholder: "Select status",
6444
- renderValue: (value) => /* @__PURE__ */ jsx(Badge, { variant: "success", children: value })
6445
- }
6446
- ),
6447
- /* @__PURE__ */ jsx("div", { className: "col-span-2", children: /* @__PURE__ */ jsx(InfoField, { label: "Description", value: alert.description }) })
6448
- ] })
6449
- }
6450
- ),
6451
- /* @__PURE__ */ jsx(ContextSection, { alert }),
6452
- /* @__PURE__ */ jsx(FormCard, { title: "Notes", children: /* @__PURE__ */ jsx(AlertNotes, { alertId: alert.id, notes: alert.notes || [] }) }),
6453
- /* @__PURE__ */ jsx(FormCard, { title: "Documents", children: /* @__PURE__ */ jsx(AlertDocuments, { alertId: alert.id, documents: alert.documents || [] }) })
6454
- ] }),
6455
- /* @__PURE__ */ jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsx(FormCard, { title: "Status Timeline", className: "h-full", children: /* @__PURE__ */ jsx(AlertTimeline, { events: alert.timeline || [] }) }) })
6456
- ] })
6673
+ children: /* @__PURE__ */ jsx(
6674
+ AlertDetailView,
6675
+ {
6676
+ alert,
6677
+ rfiStatus,
6678
+ assignee,
6679
+ onRfiStatusChange: handleRfiStatusChange,
6680
+ onAssigneeChange: handleAssigneeChange
6681
+ }
6682
+ )
6457
6683
  }
6458
6684
  );
6459
6685
  };
@@ -6512,7 +6738,7 @@ var Alerts = () => {
6512
6738
  setFilteredAlerts(mockAlerts);
6513
6739
  setCurrentPage(1);
6514
6740
  };
6515
- const getTypeBadgeVariant = (type) => {
6741
+ const getTypeBadgeVariant2 = (type) => {
6516
6742
  switch (type) {
6517
6743
  case "Ofac":
6518
6744
  return "alert-ofac";
@@ -6526,7 +6752,7 @@ var Alerts = () => {
6526
6752
  return "outline";
6527
6753
  }
6528
6754
  };
6529
- const getStatusColor = (status) => {
6755
+ const getStatusColor2 = (status) => {
6530
6756
  switch (status) {
6531
6757
  case "Unassigned":
6532
6758
  return "text-destructive";
@@ -6703,8 +6929,8 @@ var Alerts = () => {
6703
6929
  children: [
6704
6930
  /* @__PURE__ */ jsx("td", { className: "px-3 py-2 text-xs", children: alert.id }),
6705
6931
  /* @__PURE__ */ jsx("td", { className: "px-3 py-2 text-xs", children: alert.createdAt }),
6706
- /* @__PURE__ */ jsx("td", { className: "px-3 py-2", children: /* @__PURE__ */ jsx(Badge, { variant: getTypeBadgeVariant(alert.type), className: "whitespace-nowrap", children: alert.type }) }),
6707
- /* @__PURE__ */ jsx("td", { className: "px-3 py-2", children: /* @__PURE__ */ jsx("span", { className: cn("text-xs font-medium", getStatusColor(alert.status)), children: alert.status }) }),
6932
+ /* @__PURE__ */ jsx("td", { className: "px-3 py-2", children: /* @__PURE__ */ jsx(Badge, { variant: getTypeBadgeVariant2(alert.type), className: "whitespace-nowrap", children: alert.type }) }),
6933
+ /* @__PURE__ */ jsx("td", { className: "px-3 py-2", children: /* @__PURE__ */ jsx("span", { className: cn("text-xs font-medium", getStatusColor2(alert.status)), children: alert.status }) }),
6708
6934
  /* @__PURE__ */ jsx("td", { className: "px-3 py-2", children: /* @__PURE__ */ jsx(Badge, { variant: "outline", className: "whitespace-nowrap", children: alert.contextType }) }),
6709
6935
  /* @__PURE__ */ jsx("td", { className: "px-3 py-2", children: alert.rfiStatus && /* @__PURE__ */ jsx(Badge, { variant: "success", className: "whitespace-nowrap", children: alert.rfiStatus }) }),
6710
6936
  /* @__PURE__ */ jsx("td", { className: "px-3 py-2 text-xs truncate", children: alert.description })
@@ -6765,48 +6991,475 @@ var Alerts = () => {
6765
6991
  ] });
6766
6992
  };
6767
6993
  var Alerts_default = Alerts;
6994
+
6995
+ // src/lib/mock-data/businesses-list-data.ts
6996
+ var mockBusinessesList = [
6997
+ {
6998
+ id: "8112488",
6999
+ businessName: "RAPIDZ PAY INC",
7000
+ productName: "Fiat Republic Canada Inc. FBO Rapidz Pay",
7001
+ cipStatus: "verified",
7002
+ status: "active",
7003
+ created: "2025-10-05",
7004
+ modified: "2025-10-05"
7005
+ },
7006
+ {
7007
+ id: "8111609",
7008
+ businessName: "Fern Hyper Growth Llc",
7009
+ productName: "Atomic Brokerage FBO Atomic Brokerage Clients",
7010
+ cipStatus: "verified",
7011
+ status: "active",
7012
+ created: "2025-10-04",
7013
+ modified: "2025-10-04"
7014
+ },
7015
+ {
7016
+ id: "8111026",
7017
+ businessName: "ACEROSGALVANISADOS & PREPINTADOS",
7018
+ productName: "SendFriend Inc FBO Conduit Pay Agent",
7019
+ cipStatus: "not_start",
7020
+ status: "active",
7021
+ created: "2025-10-03",
7022
+ modified: "2025-10-03"
7023
+ },
7024
+ {
7025
+ id: "8110892",
7026
+ businessName: "Tech Solutions Corp",
7027
+ productName: "Digital Finance Inc FBO Tech Solutions",
7028
+ cipStatus: "pending",
7029
+ status: "active",
7030
+ created: "2025-10-02",
7031
+ modified: "2025-10-02"
7032
+ },
7033
+ {
7034
+ id: "8110654",
7035
+ businessName: "Global Trade Partners LLC",
7036
+ productName: "Swift Transfer FBO Global Trade",
7037
+ cipStatus: "verified",
7038
+ status: "active",
7039
+ created: "2025-10-01",
7040
+ modified: "2025-10-01"
7041
+ }
7042
+ ];
7043
+ var Businesses = () => {
7044
+ const navigate = useNavigate();
7045
+ const [businesses, setBusinesses] = useState(mockBusinessesList);
7046
+ const [filteredBusinesses, setFilteredBusinesses] = useState(mockBusinessesList);
7047
+ const [sortBy, setSortBy] = useState("created");
7048
+ const [sortDirection, setSortDirection] = useState("desc");
7049
+ const [filters, setFilters] = useState({
7050
+ name: "",
7051
+ productName: "",
7052
+ status: "",
7053
+ createdDateStart: void 0,
7054
+ createdDateEnd: void 0
7055
+ });
7056
+ const handleFilterChange = (field, value) => {
7057
+ setFilters((prev) => ({ ...prev, [field]: value }));
7058
+ };
7059
+ const applyFilters = () => {
7060
+ let filtered = businesses;
7061
+ if (filters.name) {
7062
+ filtered = filtered.filter(
7063
+ (business) => business.businessName.toLowerCase().includes(filters.name.toLowerCase())
7064
+ );
7065
+ }
7066
+ if (filters.productName) {
7067
+ filtered = filtered.filter(
7068
+ (business) => business.productName.toLowerCase().includes(filters.productName.toLowerCase())
7069
+ );
7070
+ }
7071
+ if (filters.status) {
7072
+ filtered = filtered.filter((business) => business.status === filters.status);
7073
+ }
7074
+ if (filters.createdDateStart) {
7075
+ filtered = filtered.filter(
7076
+ (business) => new Date(business.created) >= filters.createdDateStart
7077
+ );
7078
+ }
7079
+ if (filters.createdDateEnd) {
7080
+ filtered = filtered.filter(
7081
+ (business) => new Date(business.created) <= filters.createdDateEnd
7082
+ );
7083
+ }
7084
+ setFilteredBusinesses(filtered);
7085
+ };
7086
+ const resetFilters = () => {
7087
+ setFilters({
7088
+ name: "",
7089
+ productName: "",
7090
+ status: "",
7091
+ createdDateStart: void 0,
7092
+ createdDateEnd: void 0
7093
+ });
7094
+ setFilteredBusinesses(businesses);
7095
+ };
7096
+ const handleSort = (key) => {
7097
+ if (sortBy === key) {
7098
+ setSortDirection(sortDirection === "asc" ? "desc" : "asc");
7099
+ } else {
7100
+ setSortBy(key);
7101
+ setSortDirection("asc");
7102
+ }
7103
+ };
7104
+ const handleRowClick = (business) => {
7105
+ navigate(`/business/${business.id}`);
7106
+ };
7107
+ const columns = [
7108
+ {
7109
+ key: "id",
7110
+ title: "Business ID",
7111
+ sortable: true
7112
+ },
7113
+ {
7114
+ key: "businessName",
7115
+ title: "Business Name",
7116
+ sortable: true
7117
+ },
7118
+ {
7119
+ key: "productName",
7120
+ title: "Product Name",
7121
+ sortable: true,
7122
+ render: (value) => /* @__PURE__ */ jsx("span", { className: "text-primary hover:underline cursor-pointer", children: value })
7123
+ },
7124
+ {
7125
+ key: "cipStatus",
7126
+ title: "CIP status",
7127
+ sortable: true,
7128
+ render: (value) => {
7129
+ const status = value;
7130
+ const variant = status === "verified" ? "success" : status === "pending" ? "warning" : "default";
7131
+ const label = status === "verified" ? "Verified" : status === "pending" ? "Pending" : "Not Start";
7132
+ return /* @__PURE__ */ jsx(Badge, { variant, children: label });
7133
+ }
7134
+ },
7135
+ {
7136
+ key: "status",
7137
+ title: "Status",
7138
+ sortable: true,
7139
+ render: (value) => {
7140
+ const status = value;
7141
+ const variant = status === "active" ? "success" : "default";
7142
+ const label = status.charAt(0).toUpperCase() + status.slice(1);
7143
+ return /* @__PURE__ */ jsx(Badge, { variant, children: label });
7144
+ }
7145
+ },
7146
+ {
7147
+ key: "created",
7148
+ title: "Created",
7149
+ sortable: true
7150
+ },
7151
+ {
7152
+ key: "modified",
7153
+ title: "Modified",
7154
+ sortable: true
7155
+ }
7156
+ ];
7157
+ const sortedBusinesses = [...filteredBusinesses].sort((a, b) => {
7158
+ const aValue = a[sortBy];
7159
+ const bValue = b[sortBy];
7160
+ if (aValue < bValue) return sortDirection === "asc" ? -1 : 1;
7161
+ if (aValue > bValue) return sortDirection === "asc" ? 1 : -1;
7162
+ return 0;
7163
+ });
7164
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-screen bg-gradient-subtle", children: [
7165
+ /* @__PURE__ */ jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-4 max-w-none", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
7166
+ /* @__PURE__ */ jsxs("div", { children: [
7167
+ /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold text-foreground", children: "Businesses" }),
7168
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-1", children: "Manage business entities and their configurations" })
7169
+ ] }),
7170
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
7171
+ /* @__PURE__ */ jsxs(Sheet, { children: [
7172
+ /* @__PURE__ */ jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", className: "gap-2", children: [
7173
+ /* @__PURE__ */ jsx(Filter, { className: "h-4 w-4" }),
7174
+ "Filters"
7175
+ ] }) }),
7176
+ /* @__PURE__ */ jsxs(SheetContent, { side: "right", className: "w-full sm:max-w-xl overflow-y-auto", children: [
7177
+ /* @__PURE__ */ jsx(SheetHeader, { children: /* @__PURE__ */ jsx(SheetTitle, { children: "Business Filters" }) }),
7178
+ /* @__PURE__ */ jsxs("div", { className: "space-y-6 py-6", children: [
7179
+ /* @__PURE__ */ jsx(
7180
+ EnhancedInput,
7181
+ {
7182
+ label: "Name",
7183
+ value: filters.name,
7184
+ onChange: (e) => handleFilterChange("name", e.target.value),
7185
+ placeholder: "Enter business name"
7186
+ }
7187
+ ),
7188
+ /* @__PURE__ */ jsx(
7189
+ EnhancedInput,
7190
+ {
7191
+ label: "Product Name",
7192
+ value: filters.productName,
7193
+ onChange: (e) => handleFilterChange("productName", e.target.value),
7194
+ placeholder: "Enter product name"
7195
+ }
7196
+ ),
7197
+ /* @__PURE__ */ jsx(
7198
+ EnhancedSelect,
7199
+ {
7200
+ label: "Status",
7201
+ value: filters.status,
7202
+ onValueChange: (value) => handleFilterChange("status", value),
7203
+ placeholder: "Select status",
7204
+ options: [
7205
+ { value: "active", label: "Active" },
7206
+ { value: "inactive", label: "Inactive" },
7207
+ { value: "suspended", label: "Suspended" }
7208
+ ]
7209
+ }
7210
+ ),
7211
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
7212
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
7213
+ /* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Created Date Start" }),
7214
+ /* @__PURE__ */ jsxs(Popover, { children: [
7215
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
7216
+ Button,
7217
+ {
7218
+ variant: "outline",
7219
+ className: cn(
7220
+ "w-full justify-start text-left font-normal",
7221
+ !filters.createdDateStart && "text-muted-foreground"
7222
+ ),
7223
+ children: [
7224
+ /* @__PURE__ */ jsx(Calendar$1, { className: "mr-2 h-4 w-4" }),
7225
+ filters.createdDateStart ? format(filters.createdDateStart, "MM/dd/yyyy") : /* @__PURE__ */ jsx("span", { children: "MM/DD/YYYY" })
7226
+ ]
7227
+ }
7228
+ ) }),
7229
+ /* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0 bg-background z-50", align: "start", children: /* @__PURE__ */ jsx(
7230
+ Calendar,
7231
+ {
7232
+ mode: "single",
7233
+ selected: filters.createdDateStart,
7234
+ onSelect: (date) => handleFilterChange("createdDateStart", date),
7235
+ initialFocus: true,
7236
+ className: "pointer-events-auto"
7237
+ }
7238
+ ) })
7239
+ ] })
7240
+ ] }),
7241
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
7242
+ /* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Created Date End" }),
7243
+ /* @__PURE__ */ jsxs(Popover, { children: [
7244
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
7245
+ Button,
7246
+ {
7247
+ variant: "outline",
7248
+ className: cn(
7249
+ "w-full justify-start text-left font-normal",
7250
+ !filters.createdDateEnd && "text-muted-foreground"
7251
+ ),
7252
+ children: [
7253
+ /* @__PURE__ */ jsx(Calendar$1, { className: "mr-2 h-4 w-4" }),
7254
+ filters.createdDateEnd ? format(filters.createdDateEnd, "MM/dd/yyyy") : /* @__PURE__ */ jsx("span", { children: "MM/DD/YYYY" })
7255
+ ]
7256
+ }
7257
+ ) }),
7258
+ /* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0 bg-background z-50", align: "start", children: /* @__PURE__ */ jsx(
7259
+ Calendar,
7260
+ {
7261
+ mode: "single",
7262
+ selected: filters.createdDateEnd,
7263
+ onSelect: (date) => handleFilterChange("createdDateEnd", date),
7264
+ initialFocus: true,
7265
+ className: "pointer-events-auto"
7266
+ }
7267
+ ) })
7268
+ ] })
7269
+ ] })
7270
+ ] })
7271
+ ] }),
7272
+ /* @__PURE__ */ jsxs(SheetFooter, { className: "gap-2", children: [
7273
+ /* @__PURE__ */ jsx(Button, { variant: "outline", onClick: resetFilters, children: "Reset Filters" }),
7274
+ /* @__PURE__ */ jsx(Button, { onClick: applyFilters, children: "Apply Filters" })
7275
+ ] })
7276
+ ] })
7277
+ ] }),
7278
+ /* @__PURE__ */ jsx(Button, { onClick: () => navigate("/business/create"), children: "Create Business" })
7279
+ ] })
7280
+ ] }) }) }),
7281
+ /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 h-full max-w-none flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "flex-1 mt-4 overflow-auto", children: /* @__PURE__ */ jsx(
7282
+ DataTable,
7283
+ {
7284
+ columns,
7285
+ data: sortedBusinesses,
7286
+ sortBy,
7287
+ sortDirection,
7288
+ onSort: handleSort,
7289
+ onRowClick: handleRowClick
7290
+ }
7291
+ ) }) }) })
7292
+ ] });
7293
+ };
7294
+ var Businesses_default = Businesses;
7295
+ var businessAccounts = [
7296
+ {
7297
+ id: "acc-001",
7298
+ name: "Primary Operating Account",
7299
+ number: "****7890",
7300
+ type: "checking",
7301
+ status: "active",
7302
+ balance: "$125,450.00",
7303
+ currency: "USD",
7304
+ institution: "Chase Bank",
7305
+ routingNumber: "021000021",
7306
+ country: "US"
7307
+ },
7308
+ {
7309
+ id: "acc-002",
7310
+ name: "Business Savings",
7311
+ number: "****4567",
7312
+ type: "savings",
7313
+ status: "active",
7314
+ balance: "$45,230.00",
7315
+ currency: "USD",
7316
+ institution: "Chase Bank",
7317
+ routingNumber: "021000021",
7318
+ country: "US"
7319
+ },
7320
+ {
7321
+ id: "acc-003",
7322
+ name: "Payroll Account",
7323
+ number: "****1234",
7324
+ type: "checking",
7325
+ status: "active",
7326
+ balance: "$78,900.00",
7327
+ currency: "USD",
7328
+ institution: "Wells Fargo",
7329
+ routingNumber: "121000248",
7330
+ country: "US"
7331
+ }
7332
+ ];
7333
+ var businessCounterparties = [
7334
+ {
7335
+ id: "cp-001",
7336
+ name: "Tech Solutions Inc",
7337
+ type: "BUSINESS",
7338
+ status: "active",
7339
+ description: "Technology vendor and service provider",
7340
+ lastTransaction: "2024-01-15"
7341
+ },
7342
+ {
7343
+ id: "cp-002",
7344
+ name: "Global Logistics LLC",
7345
+ type: "BUSINESS",
7346
+ status: "active",
7347
+ description: "Shipping and logistics partner",
7348
+ lastTransaction: "2024-01-10"
7349
+ },
7350
+ {
7351
+ id: "cp-003",
7352
+ name: "Marketing Pros Agency",
7353
+ type: "BUSINESS",
7354
+ status: "active",
7355
+ description: "Marketing and advertising services",
7356
+ lastTransaction: "2024-01-08"
7357
+ },
7358
+ {
7359
+ id: "cp-004",
7360
+ name: "John Smith Consulting",
7361
+ type: "INDIVIDUAL",
7362
+ status: "active",
7363
+ description: "Independent business consultant",
7364
+ lastTransaction: "2023-12-20"
7365
+ }
7366
+ ];
6768
7367
  var Business = () => {
6769
- return /* @__PURE__ */ jsx(
6770
- DetailPageLayout,
7368
+ const accountColumns = [
6771
7369
  {
6772
- title: "Business Management",
6773
- description: "Manage business entities and their configurations",
6774
- cards: [
6775
- {
6776
- key: "profile",
6777
- component: BusinessProfileCard,
6778
- expandOnEdit: true
6779
- },
6780
- {
6781
- key: "status",
6782
- component: BusinessStatusCard,
6783
- expandOnEdit: true
6784
- },
6785
- {
6786
- key: "contact",
6787
- component: ContactInfoCard,
6788
- expandOnEdit: true
6789
- },
6790
- {
6791
- key: "banking",
6792
- component: BankingDetailsCard,
6793
- expandOnEdit: true
6794
- }
6795
- ],
6796
- actions: [
6797
- {
6798
- label: "Export Data",
6799
- variant: "outline"
6800
- },
6801
- {
6802
- label: "Edit Business",
6803
- className: "bg-gradient-primary hover:opacity-90"
6804
- }
6805
- ]
7370
+ key: "number",
7371
+ title: "Account Number",
7372
+ sortable: true
7373
+ },
7374
+ {
7375
+ key: "name",
7376
+ title: "Account Name",
7377
+ sortable: true
7378
+ },
7379
+ {
7380
+ key: "balance",
7381
+ title: "Available Balance",
7382
+ sortable: true,
7383
+ align: "right"
7384
+ },
7385
+ {
7386
+ key: "status",
7387
+ title: "Status",
7388
+ render: (value) => /* @__PURE__ */ jsx(StatusBadge, { status: value })
6806
7389
  }
6807
- );
7390
+ ];
7391
+ return /* @__PURE__ */ jsxs("div", { className: "container mx-auto p-6 space-y-6", children: [
7392
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold tracking-tight", children: "Business Management" }) }),
7393
+ /* @__PURE__ */ jsxs(Tabs, { defaultValue: "profile", className: "space-y-6", children: [
7394
+ /* @__PURE__ */ jsxs(TabsList, { className: "inline-flex gap-8 h-auto bg-transparent border-b border-border w-full p-0 rounded-none justify-start", children: [
7395
+ /* @__PURE__ */ jsx(
7396
+ TabsTrigger,
7397
+ {
7398
+ value: "profile",
7399
+ 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",
7400
+ children: "Profile"
7401
+ }
7402
+ ),
7403
+ /* @__PURE__ */ jsx(
7404
+ TabsTrigger,
7405
+ {
7406
+ value: "kyc",
7407
+ 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",
7408
+ children: "KYC"
7409
+ }
7410
+ ),
7411
+ /* @__PURE__ */ jsx(
7412
+ TabsTrigger,
7413
+ {
7414
+ value: "counterparty",
7415
+ 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",
7416
+ children: "Counterparty"
7417
+ }
7418
+ )
7419
+ ] }),
7420
+ /* @__PURE__ */ jsx(TabsContent, { value: "profile", className: "space-y-0", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-6", children: [
7421
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-6", children: [
7422
+ /* @__PURE__ */ jsx(BusinessProfileCard, { isEditing: false, onToggleEdit: () => {
7423
+ } }),
7424
+ /* @__PURE__ */ jsxs(Card, { children: [
7425
+ /* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
7426
+ /* @__PURE__ */ jsx(CardTitle, { children: "Accounts" }),
7427
+ /* @__PURE__ */ jsx(Button, { size: "sm", children: "+ New Account" })
7428
+ ] }),
7429
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
7430
+ DataTable,
7431
+ {
7432
+ columns: accountColumns,
7433
+ data: businessAccounts,
7434
+ emptyMessage: "No accounts found"
7435
+ }
7436
+ ) })
7437
+ ] })
7438
+ ] }),
7439
+ /* @__PURE__ */ jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsx(BusinessStatusCard, { isEditing: false, onToggleEdit: () => {
7440
+ } }) })
7441
+ ] }) }),
7442
+ /* @__PURE__ */ jsx(TabsContent, { value: "kyc", className: "space-y-0", children: /* @__PURE__ */ jsx("div", { className: "p-8 text-center text-muted-foreground", children: "KYC content coming soon" }) }),
7443
+ /* @__PURE__ */ jsx(TabsContent, { value: "counterparty", className: "space-y-0", children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6", children: businessCounterparties.map((counterparty) => /* @__PURE__ */ jsxs(Card, { children: [
7444
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
7445
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
7446
+ /* @__PURE__ */ jsx(CardTitle, { className: "text-lg", children: counterparty.name }),
7447
+ /* @__PURE__ */ jsx(CounterpartyTypeBadge, { type: counterparty.type })
7448
+ ] }),
7449
+ /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2 mt-2", children: /* @__PURE__ */ jsx(Badge, { variant: counterparty.status === "active" ? "default" : "secondary", children: counterparty.status }) })
7450
+ ] }),
7451
+ /* @__PURE__ */ jsxs(CardContent, { className: "space-y-3", children: [
7452
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: counterparty.description }),
7453
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center text-sm", children: [
7454
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Last Transaction" }),
7455
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: counterparty.lastTransaction })
7456
+ ] })
7457
+ ] })
7458
+ ] }, counterparty.id)) }) })
7459
+ ] })
7460
+ ] });
6808
7461
  };
6809
- var Business_default = Business;
7462
+ var BusinessDetail_default = Business;
6810
7463
  var CreateBusiness = () => {
6811
7464
  const [businessType, setBusinessType] = useState("");
6812
7465
  return /* @__PURE__ */ jsx(
@@ -7177,6 +7830,327 @@ var NotFound = () => {
7177
7830
  ] }) });
7178
7831
  };
7179
7832
  var NotFound_default = NotFound;
7833
+ var StatementHeader = ({ data, onEdit }) => {
7834
+ return /* @__PURE__ */ jsxs(Card, { children: [
7835
+ /* @__PURE__ */ jsxs(CardHeader, { direction: "row", children: [
7836
+ /* @__PURE__ */ jsx(CardTitle, { size: "md", children: "Statement Summary" }),
7837
+ /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", onClick: onEdit, children: [
7838
+ /* @__PURE__ */ jsx(Edit, { className: "h-4 w-4 mr-2" }),
7839
+ "Edit"
7840
+ ] })
7841
+ ] }),
7842
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
7843
+ /* @__PURE__ */ jsx(
7844
+ InfoField,
7845
+ {
7846
+ label: "Account",
7847
+ value: data.account,
7848
+ layout: "horizontal"
7849
+ }
7850
+ ),
7851
+ /* @__PURE__ */ jsx(
7852
+ InfoField,
7853
+ {
7854
+ label: "Product ID",
7855
+ value: data.productId,
7856
+ layout: "horizontal"
7857
+ }
7858
+ ),
7859
+ /* @__PURE__ */ jsx(
7860
+ InfoField,
7861
+ {
7862
+ label: "Program ID",
7863
+ value: data.programId,
7864
+ layout: "horizontal"
7865
+ }
7866
+ ),
7867
+ /* @__PURE__ */ jsx(
7868
+ InfoField,
7869
+ {
7870
+ label: "Start Date",
7871
+ value: data.startDate,
7872
+ layout: "horizontal"
7873
+ }
7874
+ ),
7875
+ /* @__PURE__ */ jsx(
7876
+ InfoField,
7877
+ {
7878
+ label: "End Date",
7879
+ value: data.endDate,
7880
+ layout: "horizontal"
7881
+ }
7882
+ ),
7883
+ /* @__PURE__ */ jsx(
7884
+ InfoField,
7885
+ {
7886
+ label: "Starting Balance",
7887
+ value: data.startingBalance,
7888
+ layout: "horizontal"
7889
+ }
7890
+ ),
7891
+ /* @__PURE__ */ jsx(
7892
+ InfoField,
7893
+ {
7894
+ label: "Ending Balance",
7895
+ value: data.endingBalance,
7896
+ layout: "horizontal"
7897
+ }
7898
+ )
7899
+ ] }) })
7900
+ ] });
7901
+ };
7902
+
7903
+ // src/lib/mock-data/statement-data.ts
7904
+ var mockStatementHeader = {
7905
+ account: "1234567890",
7906
+ productId: "PROD-001",
7907
+ programId: "PROG-001",
7908
+ startDate: "01/01/2024 00:00:00",
7909
+ endDate: "01/31/2024 23:59:59",
7910
+ startingBalance: "$125,450.00",
7911
+ endingBalance: "$158,320.50"
7912
+ };
7913
+ var mockStatementTransactions = [
7914
+ { transactionType: "ACH Credit", direction: "CREDIT", amount: 45e3, count: 12 },
7915
+ { transactionType: "ACH Debit", direction: "DEBIT", amount: 23500, count: 8 },
7916
+ { transactionType: "Wire Transfer In", direction: "CREDIT", amount: 15e3, count: 3 },
7917
+ { transactionType: "Wire Transfer Out", direction: "DEBIT", amount: 8200, count: 2 },
7918
+ { transactionType: "Card Purchase", direction: "DEBIT", amount: 5430.5, count: 45 },
7919
+ { transactionType: "Direct Deposit", direction: "CREDIT", amount: 12500, count: 5 },
7920
+ { transactionType: "ATM Withdrawal", direction: "DEBIT", amount: 3200, count: 16 },
7921
+ { transactionType: "Check Deposit", direction: "CREDIT", amount: 8900, count: 4 },
7922
+ { transactionType: "Bill Payment", direction: "DEBIT", amount: 6780, count: 18 },
7923
+ { transactionType: "Transfer In", direction: "CREDIT", amount: 5200, count: 7 },
7924
+ { transactionType: "Transfer Out", direction: "DEBIT", amount: 4350, count: 6 },
7925
+ { transactionType: "Fee", direction: "DEBIT", amount: 125, count: 3 },
7926
+ { transactionType: "Interest", direction: "CREDIT", amount: 85.5, count: 1 },
7927
+ { transactionType: "Refund", direction: "CREDIT", amount: 450, count: 2 }
7928
+ ];
7929
+ var mockPrograms = [
7930
+ { value: "PROG-001", label: "Consumer Banking Program" },
7931
+ { value: "PROG-002", label: "Business Banking Program" },
7932
+ { value: "PROG-003", label: "Premium Rewards Program" }
7933
+ ];
7934
+ var mockProducts = [
7935
+ { value: "PROD-001", label: "Checking Account" },
7936
+ { value: "PROD-002", label: "Savings Account" },
7937
+ { value: "PROD-003", label: "Money Market Account" },
7938
+ { value: "PROD-004", label: "Business Checking" }
7939
+ ];
7940
+ var statementTypes = [
7941
+ { value: "root", label: "Root" },
7942
+ { value: "program", label: "Program" },
7943
+ { value: "product", label: "Product" },
7944
+ { value: "account", label: "Account" }
7945
+ ];
7946
+ function Statement() {
7947
+ const [statementType, setStatementType] = useState("");
7948
+ const [selectedProgram, setSelectedProgram] = useState("");
7949
+ const [selectedProduct, setSelectedProduct] = useState("");
7950
+ const [accountNumber, setAccountNumber] = useState("");
7951
+ const [startDate, setStartDate] = useState();
7952
+ const [endDate, setEndDate] = useState();
7953
+ const [statementGenerated, setStatementGenerated] = useState(false);
7954
+ const handleStatementTypeChange = (value) => {
7955
+ setStatementType(value);
7956
+ setSelectedProgram("");
7957
+ setSelectedProduct("");
7958
+ setAccountNumber("");
7959
+ };
7960
+ const handleGenerateStatement = () => {
7961
+ if (!statementType || !startDate || !endDate) return;
7962
+ if (statementType === "program" && !selectedProgram) return;
7963
+ if (statementType === "product" && !selectedProduct) return;
7964
+ if (statementType === "account" && !accountNumber) return;
7965
+ setStatementGenerated(true);
7966
+ };
7967
+ const isGenerateDisabled = () => {
7968
+ if (!statementType || !startDate || !endDate) return true;
7969
+ if (statementType === "program" && !selectedProgram) return true;
7970
+ if (statementType === "product" && !selectedProduct) return true;
7971
+ if (statementType === "account" && !accountNumber) return true;
7972
+ return false;
7973
+ };
7974
+ const columns = [
7975
+ {
7976
+ key: "transactionType",
7977
+ title: "Transaction Type",
7978
+ sortable: true,
7979
+ align: "left"
7980
+ },
7981
+ {
7982
+ key: "direction",
7983
+ title: "Direction",
7984
+ sortable: true,
7985
+ align: "left",
7986
+ render: (value) => /* @__PURE__ */ jsx(Badge, { variant: value === "CREDIT" ? "success" : "secondary", children: value })
7987
+ },
7988
+ {
7989
+ key: "amount",
7990
+ title: "Amount",
7991
+ sortable: true,
7992
+ align: "right",
7993
+ render: (value) => `$${value.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`
7994
+ },
7995
+ {
7996
+ key: "count",
7997
+ title: "Count",
7998
+ sortable: true,
7999
+ align: "right"
8000
+ }
8001
+ ];
8002
+ const handleDownloadCSV = () => {
8003
+ console.log("Downloading CSV...");
8004
+ };
8005
+ const handlePrintPDF = () => {
8006
+ console.log("Printing PDF...");
8007
+ };
8008
+ const handleEdit = () => {
8009
+ setStatementGenerated(false);
8010
+ };
8011
+ return /* @__PURE__ */ jsxs("div", { className: "container mx-auto p-6 space-y-6", children: [
8012
+ /* @__PURE__ */ jsxs("div", { children: [
8013
+ /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold tracking-tight", children: "Statement" }),
8014
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-1", children: "Generate and view statement reports" })
8015
+ ] }),
8016
+ !statementGenerated && /* @__PURE__ */ jsxs(Card, { children: [
8017
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { size: "md", children: "Statement Parameters" }) }),
8018
+ /* @__PURE__ */ jsxs(CardContent, { className: "space-y-4", children: [
8019
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4", children: [
8020
+ /* @__PURE__ */ jsx(
8021
+ EnhancedSelect,
8022
+ {
8023
+ label: "Statement Type",
8024
+ placeholder: "Select type",
8025
+ options: statementTypes,
8026
+ value: statementType,
8027
+ onValueChange: handleStatementTypeChange
8028
+ }
8029
+ ),
8030
+ statementType === "program" && /* @__PURE__ */ jsx(
8031
+ EnhancedSelect,
8032
+ {
8033
+ label: "Program Name",
8034
+ placeholder: "Select program",
8035
+ options: mockPrograms,
8036
+ value: selectedProgram,
8037
+ onValueChange: setSelectedProgram
8038
+ }
8039
+ ),
8040
+ statementType === "product" && /* @__PURE__ */ jsx(
8041
+ EnhancedSelect,
8042
+ {
8043
+ label: "Product Name",
8044
+ placeholder: "Select product",
8045
+ options: mockProducts,
8046
+ value: selectedProduct,
8047
+ onValueChange: setSelectedProduct
8048
+ }
8049
+ ),
8050
+ statementType === "account" && /* @__PURE__ */ jsx(
8051
+ EnhancedInput,
8052
+ {
8053
+ label: "Account Number",
8054
+ placeholder: "Enter account number",
8055
+ value: accountNumber,
8056
+ onChange: (e) => setAccountNumber(e.target.value)
8057
+ }
8058
+ ),
8059
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
8060
+ /* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Start Date" }),
8061
+ /* @__PURE__ */ jsxs(Popover, { children: [
8062
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
8063
+ Button,
8064
+ {
8065
+ variant: "outline",
8066
+ className: cn(
8067
+ "justify-start text-left font-normal",
8068
+ !startDate && "text-muted-foreground"
8069
+ ),
8070
+ children: [
8071
+ /* @__PURE__ */ jsx(CalendarIcon, { className: "mr-2 h-4 w-4" }),
8072
+ startDate ? format(startDate, "MM/dd/yyyy") : "Select date"
8073
+ ]
8074
+ }
8075
+ ) }),
8076
+ /* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsx(
8077
+ Calendar,
8078
+ {
8079
+ mode: "single",
8080
+ selected: startDate,
8081
+ onSelect: setStartDate,
8082
+ initialFocus: true
8083
+ }
8084
+ ) })
8085
+ ] })
8086
+ ] }),
8087
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
8088
+ /* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "End Date" }),
8089
+ /* @__PURE__ */ jsxs(Popover, { children: [
8090
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
8091
+ Button,
8092
+ {
8093
+ variant: "outline",
8094
+ className: cn(
8095
+ "justify-start text-left font-normal",
8096
+ !endDate && "text-muted-foreground"
8097
+ ),
8098
+ children: [
8099
+ /* @__PURE__ */ jsx(CalendarIcon, { className: "mr-2 h-4 w-4" }),
8100
+ endDate ? format(endDate, "MM/dd/yyyy") : "Select date"
8101
+ ]
8102
+ }
8103
+ ) }),
8104
+ /* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsx(
8105
+ Calendar,
8106
+ {
8107
+ mode: "single",
8108
+ selected: endDate,
8109
+ onSelect: setEndDate,
8110
+ initialFocus: true
8111
+ }
8112
+ ) })
8113
+ ] })
8114
+ ] })
8115
+ ] }),
8116
+ /* @__PURE__ */ jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx(
8117
+ Button,
8118
+ {
8119
+ onClick: handleGenerateStatement,
8120
+ disabled: isGenerateDisabled(),
8121
+ children: "Generate Statement"
8122
+ }
8123
+ ) })
8124
+ ] })
8125
+ ] }),
8126
+ statementGenerated && /* @__PURE__ */ jsxs(Fragment, { children: [
8127
+ /* @__PURE__ */ jsx(StatementHeader, { data: mockStatementHeader, onEdit: handleEdit }),
8128
+ /* @__PURE__ */ jsxs(Card, { children: [
8129
+ /* @__PURE__ */ jsxs(CardHeader, { direction: "row", children: [
8130
+ /* @__PURE__ */ jsx(CardTitle, { size: "md", children: "Transaction Summary" }),
8131
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
8132
+ /* @__PURE__ */ jsxs(Button, { variant: "outline", onClick: handleDownloadCSV, children: [
8133
+ /* @__PURE__ */ jsx(Download, { className: "h-4 w-4 mr-2" }),
8134
+ "Download CSV"
8135
+ ] }),
8136
+ /* @__PURE__ */ jsxs(Button, { variant: "outline", onClick: handlePrintPDF, children: [
8137
+ /* @__PURE__ */ jsx(FileText, { className: "h-4 w-4 mr-2" }),
8138
+ "Print PDF"
8139
+ ] })
8140
+ ] })
8141
+ ] }),
8142
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
8143
+ DataTable,
8144
+ {
8145
+ columns,
8146
+ data: mockStatementTransactions,
8147
+ emptyMessage: "No transactions found"
8148
+ }
8149
+ ) })
8150
+ ] })
8151
+ ] })
8152
+ ] });
8153
+ }
7180
8154
 
7181
8155
  // src/lib/mock-data/transaction-data.ts
7182
8156
  var mockTransactions = [
@@ -8587,6 +9561,6 @@ function UIKit() {
8587
9561
  ] }) }) });
8588
9562
  }
8589
9563
 
8590
- export { ACHBankCard, ACHBasicInfoCard, ACHDetailsSection, ACHTransferSection, AccountCard, AddressForm, AlertDetail_default as AlertDetail, AlertDocuments, AlertNotes, AlertTimeline, Alerts_default as Alerts, AppSidebar, Badge, BankAddressCard, BankingDetailsCard, BasicInfoCard, BasicInfoSection, BeneficiaryAddress, BeneficiaryCard, BeneficiaryDomesticWire, Breadcrumb, Business_default as Business, BusinessProfileCard, BusinessStatusCard, BusinessTypeBadge, Button, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Cases_default as Cases, ContactInfoCard, Container, ContextSection, CounterpartyBasicInfo, DomesticWire_default as CounterpartyDomesticWire, Manage_default as CounterpartyManage, CounterpartyProfileCard, CounterpartyRecordsCard, CounterpartyTypeBadge, Create_default as CreateBusiness, Create_default2 as CreateCounterparty, Dashboard_default as Dashboard, DashboardDemo, DataGrid, DataTable, DetailPageLayout, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EditableFormCard, EditableInfoField, EnhancedInput, EnhancedSelect, EnhancedTextarea, EntityCard, FormCard, FormField, FormInput, FormProvider, FormSection, FormSelect, InfoField, IntermediaryCard, IntermediaryFI, IntermediaryFIAddress, JsonViewer, Label, ListPage, MainLayout, MetricCard, NewTransaction, NotFound_default as NotFound, OriginatorCard, OriginatorFI, OriginatorFIAddress, PageLayout, PatternLibrary, PaymentInformationSection, Popover, PopoverContent, PopoverTrigger, ReceiverCard, ResponsiveGrid, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Stack, StatusBadge, Tabs, TabsContent, TabsList, TabsTrigger, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransactionDetail_default as TransactionDetail, TransactionHistory_default as TransactionHistory, UIKit, UIKitShowcase, WireDetailsSection, WireTransferSection, badgeVariants, buttonVariants, cardVariants, inputVariants, reducer, textareaVariants, toast, useEditState, useFormWithEditState, useIsMobile, useSidebar, useToast };
9564
+ export { ACHBankCard, ACHBasicInfoCard, ACHDetailsSection, ACHTransferSection, AccountCard, AddressForm, AlertDetail_default as AlertDetail, AlertDocuments, AlertNotes, AlertTimeline, Alerts_default as Alerts, AppSidebar, Badge, BankAddressCard, BankingDetailsCard, BasicInfoCard, BasicInfoSection, BeneficiaryAddress, BeneficiaryCard, BeneficiaryDomesticWire, Breadcrumb, BusinessDetail_default as BusinessDetail, BusinessProfileCard, BusinessStatusCard, BusinessTypeBadge, Businesses_default as Businesses, Button, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Cases_default as Cases, ContactInfoCard, Container, ContextSection, CounterpartyBasicInfo, DomesticWire_default as CounterpartyDomesticWire, Manage_default as CounterpartyManage, CounterpartyProfileCard, CounterpartyRecordsCard, CounterpartyTypeBadge, Create_default as CreateBusiness, Create_default2 as CreateCounterparty, Dashboard_default as Dashboard, DashboardDemo, DataGrid, DataTable, DetailPageLayout, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EditableFormCard, EditableInfoField, EnhancedInput, EnhancedSelect, EnhancedTextarea, EntityCard, FormCard, FormField, FormInput, FormProvider, FormSection, FormSelect, InfoField, IntermediaryCard, IntermediaryFI, IntermediaryFIAddress, JsonViewer, Label, ListPage, MainLayout, MetricCard, NewTransaction, NotFound_default as NotFound, OriginatorCard, OriginatorFI, OriginatorFIAddress, PageLayout, PatternLibrary, PaymentInformationSection, Popover, PopoverContent, PopoverTrigger, ReceiverCard, ResponsiveGrid, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Stack, Statement, StatusBadge, Tabs, TabsContent, TabsList, TabsTrigger, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransactionDetail_default as TransactionDetail, TransactionHistory_default as TransactionHistory, UIKit, UIKitShowcase, WireDetailsSection, WireTransferSection, badgeVariants, buttonVariants, cardVariants, inputVariants, reducer, textareaVariants, toast, useEditState, useFormWithEditState, useIsMobile, useSidebar, useToast };
8591
9565
  //# sourceMappingURL=index.js.map
8592
9566
  //# sourceMappingURL=index.js.map