126 lines
3.9 KiB
TypeScript
126 lines
3.9 KiB
TypeScript
/**
|
|
* 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' | 'development'
|
|
|
|
export interface NavModule {
|
|
id: string
|
|
name: string
|
|
href: string
|
|
description: string
|
|
purpose: string
|
|
audience: string[]
|
|
gdprArticles?: string[]
|
|
oldAdminPath?: string
|
|
subgroup?: string
|
|
}
|
|
|
|
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'],
|
|
},
|
|
],
|
|
},
|
|
// =========================================================================
|
|
// Development - Entwickler-Tools und Dokumentation
|
|
// =========================================================================
|
|
{
|
|
id: 'development',
|
|
name: 'Entwicklung & Produkte',
|
|
icon: 'code',
|
|
color: '#64748b', // Slate-500
|
|
colorClass: 'development',
|
|
description: 'Dokumentation, Screenflow & Brandbook',
|
|
modules: [
|
|
{
|
|
id: 'docs',
|
|
name: 'Developer Docs',
|
|
href: '/development/docs',
|
|
description: 'MkDocs Projekt-Dokumentation',
|
|
purpose: 'Technische Dokumentation der Compliance-Plattform mit Architektur, API-Referenz und Entwickler-Guides.',
|
|
audience: ['Entwickler', 'Architekten'],
|
|
},
|
|
{
|
|
id: 'screen-flow',
|
|
name: 'Screen Flow',
|
|
href: '/development/screen-flow',
|
|
description: 'UI Screen-Verbindungen & Navigation',
|
|
purpose: 'Visualisierung aller SDK-Screens und deren Verbindungen mit interaktivem ReactFlow-Diagramm.',
|
|
audience: ['Entwickler', 'Designer'],
|
|
},
|
|
{
|
|
id: 'brandbook',
|
|
name: 'Brandbook',
|
|
href: '/development/brandbook',
|
|
description: 'Corporate Design & Styleguide',
|
|
purpose: 'Compliance SDK Design-System mit Farben, Typografie, Komponenten und Tonalitaet.',
|
|
audience: ['Entwickler', 'Designer'],
|
|
},
|
|
],
|
|
},
|
|
]
|
|
|
|
// 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]
|
|
}
|