From fd3f93afa3880c38a1e149bf757c220149c1828b Mon Sep 17 00:00:00 2001 From: Gabriel Santana de Menezes Date: Sun, 3 May 2026 19:39:06 -0400 Subject: [PATCH] Organizacao ativa --- frontend/src/components/AppShell.tsx | 92 ++++++++++++++++++++++++++- frontend/src/contexts/AuthContext.tsx | 34 +++++++++- 2 files changed, 121 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/AppShell.tsx b/frontend/src/components/AppShell.tsx index dce2094..204161f 100644 --- a/frontend/src/components/AppShell.tsx +++ b/frontend/src/components/AppShell.tsx @@ -1,10 +1,11 @@ import React, { useState } from 'react' -import { Layout, ListTodo, PlusCircle, Columns, LogOut, Settings, Building2, Clock } from 'lucide-react' +import { Layout, ListTodo, PlusCircle, Columns, LogOut, Settings, Building2, Clock, ChevronDown, Shield } from 'lucide-react' import { NavLink, Outlet, Navigate } from 'react-router-dom' import { useAuth } from '../contexts/AuthContext' import { OnboardingModal } from './OnboardingModal' import { cn } from '../lib/utils' +import { motion } from 'framer-motion' const navLinkClassName = ({ isActive }: { isActive: boolean }) => cn( @@ -15,8 +16,9 @@ const navLinkClassName = ({ isActive }: { isActive: boolean }) => ) export function AppShell() { - const { user, isAuthenticated, isLoading, logout } = useAuth() + const { user, isAuthenticated, isLoading, logout, activeOrg, setActiveOrg } = useAuth() const [showOrgModal, setShowOrgModal] = useState(false) + const [showOrgSwitcher, setShowOrgSwitcher] = useState(false) if (isLoading) { return ( @@ -50,6 +52,92 @@ export function AppShell() { +
+ + {/* Org Switcher */} +
+ + + {showOrgSwitcher && ( + <> +
setShowOrgSwitcher(false)} + /> + +
+ Suas Organizações +
+
+ {user?.organizations.map((org) => ( + + ))} +
+
+ +
+
+ + )} +
+