refactor(admin-lehrer): Rename to Admin Lehrer KI and remove migrated categories

Remove communication, infrastructure, and development categories from
navigation (now in Admin Core on port 3008). Rename Admin v2 to
Admin Lehrer KI in sidebar, header, and browser title.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Boenisch
2026-02-12 20:23:16 +01:00
parent e22019b2d5
commit 8c1f7a783f
5 changed files with 112 additions and 171 deletions

View File

@@ -1,13 +1,12 @@
/**
* Role-based Access System for Admin-Lehrer
* Role-based Access System for Admin v2
*
* Roles determine which categories and modules are visible.
* SDK-specific roles (auditor, dsb) removed for Lehrer frontend.
* Roles determine which categories and modules are visible
*/
import { CategoryId } from './navigation'
export type RoleId = 'developer' | 'manager'
export type RoleId = 'developer' | 'manager' | 'auditor' | 'dsb'
export interface Role {
id: RoleId
@@ -24,7 +23,7 @@ export const roles: Role[] = [
name: 'Entwickler',
description: 'Voller Zugriff auf alle Bereiche',
icon: 'code',
visibleCategories: ['ai', 'infrastructure', 'education', 'communication', 'development', 'website'],
visibleCategories: ['compliance-sdk', 'ai', 'education', 'website'],
color: 'bg-primary-100 border-primary-300 text-primary-700',
},
{
@@ -32,13 +31,29 @@ export const roles: Role[] = [
name: 'Manager',
description: 'Executive Uebersicht',
icon: 'chart',
visibleCategories: ['communication', 'website'],
visibleCategories: ['compliance-sdk', 'website'],
color: 'bg-blue-100 border-blue-300 text-blue-700',
},
{
id: 'auditor',
name: 'Auditor',
description: 'Compliance Pruefung',
icon: 'clipboard',
visibleCategories: ['compliance-sdk'],
color: 'bg-amber-100 border-amber-300 text-amber-700',
},
{
id: 'dsb',
name: 'DSB',
description: 'Datenschutzbeauftragter',
icon: 'shield',
visibleCategories: ['compliance-sdk'],
color: 'bg-purple-100 border-purple-300 text-purple-700',
},
]
// Storage key for localStorage
const ROLE_STORAGE_KEY = 'admin-lehrer-selected-role'
const ROLE_STORAGE_KEY = 'admin-v2-selected-role'
// Get role by ID
export function getRoleById(id: RoleId): Role | undefined {