mirror of
http://172.20.10.11:3000/gitadmin/INSIGHT-MVP.git
synced 2026-06-24 22:46:39 +02:00
- Admin section moved to dedicated area with horizontal tab navigation - Sidebar now shows gear icon link to Administration (PLATFORM_ADMIN only) - External links management page for configuring sidebar shortcuts - External links displayed in sidebar for all authenticated users - Backend: Redis-based CRUD endpoints for external link configuration Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
61 lines
1.6 KiB
TypeScript
61 lines
1.6 KiB
TypeScript
import { Outlet, NavLink, useNavigate } from 'react-router-dom';
|
|
import styles from './AdminLayout.module.css';
|
|
|
|
const tabs = [
|
|
{ to: '/admin/users', label: 'Benutzer' },
|
|
{ to: '/admin/tenants', label: 'Mandanten' },
|
|
{ to: '/admin/sso', label: 'SSO-Konfiguration' },
|
|
{ to: '/admin/external-links', label: 'Externe Links' },
|
|
];
|
|
|
|
export function AdminLayout() {
|
|
const navigate = useNavigate();
|
|
|
|
return (
|
|
<div>
|
|
{/* Header mit Zurück-Button und Tabs */}
|
|
<div className={styles.header}>
|
|
<div className={styles.headerTop}>
|
|
<button
|
|
className={styles.backButton}
|
|
onClick={() => navigate('/')}
|
|
>
|
|
<svg
|
|
width="16"
|
|
height="16"
|
|
viewBox="0 0 16 16"
|
|
fill="none"
|
|
stroke="currentColor"
|
|
strokeWidth="2"
|
|
strokeLinecap="round"
|
|
strokeLinejoin="round"
|
|
>
|
|
<path d="M10 12L6 8l4-4" />
|
|
</svg>
|
|
Zurück zum Dashboard
|
|
</button>
|
|
<h1 className={styles.title}>Administration</h1>
|
|
</div>
|
|
|
|
<nav className={styles.tabs}>
|
|
{tabs.map((tab) => (
|
|
<NavLink
|
|
key={tab.to}
|
|
to={tab.to}
|
|
className={({ isActive }) =>
|
|
`${styles.tab} ${isActive ? styles.tabActive : ''}`
|
|
}
|
|
>
|
|
{tab.label}
|
|
</NavLink>
|
|
))}
|
|
</nav>
|
|
</div>
|
|
|
|
{/* Content */}
|
|
<div className={styles.content}>
|
|
<Outlet />
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|