Initial commit: MSP Monitor Dashboard
- Next.js 14 frontend with dark cyan/navy theme - tRPC API with Prisma ORM - MeshCentral, LibreNMS, Headwind MDM integrations - Multi-tenant architecture - Alert system with email/SMS/webhook notifications - Docker Compose deployment - Complete documentation
This commit is contained in:
40
src/app/(dashboard)/layout.tsx
Normal file
40
src/app/(dashboard)/layout.tsx
Normal file
@@ -0,0 +1,40 @@
|
||||
'use client'
|
||||
|
||||
import { useState, useEffect } from 'react'
|
||||
import Sidebar from '@/components/layout/Sidebar'
|
||||
import Header from '@/components/layout/Header'
|
||||
|
||||
export default function DashboardLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode
|
||||
}) {
|
||||
const [alertasActivas, setAlertasActivas] = useState(0)
|
||||
const [user, setUser] = useState({
|
||||
nombre: 'Admin',
|
||||
email: 'admin@example.com',
|
||||
rol: 'SUPER_ADMIN',
|
||||
})
|
||||
|
||||
useEffect(() => {
|
||||
// TODO: Cargar alertas activas desde API
|
||||
// TODO: Cargar usuario desde sesion
|
||||
}, [])
|
||||
|
||||
const handleLogout = async () => {
|
||||
// TODO: Implementar logout
|
||||
window.location.href = '/login'
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex h-screen bg-dark-500">
|
||||
<Sidebar alertasActivas={alertasActivas} />
|
||||
<div className="flex-1 flex flex-col overflow-hidden">
|
||||
<Header user={user} onLogout={handleLogout} />
|
||||
<main className="flex-1 overflow-y-auto p-6">
|
||||
{children}
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user