diff --git a/frontend/components/Sidebar.tsx b/frontend/components/Sidebar.tsx index 5ce0e90..5382c52 100644 --- a/frontend/components/Sidebar.tsx +++ b/frontend/components/Sidebar.tsx @@ -6,7 +6,7 @@ import { } from 'lucide-react'; import { ToothIcon } from './ToothIcon.tsx'; import { HybridBackend } from '../services/backend.ts'; -import { getActivePlugins } from '../views/plugins/pluginRegistry.ts'; +import { getActivePlugins, isPluginActive } from '../views/plugins/pluginRegistry.ts'; interface SidebarProps { activeTab: string; @@ -39,7 +39,7 @@ export const Sidebar: React.FC = ({ activeTab, setActiveTab }) => } // NewWhats: Inbox + Secretária IA — para TODOS os usuários quando o plugin está // ativo (a CONFIG do plugin fica no catálogo PLUGINS, exclusivo do superadmin). - if (activePluginIds.includes('newwhats')) { + if (isPluginActive('newwhats')) { pluginMenuItems.push({ id: 'wa-inbox', label: 'WHATSAPP', icon: MessageCircle, color: '#16a34a' }); pluginMenuItems.push({ id: 'wa-secretaria', label: 'SECRETÁRIA IA', icon: Bot, color: '#2563eb' }); }