import { erfordereBenutzer } from '@/lib/auth/rechte'; import { Kopfzeile, type Navigationseintrag } from '@/komponenten/Kopfzeile'; import { Netzzustand } from '@/komponenten/Netzzustand'; import { abmelden } from '../anmelden/aktionen'; export const dynamic = 'force-dynamic'; // Die Navigation wächst mit den Bausteinen mit – hier stehen nur Ziele, // die es auch wirklich gibt. const fuerAzubi: Navigationseintrag[] = [ { pfad: '/', titel: 'Woche' }, { pfad: '/handouts', titel: 'Handouts' }, { pfad: '/karten', titel: 'Merkkarten' }, { pfad: '/aufgaben', titel: 'Aufgaben' }, { pfad: '/checklisten', titel: 'Checklisten' }, { pfad: '/berichtsheft', titel: 'Berichtsheft' }, { pfad: '/kontrollen', titel: 'Kontrollen' }, { pfad: '/auswertung', titel: 'Mein Stand' }, { pfad: '/feedback', titel: 'Feedback' }, { pfad: '/glossar', titel: 'Glossar' }, ]; const fuerAusbilder: Navigationseintrag[] = [ { pfad: '/', titel: 'Überblick' }, { pfad: '/wochenplan', titel: 'Wochenplan' }, { pfad: '/handouts', titel: 'Handouts' }, { pfad: '/karten', titel: 'Merkkarten' }, { pfad: '/aufgaben', titel: 'Aufgaben' }, { pfad: '/checklisten', titel: 'Checklisten' }, { pfad: '/berichtsheft', titel: 'Berichtshefte' }, { pfad: '/kontrollen', titel: 'Kontrollen' }, { pfad: '/auswertung', titel: 'Auswertung' }, { pfad: '/feedback', titel: 'Feedback' }, { pfad: '/glossar', titel: 'Glossar' }, { pfad: '/verwaltung', titel: 'Verwaltung' }, ]; export default async function AngemeldetLayout({ children }: { children: React.ReactNode }) { const benutzer = await erfordereBenutzer(); const eintraege = benutzer.rolle === 'ausbilder' ? fuerAusbilder : fuerAzubi; return ( <> Zum Inhalt springen
{children}
); }