Remove duplicate compliance and DSGVO admin pages that have been superseded by the unified SDK pipeline. Update navigation, sidebar, roles, and module registry to reflect the new structure. Add DSFA corpus API proxy and source-policy components. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
533 lines
20 KiB
TypeScript
533 lines
20 KiB
TypeScript
/**
|
|
* Navigation Structure for Admin v2
|
|
*
|
|
* Main categories with color-coded modules.
|
|
* All DSGVO and Compliance modules are now consolidated under the SDK.
|
|
*/
|
|
|
|
export type CategoryId = 'compliance-sdk' | 'ai' | 'infrastructure' | 'education' | 'communication' | 'development' | 'website' | 'sdk-docs'
|
|
|
|
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'],
|
|
},
|
|
],
|
|
},
|
|
// =========================================================================
|
|
// KI & Automatisierung
|
|
// =========================================================================
|
|
{
|
|
id: 'ai',
|
|
name: 'KI & Automatisierung',
|
|
icon: 'brain',
|
|
color: '#14b8a6', // Teal
|
|
colorClass: 'ai',
|
|
description: 'LLM, OCR, RAG & Machine Learning',
|
|
modules: [
|
|
// -----------------------------------------------------------------------
|
|
// KI-Daten-Pipeline: Magic Help -> OCR -> Indexierung -> Suche
|
|
// -----------------------------------------------------------------------
|
|
{
|
|
id: 'magic-help',
|
|
name: 'Magic Help (TrOCR)',
|
|
href: '/ai/magic-help',
|
|
description: 'TrOCR Testing & Fine-Tuning',
|
|
purpose: 'Testen und verbessern Sie die TrOCR-Handschrifterkennung. Laden Sie Bilder hoch, um die OCR-Qualitaet zu pruefen, und trainieren Sie das Modell mit LoRA Fine-Tuning. Bidirektionaler Austausch mit OCR-Labeling.',
|
|
audience: ['Entwickler', 'Administratoren', 'QA'],
|
|
oldAdminPath: '/admin/magic-help',
|
|
subgroup: 'KI-Daten-Pipeline',
|
|
},
|
|
{
|
|
id: 'ocr-labeling',
|
|
name: 'OCR-Labeling',
|
|
href: '/ai/ocr-labeling',
|
|
description: 'Handschrift-Training & Labels',
|
|
purpose: 'Labeln Sie Handschrift-Samples fuer das Training von TrOCR-Modellen. Erstellen Sie Ground Truth Daten, die zur RAG Pipeline exportiert werden koennen.',
|
|
audience: ['Entwickler', 'Data Scientists', 'QA'],
|
|
oldAdminPath: '/admin/ocr-labeling',
|
|
subgroup: 'KI-Daten-Pipeline',
|
|
},
|
|
{
|
|
id: 'rag-pipeline',
|
|
name: 'RAG Pipeline',
|
|
href: '/ai/rag-pipeline',
|
|
description: 'Dokument-Indexierung',
|
|
purpose: 'RAG-Pipeline fuer Bildungsdokumente: NiBiS Erwartungshorizonte, Schulordnungen, Custom EH. OCR, Chunking und Vektor-Indexierung in Qdrant.',
|
|
audience: ['Entwickler', 'Data Scientists', 'Bildungs-Admins'],
|
|
oldAdminPath: '/admin/training',
|
|
subgroup: 'KI-Daten-Pipeline',
|
|
},
|
|
{
|
|
id: 'rag',
|
|
name: 'Daten & RAG',
|
|
href: '/ai/rag',
|
|
description: 'Vektor-Suche & Collections',
|
|
purpose: 'Verwalten und durchsuchen Sie indexierte Dokumente. Zeigt Status aller Qdrant Collections und ermoeglicht semantische Suche.',
|
|
audience: ['Entwickler', 'Data Scientists', 'Compliance Officer'],
|
|
oldAdminPath: '/admin/rag',
|
|
subgroup: 'KI-Daten-Pipeline',
|
|
},
|
|
// -----------------------------------------------------------------------
|
|
// KI-Werkzeuge: Standalone-Tools fuer Entwicklung & QA
|
|
// -----------------------------------------------------------------------
|
|
{
|
|
id: 'llm-compare',
|
|
name: 'LLM Vergleich',
|
|
href: '/ai/llm-compare',
|
|
description: 'KI-Provider Vergleich',
|
|
purpose: 'Vergleichen Sie verschiedene LLM-Anbieter (Ollama, OpenAI, Anthropic) hinsichtlich Qualitaet, Geschwindigkeit und Kosten. Standalone-Werkzeug fuer Modell-Evaluation.',
|
|
audience: ['Entwickler', 'Data Scientists'],
|
|
oldAdminPath: '/admin/llm-compare',
|
|
subgroup: 'KI-Werkzeuge',
|
|
},
|
|
{
|
|
id: 'ocr-compare',
|
|
name: 'OCR Vergleich',
|
|
href: '/ai/ocr-compare',
|
|
description: 'OCR-Methoden & Vokabel-Extraktion',
|
|
purpose: 'Vergleichen Sie verschiedene OCR-Methoden (lokales LLM, Vision LLM, PaddleOCR, Tesseract, Anthropic) fuer Vokabel-Extraktion. Grid-Overlay, Block-Review und LLM-Vergleich.',
|
|
audience: ['Entwickler', 'Data Scientists', 'Lehrer'],
|
|
subgroup: 'KI-Werkzeuge',
|
|
},
|
|
{
|
|
id: 'test-quality',
|
|
name: 'Test Quality (BQAS)',
|
|
href: '/ai/test-quality',
|
|
description: 'Golden Suite, RAG & Synthetic Tests',
|
|
purpose: 'BQAS Dashboard mit Golden Suite (97 Referenz-Tests), RAG/Korrektur Tests und Synthetic Test Generierung. Ueberwacht die Qualitaet der KI-Ausgaben.',
|
|
audience: ['Entwickler', 'Data Scientists', 'QA'],
|
|
oldAdminPath: '/admin/quality',
|
|
subgroup: 'KI-Werkzeuge',
|
|
},
|
|
{
|
|
id: 'gpu',
|
|
name: 'GPU Infrastruktur',
|
|
href: '/ai/gpu',
|
|
description: 'vast.ai GPU Management',
|
|
purpose: 'Verwalten Sie GPU-Instanzen auf vast.ai fuer ML-Training und Inferenz.',
|
|
audience: ['DevOps', 'Entwickler'],
|
|
oldAdminPath: '/admin/gpu',
|
|
subgroup: 'KI-Werkzeuge',
|
|
},
|
|
// -----------------------------------------------------------------------
|
|
// KI-Anwendungen: Endnutzer-orientierte KI-Module
|
|
// -----------------------------------------------------------------------
|
|
{
|
|
id: 'agents',
|
|
name: 'Agent Management',
|
|
href: '/ai/agents',
|
|
description: 'Multi-Agent System & SOUL-Editor',
|
|
purpose: 'Verwaltung des Multi-Agent-Systems. Bearbeiten Sie Agent-Persoenlichkeiten (SOUL-Files), ueberwachen Sie Sessions und analysieren Sie Agent-Statistiken. Architektur-Dokumentation fuer Entwickler.',
|
|
audience: ['Entwickler', 'Lehrer', 'Admins'],
|
|
subgroup: 'KI-Anwendungen',
|
|
},
|
|
],
|
|
},
|
|
// =========================================================================
|
|
// Infrastruktur & DevOps
|
|
// =========================================================================
|
|
{
|
|
id: 'infrastructure',
|
|
name: 'Infrastruktur & DevOps',
|
|
icon: 'server',
|
|
color: '#f97316', // Orange
|
|
colorClass: 'infrastructure',
|
|
description: 'GPU, Security, CI/CD & Monitoring',
|
|
modules: [
|
|
{
|
|
id: 'ci-cd',
|
|
name: 'CI/CD',
|
|
href: '/infrastructure/ci-cd',
|
|
description: 'Pipelines, Deployments & Container',
|
|
purpose: 'CI/CD Dashboard mit Gitea Actions Pipelines, Deployment-Status und Container-Management.',
|
|
audience: ['DevOps', 'Entwickler'],
|
|
subgroup: 'DevOps Pipeline',
|
|
},
|
|
{
|
|
id: 'tests',
|
|
name: 'Test Dashboard',
|
|
href: '/infrastructure/tests',
|
|
description: 'Test-Suites, Coverage & CI/CD',
|
|
purpose: 'Zentrales Dashboard fuer alle 280+ Tests. Unit (Go, Python), Integration, E2E (Playwright) und BQAS Quality Tests. Aggregiert Tests aus allen Services ohne physische Migration.',
|
|
audience: ['Entwickler', 'QA', 'DevOps'],
|
|
subgroup: 'DevOps Pipeline',
|
|
},
|
|
{
|
|
id: 'sbom',
|
|
name: 'SBOM',
|
|
href: '/infrastructure/sbom',
|
|
description: 'Software Bill of Materials',
|
|
purpose: 'Verwalten Sie alle Software-Abhaengigkeiten und deren Lizenzen.',
|
|
audience: ['DevOps', 'Compliance'],
|
|
oldAdminPath: '/admin/sbom',
|
|
subgroup: 'DevOps Pipeline',
|
|
},
|
|
{
|
|
id: 'security',
|
|
name: 'Security',
|
|
href: '/infrastructure/security',
|
|
description: 'DevSecOps Dashboard & Scans',
|
|
purpose: 'Security-Scans, Vulnerability-Reports und OWASP-Compliance.',
|
|
audience: ['DevOps', 'Security'],
|
|
oldAdminPath: '/admin/security',
|
|
subgroup: 'DevOps Pipeline',
|
|
},
|
|
{
|
|
id: 'middleware',
|
|
name: 'Middleware',
|
|
href: '/infrastructure/middleware',
|
|
description: 'Middleware Stack & API Gateway',
|
|
purpose: 'Ueberwachen und testen Sie den Middleware-Stack und API Gateway.',
|
|
audience: ['DevOps'],
|
|
oldAdminPath: '/admin/middleware',
|
|
subgroup: 'Infrastructure',
|
|
},
|
|
],
|
|
},
|
|
// =========================================================================
|
|
// Bildung & Schule
|
|
// =========================================================================
|
|
{
|
|
id: 'education',
|
|
name: 'Bildung & Schule',
|
|
icon: 'graduation',
|
|
color: '#3b82f6', // Blue
|
|
colorClass: 'education',
|
|
description: 'Bildungsquellen & Lehrplaene',
|
|
modules: [
|
|
{
|
|
id: 'edu-search',
|
|
name: 'Education Search',
|
|
href: '/education/edu-search',
|
|
description: 'Bildungsquellen & Crawler',
|
|
purpose: 'Verwalten Sie Bildungsquellen und konfigurieren Sie Crawler fuer neue Inhalte.',
|
|
audience: ['Content Manager'],
|
|
oldAdminPath: '/admin/edu-search',
|
|
},
|
|
{
|
|
id: 'zeugnisse-crawler',
|
|
name: 'Zeugnisse-Crawler',
|
|
href: '/education/zeugnisse-crawler',
|
|
description: 'Zeugnis-Daten',
|
|
purpose: 'Verwalten Sie gecrawlte Zeugnis-Strukturen und -Formate.',
|
|
audience: ['Entwickler'],
|
|
oldAdminPath: '/admin/zeugnisse-crawler',
|
|
},
|
|
{
|
|
id: 'abitur-archiv',
|
|
name: 'Abitur-Archiv',
|
|
href: '/education/abitur-archiv',
|
|
description: 'Zentralabitur-Materialien 2021-2025',
|
|
purpose: 'Durchsuchen und filtern Sie Abitur-Aufgaben und Erwartungshorizonte. Themensuche mit semantischer Suche via RAG. Integration mit Klausur-Korrektur fuer schnelle Vorlagen-Nutzung.',
|
|
audience: ['Lehrer', 'Entwickler'],
|
|
},
|
|
{
|
|
id: 'klausur-korrektur',
|
|
name: 'Klausur-Korrektur',
|
|
href: '/education/klausur-korrektur',
|
|
description: 'Abitur-Korrektur mit KI',
|
|
purpose: 'KI-gestuetzte Korrektur von Abitur- und Vorabitur-Klausuren. Nutzt die RAG-Pipeline fuer Erwartungshorizont-Vorschlaege.',
|
|
audience: ['Lehrer', 'Entwickler'],
|
|
oldAdminPath: '/admin/klausur-korrektur',
|
|
},
|
|
],
|
|
},
|
|
// =========================================================================
|
|
// Kommunikation & Alerts
|
|
// =========================================================================
|
|
{
|
|
id: 'communication',
|
|
name: 'Kommunikation & Alerts',
|
|
icon: 'mail',
|
|
color: '#22c55e', // Green
|
|
colorClass: 'communication',
|
|
description: 'Matrix, E-Mail & Benachrichtigungen',
|
|
modules: [
|
|
{
|
|
id: 'video-chat',
|
|
name: 'Video & Chat',
|
|
href: '/communication/video-chat',
|
|
description: 'Matrix & Jitsi Monitoring',
|
|
purpose: 'Dashboard fuer Matrix Synapse (E2EE Messaging) und Jitsi Meet (Videokonferenzen). Ueberwachen Sie Service-Status, aktive Meetings, Traffic und SysEleven Ressourcenplanung.',
|
|
audience: ['Admins', 'DevOps', 'Support'],
|
|
oldAdminPath: '/admin/communication',
|
|
},
|
|
{
|
|
id: 'matrix',
|
|
name: 'Voice Service',
|
|
href: '/communication/matrix',
|
|
description: 'Voice-First Interface & Architektur',
|
|
purpose: 'Konfigurieren und testen Sie den Voice-Service (PersonaPlex-7B, TaskOrchestrator). Dokumentation der Voice-First Architektur mit DSGVO-Compliance.',
|
|
audience: ['Entwickler', 'Admins'],
|
|
oldAdminPath: '/admin/voice',
|
|
},
|
|
{
|
|
id: 'mail',
|
|
name: 'Unified Inbox',
|
|
href: '/communication/mail',
|
|
description: 'E-Mail-Konten & KI-Analyse',
|
|
purpose: 'Verwalten Sie E-Mail-Konten und nutzen Sie KI zur Kategorisierung.',
|
|
audience: ['Support', 'Admins'],
|
|
oldAdminPath: '/admin/mail',
|
|
},
|
|
{
|
|
id: 'alerts',
|
|
name: 'Alerts Monitoring',
|
|
href: '/communication/alerts',
|
|
description: 'Google Alerts & Feed-Ueberwachung',
|
|
purpose: 'Ueberwachen Sie Google Alerts und RSS-Feeds fuer relevante Neuigkeiten.',
|
|
audience: ['Marketing', 'Admins'],
|
|
oldAdminPath: '/admin/alerts',
|
|
},
|
|
],
|
|
},
|
|
// =========================================================================
|
|
// Entwicklung & Produkte
|
|
// =========================================================================
|
|
{
|
|
id: 'development',
|
|
name: 'Entwicklung & Produkte',
|
|
icon: 'code',
|
|
color: '#64748b', // Slate
|
|
colorClass: 'development',
|
|
description: 'Workflow, Game, Docs & Brandbook',
|
|
modules: [
|
|
{
|
|
id: 'workflow',
|
|
name: 'Dev Workflow',
|
|
href: '/development/workflow',
|
|
description: 'Git, CI/CD & Team-Regeln',
|
|
purpose: 'Entwicklungs-Workflow mit Git, CI/CD Pipeline und Team-Konventionen. Pflichtlektuere fuer alle Entwickler.',
|
|
audience: ['Entwickler', 'DevOps'],
|
|
},
|
|
{
|
|
id: 'docs',
|
|
name: 'Developer Docs',
|
|
href: '/development/docs',
|
|
description: 'API & Architektur',
|
|
purpose: 'Durchsuchen Sie die API-Dokumentation und Architektur-Diagramme.',
|
|
audience: ['Entwickler'],
|
|
oldAdminPath: '/admin/docs',
|
|
},
|
|
{
|
|
id: 'brandbook',
|
|
name: 'Brandbook',
|
|
href: '/development/brandbook',
|
|
description: 'Corporate Design',
|
|
purpose: 'Referenz fuer Logos, Farben, Typografie und Design-Richtlinien.',
|
|
audience: ['Designer', 'Marketing'],
|
|
oldAdminPath: '/admin/brandbook',
|
|
},
|
|
{
|
|
id: 'screen-flow',
|
|
name: 'Screen Flow',
|
|
href: '/development/screen-flow',
|
|
description: 'UI Screen-Verbindungen',
|
|
purpose: 'Visualisieren Sie die Navigation und Screen-Verbindungen der App.',
|
|
audience: ['Designer', 'Entwickler'],
|
|
oldAdminPath: '/admin/screen-flow',
|
|
},
|
|
],
|
|
},
|
|
// =========================================================================
|
|
// Website
|
|
// =========================================================================
|
|
{
|
|
id: 'website',
|
|
name: 'Website',
|
|
icon: 'globe',
|
|
color: '#0ea5e9', // Sky-500
|
|
colorClass: 'website',
|
|
description: 'Website Content & Management',
|
|
modules: [
|
|
{
|
|
id: 'uebersetzungen',
|
|
name: 'Uebersetzungen',
|
|
href: '/website/uebersetzungen',
|
|
description: 'Website Content & Sprachen',
|
|
purpose: 'Verwalten Sie Website-Inhalte und Uebersetzungen.',
|
|
audience: ['Content Manager'],
|
|
oldAdminPath: '/admin/content',
|
|
},
|
|
{
|
|
id: 'manager',
|
|
name: 'Website Manager',
|
|
href: '/website/manager',
|
|
description: 'CMS Dashboard',
|
|
purpose: 'Visuelles CMS-Dashboard fuer die BreakPilot Website. Alle Sektionen bearbeiten mit Live-Preview.',
|
|
audience: ['Content Manager', 'Entwickler'],
|
|
},
|
|
],
|
|
},
|
|
// =========================================================================
|
|
// SDK Dokumentation
|
|
// =========================================================================
|
|
{
|
|
id: 'sdk-docs',
|
|
name: 'SDK Dokumentation',
|
|
icon: 'code-2',
|
|
color: '#06b6d4', // Cyan
|
|
colorClass: 'sdk-docs',
|
|
description: 'Consent SDK Dokumentation & Integration',
|
|
modules: [
|
|
{
|
|
id: 'consent-sdk',
|
|
name: 'Consent SDK',
|
|
href: '/developers/sdk/consent',
|
|
description: 'DSGVO/TTDSG-konformes Consent Management',
|
|
purpose: 'Vollstaendige Dokumentation des Consent SDK fuer Web, PWA und Mobile Apps. Inklusive Framework-Integrationen (React, Vue, Angular) und Mobile SDKs (iOS, Android, Flutter).',
|
|
audience: ['Entwickler', 'Frontend-Entwickler', 'Mobile-Entwickler'],
|
|
gdprArticles: ['Art. 6', 'Art. 7', 'Art. 13', 'Art. 14', 'Art. 17', 'Art. 20'],
|
|
},
|
|
{
|
|
id: 'sdk-installation',
|
|
name: 'Installation',
|
|
href: '/developers/sdk/consent/installation',
|
|
description: 'SDK Installation & Setup',
|
|
purpose: 'Schritt-fuer-Schritt Anleitung zur Installation des Consent SDK in verschiedenen Umgebungen.',
|
|
audience: ['Entwickler'],
|
|
},
|
|
{
|
|
id: 'sdk-frameworks',
|
|
name: 'Frameworks',
|
|
href: '/developers/sdk/consent/frameworks',
|
|
description: 'React, Vue, Angular Integration',
|
|
purpose: 'Framework-spezifische Integrationen mit Hooks, Composables und Services.',
|
|
audience: ['Frontend-Entwickler'],
|
|
},
|
|
{
|
|
id: 'sdk-mobile',
|
|
name: 'Mobile SDKs',
|
|
href: '/developers/sdk/consent/mobile',
|
|
description: 'iOS, Android, Flutter',
|
|
purpose: 'Native Mobile SDKs fuer iOS (Swift), Android (Kotlin) und Flutter (Dart).',
|
|
audience: ['Mobile-Entwickler'],
|
|
},
|
|
{
|
|
id: 'sdk-api',
|
|
name: 'API Referenz',
|
|
href: '/developers/sdk/consent/api-reference',
|
|
description: 'Vollstaendige API-Dokumentation',
|
|
purpose: 'Detaillierte Dokumentation aller Methoden, Konfigurationsoptionen und Events.',
|
|
audience: ['Entwickler'],
|
|
},
|
|
{
|
|
id: 'sdk-security',
|
|
name: 'Sicherheit',
|
|
href: '/developers/sdk/consent/security',
|
|
description: 'Security Best Practices',
|
|
purpose: 'Sicherheits-Features, DSGVO/TTDSG Compliance-Hinweise und Best Practices.',
|
|
audience: ['Entwickler', 'DSB', 'Security'],
|
|
gdprArticles: ['Art. 6', 'Art. 7', '§ 25 TTDSG'],
|
|
},
|
|
],
|
|
},
|
|
]
|
|
|
|
// 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',
|
|
},
|
|
{
|
|
id: 'architecture',
|
|
name: 'Architektur',
|
|
href: '/architecture',
|
|
description: 'Backend-Module & Datenfluss',
|
|
purpose: 'Uebersicht aller Backend-Module und deren Verbindung zum Frontend. Essentiell fuer Migration und Audit.',
|
|
audience: ['Entwickler', 'DevOps', 'Auditoren', 'Manager'],
|
|
},
|
|
{
|
|
id: 'onboarding',
|
|
name: 'Onboarding',
|
|
href: '/onboarding',
|
|
description: 'Lern-Wizards',
|
|
purpose: 'Gefuehrte Tutorials fuer neue Benutzer.',
|
|
audience: ['Alle'],
|
|
oldAdminPath: '/admin/onboarding',
|
|
},
|
|
{
|
|
id: 'backlog',
|
|
name: 'Production Backlog',
|
|
href: '/backlog',
|
|
description: 'Go-Live Checkliste',
|
|
purpose: 'Verfolgen Sie den Fortschritt zum Production-Launch.',
|
|
audience: ['Entwickler', 'Manager'],
|
|
oldAdminPath: '/admin/backlog',
|
|
},
|
|
{
|
|
id: 'rbac',
|
|
name: 'RBAC',
|
|
href: '/rbac',
|
|
description: 'Rollen & Berechtigungen',
|
|
purpose: 'Verwalten Sie Benutzerrollen und Zugriffsrechte.',
|
|
audience: ['Admins', 'DSB'],
|
|
oldAdminPath: '/admin/rbac',
|
|
},
|
|
]
|
|
|
|
// 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]
|
|
}
|