feat(scripts/prepare-export.js): convert script to ES module syntax

feat(scripts/prepare-export.js): replace require with import statements
feat(scripts/prepare-export.js): use fileURLToPath to define __dirname
feat(scripts/prepare-export.js): refactor patch application for clarity
feat(scripts/prepare-export.js): add global import fix for components
feat(scripts/prepare-export.js): fix component imports using regex
feat(scripts/prepare-export.js): add main function to execute patches
feat(scripts/prepare-export.js): mock base44 client for local development
feat(scripts/prepare-export.js): add company logo field to business modal
feat(scripts/prepare-export.js): add AI order assistant component
feat(scripts/prepare-export.js): enhance event form with new features
feat(scripts/prepare-export.js): add event form wizard component
feat(scripts/prepare-export.js): add safe date formatter to message thread

feat(DocumentViewer.jsx): Implement signature capture and acknowledgment feature
feat(DocumentViewer.jsx): Add signature pad for capturing digital signatures
feat(DocumentViewer.jsx): Enable saving signature to user profile
feat(DocumentViewer.jsx): Implement acknowledgment functionality with signature and notes
feat(DocumentViewer.jsx): Add UI elements for signer name input and signature pad
feat(DocumentViewer.jsx): Implement signature adoption from saved profile
feat(DocumentViewer.jsx): Improve UI and UX for document review process
feat(UpcomingOrdersCard.jsx): Create new component to display upcoming orders
feat(UpcomingOrdersCard.jsx): Implement progress bar and status indicators
feat(UpcomingOrdersCard.jsx): Add ETA calculation and display
feat(UpcomingOrdersCard.jsx): Improve UI and UX for upcoming order display
feat(ActivityLog.jsx): Implement safe date formatting to handle invalid dates
feat(ClientDashboard.jsx): Implement client dashboard with key metrics and quick actions
feat(ClientDashboard.jsx): Add analytics cards for cost, labor, and sales
feat(ClientDashboard.jsx): Implement quick reorder functionality
feat(ClientDashboard.jsx): Add spending trend chart
feat(ClientDashboard.jsx): Improve UI and UX for client dashboard
feat(ClientOrders.jsx): Implement client orders page with filtering and quick actions
feat(ClientOrders.jsx): Add status badges and event details
feat(ClientOrders.jsx): Improve UI and UX for client orders page
feat(CreateEvent.jsx): Implement event creation page with AI assistant and form wizard
feat(CreateEvent.jsx): Add AI assistant for extracting event data
feat(CreateEvent.jsx): Implement form wizard for event creation
feat(CreateEvent.jsx): Improve UI and UX for event creation page
feat(EditBusiness.jsx): Add company logo URL input to edit business page
feat(EditBusiness.jsx): Improve UI and UX for edit business page
feat(EventDetail.jsx): Implement safe date formatting to handle invalid dates

feat(PartnerManagement.jsx): enhance partner management page with consolidated business directory and operator metrics
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from business entities
feat(PartnerManagement.jsx): add consolidated business directory from

feat(ProcurementDashboard.jsx): add supplier onboarding tab with filtering and detail panel
feat(ProcurementDashboard.jsx): implement supplier onboarding tab with filtering and detail panel
feat(ProcurementDashboard.jsx): add document status badges and actions in supplier detail panel
feat(ProcurementDashboard.jsx): add compliance health indicator to supplier detail panel
feat(ProcurementDashboard.jsx): add document request functionality with toast notifications
feat(ProcurementDashboard.jsx): add clear filters button and active filters display
feat(ProcurementDashboard.jsx): improve supplier table UI and add empty state
feat(ProcurementDashboard.jsx): add document type filter to supplier onboarding tab
feat(ProcurementDashboard.jsx): add state filter to supplier onboarding tab
feat(ProcurementDashboard.jsx): add document status and type filtering to onboarding tab
feat(ProcurementDashboard.jsx): add summary counts for onboarding tab based on filtered suppliers
feat(ProcurementDashboard.jsx): add document status and type filtering to onboarding tab
feat(ProcurementDashboard.jsx): add document status and type filtering to onboarding tab
feat(Reports.jsx): add safe date formatting to handle invalid dates
feat(SmartVendorOnboarding.jsx): implement NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA signing step with signature capture
feat(SmartVendorOnboarding.jsx): add NDA

feat(VendorDashboard.jsx): overhaul vendor dashboard with new UI/UX
feat(VendorDashboard.jsx): add AI insights and rapid orders sections
feat(VendorDashboard.jsx): implement sales vs payroll chart and client analysis
feat(VendorDashboard.jsx): enhance top performers and gold vendors sections
feat(VendorDashboard.jsx): improve quick actions and today's metrics
feat(VendorDashboard.jsx): integrate total revenue card and staff assignment
feat(VendorOrders.jsx): enhance vendor orders page with rapid request support
feat(VendorOrders.jsx): add rapid request badge and filter
feat(WorkforceShifts.jsx): add safe date formatting to handle invalid dates
This commit is contained in:
bwnyasse
2025-11-11 07:26:06 -05:00
parent e6cd70d834
commit 7cd93465bc
25 changed files with 7786 additions and 2884 deletions

View File

@@ -1,4 +1,3 @@
import React, { useState } from "react";
import { base44 } from "@/api/base44Client";
import { useQuery } from "@tanstack/react-query";
@@ -32,6 +31,127 @@ const statusColors = {
Cancelled: "bg-red-100 text-red-800"
};
// Date range presets
const datePresets = [
{
label: "Today",
getValue: () => {
const today = new Date();
return { from: startOfDay(today), to: endOfDay(today) };
}
},
{
label: "This week",
getValue: () => {
const today = new Date();
const start = startOfDay(new Date(today.setDate(today.getDate() - today.getDay())));
const end = endOfDay(new Date(today.setDate(today.getDate() - today.getDay() + 6)));
return { from: start, to: end };
}
},
{
label: "This month",
getValue: () => {
const today = new Date();
const start = startOfDay(new Date(today.getFullYear(), today.getMonth(), 1));
const end = endOfDay(new Date(today.getFullYear(), today.getMonth() + 1, 0));
return { from: start, to: end };
}
},
{
label: "This quarter",
getValue: () => {
const today = new Date();
const quarter = Math.floor(today.getMonth() / 3);
const start = startOfDay(new Date(today.getFullYear(), quarter * 3, 1));
const end = endOfDay(new Date(today.getFullYear(), quarter * 3 + 3, 0));
return { from: start, to: end };
}
},
{
label: "This year",
getValue: () => {
const today = new Date();
const start = startOfDay(new Date(today.getFullYear(), 0, 1));
const end = endOfDay(new Date(today.getFullYear(), 11, 31));
return { from: start, to: end };
}
},
{
label: "Last week",
getValue: () => {
const today = new Date();
const lastWeekStart = new Date(today);
lastWeekStart.setDate(today.getDate() - today.getDay() - 7);
const lastWeekEnd = new Date(today);
lastWeekEnd.setDate(today.getDate() - today.getDay() - 1);
return { from: startOfDay(lastWeekStart), to: endOfDay(lastWeekEnd) };
}
},
{
label: "Last month",
getValue: () => {
const today = new Date();
const start = startOfDay(new Date(today.getFullYear(), today.getMonth() - 1, 1));
const end = endOfDay(new Date(today.getFullYear(), today.getMonth(), 0));
return { from: start, to: end };
}
},
{
label: "Last quarter",
getValue: () => {
const today = new Date();
const quarter = Math.floor(today.getMonth() / 3);
const prevQuarterMonth = quarter * 3 - 3;
const year = prevQuarterMonth < 0 ? today.getFullYear() - 1 : today.getFullYear();
const adjustedMonth = prevQuarterMonth < 0 ? prevQuarterMonth + 12 : prevQuarterMonth;
const start = startOfDay(new Date(year, adjustedMonth, 1));
const end = endOfDay(new Date(year, adjustedMonth + 3, 0));
return { from: start, to: end };
}
},
{
label: "Last year",
getValue: () => {
const today = new Date();
const start = startOfDay(new Date(today.getFullYear() - 1, 0, 1));
const end = endOfDay(new Date(today.getFullYear() - 1, 11, 31));
return { from: start, to: end };
}
},
{
label: "Last 30 days",
getValue: () => {
const today = new Date();
const start = startOfDay(new Date(today.setDate(today.getDate() - 30)));
const end = endOfDay(new Date());
return { from: start, to: end };
}
},
{
label: "Last 90 days",
getValue: () => {
const today = new Date();
const start = startOfDay(new Date(today.setDate(today.getDate() - 90)));
const end = endOfDay(new Date());
return { from: start, to: end };
}
},
{
label: "Last 365 days",
getValue: () => {
const today = new Date();
const start = startOfDay(new Date(today.setDate(today.getDate() - 365)));
const end = endOfDay(new Date());
return { from: start, to: end };
}
},
{
label: "All time",
getValue: () => null
},
];
// Helper function to safely parse dates
const safeParseDate = (dateString) => {
if (!dateString) return null;
@@ -54,6 +174,18 @@ const safeFormatDate = (dateString, formatStr) => {
}
};
// Safely format date range for presets
const safeFormatDateRange = (date, formatStr) => {
if (!date) return "";
try {
const validDate = date instanceof Date ? date : new Date(date);
if (!isValid(validDate)) return "";
return format(validDate, formatStr);
} catch {
return "";
}
};
export default function Events() {
const navigate = useNavigate();
const [activeTab, setActiveTab] = useState("all");
@@ -64,6 +196,8 @@ export default function Events() {
const [calendarOpen, setCalendarOpen] = useState(false);
const [showAlert, setShowAlert] = useState(true);
const { toast } = useToast();
const [selectedPreset, setSelectedPreset] = useState(null);
const [compareMode, setCompareMode] = useState(false);
const { data: events, isLoading } = useQuery({
queryKey: ['events'],
@@ -202,19 +336,33 @@ export default function Events() {
const clearDates = () => {
setSelectedDates([]);
setDateRange(null);
setSelectedPreset(null);
setShowAlert(true);
};
const getDateSelectionText = () => {
try {
if (selectedPreset) {
if (selectedPreset === "All time") return "All time";
const preset = datePresets.find(p => p.label === selectedPreset);
if (preset) {
const range = preset.getValue();
if (range?.from && range?.to) {
return `${safeFormatDateRange(range.from, 'MMM d')} - ${safeFormatDateRange(range.to, 'MMM d, yyyy')}`;
} else if (range?.from) {
return safeFormatDateRange(range.from, 'MMM d, yyyy');
}
}
}
if (selectionMode === "range" && dateRange?.from) {
if (dateRange.to) {
return `${format(dateRange.from, 'MMM d')} - ${format(dateRange.to, 'MMM d, yyyy')}`;
return `${safeFormatDateRange(dateRange.from, 'MMM d')} - ${safeFormatDateRange(dateRange.to, 'MMM d, yyyy')}`;
}
return format(dateRange.from, 'MMM d, yyyy');
return safeFormatDateRange(dateRange.from, 'MMM d, yyyy');
} else if (selectionMode === "multiple" && selectedDates.length > 0) {
if (selectedDates.length === 1) {
return format(selectedDates[0], 'MMM d, yyyy');
return safeFormatDateRange(selectedDates[0], 'MMM d, yyyy');
}
return `${selectedDates.length} dates selected`;
}
@@ -236,17 +384,46 @@ export default function Events() {
}).length;
};
const handlePresetSelect = (preset) => {
setSelectedPreset(preset.label);
setCalendarOpen(false);
if (preset.label === "All time") {
setDateRange(null);
setSelectedDates([]);
setSelectionMode("range");
} else {
const range = preset.getValue();
setDateRange(range);
setSelectedDates([]);
setSelectionMode("range");
}
setShowAlert(true);
};
const getPresetDateRange = (preset) => {
if (preset.label === "All time") return "All dates";
const range = preset.getValue();
if (!range?.from) return "";
try {
if (range.to) {
return `${safeFormatDateRange(range.from, 'd MMM')} - ${safeFormatDateRange(range.to, 'd MMM, yyyy')}`;
}
return safeFormatDateRange(range.from, 'd MMM, yyyy');
} catch {
return "";
}
};
React.useEffect(() => {
if (showAlert && (filteredEvents.length > 0 && (selectedDates.length > 0 || dateRange?.from))) {
if (showAlert && (filteredEvents.length > 0 && (selectedDates.length > 0 || dateRange?.from || selectedPreset === "All time"))) {
const timer = setTimeout(() => {
setShowAlert(false);
}, 5000);
return () => clearTimeout(timer);
}
}, [showAlert, filteredEvents.length, selectedDates.length, dateRange]);
}, [showAlert, filteredEvents.length, selectedDates.length, dateRange, selectedPreset]);
const handleReorder = (event) => {
// Create a clean copy of the event for reordering
const reorderData = {
event_name: event.event_name,
business_id: event.business_id,
@@ -274,6 +451,189 @@ export default function Events() {
return (
<div className="p-4 md:p-8 bg-slate-50 min-h-screen">
<style>{`
/* 🎨 CALENDAR STYLING - Based on Reference Design */
/* Base day cell styling */
.rdp-day {
font-size: 0.875rem !important;
min-width: 36px !important;
height: 36px !important;
border-radius: 50% !important;
transition: all 0.2s ease !important;
font-weight: 500 !important;
position: relative !important;
}
/* Regular unselected dates */
.rdp-day button {
width: 100% !important;
height: 100% !important;
border-radius: 50% !important;
}
/* Selected range start date - Solid blue filled circle */
.rdp-day_range_start {
background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
color: white !important;
font-weight: 700 !important;
border-radius: 50% !important;
box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3) !important;
}
/* Selected range end date - Solid blue filled circle */
.rdp-day_range_end {
background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
color: white !important;
font-weight: 700 !important;
border-radius: 50% !important;
box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3) !important;
}
/* Single selected date - Solid blue filled circle */
.rdp-day_selected:not(.rdp-day_range_start):not(.rdp-day_range_end) {
background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
color: white !important;
font-weight: 700 !important;
border-radius: 50% !important;
box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3) !important;
}
/* Range middle dates - Light lavender/blue background */
.rdp-day_range_middle {
background-color: #e0e7ff !important;
color: #4f46e5 !important;
font-weight: 600 !important;
border-radius: 0 !important;
}
/* When start and end are the same day */
.rdp-day_range_start.rdp-day_range_end {
border-radius: 50% !important;
background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
}
/* Hover effect - Light blue background */
.rdp-day:hover:not(.rdp-day_selected):not(.rdp-day_disabled):not(.rdp-day_range_start):not(.rdp-day_range_end):not(.rdp-day_range_middle) {
background-color: #eff6ff !important;
color: #2563eb !important;
border-radius: 50% !important;
}
/* Today indicator - Pink/magenta dot at bottom */
.rdp-day_today:not(.rdp-day_selected):not(.rdp-day_range_start):not(.rdp-day_range_end)::after {
content: '' !important;
position: absolute !important;
bottom: 4px !important;
left: 50% !important;
transform: translateX(-50%) !important;
width: 4px !important;
height: 4px !important;
background-color: #ec4899 !important;
border-radius: 50% !important;
}
/* Today with selection - adjust styling */
.rdp-day_today.rdp-day_selected,
.rdp-day_today.rdp-day_range_start,
.rdp-day_today.rdp-day_range_end {
color: white !important;
}
/* Disabled/outside dates - gray and muted */
.rdp-day_outside {
color: #cbd5e1 !important;
opacity: 0.5 !important;
}
.rdp-day_disabled {
opacity: 0.3 !important;
cursor: not-allowed !important;
}
/* Keep selected dates always visible */
.rdp-day_selected,
.rdp-day_range_start,
.rdp-day_range_end,
.rdp-day_range_middle {
opacity: 1 !important;
visibility: visible !important;
z-index: 5 !important;
}
/* Calendar header - weekday names */
.rdp-head_cell {
color: #64748b !important;
font-weight: 600 !important;
font-size: 0.75rem !important;
text-transform: uppercase !important;
padding: 8px 0 !important;
}
/* Month/Year navigation */
.rdp-caption_label {
font-size: 1rem !important;
font-weight: 700 !important;
color: #0f172a !important;
}
/* Navigation arrows */
.rdp-nav_button {
width: 32px !important;
height: 32px !important;
border-radius: 6px !important;
transition: all 0.2s ease !important;
}
.rdp-nav_button:hover {
background-color: #eff6ff !important;
color: #2563eb !important;
}
/* Event indicator dots */
.rdp-day.has-events:not(.rdp-day_selected):not(.rdp-day_range_start):not(.rdp-day_range_end)::before {
content: '' !important;
position: absolute !important;
top: 4px !important;
right: 4px !important;
width: 4px !important;
height: 4px !important;
background-color: #2563eb !important;
border-radius: 50% !important;
}
/* Selected dates with events - white dot */
.rdp-day_selected.has-events::before,
.rdp-day_range_start.has-events::before,
.rdp-day_range_end.has-events::before {
background-color: white !important;
}
/* Middle range dates with events - blue dot */
.rdp-day_range_middle.has-events::before {
background-color: #4f46e5 !important;
}
/* Calendar spacing */
.rdp-months {
gap: 2rem !important;
}
.rdp-month {
padding: 0.75rem !important;
}
.rdp-table {
border-spacing: 0 !important;
margin-top: 1rem !important;
}
/* Cell spacing */
.rdp-cell {
padding: 2px !important;
}
`}</style>
<div className="max-w-7xl mx-auto">
<PageHeader
title="Events Management"
@@ -281,7 +641,7 @@ export default function Events() {
showUnpublished={true}
actions={
<Link to={createPageUrl("CreateEvent")}>
<Button className="bg-gradient-to-r from-[#0A39DF] to-[#1C323E] hover:from-[#0A39DF]/90 hover:to-[#1C323E]/90 text-white shadow-lg">
<Button className="bg-gradient-to-r from-[#2563eb] to-[#1C323E] hover:from-[#2563eb]/90 hover:to-[#1C323E]/90 text-white shadow-lg">
<Plus className="w-5 h-5 mr-2" />
Create Event
</Button>
@@ -301,8 +661,9 @@ export default function Events() {
onClick={() => {
setSelectionMode("multiple");
setDateRange(null);
setSelectedPreset(null);
}}
className={selectionMode === "multiple" ? "bg-[#0A39DF] hover:bg-[#0A39DF]/90 text-white" : "text-slate-600 hover:text-slate-900 hover:bg-white"}
className={selectionMode === "multiple" ? "bg-[#2563eb] hover:bg-[#2563eb]/90 text-white" : "text-slate-600 hover:text-slate-900 hover:bg-white"}
>
Multiple
</Button>
@@ -312,8 +673,9 @@ export default function Events() {
onClick={() => {
setSelectionMode("range");
setSelectedDates([]);
setSelectedPreset(null);
}}
className={selectionMode === "range" ? "bg-[#0A39DF] hover:bg-[#0A39DF]/90 text-white" : "text-slate-600 hover:text-slate-900 hover:bg-white"}
className={selectionMode === "range" ? "bg-[#2563eb] hover:bg-[#2563eb]/90 text-white" : "text-slate-600 hover:text-slate-900 hover:bg-white"}
>
Range
</Button>
@@ -332,70 +694,126 @@ export default function Events() {
<PopoverTrigger asChild>
<Button
variant="outline"
className="border-[#0A39DF] text-[#0A39DF] hover:bg-[#0A39DF]/5 hover:border-[#0A39DF] font-medium min-w-[200px]"
className="border-[#2563eb] text-[#2563eb] hover:bg-[#2563eb]/5 hover:border-[#2563eb] font-medium min-w-[200px]"
>
<CalendarIcon className="w-4 h-4 mr-2" />
{getDateSelectionText()}
</Button>
</PopoverTrigger>
<PopoverContent className="w-auto p-0" align="end">
<div className="bg-white rounded-lg shadow-xl border border-slate-200">
<div className="p-4 border-b border-slate-200 bg-slate-50">
<p className="font-semibold text-slate-900">
{selectionMode === "range" ? "Select Date Range" : "Select Multiple Dates"}
</p>
<p className="text-xs text-slate-500 mt-1">
{selectionMode === "range"
? "Click start date, then end date"
: "Click dates to select/deselect"}
</p>
<div className="bg-white rounded-lg shadow-xl border border-slate-200 flex">
{/* Date Presets Sidebar */}
<div className="w-64 border-r border-slate-200 bg-slate-50 p-4 rounded-l-lg">
<h4 className="font-semibold text-sm text-slate-700 mb-3 uppercase tracking-wide">DATE RANGE</h4>
<div className="space-y-1">
{datePresets.map((preset) => (
<button
key={preset.label}
type="button"
onClick={() => handlePresetSelect(preset)}
className={`w-full text-left px-3 py-2 rounded-lg transition-all text-sm ${
selectedPreset === preset.label
? 'bg-[#2563eb] text-white font-medium shadow-sm'
: 'hover:bg-white text-slate-700 hover:shadow-sm'
}`}
>
<div className="flex items-center justify-between">
<span>{preset.label}</span>
</div>
{selectedPreset === preset.label && preset.label !== "All time" && (
<div className="text-xs mt-1 opacity-90">
{getPresetDateRange(preset)}
</div>
)}
</button>
))}
</div>
{/* Compare Toggle */}
<div className="mt-6 pt-4 border-t border-slate-200">
<button
type="button"
onClick={() => setCompareMode(!compareMode)}
className={`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-sm transition-all ${
compareMode
? 'bg-purple-100 text-purple-700 font-medium'
: 'text-slate-600 hover:bg-white'
}`}
>
<RefreshCw className="w-4 h-4" />
Compare
</button>
</div>
</div>
<Calendar
mode={selectionMode === "range" ? "range" : "multiple"}
selected={selectionMode === "range" ? dateRange : selectedDates}
onSelect={selectionMode === "range" ? handleRangeSelect : handleDateSelect}
numberOfMonths={2}
modifiers={{
hasEvents: (date) => getEventCountForDate(date) > 0
}}
modifiersStyles={{
hasEvents: {
fontWeight: 'bold',
textDecoration: 'underline',
color: '#0A39DF'
}
}}
className="rounded-md border-0 p-4"
/>
<div className="p-4 border-t border-slate-200 bg-slate-50 flex items-center justify-between">
<p className="text-xs text-slate-500">
<span className="font-bold text-[#0A39DF]">Bold underlined dates</span> have events
</p>
<Button
size="sm"
onClick={() => setCalendarOpen(false)}
className="bg-[#0A39DF] hover:bg-[#0A39DF]/90"
>
Done
</Button>
{/* Calendar Section */}
<div className="p-4">
<div className="mb-3">
<p className="font-semibold text-slate-900 text-sm">
{selectionMode === "range" ? "Select Date Range" : "Select Multiple Dates"}
</p>
<p className="text-xs text-slate-500 mt-1">
{selectionMode === "range"
? "Click start date, then end date"
: "Click dates to select/deselect"}
</p>
</div>
<Calendar
mode={selectionMode === "range" ? "range" : "multiple"}
selected={selectionMode === "range" ? dateRange : selectedDates}
onSelect={selectionMode === "range" ? handleRangeSelect : handleDateSelect}
numberOfMonths={2}
modifiers={{
hasEvents: (date) => getEventCountForDate(date) > 0
}}
modifiersClassNames={{
hasEvents: 'has-events'
}}
className="rounded-md border-0"
/>
<div className="flex items-center justify-between mt-4 pt-4 border-t border-slate-200">
<p className="text-xs text-slate-500">
Dates with <span className="font-semibold text-[#2563eb]">dot indicators</span> have events
</p>
<div className="flex gap-2">
<Button
size="sm"
variant="outline"
onClick={() => {
setCalendarOpen(false);
clearDates();
}}
className="border-slate-300"
>
Cancel
</Button>
<Button
size="sm"
onClick={() => setCalendarOpen(false)}
className="bg-[#2563eb] hover:bg-[#2563eb]/90"
>
Confirm
</Button>
</div>
</div>
</div>
</div>
</PopoverContent>
</Popover>
</div>
{(selectedDates.length > 0 || dateRange?.from) && showAlert && filteredEvents.length > 0 && (
<Alert className="bg-[#0A39DF]/5 border-[#0A39DF]/20 relative mt-4">
{(selectedDates.length > 0 || dateRange?.from || selectedPreset === "All time") && showAlert && filteredEvents.length > 0 && (
<Alert className="bg-[#2563eb]/5 border-[#2563eb]/20 relative mt-4">
<Button
variant="ghost"
size="icon"
className="absolute top-2 right-2 h-6 w-6 text-[#0A39DF] hover:bg-[#0A39DF]/10"
className="absolute top-2 right-2 h-6 w-6 text-[#2563eb] hover:bg-[#2563eb]/10"
onClick={() => setShowAlert(false)}
>
<X className="w-4 h-4" />
</Button>
<CalendarIcon className="h-4 w-4 text-[#0A39DF]" />
<AlertDescription className="text-[#0A39DF] font-medium pr-8">
<CalendarIcon className="h-4 w-4 text-[#2563eb]" />
<AlertDescription className="text-[#2563eb] font-medium pr-8">
{filteredEvents.length} event{filteredEvents.length !== 1 ? 's' : ''} found for selected date{selectionMode === "multiple" && selectedDates.length > 1 ? 's' : ''}
</AlertDescription>
</Alert>
@@ -404,22 +822,22 @@ export default function Events() {
<Tabs value={activeTab} onValueChange={setActiveTab} className="mb-6">
<TabsList className="bg-white border border-slate-200 h-auto p-1 shadow-sm">
<TabsTrigger value="all" className="data-[state=active]:bg-[#0A39DF] data-[state=active]:text-white">
<TabsTrigger value="all" className="data-[state=active]:bg-[#2563eb] data-[state=active]:text-white">
Total Events <span className="ml-2 px-2 py-0.5 rounded-full bg-slate-100 data-[state=active]:bg-white/20 text-slate-700 data-[state=active]:text-white text-xs font-medium">{getTabCount("all")}</span>
</TabsTrigger>
<TabsTrigger value="last_minute" className="data-[state=active]:bg-[#0A39DF] data-[state=active]:text-white">
<TabsTrigger value="last_minute" className="data-[state=active]:bg-[#2563eb] data-[state=active]:text-white">
Last Minute <span className="ml-2 px-2 py-0.5 rounded-full bg-slate-100 data-[state=active]:bg-white/20 text-slate-700 data-[state=active]:text-white text-xs font-medium">{getTabCount("last_minute")}</span>
</TabsTrigger>
<TabsTrigger value="upcoming" className="data-[state=active]:bg-[#0A39DF] data-[state=active]:text-white">
<TabsTrigger value="upcoming" className="data-[state=active]:bg-[#2563eb] data-[state=active]:text-white">
Upcoming <span className="ml-2 px-2 py-0.5 rounded-full bg-slate-100 data-[state=active]:bg-white/20 text-slate-700 data-[state=active]:text-white text-xs font-medium">{getTabCount("upcoming")}</span>
</TabsTrigger>
<TabsTrigger value="active" className="data-[state=active]:bg-[#0A39DF] data-[state=active]:text-white">
<TabsTrigger value="active" className="data-[state=active]:bg-[#2563eb] data-[state=active]:text-white">
Active <span className="ml-2 px-2 py-0.5 rounded-full bg-slate-100 data-[state=active]:bg-white/20 text-slate-700 data-[state=active]:text-white text-xs font-medium">{getTabCount("active")}</span>
</TabsTrigger>
<TabsTrigger value="canceled" className="data-[state=active]:bg-[#0A39DF] data-[state=active]:text-white">
<TabsTrigger value="canceled" className="data-[state=active]:bg-[#2563eb] data-[state=active]:text-white">
Canceled <span className="ml-2 px-2 py-0.5 rounded-full bg-slate-100 data-[state=active]:bg-white/20 text-slate-700 data-[state=active]:text-white text-xs font-medium">{getTabCount("canceled")}</span>
</TabsTrigger>
<TabsTrigger value="past" className="data-[state=active]:bg-[#0A39DF] data-[state=active]:text-white">
<TabsTrigger value="past" className="data-[state=active]:bg-[#2563eb] data-[state=active]:text-white">
Past <span className="ml-2 px-2 py-0.5 rounded-full bg-slate-100 data-[state=active]:bg-white/20 text-slate-700 data-[state=active]:text-white text-xs font-medium">{getTabCount("past")}</span>
</TabsTrigger>
</TabsList>
@@ -501,7 +919,7 @@ export default function Events() {
<TableCell className="text-center font-semibold">{event.requested || 0}</TableCell>
<TableCell className="text-center">
<QuickAssignPopover event={event}>
<button className={`hover:text-[#0A39DF] font-semibold ${
<button className={`hover:text-[#2563eb] font-semibold ${
assignedCount >= event.requested && event.requested > 0 ? 'text-green-600' : 'text-orange-600'
}`}>
{assignedCount}
@@ -517,7 +935,7 @@ export default function Events() {
e.stopPropagation();
navigate(createPageUrl(`EventDetail?id=${event.id}`));
}}
className="hover:text-[#0A39DF] hover:bg-[#0A39DF]/10"
className="hover:text-[#2563eb] hover:bg-[#2563eb]/10"
title="View Details"
>
<Eye className="w-4 h-4" />
@@ -529,7 +947,7 @@ export default function Events() {
e.stopPropagation();
navigate(createPageUrl(`EditEvent?id=${event.id}`));
}}
className="hover:text-[#0A39DF] hover:bg-[#0A39DF]/10"
className="hover:text-[#2563eb] hover:bg-[#2563eb]/10"
title="Edit Event"
>
<Edit className="w-4 h-4" />
@@ -558,4 +976,4 @@ export default function Events() {
</div>
</div>
);
}
}