@licklist/design 0.78.5-dev.106 → 0.78.5-dev.107
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/.vscode/settings.json +3 -0
- package/bitbucket-pipelines.yml +13 -4
- package/dist/Maintenance/Maintenance.scss.js +1 -1
- package/dist/product-set/form/ProductsControl.d.ts +2 -1
- package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductsControl.js +0 -24
- package/dist/v2/components/ActionMenu/ActionMenu.scss.js +1 -1
- package/dist/v2/components/Badge/Badge.scss.js +1 -1
- package/dist/v2/components/Button/Button.scss.js +1 -1
- package/dist/v2/components/Button/GhostButton.scss.js +1 -1
- package/dist/v2/components/Checkbox/Checkbox.scss.js +1 -1
- package/dist/v2/components/DataTable/DataTable.d.ts.map +1 -1
- package/dist/v2/components/DataTable/DataTable.js +86 -2
- package/dist/v2/components/IconButton/IconButton.scss.js +1 -1
- package/dist/v2/components/Modal/DeleteModal.d.ts.map +1 -1
- package/dist/v2/components/Modal/DeleteModal.js +13 -11
- package/dist/v2/components/Modal/DeleteModal.scss.js +1 -1
- package/dist/v2/components/NPSScore/NPSScore.scss.js +1 -1
- package/dist/v2/components/NewTabs/NewTabs.scss.js +1 -1
- package/dist/v2/components/Select/Select.scss.js +1 -1
- package/dist/v2/components/StatusBadge/StatusBadge.scss.js +1 -1
- package/dist/v2/components/StepIndicator/StepIndicator.scss.js +1 -1
- package/dist/v2/components/Tabs/Tabs.scss.js +1 -1
- package/dist/v2/components/Toggle/Toggle.d.ts.map +1 -1
- package/dist/v2/components/Toggle/Toggle.js +8 -5
- package/dist/v2/components/Tooltip/Tooltip.scss.js +1 -1
- package/dist/v2/components/UserAvatar/UserAvatar.scss.js +1 -1
- package/dist/v2/components/UserPanel/UserPanel.scss.js +1 -1
- package/dist/v2/components/WYSIWYGEditor/WYSIWYGEditor.scss.js +1 -1
- package/dist/v2/components/ZoneCard/ZoneCard.scss.js +1 -1
- package/dist/v2/dashboard-analytics/chart/Chart.scss.js +1 -1
- package/dist/v2/dashboard-analytics/metric-card/MetricCard.scss.js +1 -1
- package/dist/v2/dashboard-analytics/venue-card/VenueCard.scss.js +1 -1
- package/dist/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.scss.js +1 -1
- package/dist/v2/icons/index.js +1 -16
- package/dist/v2/index.d.ts +0 -4
- package/dist/v2/index.d.ts.map +1 -1
- package/dist/v2/navigation/DashboardLayout/AdminSidebar.scss.js +1 -1
- package/dist/v2/navigation/DashboardLayout/DashboardLayout.scss.js +1 -1
- package/dist/v2/navigation/DashboardLayout/ProviderSidebar.scss.js +1 -1
- package/dist/v2/navigation/DashboardLayout/TopNavigation.scss.js +1 -1
- package/dist/v2/pages/Settings/SettingsTabs.scss.js +1 -1
- package/dist/v2/pages/Settings/components/SidebarCustomisation.js +0 -3
- package/dist/v2/pages/Settings/components/SidebarCustomisation.scss.js +1 -1
- package/dist/v2/pages/Settings/components/SidebarNavItem.js +0 -3
- package/dist/v2/pages/auth/AuthLayout/AuthLayout.scss.js +1 -1
- package/dist/v2/styles/form/NewInput.scss.js +1 -1
- package/package.json +6 -6
- package/rollup.config.js +16 -2
- package/src/iframe/payment/payment-status-page/PaymentStatusPage.tsx +1 -1
- package/src/product-set/form/ProductsControl.tsx +2 -1
- package/src/v2/components/DataTable/DataTable.tsx +23 -1
- package/src/v2/components/Modal/DeleteModal.tsx +12 -20
- package/src/v2/components/Toggle/Toggle.tsx +6 -5
- package/src/v2/index.ts +0 -73
- package/dist/v2/shadcn/components/ui/accordion.d.ts +0 -8
- package/dist/v2/shadcn/components/ui/accordion.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/alert-dialog.d.ts +0 -21
- package/dist/v2/shadcn/components/ui/alert-dialog.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/alert.d.ts +0 -9
- package/dist/v2/shadcn/components/ui/alert.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/aspect-ratio.d.ts +0 -4
- package/dist/v2/shadcn/components/ui/aspect-ratio.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/avatar.d.ts +0 -7
- package/dist/v2/shadcn/components/ui/avatar.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/badge.d.ts +0 -10
- package/dist/v2/shadcn/components/ui/badge.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/breadcrumb.d.ts +0 -20
- package/dist/v2/shadcn/components/ui/breadcrumb.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/button.d.ts +0 -14
- package/dist/v2/shadcn/components/ui/button.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/calendar.d.ts +0 -9
- package/dist/v2/shadcn/components/ui/calendar.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/card.d.ts +0 -9
- package/dist/v2/shadcn/components/ui/card.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/carousel.d.ts +0 -19
- package/dist/v2/shadcn/components/ui/carousel.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/checkbox.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/checkbox.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/checkbox.js +0 -115
- package/dist/v2/shadcn/components/ui/checkbox.scss.js +0 -6
- package/dist/v2/shadcn/components/ui/collapsible.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/collapsible.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/command.d.ts +0 -83
- package/dist/v2/shadcn/components/ui/command.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/context-menu.d.ts +0 -28
- package/dist/v2/shadcn/components/ui/context-menu.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/dialog.d.ts +0 -20
- package/dist/v2/shadcn/components/ui/dialog.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/dialog.js +0 -169
- package/dist/v2/shadcn/components/ui/drawer.d.ts +0 -23
- package/dist/v2/shadcn/components/ui/drawer.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/dropdown-menu.d.ts +0 -28
- package/dist/v2/shadcn/components/ui/dropdown-menu.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/form.d.ts +0 -24
- package/dist/v2/shadcn/components/ui/form.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/hover-card.d.ts +0 -7
- package/dist/v2/shadcn/components/ui/hover-card.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/input-otp.d.ts +0 -35
- package/dist/v2/shadcn/components/ui/input-otp.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/input.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/input.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/label.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/label.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/menubar.d.ts +0 -34
- package/dist/v2/shadcn/components/ui/menubar.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/navigation-menu.d.ts +0 -13
- package/dist/v2/shadcn/components/ui/navigation-menu.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/pagination.d.ts +0 -29
- package/dist/v2/shadcn/components/ui/pagination.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/popover.d.ts +0 -7
- package/dist/v2/shadcn/components/ui/popover.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/progress.d.ts +0 -5
- package/dist/v2/shadcn/components/ui/progress.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/radio-card.d.ts +0 -12
- package/dist/v2/shadcn/components/ui/radio-card.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/radio-group.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/radio-group.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/scroll-area.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/scroll-area.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/select.d.ts +0 -14
- package/dist/v2/shadcn/components/ui/select.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/separator.d.ts +0 -5
- package/dist/v2/shadcn/components/ui/separator.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/sheet.d.ts +0 -26
- package/dist/v2/shadcn/components/ui/sheet.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/sidebar.d.ts +0 -67
- package/dist/v2/shadcn/components/ui/sidebar.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/skeleton.d.ts +0 -3
- package/dist/v2/shadcn/components/ui/skeleton.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/slider.d.ts +0 -5
- package/dist/v2/shadcn/components/ui/slider.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/switch.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/switch.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/switch.js +0 -115
- package/dist/v2/shadcn/components/ui/switch.scss.js +0 -6
- package/dist/v2/shadcn/components/ui/table-pagination.d.ts +0 -11
- package/dist/v2/shadcn/components/ui/table-pagination.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/table.d.ts +0 -11
- package/dist/v2/shadcn/components/ui/table.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/tabs.d.ts +0 -8
- package/dist/v2/shadcn/components/ui/tabs.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/textarea.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/textarea.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/toast.d.ts +0 -16
- package/dist/v2/shadcn/components/ui/toast.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/toaster.d.ts +0 -2
- package/dist/v2/shadcn/components/ui/toaster.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/toggle-group.d.ts +0 -13
- package/dist/v2/shadcn/components/ui/toggle-group.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/toggle.d.ts +0 -13
- package/dist/v2/shadcn/components/ui/toggle.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/tooltip.d.ts +0 -8
- package/dist/v2/shadcn/components/ui/tooltip.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/use-toast.d.ts +0 -3
- package/dist/v2/shadcn/components/ui/use-toast.d.ts.map +0 -1
- package/dist/v2/shadcn/hooks/use-mobile.d.ts +0 -2
- package/dist/v2/shadcn/hooks/use-mobile.d.ts.map +0 -1
- package/dist/v2/shadcn/hooks/use-toast.d.ts +0 -45
- package/dist/v2/shadcn/hooks/use-toast.d.ts.map +0 -1
- package/dist/v2/shadcn/index.d.ts +0 -20
- package/dist/v2/shadcn/index.d.ts.map +0 -1
- package/dist/v2/shadcn/lib/utils.d.ts +0 -3
- package/dist/v2/shadcn/lib/utils.d.ts.map +0 -1
- package/dist/v2/shadcn/lib/utils.js +0 -11
- package/dist/v2/shadcn/styles/globals.css +0 -112
- package/src/v2/shadcn/_reference/AccountManagerCard.tsx +0 -45
- package/src/v2/shadcn/_reference/AffiliatesTable.tsx +0 -178
- package/src/v2/shadcn/_reference/AuditArchive.tsx +0 -165
- package/src/v2/shadcn/_reference/AuditContent.tsx +0 -270
- package/src/v2/shadcn/_reference/AutomationsGeneralSettings.tsx +0 -251
- package/src/v2/shadcn/_reference/AvatarUpload.tsx +0 -150
- package/src/v2/shadcn/_reference/BookingsSummaryCard.tsx +0 -268
- package/src/v2/shadcn/_reference/CodeCleanUpAudit.tsx +0 -274
- package/src/v2/shadcn/_reference/CompaniesTable.tsx +0 -387
- package/src/v2/shadcn/_reference/ComponentAudit.tsx +0 -239
- package/src/v2/shadcn/_reference/ConfigureSettingsCard.tsx +0 -95
- package/src/v2/shadcn/_reference/CustomerCard.tsx +0 -155
- package/src/v2/shadcn/_reference/DashboardCards.tsx +0 -50
- package/src/v2/shadcn/_reference/DashboardFooter.tsx +0 -18
- package/src/v2/shadcn/_reference/DiarySettings.tsx +0 -187
- package/src/v2/shadcn/_reference/DiaryView.tsx +0 -998
- package/src/v2/shadcn/_reference/EmptyState.tsx +0 -76
- package/src/v2/shadcn/_reference/EntityInfoCard.tsx +0 -48
- package/src/v2/shadcn/_reference/ExistingUserAssignments.tsx +0 -131
- package/src/v2/shadcn/_reference/FeatureToggle.tsx +0 -72
- package/src/v2/shadcn/_reference/FlowCard.tsx +0 -170
- package/src/v2/shadcn/_reference/FlowsContent.tsx +0 -688
- package/src/v2/shadcn/_reference/FlowsGeneralSettings.tsx +0 -27
- package/src/v2/shadcn/_reference/GeneralSettings.tsx +0 -33
- package/src/v2/shadcn/_reference/InventoryGeneralSettings.tsx +0 -82
- package/src/v2/shadcn/_reference/LanguageSelector.tsx +0 -97
- package/src/v2/shadcn/_reference/LoadingScreen.tsx +0 -25
- package/src/v2/shadcn/_reference/LoadingSpinner.tsx +0 -41
- package/src/v2/shadcn/_reference/ManagedClientsList.tsx +0 -121
- package/src/v2/shadcn/_reference/NPSScore.tsx +0 -379
- package/src/v2/shadcn/_reference/NPSSummaryCard.tsx +0 -181
- package/src/v2/shadcn/_reference/NotificationBanner.tsx +0 -129
- package/src/v2/shadcn/_reference/NotificationPanel.tsx +0 -208
- package/src/v2/shadcn/_reference/OnlineUsersCard.tsx +0 -73
- package/src/v2/shadcn/_reference/ProtectedRoute.tsx +0 -39
- package/src/v2/shadcn/_reference/ProvidersTable.tsx +0 -353
- package/src/v2/shadcn/_reference/QuickAddPanel.tsx +0 -1057
- package/src/v2/shadcn/_reference/QuickFilters.tsx +0 -112
- package/src/v2/shadcn/_reference/ScheduleView.tsx +0 -410
- package/src/v2/shadcn/_reference/ScrollToTop.tsx +0 -14
- package/src/v2/shadcn/_reference/SecondaryNav.tsx +0 -50
- package/src/v2/shadcn/_reference/SecuritySettings.tsx +0 -258
- package/src/v2/shadcn/_reference/SessionDetailView.tsx +0 -294
- package/src/v2/shadcn/_reference/Sidebar.tsx +0 -14
- package/src/v2/shadcn/_reference/SidebarAwareLayout.tsx +0 -30
- package/src/v2/shadcn/_reference/SidebarLabelCustomization.tsx +0 -285
- package/src/v2/shadcn/_reference/SimulationBanner.tsx +0 -57
- package/src/v2/shadcn/_reference/SortControls.tsx +0 -65
- package/src/v2/shadcn/_reference/StatusBadge.tsx +0 -49
- package/src/v2/shadcn/_reference/StyleGuideContent.tsx +0 -331
- package/src/v2/shadcn/_reference/TableActionMenu.tsx +0 -126
- package/src/v2/shadcn/_reference/ThemeProvider.tsx +0 -119
- package/src/v2/shadcn/_reference/ThemeSettings.tsx +0 -73
- package/src/v2/shadcn/_reference/TopNavigation.tsx +0 -332
- package/src/v2/shadcn/_reference/UserActivityHistory.tsx +0 -209
- package/src/v2/shadcn/_reference/UserLanguageSettings.tsx +0 -94
- package/src/v2/shadcn/_reference/UserPanel.tsx +0 -472
- package/src/v2/shadcn/_reference/UsersTable.tsx +0 -1023
- package/src/v2/shadcn/_reference/WaiverForm.tsx +0 -301
- package/src/v2/shadcn/_reference/WaiversGeneralSettings.tsx +0 -46
- package/src/v2/shadcn/_reference/WaiversTable.tsx +0 -290
- package/src/v2/shadcn/_reference/WaiversTemplatesSettings.tsx +0 -416
- package/src/v2/shadcn/_reference/ai/AIChatPanel.tsx +0 -313
- package/src/v2/shadcn/_reference/ai/AIChatSearchBar.tsx +0 -36
- package/src/v2/shadcn/_reference/ai/ChatInteractiveBlock.tsx +0 -298
- package/src/v2/shadcn/_reference/ai/ChatMessageContent.tsx +0 -40
- package/src/v2/shadcn/_reference/ai/parseInteractiveBlocks.ts +0 -142
- package/src/v2/shadcn/_reference/auth/AuthLayout.tsx +0 -55
- package/src/v2/shadcn/_reference/auth/CreatePasswordForm.tsx +0 -285
- package/src/v2/shadcn/_reference/auth/CreatePasswordPanel.tsx +0 -20
- package/src/v2/shadcn/_reference/auth/LoginFooter.tsx +0 -14
- package/src/v2/shadcn/_reference/auth/LoginForm.tsx +0 -205
- package/src/v2/shadcn/_reference/auth/LoginPanel.tsx +0 -41
- package/src/v2/shadcn/_reference/auth/ResetPasswordForm.tsx +0 -102
- package/src/v2/shadcn/_reference/auth/ResetPasswordPanel.tsx +0 -20
- package/src/v2/shadcn/_reference/auth/VerifyEmailForm.tsx +0 -95
- package/src/v2/shadcn/_reference/auth/VerifyEmailPanel.tsx +0 -20
- package/src/v2/shadcn/_reference/email/EmailAttachment.tsx +0 -119
- package/src/v2/shadcn/_reference/email/EmailAutomation.tsx +0 -92
- package/src/v2/shadcn/_reference/email/EmailPlaceholders.tsx +0 -64
- package/src/v2/shadcn/_reference/email/UnlayerEmailEditor.tsx +0 -41
- package/src/v2/shadcn/_reference/email/emailTemplateData.ts +0 -53
- package/src/v2/shadcn/_reference/emptyStateIcons.tsx +0 -103
- package/src/v2/shadcn/_reference/games/MazeGame.tsx +0 -394
- package/src/v2/shadcn/_reference/games/RunnerGame.tsx +0 -497
- package/src/v2/shadcn/_reference/logos/BookedLogoFull.tsx +0 -36
- package/src/v2/shadcn/_reference/logos/BookedLogoMark.tsx +0 -31
- package/src/v2/shadcn/_reference/logos/BookedLogoNew.tsx +0 -36
- package/src/v2/shadcn/_reference/pricing/DynamicPricingRulesEditor.tsx +0 -401
- package/src/v2/shadcn/_reference/pricing/DynamicPricingTierCard.tsx +0 -77
- package/src/v2/shadcn/_reference/pricing/DynamicPricingTiersList.tsx +0 -218
- package/src/v2/shadcn/_reference/pricing/PricingCalendar.tsx +0 -810
- package/src/v2/shadcn/_reference/pricing/PricingPeriodCard.tsx +0 -152
- package/src/v2/shadcn/_reference/pricing/PricingPeriodForm.tsx +0 -377
- package/src/v2/shadcn/_reference/pricing/PricingPeriodsList.tsx +0 -213
- package/src/v2/shadcn/_reference/pricing/getRuleSummary.ts +0 -39
- package/src/v2/shadcn/_reference/products/AvailabilityRulesSection.tsx +0 -184
- package/src/v2/shadcn/_reference/products/AvailabilitySection.tsx +0 -677
- package/src/v2/shadcn/_reference/products/BookingTypeConfigOptions.tsx +0 -40
- package/src/v2/shadcn/_reference/products/CapacityPeriodsSection.tsx +0 -238
- package/src/v2/shadcn/_reference/products/DynamicPricingTiersSection.tsx +0 -131
- package/src/v2/shadcn/_reference/products/GiftCardOrdersTab.tsx +0 -192
- package/src/v2/shadcn/_reference/products/GiftCardSettings.tsx +0 -342
- package/src/v2/shadcn/_reference/products/PackageProductsSection.tsx +0 -322
- package/src/v2/shadcn/_reference/products/PricingSection.tsx +0 -173
- package/src/v2/shadcn/_reference/products/ProductTypeFields.tsx +0 -353
- package/src/v2/shadcn/_reference/products/ProductTypeIcon.tsx +0 -95
- package/src/v2/shadcn/_reference/products/VariablePricingSection.tsx +0 -140
- package/src/v2/shadcn/_reference/products/productTypeConfig.ts +0 -182
- package/src/v2/shadcn/_reference/shared/BackButton.tsx +0 -50
- package/src/v2/shadcn/_reference/shared/CancelConfirmationDialog.tsx +0 -18
- package/src/v2/shadcn/_reference/shared/ConfirmationDialog.tsx +0 -136
- package/src/v2/shadcn/_reference/shared/DeleteConfirmationDialog.tsx +0 -18
- package/src/v2/shadcn/_reference/shared/DeleteEntityPage.tsx +0 -221
- package/src/v2/shadcn/_reference/shared/SidebarIcons.tsx +0 -108
- package/src/v2/shadcn/_reference/shared/UnifiedSidebar.tsx +0 -722
- package/src/v2/shadcn/_reference/tables/BulkActionsBar.tsx +0 -68
- package/src/v2/shadcn/_reference/tables/DataTable.tsx +0 -221
- package/src/v2/shadcn/_reference/tables/TableControls.tsx +0 -94
- package/src/v2/shadcn/_reference/tables/index.ts +0 -3
- package/src/v2/shadcn/_reference/tables/types.ts +0 -79
- package/src/v2/shadcn/_reference/zones/LegacyZoneSettings.tsx +0 -299
- package/src/v2/shadcn/components/ui/accordion.stories.tsx +0 -63
- package/src/v2/shadcn/components/ui/accordion.tsx +0 -52
- package/src/v2/shadcn/components/ui/alert-dialog.stories.tsx +0 -44
- package/src/v2/shadcn/components/ui/alert-dialog.tsx +0 -104
- package/src/v2/shadcn/components/ui/alert.stories.tsx +0 -44
- package/src/v2/shadcn/components/ui/alert.tsx +0 -43
- package/src/v2/shadcn/components/ui/aspect-ratio.stories.tsx +0 -46
- package/src/v2/shadcn/components/ui/aspect-ratio.tsx +0 -5
- package/src/v2/shadcn/components/ui/avatar.stories.tsx +0 -39
- package/src/v2/shadcn/components/ui/avatar.tsx +0 -38
- package/src/v2/shadcn/components/ui/badge.stories.tsx +0 -17
- package/src/v2/shadcn/components/ui/badge.tsx +0 -30
- package/src/v2/shadcn/components/ui/breadcrumb.stories.tsx +0 -91
- package/src/v2/shadcn/components/ui/breadcrumb.tsx +0 -90
- package/src/v2/shadcn/components/ui/button.stories.tsx +0 -20
- package/src/v2/shadcn/components/ui/button.tsx +0 -60
- package/src/v2/shadcn/components/ui/calendar.stories.tsx +0 -61
- package/src/v2/shadcn/components/ui/calendar.tsx +0 -54
- package/src/v2/shadcn/components/ui/card.stories.tsx +0 -37
- package/src/v2/shadcn/components/ui/card.tsx +0 -43
- package/src/v2/shadcn/components/ui/carousel.stories.tsx +0 -92
- package/src/v2/shadcn/components/ui/carousel.tsx +0 -224
- package/src/v2/shadcn/components/ui/checkbox.scss +0 -38
- package/src/v2/shadcn/components/ui/checkbox.stories.tsx +0 -23
- package/src/v2/shadcn/components/ui/checkbox.tsx +0 -24
- package/src/v2/shadcn/components/ui/collapsible.stories.tsx +0 -59
- package/src/v2/shadcn/components/ui/collapsible.tsx +0 -9
- package/src/v2/shadcn/components/ui/command.stories.tsx +0 -70
- package/src/v2/shadcn/components/ui/command.tsx +0 -132
- package/src/v2/shadcn/components/ui/context-menu.stories.tsx +0 -72
- package/src/v2/shadcn/components/ui/context-menu.tsx +0 -178
- package/src/v2/shadcn/components/ui/dialog.stories.tsx +0 -67
- package/src/v2/shadcn/components/ui/dialog.tsx +0 -95
- package/src/v2/shadcn/components/ui/drawer.stories.tsx +0 -50
- package/src/v2/shadcn/components/ui/drawer.tsx +0 -87
- package/src/v2/shadcn/components/ui/dropdown-menu.stories.tsx +0 -73
- package/src/v2/shadcn/components/ui/dropdown-menu.tsx +0 -179
- package/src/v2/shadcn/components/ui/form.stories.tsx +0 -105
- package/src/v2/shadcn/components/ui/form.tsx +0 -129
- package/src/v2/shadcn/components/ui/hover-card.stories.tsx +0 -35
- package/src/v2/shadcn/components/ui/hover-card.tsx +0 -27
- package/src/v2/shadcn/components/ui/input-otp.stories.tsx +0 -72
- package/src/v2/shadcn/components/ui/input-otp.tsx +0 -61
- package/src/v2/shadcn/components/ui/input.stories.tsx +0 -16
- package/src/v2/shadcn/components/ui/input.tsx +0 -25
- package/src/v2/shadcn/components/ui/label.stories.tsx +0 -13
- package/src/v2/shadcn/components/ui/label.tsx +0 -17
- package/src/v2/shadcn/components/ui/menubar.stories.tsx +0 -86
- package/src/v2/shadcn/components/ui/menubar.tsx +0 -207
- package/src/v2/shadcn/components/ui/navigation-menu.stories.tsx +0 -68
- package/src/v2/shadcn/components/ui/navigation-menu.tsx +0 -120
- package/src/v2/shadcn/components/ui/pagination.stories.tsx +0 -78
- package/src/v2/shadcn/components/ui/pagination.tsx +0 -81
- package/src/v2/shadcn/components/ui/popover.stories.tsx +0 -44
- package/src/v2/shadcn/components/ui/popover.tsx +0 -29
- package/src/v2/shadcn/components/ui/progress.stories.tsx +0 -17
- package/src/v2/shadcn/components/ui/progress.tsx +0 -23
- package/src/v2/shadcn/components/ui/radio-card.stories.tsx +0 -68
- package/src/v2/shadcn/components/ui/radio-card.tsx +0 -52
- package/src/v2/shadcn/components/ui/radio-group.stories.tsx +0 -77
- package/src/v2/shadcn/components/ui/radio-group.tsx +0 -35
- package/src/v2/shadcn/components/ui/scroll-area.stories.tsx +0 -56
- package/src/v2/shadcn/components/ui/scroll-area.tsx +0 -38
- package/src/v2/shadcn/components/ui/select.stories.tsx +0 -60
- package/src/v2/shadcn/components/ui/select.tsx +0 -148
- package/src/v2/shadcn/components/ui/separator.stories.tsx +0 -30
- package/src/v2/shadcn/components/ui/separator.tsx +0 -20
- package/src/v2/shadcn/components/ui/sheet.stories.tsx +0 -115
- package/src/v2/shadcn/components/ui/sheet.tsx +0 -107
- package/src/v2/shadcn/components/ui/sidebar.stories.tsx +0 -167
- package/src/v2/shadcn/components/ui/sidebar.tsx +0 -637
- package/src/v2/shadcn/components/ui/skeleton.stories.tsx +0 -36
- package/src/v2/shadcn/components/ui/skeleton.tsx +0 -7
- package/src/v2/shadcn/components/ui/slider.stories.tsx +0 -16
- package/src/v2/shadcn/components/ui/slider.tsx +0 -23
- package/src/v2/shadcn/components/ui/switch.scss +0 -63
- package/src/v2/shadcn/components/ui/switch.stories.tsx +0 -23
- package/src/v2/shadcn/components/ui/switch.tsx +0 -24
- package/src/v2/shadcn/components/ui/table-pagination.stories.tsx +0 -81
- package/src/v2/shadcn/components/ui/table-pagination.tsx +0 -61
- package/src/v2/shadcn/components/ui/table.stories.tsx +0 -40
- package/src/v2/shadcn/components/ui/table.tsx +0 -72
- package/src/v2/shadcn/components/ui/tabs.stories.tsx +0 -85
- package/src/v2/shadcn/components/ui/tabs.tsx +0 -53
- package/src/v2/shadcn/components/ui/textarea.stories.tsx +0 -15
- package/src/v2/shadcn/components/ui/textarea.tsx +0 -21
- package/src/v2/shadcn/components/ui/toast.stories.tsx +0 -77
- package/src/v2/shadcn/components/ui/toast.tsx +0 -111
- package/src/v2/shadcn/components/ui/toaster.stories.tsx +0 -46
- package/src/v2/shadcn/components/ui/toaster.tsx +0 -24
- package/src/v2/shadcn/components/ui/toggle-group.stories.tsx +0 -95
- package/src/v2/shadcn/components/ui/toggle-group.tsx +0 -49
- package/src/v2/shadcn/components/ui/toggle.stories.tsx +0 -18
- package/src/v2/shadcn/components/ui/toggle.tsx +0 -37
- package/src/v2/shadcn/components/ui/tooltip.stories.tsx +0 -57
- package/src/v2/shadcn/components/ui/tooltip.tsx +0 -28
- package/src/v2/shadcn/components/ui/use-toast.ts +0 -3
- package/src/v2/shadcn/hooks/use-mobile.tsx +0 -19
- package/src/v2/shadcn/hooks/use-toast.ts +0 -184
- package/src/v2/shadcn/index.ts +0 -76
- package/src/v2/shadcn/lib/utils.ts +0 -6
- package/src/v2/shadcn/styles/globals.css +0 -112
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { cn } from '../lib/utils';
|
|
3
|
-
import {
|
|
4
|
-
AnalyticsIcon,
|
|
5
|
-
BookingTypesIcon,
|
|
6
|
-
ReportsIcon,
|
|
7
|
-
DatesEventsIcon,
|
|
8
|
-
LoyaltyIcon,
|
|
9
|
-
CustomersIcon,
|
|
10
|
-
AffiliatesIcon,
|
|
11
|
-
BookingsIcon,
|
|
12
|
-
WaiversIcon,
|
|
13
|
-
InboxIcon,
|
|
14
|
-
SentIcon,
|
|
15
|
-
UsersIcon,
|
|
16
|
-
HomeIcon,
|
|
17
|
-
CompanyIcon,
|
|
18
|
-
PaymentsIcon,
|
|
19
|
-
ZonesIcon,
|
|
20
|
-
} from './emptyStateIcons';
|
|
21
|
-
import { MarketingIcon } from './shared/SidebarIcons';
|
|
22
|
-
|
|
23
|
-
interface EmptyStateProps {
|
|
24
|
-
icon: React.ReactNode | string;
|
|
25
|
-
title: string;
|
|
26
|
-
description: string;
|
|
27
|
-
className?: string;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const iconMap: Record<string, React.ComponentType> = {
|
|
31
|
-
Analytics: AnalyticsIcon,
|
|
32
|
-
BookingTypes: BookingTypesIcon,
|
|
33
|
-
Reports: ReportsIcon,
|
|
34
|
-
DatesEvents: DatesEventsIcon,
|
|
35
|
-
Loyalty: LoyaltyIcon,
|
|
36
|
-
Customers: CustomersIcon,
|
|
37
|
-
Affiliate: AffiliatesIcon,
|
|
38
|
-
Affiliates: AffiliatesIcon,
|
|
39
|
-
Bookings: BookingsIcon,
|
|
40
|
-
Campaigns: MarketingIcon,
|
|
41
|
-
Waivers: WaiversIcon,
|
|
42
|
-
Inbox: InboxIcon,
|
|
43
|
-
Sent: SentIcon,
|
|
44
|
-
Users: UsersIcon,
|
|
45
|
-
Home: HomeIcon,
|
|
46
|
-
Company: CompanyIcon,
|
|
47
|
-
Payments: PaymentsIcon,
|
|
48
|
-
Zones: ZonesIcon,
|
|
49
|
-
Inventory: BookingTypesIcon,
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
const EmptyState: React.FC<EmptyStateProps> = ({ icon, title, description, className }) => {
|
|
53
|
-
const renderIcon = () => {
|
|
54
|
-
if (typeof icon === 'string') {
|
|
55
|
-
const IconComponent = iconMap[icon];
|
|
56
|
-
return IconComponent ? <IconComponent /> : null;
|
|
57
|
-
}
|
|
58
|
-
return icon;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
return (
|
|
62
|
-
<div className={cn("flex flex-col items-start py-16 px-4", className)}>
|
|
63
|
-
{renderIcon()}
|
|
64
|
-
|
|
65
|
-
<h3 className="text-label-secondary text-base font-medium leading-6 mb-1">
|
|
66
|
-
{title}
|
|
67
|
-
</h3>
|
|
68
|
-
|
|
69
|
-
<p className="text-label-secondary text-[15px] font-normal leading-6">
|
|
70
|
-
{description}
|
|
71
|
-
</p>
|
|
72
|
-
</div>
|
|
73
|
-
);
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
export default EmptyState;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
interface InfoItem {
|
|
4
|
-
label: string;
|
|
5
|
-
value: string | number | boolean | null | undefined;
|
|
6
|
-
capitalize?: boolean;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
interface EntityInfoCardProps {
|
|
10
|
-
title: string;
|
|
11
|
-
items: InfoItem[];
|
|
12
|
-
footerActions?: ReactNode;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const EntityInfoCard: React.FC<EntityInfoCardProps> = ({ title, items, footerActions }) => {
|
|
16
|
-
const formatValue = (item: InfoItem) => {
|
|
17
|
-
const value = item.value;
|
|
18
|
-
|
|
19
|
-
if (value === null || value === undefined) return '—';
|
|
20
|
-
if (typeof value === 'boolean') return value ? 'Yes' : 'No';
|
|
21
|
-
if (typeof value === 'number') return value.toString();
|
|
22
|
-
|
|
23
|
-
return item.capitalize ? value.charAt(0).toUpperCase() + value.slice(1) : value;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
return (
|
|
27
|
-
<div className="bg-surface-secondary rounded-lg p-6">
|
|
28
|
-
<h2 className="text-label-primary text-lg font-semibold mb-4">
|
|
29
|
-
{title}
|
|
30
|
-
</h2>
|
|
31
|
-
<div className="grid grid-cols-2 gap-4 text-sm max-sm:grid-cols-1">
|
|
32
|
-
{items.map((item, index) => (
|
|
33
|
-
<div key={index}>
|
|
34
|
-
<span className="text-label-tertiary">{item.label}:</span>
|
|
35
|
-
<span className="text-label-primary ml-2">{formatValue(item)}</span>
|
|
36
|
-
</div>
|
|
37
|
-
))}
|
|
38
|
-
</div>
|
|
39
|
-
{footerActions && (
|
|
40
|
-
<div className="flex items-center gap-2 mt-4 pt-4 border-t border-border-primary">
|
|
41
|
-
{footerActions}
|
|
42
|
-
</div>
|
|
43
|
-
)}
|
|
44
|
-
</div>
|
|
45
|
-
);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export default EntityInfoCard;
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { supabase } from '@/integrations/supabase/client';
|
|
3
|
-
|
|
4
|
-
interface Assignment {
|
|
5
|
-
id: string;
|
|
6
|
-
name: string;
|
|
7
|
-
type: 'company' | 'venue' | 'promoter';
|
|
8
|
-
avatarUrl: string | null;
|
|
9
|
-
role: string | null;
|
|
10
|
-
venueId: string | null;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
interface ExistingUserAssignmentsProps {
|
|
14
|
-
userId: string;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const formatRoleDisplay = (role: string): string => {
|
|
18
|
-
return role.replace('_', ' ').replace(/\w/g, l => l.toUpperCase());
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const ExistingUserAssignments: React.FC<ExistingUserAssignmentsProps> = ({ userId }) => {
|
|
22
|
-
const [assignments, setAssignments] = useState<Assignment[]>([]);
|
|
23
|
-
const [isLoading, setIsLoading] = useState(true);
|
|
24
|
-
|
|
25
|
-
useEffect(() => {
|
|
26
|
-
const fetchAssignments = async () => {
|
|
27
|
-
setIsLoading(true);
|
|
28
|
-
try {
|
|
29
|
-
const [companiesRes, providersRes, rolesRes] = await Promise.all([
|
|
30
|
-
supabase
|
|
31
|
-
.from('user_companies')
|
|
32
|
-
.select('company_id, companies:company_id(id, name, avatar_url, company_id)')
|
|
33
|
-
.eq('user_id', userId),
|
|
34
|
-
supabase
|
|
35
|
-
.from('user_providers')
|
|
36
|
-
.select('provider_id, providers:provider_id(id, name, type, avatar_url, venue_id)')
|
|
37
|
-
.eq('user_id', userId),
|
|
38
|
-
supabase
|
|
39
|
-
.from('user_roles')
|
|
40
|
-
.select('role, provider_id, company_id')
|
|
41
|
-
.eq('user_id', userId),
|
|
42
|
-
]);
|
|
43
|
-
|
|
44
|
-
const roles = (rolesRes.data || []) as Array<{ role: string; provider_id: string | null; company_id: string | null }>;
|
|
45
|
-
const items: Assignment[] = [];
|
|
46
|
-
|
|
47
|
-
if (companiesRes.data) {
|
|
48
|
-
for (const uc of companiesRes.data) {
|
|
49
|
-
const company = uc.companies as any;
|
|
50
|
-
if (company) {
|
|
51
|
-
const companyRole = roles.find(r => r.company_id === company.id && !r.provider_id);
|
|
52
|
-
items.push({
|
|
53
|
-
id: company.id,
|
|
54
|
-
name: company.name,
|
|
55
|
-
type: 'company',
|
|
56
|
-
avatarUrl: company.avatar_url,
|
|
57
|
-
role: companyRole?.role || null,
|
|
58
|
-
venueId: company.company_id || null,
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
if (providersRes.data) {
|
|
65
|
-
for (const up of providersRes.data) {
|
|
66
|
-
const provider = up.providers as any;
|
|
67
|
-
if (provider) {
|
|
68
|
-
const providerRole = roles.find(r => r.provider_id === provider.id);
|
|
69
|
-
items.push({
|
|
70
|
-
id: provider.id,
|
|
71
|
-
name: provider.name,
|
|
72
|
-
type: provider.type === 'promoter' ? 'promoter' : 'venue',
|
|
73
|
-
avatarUrl: provider.avatar_url,
|
|
74
|
-
role: providerRole?.role || null,
|
|
75
|
-
venueId: provider.venue_id || null,
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
setAssignments(items);
|
|
82
|
-
} catch (error) {
|
|
83
|
-
console.error('Error fetching user assignments:', error);
|
|
84
|
-
} finally {
|
|
85
|
-
setIsLoading(false);
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
fetchAssignments();
|
|
90
|
-
}, [userId]);
|
|
91
|
-
|
|
92
|
-
if (isLoading || assignments.length === 0) return null;
|
|
93
|
-
|
|
94
|
-
return (
|
|
95
|
-
<div className="flex flex-col gap-3">
|
|
96
|
-
<span className="text-label-secondary text-xs font-semibold">Currently assigned to</span>
|
|
97
|
-
<div className="flex flex-col gap-2">
|
|
98
|
-
{assignments.map(a => (
|
|
99
|
-
<div key={a.id} className="flex items-center gap-3 p-4 bg-surface-secondary border border-border-primary rounded-lg">
|
|
100
|
-
<div className="w-10 h-10 rounded-full relative flex items-center justify-center flex-shrink-0 overflow-hidden bg-fill-secondary/20 border border-border-primary">
|
|
101
|
-
{a.avatarUrl ? (
|
|
102
|
-
<img src={a.avatarUrl} alt={a.name} className="w-full h-full object-cover" />
|
|
103
|
-
) : (
|
|
104
|
-
<span className="text-label-secondary font-bold text-sm">
|
|
105
|
-
{a.name.charAt(0).toUpperCase()}
|
|
106
|
-
</span>
|
|
107
|
-
)}
|
|
108
|
-
</div>
|
|
109
|
-
<div className="flex flex-col gap-0.5 flex-1">
|
|
110
|
-
<span className="text-label-primary font-medium text-sm">{a.name}</span>
|
|
111
|
-
<div className="flex justify-center items-center gap-2 bg-surface-tertiary px-2 py-1 rounded-lg w-fit">
|
|
112
|
-
<span className="text-label-secondary text-[10px] leading-3 font-mono font-semibold whitespace-nowrap">
|
|
113
|
-
{a.type === 'company'
|
|
114
|
-
? `Company ID: ${a.venueId || a.id.slice(0, 8)}`
|
|
115
|
-
: `${a.type === 'venue' ? 'Venue' : 'Promoter'} ID: ${a.venueId || a.id.slice(0, 8)}`}
|
|
116
|
-
</span>
|
|
117
|
-
</div>
|
|
118
|
-
</div>
|
|
119
|
-
{a.role && (
|
|
120
|
-
<span className="text-label-secondary text-sm font-medium whitespace-nowrap">
|
|
121
|
-
{formatRoleDisplay(a.role)}
|
|
122
|
-
</span>
|
|
123
|
-
)}
|
|
124
|
-
</div>
|
|
125
|
-
))}
|
|
126
|
-
</div>
|
|
127
|
-
</div>
|
|
128
|
-
);
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
export default ExistingUserAssignments;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Switch } from './ui/switch';
|
|
3
|
-
import { IconLock } from '../../icons';
|
|
4
|
-
import { cn } from '../lib/utils';
|
|
5
|
-
|
|
6
|
-
interface FeatureToggleProps {
|
|
7
|
-
icon: React.ReactNode;
|
|
8
|
-
title: string;
|
|
9
|
-
description: string;
|
|
10
|
-
enabled: boolean;
|
|
11
|
-
onToggle: (checked: boolean) => void;
|
|
12
|
-
isLocked?: boolean;
|
|
13
|
-
/** When true, hides the switch entirely (read-only display) */
|
|
14
|
-
readOnly?: boolean;
|
|
15
|
-
className?: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Reusable feature toggle component with icon, title, description, and switch.
|
|
20
|
-
* Used for enabling/disabling features in settings pages.
|
|
21
|
-
* When isLocked is true, displays a lock icon instead of the switch.
|
|
22
|
-
*/
|
|
23
|
-
const FeatureToggle: React.FC<FeatureToggleProps> = ({
|
|
24
|
-
icon,
|
|
25
|
-
title,
|
|
26
|
-
description,
|
|
27
|
-
enabled,
|
|
28
|
-
onToggle,
|
|
29
|
-
isLocked = false,
|
|
30
|
-
readOnly = false,
|
|
31
|
-
className,
|
|
32
|
-
}) => {
|
|
33
|
-
return (
|
|
34
|
-
<div
|
|
35
|
-
className={cn(
|
|
36
|
-
"flex items-center justify-between p-4 border border-border-primary rounded-lg bg-surface-secondary w-full",
|
|
37
|
-
className
|
|
38
|
-
)}
|
|
39
|
-
>
|
|
40
|
-
<div className="flex items-center gap-4 min-w-0 mr-4">
|
|
41
|
-
{/* Icon */}
|
|
42
|
-
<div className="flex items-center justify-center w-12 h-12 flex-shrink-0">
|
|
43
|
-
{icon}
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
{/* Text content */}
|
|
47
|
-
<div className="flex flex-col gap-0.5">
|
|
48
|
-
<span className="text-label-primary font-medium text-base">
|
|
49
|
-
{title}
|
|
50
|
-
</span>
|
|
51
|
-
<p className="text-label-tertiary text-sm">
|
|
52
|
-
{description}
|
|
53
|
-
</p>
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
|
|
57
|
-
{/* Switch, Lock Icon, or nothing (readOnly) */}
|
|
58
|
-
{readOnly ? null : isLocked ? (
|
|
59
|
-
<div className="pr-1">
|
|
60
|
-
<IconLock size={32} className="fill-fill-secondary" />
|
|
61
|
-
</div>
|
|
62
|
-
) : (
|
|
63
|
-
<Switch
|
|
64
|
-
checked={enabled}
|
|
65
|
-
onCheckedChange={onToggle}
|
|
66
|
-
/>
|
|
67
|
-
)}
|
|
68
|
-
</div>
|
|
69
|
-
);
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export default FeatureToggle;
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IconThreeDots, IconEdit, IconDelete, IconPlus } from '../../icons';
|
|
3
|
-
import { Badge } from './ui/badge';
|
|
4
|
-
import {
|
|
5
|
-
DropdownMenu,
|
|
6
|
-
DropdownMenuContent,
|
|
7
|
-
DropdownMenuItem,
|
|
8
|
-
DropdownMenuTrigger,
|
|
9
|
-
} from './ui/dropdown-menu';
|
|
10
|
-
import { Button } from './ui/button';
|
|
11
|
-
|
|
12
|
-
interface FlowCardProps {
|
|
13
|
-
id: string;
|
|
14
|
-
type: 'booking' | 'enquiry';
|
|
15
|
-
referenceNumber: string;
|
|
16
|
-
date: string;
|
|
17
|
-
customerName: string;
|
|
18
|
-
customerEmail: string;
|
|
19
|
-
totalAmount: number;
|
|
20
|
-
netAmount: number;
|
|
21
|
-
activityName: string;
|
|
22
|
-
bookingTime: string;
|
|
23
|
-
status: string;
|
|
24
|
-
tags?: string[];
|
|
25
|
-
onClick?: (id: string) => void;
|
|
26
|
-
onEdit?: (id: string) => void;
|
|
27
|
-
onDelete?: (id: string) => void;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const statusColors: Record<string, string> = {
|
|
31
|
-
active: 'bg-surface-status-success text-label-status-success border-border-status-success',
|
|
32
|
-
cancelled: 'bg-surface-status-error text-label-status-error border-border-status-error',
|
|
33
|
-
declined: 'bg-surface-status-error text-label-status-error border-border-status-error',
|
|
34
|
-
initial_contact: 'bg-surface-status-info text-label-status-info border-border-status-info',
|
|
35
|
-
action_required: 'bg-surface-status-warning text-label-status-warning border-border-status-warning',
|
|
36
|
-
ready_to_convert: 'bg-surface-status-success text-label-status-success border-border-status-success',
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
const formatStatus = (status: string): string => {
|
|
40
|
-
return status
|
|
41
|
-
.split('_')
|
|
42
|
-
.map(word => word.charAt(0).toUpperCase() + word.slice(1))
|
|
43
|
-
.join(' ');
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export const FlowCard: React.FC<FlowCardProps> = ({
|
|
47
|
-
id,
|
|
48
|
-
type,
|
|
49
|
-
referenceNumber,
|
|
50
|
-
date,
|
|
51
|
-
customerName,
|
|
52
|
-
customerEmail,
|
|
53
|
-
totalAmount,
|
|
54
|
-
netAmount,
|
|
55
|
-
activityName,
|
|
56
|
-
bookingTime,
|
|
57
|
-
status,
|
|
58
|
-
tags = [],
|
|
59
|
-
onClick,
|
|
60
|
-
onEdit,
|
|
61
|
-
onDelete,
|
|
62
|
-
}) => {
|
|
63
|
-
const handleCardClick = (e: React.MouseEvent) => {
|
|
64
|
-
// Don't trigger card click if clicking on dropdown menu
|
|
65
|
-
if ((e.target as HTMLElement).closest('[data-radix-collection-item]') ||
|
|
66
|
-
(e.target as HTMLElement).closest('[role="menu"]') ||
|
|
67
|
-
(e.target as HTMLElement).closest('button')) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
onClick?.(id);
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
return (
|
|
74
|
-
<div
|
|
75
|
-
className="flex flex-col items-start gap-3 p-4 bg-surface-primary border border-border-primary rounded-lg hover:bg-surface-secondary transition-colors cursor-pointer"
|
|
76
|
-
onClick={handleCardClick}
|
|
77
|
-
>
|
|
78
|
-
{/* Header with type badge, reference, and menu */}
|
|
79
|
-
<div className="flex items-start justify-between w-full">
|
|
80
|
-
<div className="flex flex-col gap-1">
|
|
81
|
-
<div className="flex items-center gap-2">
|
|
82
|
-
<Badge variant={type === 'booking' ? 'default' : 'secondary'} className="text-[10px] font-bold px-2 py-0.5">
|
|
83
|
-
{type === 'booking' ? 'BKG' : 'ENQ'}
|
|
84
|
-
</Badge>
|
|
85
|
-
<span className="text-label-primary text-sm font-semibold">
|
|
86
|
-
#{referenceNumber}
|
|
87
|
-
</span>
|
|
88
|
-
</div>
|
|
89
|
-
<span className="text-label-tertiary text-xs">
|
|
90
|
-
{new Date(date).toLocaleDateString('en-GB')}
|
|
91
|
-
</span>
|
|
92
|
-
</div>
|
|
93
|
-
|
|
94
|
-
<DropdownMenu>
|
|
95
|
-
<DropdownMenuTrigger asChild>
|
|
96
|
-
<Button variant="ghost" size="icon" className="h-8 w-8">
|
|
97
|
-
<IconThreeDots className="w-4 h-4 fill-fill-primary" />
|
|
98
|
-
</Button>
|
|
99
|
-
</DropdownMenuTrigger>
|
|
100
|
-
<DropdownMenuContent align="end">
|
|
101
|
-
<DropdownMenuItem onClick={() => onEdit?.(id)}>
|
|
102
|
-
<IconEdit className="w-4 h-4 mr-2 fill-fill-primary" />
|
|
103
|
-
Edit
|
|
104
|
-
</DropdownMenuItem>
|
|
105
|
-
<DropdownMenuItem onClick={() => onDelete?.(id)} className="text-label-danger">
|
|
106
|
-
<IconDelete className="w-4 h-4 mr-2 fill-fill-danger" />
|
|
107
|
-
Delete
|
|
108
|
-
</DropdownMenuItem>
|
|
109
|
-
</DropdownMenuContent>
|
|
110
|
-
</DropdownMenu>
|
|
111
|
-
</div>
|
|
112
|
-
|
|
113
|
-
{/* Customer info */}
|
|
114
|
-
<div className="flex flex-col gap-0.5 w-full">
|
|
115
|
-
<span className="text-label-primary text-sm font-medium truncate">
|
|
116
|
-
{customerName}
|
|
117
|
-
</span>
|
|
118
|
-
<span className="text-label-tertiary text-xs truncate">
|
|
119
|
-
{customerEmail}
|
|
120
|
-
</span>
|
|
121
|
-
</div>
|
|
122
|
-
|
|
123
|
-
{/* Financial info */}
|
|
124
|
-
<div className="flex flex-col gap-0.5 w-full">
|
|
125
|
-
<div className="flex items-center justify-between">
|
|
126
|
-
<span className="text-label-tertiary text-xs">Total:</span>
|
|
127
|
-
<span className="text-label-primary text-sm font-semibold">
|
|
128
|
-
£{totalAmount.toFixed(2)}
|
|
129
|
-
</span>
|
|
130
|
-
</div>
|
|
131
|
-
<div className="flex items-center justify-between">
|
|
132
|
-
<span className="text-label-tertiary text-xs">Net:</span>
|
|
133
|
-
<span className="text-label-tertiary text-xs">
|
|
134
|
-
£{netAmount.toFixed(2)}
|
|
135
|
-
</span>
|
|
136
|
-
</div>
|
|
137
|
-
</div>
|
|
138
|
-
|
|
139
|
-
{/* Activity info */}
|
|
140
|
-
<div className="flex flex-col gap-0.5 w-full pt-2 border-t border-border-primary">
|
|
141
|
-
<span className="text-label-primary text-xs font-medium">
|
|
142
|
-
{activityName}
|
|
143
|
-
</span>
|
|
144
|
-
<span className="text-label-tertiary text-xs">
|
|
145
|
-
{bookingTime}
|
|
146
|
-
</span>
|
|
147
|
-
</div>
|
|
148
|
-
|
|
149
|
-
{/* Status badge */}
|
|
150
|
-
<Badge className={`${statusColors[status] || statusColors.active} text-xs px-2 py-1`}>
|
|
151
|
-
{formatStatus(status)}
|
|
152
|
-
</Badge>
|
|
153
|
-
|
|
154
|
-
{/* Tags */}
|
|
155
|
-
{tags.length > 0 && (
|
|
156
|
-
<div className="flex flex-wrap gap-2 w-full pt-2">
|
|
157
|
-
{tags.map((tag, index) => (
|
|
158
|
-
<Badge key={index} variant="outline" className="text-xs px-2 py-0.5">
|
|
159
|
-
{tag}
|
|
160
|
-
</Badge>
|
|
161
|
-
))}
|
|
162
|
-
<Button variant="ghost" size="sm" className="text-label-tertiary text-xs hover:text-label-primary h-auto px-1 py-0.5 gap-1">
|
|
163
|
-
<IconPlus className="w-3 h-3 fill-fill-secondary" />
|
|
164
|
-
Add Tag
|
|
165
|
-
</Button>
|
|
166
|
-
</div>
|
|
167
|
-
)}
|
|
168
|
-
</div>
|
|
169
|
-
);
|
|
170
|
-
};
|