// fichaje.eu — Sidebar + Topbar shell const NAV_GROUPS = [ { label: 'INICIO', items: [ { key: 'inicio', label: 'Inicio', icon: }, { key: 'bandeja', label: 'Bandeja de entrada', icon: , badge: 3 }, { key: 'calendario',label: 'Calendario', icon: }, { key: 'descubrir', label: 'Descubrir', icon: }, ]}, { label: 'PERSONAL', items: [ { key: 'perfil', label: 'Perfil', icon: }, { key: 'ausencias', label: 'Ausencias', icon: }, { key: 'fichaje', label: 'Fichaje', icon: , live: true }, { key: 'misdocs', label: 'Mis documentos', icon: }, ]}, { label: 'EQUIPO', items: [ { key: 'tareas', label: 'Tareas', icon: }, ]}, { label: 'EMPRESA', items: [ { key: 'organizacion', label: 'Organización', icon: , adminOnly: false }, { key: 'documentos', label: 'Documentos', icon: }, ]}, { label: 'OPERACIONES', items: [ { key: 'control', label: 'Control horario', icon: , adminOnly: true }, { key: 'protocolos',label: 'Protocolos', icon: , adminOnly: true }, ]}, { label: 'CONFIGURACIÓN', items: [ { key: 'config', label: 'Configuración', icon: }, ]}, ]; const Sidebar = ({ current, onNav, role, dark = false }) => { return ( ); }; const NavItem = ({ item, active, onClick }) => { const [hover, setHover] = React.useState(false); return ( ); }; const Topbar = ({ role, onRoleChange, current, onNav }) => { const titleMap = { inicio: 'Inicio', bandeja: 'Bandeja de entrada', calendario: 'Calendario', descubrir: 'Descubrir', perfil: 'Perfil', ausencias: 'Ausencias', fichaje: 'Fichaje', misdocs: 'Mis documentos', tareas: 'Tareas', organizacion: 'Organización', documentos: 'Documentos', control: 'Control horario', protocolos: 'Protocolos', config: 'Configuración', }; return (
{titleMap[current] || 'Inicio'}
{/* Search */}
} placeholder="Buscar personas, documentos…" style={{ background: 'var(--slate-50)', borderColor: 'var(--slate-150)' }}/> ⌘K
{/* Role toggle */}
{/* Notifications */} {/* User */}
{ME.name.split(' ')[0]}
{role === 'admin' ? 'Administrador' : ME.role}
); }; Object.assign(window, { Sidebar, Topbar });