diff --git a/apps/web/src/app/(portal)/admin/layout.tsx b/apps/web/src/app/(portal)/admin/layout.tsx
new file mode 100644
index 0000000..afa4c11
--- /dev/null
+++ b/apps/web/src/app/(portal)/admin/layout.tsx
@@ -0,0 +1,41 @@
+'use client';
+
+import Link from 'next/link';
+import { useTranslations } from 'next-intl';
+import { AdminSidebar } from '@/components/admin/admin-sidebar';
+
+export default function AdminLayout({
+ children,
+}: {
+ children: React.ReactNode;
+}) {
+ const t = useTranslations('settings');
+
+ return (
+
(null);
+ const pathname = usePathname();
+
+ const isAdmin = user?.role === 'ADMIN' || user?.role === 'SUPER_ADMIN';
// Fetch current user on mount to populate auth store
useEffect(() => {
@@ -154,7 +158,28 @@ export function Header() {
+ {/* Administration link */}
+ {isAdmin && (
+
+
setDropdownOpen(false)}
+ className={`flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors ${
+ pathname.startsWith('/admin')
+ ? 'bg-muted text-foreground font-medium'
+ : 'text-foreground hover:bg-muted'
+ }`}
+ >
+
+ {tHeader('admin.label')}
+
+
+ )}
+
{/* Logout button */}
+
-
- {categoriesOpen && (
-
- {activeModules.length === 0 ? (
-
- {t('categories.empty')}
-
- ) : filteredCategories.length === 0 ? (
-
- {t('noResults')}
-
- ) : (
-
- {filteredCategories.map(([category, mods]) => (
- -
-
-
+ ))}
+
+ )}
+
>
)}
-
- {isAdmin && (
-
- {!isCollapsed && (
-
- {t('admin')}
-
- )}
-
- -
-
-
-
-
-
-
-
- {!isCollapsed && {t('users')}}
-
-
- {isSuperAdmin && (
- -
-
-
-
-
-
- {!isCollapsed && {t('tenants')}}
-
-
- )}
- -
-
-
-
-
-
-
- {!isCollapsed && {t('modules')}}
-
-
- -
-
-
-
-
-
-
- {!isCollapsed && {t('ldap')}}
-
-
-
-
- )}
@@ -250,7 +198,6 @@ export function Sidebar() {
-
);
diff --git a/apps/web/src/messages/de.json b/apps/web/src/messages/de.json
index e2a814c..917f6a9 100644
--- a/apps/web/src/messages/de.json
+++ b/apps/web/src/messages/de.json
@@ -69,6 +69,13 @@
},
"settings": "Einstellungen",
"logout": "Abmelden",
+ "admin": {
+ "label": "Administrator",
+ "users": "Benutzer",
+ "tenants": "Mandanten",
+ "modules": "Module",
+ "ldap": "LDAP"
+ },
"role": {
"SUPER_ADMIN": "Super-Admin",
"ADMIN": "Admin",
diff --git a/apps/web/src/messages/en.json b/apps/web/src/messages/en.json
index 6deef92..112cd3b 100644
--- a/apps/web/src/messages/en.json
+++ b/apps/web/src/messages/en.json
@@ -69,6 +69,13 @@
},
"settings": "Settings",
"logout": "Sign Out",
+ "admin": {
+ "label": "Administration",
+ "users": "Users",
+ "tenants": "Tenants",
+ "modules": "Modules",
+ "ldap": "LDAP"
+ },
"role": {
"SUPER_ADMIN": "Super Admin",
"ADMIN": "Admin",