From 872acd800ad76340821e7f54d73b1c753d86a6bd Mon Sep 17 00:00:00 2001 From: VPS 4 Builder Date: Sun, 28 Jun 2026 19:14:59 +0200 Subject: [PATCH] =?UTF-8?q?fix(sidebar):=20itens=20WHATSAPP/SECRET=C3=81RI?= =?UTF-8?q?A=20usam=20isPluginActive=20(ALWAYS=5FON)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit getActivePlugins() não inclui ALWAYS_ON_PLUGINS; o gate dos itens checava activePluginIds.includes('newwhats') (sempre falso). Troca para isPluginActive ('newwhats'), que considera ALWAYS_ON — agora os menus aparecem. Co-Authored-By: Claude Opus 4.8 --- frontend/components/Sidebar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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' }); }