/** * Navigation Structure for Admin Compliance * * Compliance-only navigation with SDK modules. * Extracted from admin-v2, keeping only compliance-relevant modules. */ export type CategoryId = 'compliance-sdk' export interface NavModule { id: string name: string href: string description: string purpose: string audience: string[] gdprArticles?: string[] oldAdminPath?: string // Reference to old admin for migration subgroup?: string // Optional subgroup for visual grouping in sidebar } export interface NavCategory { id: CategoryId name: string icon: string color: string colorClass: string description: string modules: NavModule[] } export const navigation: NavCategory[] = [ // ========================================================================= // Compliance SDK - Alle Datenschutz-, Compliance- und SDK-Module // ========================================================================= { id: 'compliance-sdk', name: 'Compliance SDK', icon: 'shield', color: '#8b5cf6', // Violet-500 colorClass: 'compliance-sdk', description: 'DSGVO, Audit, GRC & SDK-Werkzeuge', modules: [ { id: 'catalog-manager', name: 'Katalogverwaltung', href: '/dashboard/catalog-manager', description: 'SDK-Kataloge & Auswahltabellen', purpose: 'Zentrale Verwaltung aller Dropdown- und Auswahltabellen im SDK. Systemkataloge (Risiken, Massnahmen, Vorlagen) anzeigen und benutzerdefinierte Eintraege ergaenzen, bearbeiten und loeschen.', audience: ['DSB', 'Compliance Officer', 'Administratoren'], }, ], }, ] // Meta modules (always visible) export const metaModules: NavModule[] = [ { id: 'dashboard', name: 'Dashboard', href: '/dashboard', description: 'Uebersicht & Statistiken', purpose: 'Zentrale Uebersicht ueber alle Systeme mit wichtigen Kennzahlen.', audience: ['Alle'], oldAdminPath: '/admin', }, ] // Helper function to get category by ID export function getCategoryById(id: CategoryId): NavCategory | undefined { return navigation.find(cat => cat.id === id) } // Helper function to get module by href export function getModuleByHref(href: string): { category: NavCategory; module: NavModule } | undefined { for (const category of navigation) { const module = category.modules.find(m => m.href === href) if (module) { return { category, module } } } return undefined } // Helper function to get all modules flat export function getAllModules(): NavModule[] { return [...navigation.flatMap(cat => cat.modules), ...metaModules] }