diff --git a/src/components/auth/DemoRoleSwitcher.tsx b/src/components/auth/DemoRoleSwitcher.tsx index bd8ddd6..0029c03 100644 --- a/src/components/auth/DemoRoleSwitcher.tsx +++ b/src/components/auth/DemoRoleSwitcher.tsx @@ -3,14 +3,10 @@ import { UserRole } from '../../domain/enums' import { authService } from '../../services/authService' import { useSessionStore } from '../../stores/sessionStore' -const ROLE_LABELS: Record = { - [UserRole.SUPER_ADMIN]: 'Super Admin', - [UserRole.ORGANIZATION_ADMIN]: 'Org Admin', - [UserRole.PROPERTY_MANAGER]: 'Prop. Manager', - [UserRole.REVIEWER]: 'Reviewer', - [UserRole.OWNER_VIEWER]: 'Owner Viewer', - [UserRole.DEMAND_USER]: 'Demand User', -} +const DEMO_ROLES: { role: UserRole; label: string }[] = [ + { role: UserRole.PROPERTY_MANAGER, label: 'Verwaltung' }, + { role: UserRole.DEMAND_USER, label: 'Bürosuche' }, +] export function DemoRoleSwitcher() { const { currentUser } = useSessionStore() @@ -28,12 +24,12 @@ export function DemoRoleSwitcher() { Demo-Modus - {Object.values(UserRole).map((role) => { + {DEMO_ROLES.map(({ role, label }) => { const active = currentUser?.role === role return ( handleSwitch(role)} diff --git a/src/components/layout/UserMenu.tsx b/src/components/layout/UserMenu.tsx index eeedc8d..9f1b50f 100644 --- a/src/components/layout/UserMenu.tsx +++ b/src/components/layout/UserMenu.tsx @@ -7,11 +7,7 @@ import { useToastStore } from '../../stores/toastStore' import { DemoRoleSwitcher } from '../auth/DemoRoleSwitcher' const ROLE_LABELS: Record = { - SUPER_ADMIN: 'Super Admin', - ORGANIZATION_ADMIN: 'Org Admin', PROPERTY_MANAGER: 'Property Manager', - REVIEWER: 'Reviewer', - OWNER_VIEWER: 'Owner Viewer', DEMAND_USER: 'Demand User', }