@licklist/design 0.78.5-dev.105 → 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/index.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/DataTable/DataTable.d.ts.map +1 -1
- package/dist/v2/components/DataTable/DataTable.js +86 -2
- package/dist/v2/components/InputCheckbox/InputCheckbox.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/Toggle/Toggle.d.ts.map +1 -1
- package/dist/v2/components/Toggle/Toggle.js +8 -5
- package/dist/v2/components/ZoneCard/ZoneCard.scss.js +1 -1
- package/dist/v2/components/index.d.ts +1 -1
- package/dist/v2/components/index.d.ts.map +1 -1
- package/dist/v2/icons/index.d.ts +4 -0
- package/dist/v2/icons/index.d.ts.map +1 -1
- package/dist/v2/icons/index.js +47 -16
- package/dist/v2/index.d.ts +0 -4
- package/dist/v2/index.d.ts.map +1 -1
- package/dist/v2/pages/Settings/components/SidebarCustomisation.js +0 -3
- package/dist/v2/pages/Settings/components/SidebarNavItem.js +0 -3
- 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/InputCheckbox/InputCheckbox.scss +6 -6
- package/src/v2/components/Modal/DeleteModal.tsx +12 -20
- package/src/v2/components/Toggle/Toggle.tsx +6 -5
- package/src/v2/components/ZoneCard/ZoneCard.scss +78 -0
- package/src/v2/components/index.ts +1 -0
- package/src/v2/icons/index.tsx +10 -0
- package/src/v2/index.ts +0 -73
- package/src/v2/navigation/Navigation/Navigation.stories.tsx +137 -0
- 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,27 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IconFlows } from '../../icons';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Flows General Settings - informational content only.
|
|
6
|
-
* Flows are always required, no toggle needed.
|
|
7
|
-
*/
|
|
8
|
-
const FlowsGeneralSettings: React.FC = () => {
|
|
9
|
-
return (
|
|
10
|
-
<div className="flex flex-col gap-4 w-full">
|
|
11
|
-
<div className="flex items-start gap-4 p-4 border border-border-primary rounded-lg bg-surface-secondary">
|
|
12
|
-
<IconFlows size={48} className="fill-fill-primary flex-shrink-0" />
|
|
13
|
-
<div className="flex flex-col gap-1">
|
|
14
|
-
<span className="text-label-primary font-medium text-base">
|
|
15
|
-
Flows Configuration
|
|
16
|
-
</span>
|
|
17
|
-
<p className="text-label-secondary text-sm">
|
|
18
|
-
Configure booking flows and diary settings for your venue.
|
|
19
|
-
Manage how bookings are displayed and processed through the flows dashboard.
|
|
20
|
-
</p>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export default FlowsGeneralSettings;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { useLocation } from 'react-router-dom';
|
|
3
|
-
import SidebarLabelCustomization from './SidebarLabelCustomization';
|
|
4
|
-
import { Notification } from './NotificationBanner';
|
|
5
|
-
|
|
6
|
-
interface GeneralSettingsProps {
|
|
7
|
-
onShowNotification: (notification: Notification) => void;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const GeneralSettings: React.FC<GeneralSettingsProps> = ({ onShowNotification }) => {
|
|
11
|
-
const location = useLocation();
|
|
12
|
-
|
|
13
|
-
// Determine context
|
|
14
|
-
const isCompanyContext = location.pathname.startsWith('/company');
|
|
15
|
-
const isProviderContext = location.pathname.includes('/venue/') || location.pathname.includes('/promoter/');
|
|
16
|
-
const showLabelCustomization = isCompanyContext || isProviderContext;
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<div className="flex flex-col items-start self-stretch">
|
|
20
|
-
{showLabelCustomization && (
|
|
21
|
-
<div className="flex flex-col gap-2 w-full py-4">
|
|
22
|
-
<h2 className="text-label-primary text-xl font-semibold">Navigation</h2>
|
|
23
|
-
<SidebarLabelCustomization
|
|
24
|
-
type={isProviderContext ? 'provider' : 'company'}
|
|
25
|
-
onShowNotification={onShowNotification}
|
|
26
|
-
/>
|
|
27
|
-
</div>
|
|
28
|
-
)}
|
|
29
|
-
</div>
|
|
30
|
-
);
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export default GeneralSettings;
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { supabase } from '@/integrations/supabase/client';
|
|
3
|
-
import { useNotify } from '../hooks/useNotify';
|
|
4
|
-
import { useUserRole } from '../hooks/useUserRole';
|
|
5
|
-
import { IconProducts } from '../../icons';
|
|
6
|
-
import FeatureToggle from './FeatureToggle';
|
|
7
|
-
|
|
8
|
-
interface InventoryGeneralSettingsProps {
|
|
9
|
-
/** 'provider' uses ProviderContext, 'company' uses CompanyContext */
|
|
10
|
-
entityType: 'provider' | 'company';
|
|
11
|
-
/** The entity object (provider or company) */
|
|
12
|
-
entity: { id: string; inventory_enabled?: boolean | null } | null;
|
|
13
|
-
/** Callback to optimistically update the entity */
|
|
14
|
-
onUpdate: (updates: { inventory_enabled: boolean }) => void;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const InventoryGeneralSettings: React.FC<InventoryGeneralSettingsProps> = ({
|
|
18
|
-
entityType,
|
|
19
|
-
entity,
|
|
20
|
-
onUpdate,
|
|
21
|
-
}) => {
|
|
22
|
-
const { hasRole, isLoading: isRoleLoading } = useUserRole();
|
|
23
|
-
const { showSuccess, showError } = useNotify();
|
|
24
|
-
|
|
25
|
-
const inventoryEnabled = entity?.inventory_enabled === true;
|
|
26
|
-
|
|
27
|
-
// Only super_admin and system_admin can toggle features
|
|
28
|
-
const canToggleFeature = hasRole('super_admin') || hasRole('system_admin');
|
|
29
|
-
|
|
30
|
-
const tableName = entityType === 'provider' ? 'providers' : 'companies';
|
|
31
|
-
const entityLabel = entityType === 'provider' ? 'venue' : 'company';
|
|
32
|
-
|
|
33
|
-
const handleInventoryToggle = async (checked: boolean) => {
|
|
34
|
-
if (!entity || !canToggleFeature) return;
|
|
35
|
-
|
|
36
|
-
// Optimistically update context immediately
|
|
37
|
-
onUpdate({ inventory_enabled: checked });
|
|
38
|
-
|
|
39
|
-
try {
|
|
40
|
-
const { error } = await supabase
|
|
41
|
-
.from(tableName)
|
|
42
|
-
.update({ inventory_enabled: checked })
|
|
43
|
-
.eq('id', entity.id);
|
|
44
|
-
|
|
45
|
-
if (error) throw error;
|
|
46
|
-
|
|
47
|
-
showSuccess(`Inventory ${checked ? 'enabled' : 'disabled'}`);
|
|
48
|
-
} catch (error) {
|
|
49
|
-
// Revert on error
|
|
50
|
-
onUpdate({ inventory_enabled: !checked });
|
|
51
|
-
console.error('Error updating inventory setting:', error);
|
|
52
|
-
showError('Failed to update inventory setting');
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
const title = inventoryEnabled ? 'Inventory Enabled' : 'Inventory Disabled';
|
|
57
|
-
const description = inventoryEnabled
|
|
58
|
-
? entityType === 'provider'
|
|
59
|
-
? 'Manage your products and activities for this venue.'
|
|
60
|
-
: 'Manage shared products and activities across all venues in this company.'
|
|
61
|
-
: entityType === 'provider'
|
|
62
|
-
? 'Inventory is currently disabled. Enable to manage products and activities for your venue.'
|
|
63
|
-
: 'Inventory is currently disabled. Enable to manage shared products and activities for your company.';
|
|
64
|
-
|
|
65
|
-
// Don't show lock state until we know the user's role
|
|
66
|
-
const showLocked = !isRoleLoading && !canToggleFeature;
|
|
67
|
-
|
|
68
|
-
return (
|
|
69
|
-
<div className="flex flex-col gap-4 w-full">
|
|
70
|
-
<FeatureToggle
|
|
71
|
-
icon={<IconProducts size={48} className="fill-fill-primary" />}
|
|
72
|
-
title={title}
|
|
73
|
-
description={description}
|
|
74
|
-
enabled={inventoryEnabled}
|
|
75
|
-
onToggle={handleInventoryToggle}
|
|
76
|
-
isLocked={showLocked}
|
|
77
|
-
/>
|
|
78
|
-
</div>
|
|
79
|
-
);
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
export default InventoryGeneralSettings;
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './ui/select';
|
|
3
|
-
import { AVAILABLE_LANGUAGES, getLanguageLabel } from '@/i18n';
|
|
4
|
-
import { useAppSettings } from '@/contexts/AppSettingsContext';
|
|
5
|
-
import { IconGlobe } from '../../icons';
|
|
6
|
-
import { supabase } from '@/integrations/supabase/client';
|
|
7
|
-
import { Notification } from './NotificationBanner';
|
|
8
|
-
|
|
9
|
-
interface LanguageSelectorProps {
|
|
10
|
-
type: 'provider' | 'company';
|
|
11
|
-
entityId: string;
|
|
12
|
-
currentLanguage: string;
|
|
13
|
-
onLanguageChange: (language: string) => void;
|
|
14
|
-
onShowNotification: (notification: Notification) => void;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const LanguageSelector: React.FC<LanguageSelectorProps> = ({
|
|
18
|
-
type,
|
|
19
|
-
entityId,
|
|
20
|
-
currentLanguage,
|
|
21
|
-
onLanguageChange,
|
|
22
|
-
onShowNotification,
|
|
23
|
-
}) => {
|
|
24
|
-
const { settings } = useAppSettings();
|
|
25
|
-
|
|
26
|
-
// Only show languages that are enabled globally
|
|
27
|
-
const availableLanguages = AVAILABLE_LANGUAGES.filter(
|
|
28
|
-
lang => settings.supportedLanguages.includes(lang.code)
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
// If translation is not enabled globally, don't show the selector
|
|
32
|
-
if (!settings.languageTranslationEnabled) {
|
|
33
|
-
return (
|
|
34
|
-
<div className="flex flex-col gap-2 w-full">
|
|
35
|
-
<h3 className="text-label-primary text-base font-semibold leading-[1.2rem]">Language Settings</h3>
|
|
36
|
-
<div className="flex items-center gap-3 p-3 border border-border-primary rounded-lg bg-surface-secondary">
|
|
37
|
-
<IconGlobe size={20} className="text-fill-secondary flex-shrink-0" />
|
|
38
|
-
<span className="text-label-secondary text-sm">
|
|
39
|
-
Language translation is currently disabled. Contact your administrator to enable it.
|
|
40
|
-
</span>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const handleChange = async (newLanguage: string) => {
|
|
47
|
-
const table = type === 'provider' ? 'providers' : 'companies';
|
|
48
|
-
|
|
49
|
-
try {
|
|
50
|
-
const { error } = await supabase
|
|
51
|
-
.from(table)
|
|
52
|
-
.update({ language: newLanguage } as any)
|
|
53
|
-
.eq('id', entityId);
|
|
54
|
-
|
|
55
|
-
if (error) throw error;
|
|
56
|
-
|
|
57
|
-
onLanguageChange(newLanguage);
|
|
58
|
-
onShowNotification({
|
|
59
|
-
type: 'success',
|
|
60
|
-
title: 'Language Updated',
|
|
61
|
-
message: `Dashboard language has been set to ${getLanguageLabel(newLanguage)}.`,
|
|
62
|
-
});
|
|
63
|
-
} catch (error) {
|
|
64
|
-
console.error('Error updating language:', error);
|
|
65
|
-
onShowNotification({
|
|
66
|
-
type: 'error',
|
|
67
|
-
title: 'Update Failed',
|
|
68
|
-
message: 'An error occurred while updating the language setting.',
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
return (
|
|
74
|
-
<div className="flex flex-col gap-2 w-full">
|
|
75
|
-
<h3 className="text-label-primary text-base font-semibold leading-[1.2rem]">Language Settings</h3>
|
|
76
|
-
<p className="text-label-secondary text-sm">
|
|
77
|
-
Set the display language for this dashboard. Admin users will always see the interface in English.
|
|
78
|
-
</p>
|
|
79
|
-
<div className="max-w-xs">
|
|
80
|
-
<Select value={currentLanguage} onValueChange={handleChange}>
|
|
81
|
-
<SelectTrigger className="bg-surface-secondary border-border-primary">
|
|
82
|
-
<SelectValue placeholder="Select Language" />
|
|
83
|
-
</SelectTrigger>
|
|
84
|
-
<SelectContent>
|
|
85
|
-
{availableLanguages.map((lang) => (
|
|
86
|
-
<SelectItem key={lang.code} value={lang.code}>
|
|
87
|
-
{lang.label}
|
|
88
|
-
</SelectItem>
|
|
89
|
-
))}
|
|
90
|
-
</SelectContent>
|
|
91
|
-
</Select>
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
);
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
export default LanguageSelector;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import LoadingSpinner from './LoadingSpinner';
|
|
3
|
-
|
|
4
|
-
interface LoadingScreenProps {
|
|
5
|
-
message?: string;
|
|
6
|
-
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const LoadingScreen: React.FC<LoadingScreenProps> = ({
|
|
10
|
-
message = 'Loading...',
|
|
11
|
-
size = 'lg'
|
|
12
|
-
}) => {
|
|
13
|
-
return (
|
|
14
|
-
<div className="flex flex-col items-center justify-center flex-1 self-stretch gap-4 animate-fade-in py-12">
|
|
15
|
-
<LoadingSpinner size={size} />
|
|
16
|
-
{message && (
|
|
17
|
-
<p className="text-label-secondary text-sm font-medium animate-pulse">
|
|
18
|
-
{message}
|
|
19
|
-
</p>
|
|
20
|
-
)}
|
|
21
|
-
</div>
|
|
22
|
-
);
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export default LoadingScreen;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { DotLottieReact } from '@lottiefiles/dotlottie-react';
|
|
3
|
-
import { useTheme } from './ThemeProvider';
|
|
4
|
-
import loaderDark from '@/assets/Loader_Dark.lottie';
|
|
5
|
-
import loaderLight from '@/assets/Loader_Light.lottie';
|
|
6
|
-
|
|
7
|
-
interface LoadingSpinnerProps {
|
|
8
|
-
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
9
|
-
className?: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const LoadingSpinner: React.FC<LoadingSpinnerProps> = ({
|
|
13
|
-
size = 'md',
|
|
14
|
-
className = ''
|
|
15
|
-
}) => {
|
|
16
|
-
const { theme } = useTheme();
|
|
17
|
-
|
|
18
|
-
const sizeClasses = {
|
|
19
|
-
sm: 'w-16 h-16',
|
|
20
|
-
md: 'w-24 h-24',
|
|
21
|
-
lg: 'w-32 h-32',
|
|
22
|
-
xl: 'w-48 h-48'
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
// Use dark loader for dark theme, light loader for light theme
|
|
26
|
-
const loaderSrc = theme === 'dark' ? loaderDark : loaderLight;
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<div className={`flex items-center justify-center ${className}`}>
|
|
30
|
-
<div className={sizeClasses[size]}>
|
|
31
|
-
<DotLottieReact
|
|
32
|
-
src={loaderSrc}
|
|
33
|
-
loop
|
|
34
|
-
autoplay
|
|
35
|
-
/>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export default LoadingSpinner;
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { supabase } from '@/integrations/supabase/client';
|
|
3
|
-
import { useNavigate } from 'react-router-dom';
|
|
4
|
-
|
|
5
|
-
interface ManagedClient {
|
|
6
|
-
id: string;
|
|
7
|
-
name: string;
|
|
8
|
-
type: 'company' | 'venue' | 'promoter';
|
|
9
|
-
friendly_id: string;
|
|
10
|
-
avatar_url: string | null;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
interface ManagedClientsListProps {
|
|
14
|
-
userId: string;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const ManagedClientsList: React.FC<ManagedClientsListProps> = ({ userId }) => {
|
|
18
|
-
const [clients, setClients] = useState<ManagedClient[]>([]);
|
|
19
|
-
const [isLoading, setIsLoading] = useState(true);
|
|
20
|
-
const navigate = useNavigate();
|
|
21
|
-
|
|
22
|
-
useEffect(() => {
|
|
23
|
-
const fetchClients = async () => {
|
|
24
|
-
setIsLoading(true);
|
|
25
|
-
try {
|
|
26
|
-
const [companiesRes, providersRes] = await Promise.all([
|
|
27
|
-
supabase
|
|
28
|
-
.from('companies')
|
|
29
|
-
.select('id, name, company_id, avatar_url')
|
|
30
|
-
.eq('account_manager_id', userId),
|
|
31
|
-
supabase
|
|
32
|
-
.from('providers')
|
|
33
|
-
.select('id, name, type, venue_id, avatar_url')
|
|
34
|
-
.eq('account_manager_id', userId),
|
|
35
|
-
]);
|
|
36
|
-
|
|
37
|
-
const items: ManagedClient[] = [];
|
|
38
|
-
|
|
39
|
-
if (companiesRes.data) {
|
|
40
|
-
items.push(...companiesRes.data.map(c => ({
|
|
41
|
-
id: c.id,
|
|
42
|
-
name: c.name,
|
|
43
|
-
type: 'company' as const,
|
|
44
|
-
friendly_id: c.company_id || c.id.slice(0, 8),
|
|
45
|
-
avatar_url: c.avatar_url,
|
|
46
|
-
})));
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
if (providersRes.data) {
|
|
50
|
-
items.push(...providersRes.data.map(p => ({
|
|
51
|
-
id: p.id,
|
|
52
|
-
name: p.name,
|
|
53
|
-
type: (p.type === 'promoter' ? 'promoter' : 'venue') as ManagedClient['type'],
|
|
54
|
-
friendly_id: p.venue_id || p.id.slice(0, 8),
|
|
55
|
-
avatar_url: p.avatar_url,
|
|
56
|
-
})));
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
setClients(items);
|
|
60
|
-
} catch (error) {
|
|
61
|
-
console.error('Error fetching managed clients:', error);
|
|
62
|
-
} finally {
|
|
63
|
-
setIsLoading(false);
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
fetchClients();
|
|
68
|
-
}, [userId]);
|
|
69
|
-
|
|
70
|
-
if (isLoading || clients.length === 0) return null;
|
|
71
|
-
|
|
72
|
-
const typeLabel = (type: ManagedClient['type']) =>
|
|
73
|
-
type === 'company' ? 'Company' : type === 'venue' ? 'Venue' : 'Promoter';
|
|
74
|
-
|
|
75
|
-
const handleClick = (client: ManagedClient) => {
|
|
76
|
-
if (client.type === 'company') {
|
|
77
|
-
navigate(`/admin/companies/${client.id}`);
|
|
78
|
-
} else {
|
|
79
|
-
navigate(`/admin/providers/${client.id}`);
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
return (
|
|
84
|
-
<div className="flex flex-col gap-4 p-6 bg-surface-primary border border-border-primary rounded-lg">
|
|
85
|
-
<h2 className="text-label-primary text-lg font-semibold">Managed Clients</h2>
|
|
86
|
-
<p className="text-label-secondary text-sm">
|
|
87
|
-
{clients.length} {clients.length === 1 ? 'client' : 'clients'} assigned to this account manager.
|
|
88
|
-
</p>
|
|
89
|
-
<div className="flex flex-col gap-2">
|
|
90
|
-
{clients.map(client => (
|
|
91
|
-
<button
|
|
92
|
-
key={`${client.type}-${client.id}`}
|
|
93
|
-
type="button"
|
|
94
|
-
onClick={() => handleClick(client)}
|
|
95
|
-
className="flex items-center gap-3 p-4 bg-surface-secondary border border-border-primary rounded-lg text-left w-full hover:bg-surface-primary-hover transition-colors"
|
|
96
|
-
>
|
|
97
|
-
<div className="w-10 h-10 rounded-full flex items-center justify-center flex-shrink-0 overflow-hidden bg-fill-secondary/20 border border-border-primary">
|
|
98
|
-
{client.avatar_url ? (
|
|
99
|
-
<img src={client.avatar_url} alt={client.name} className="w-full h-full object-cover" />
|
|
100
|
-
) : (
|
|
101
|
-
<span className="text-label-secondary font-bold text-sm">
|
|
102
|
-
{client.name[0]?.toUpperCase() || '?'}
|
|
103
|
-
</span>
|
|
104
|
-
)}
|
|
105
|
-
</div>
|
|
106
|
-
<div className="flex flex-col gap-0.5 flex-1">
|
|
107
|
-
<span className="text-label-primary font-medium text-sm">{client.name}</span>
|
|
108
|
-
<div className="flex justify-center items-center gap-2 bg-surface-tertiary px-2 py-1 rounded-lg w-fit">
|
|
109
|
-
<span className="text-label-secondary text-[10px] leading-3 font-mono font-semibold whitespace-nowrap">
|
|
110
|
-
{typeLabel(client.type)} ID: {client.friendly_id}
|
|
111
|
-
</span>
|
|
112
|
-
</div>
|
|
113
|
-
</div>
|
|
114
|
-
</button>
|
|
115
|
-
))}
|
|
116
|
-
</div>
|
|
117
|
-
</div>
|
|
118
|
-
);
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
export default ManagedClientsList;
|