mirror of
http://172.20.10.11:3000/gitadmin/INSIGHT-MVP.git
synced 2026-06-24 23:56:40 +02:00
Stammdaten (Kapitel 14):
- 5 neue Prisma-Modelle: Department, Location, CostCenter, JobTitle, SkillCategory
- MasterDataModule (Core Service): vollständiges CRUD + öffentliche Dropdown-Endpoints
- Admin-UI /admin/master-data mit 5 Tabs, Inline-Edit, Farbwahl (Skill-Kategorien)
CRM Reporting (Kapitel 22.9):
- recharts ^2.12.0 installiert
- Deals: GET /deals/stats (Win/Loss-Rate, Umsatz, Trend, Verlustgründe)
- Aktivitäten: GET /activities/stats (nach Typ, Completion-Rate, offene Tasks)
- Reports-Seite /crm/reports: LineChart, PieChart, BarChart mit Zeitraum-Filter
Hilfesystem (Kapitel 16):
- @anthropic-ai/sdk installiert; ANTHROPIC_API_KEY optional in .env
- HelpModule (Core Service): POST /help/chat via Claude Haiku
- HelpTooltip-Komponente: Hover-Tooltip für Formularfelder
- HelpPanel: seitlicher Drawer mit Seitenkontext + KI-Chat
- ❓-Button im Topbar (AppLayout), pageKey aus Route abgeleitet
Migration erforderlich: prisma migrate deploy (core-service)
Deployment: core rebuild, crm rebuild, frontend rebuild
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
67 lines
1.9 KiB
TypeScript
67 lines
1.9 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/sso', label: 'SSO-Konfiguration' },
|
|
{ to: '/admin/external-links', label: 'Externe Links' },
|
|
{ to: '/admin/customize', label: 'Anpassungen' },
|
|
{ to: '/admin/company', label: 'Firmendaten' },
|
|
{ to: '/admin/events', label: 'Events' },
|
|
{ to: '/admin/ssl', label: 'SSL / Domain' },
|
|
{ to: '/admin/profile-access', label: 'Profilzugriff' },
|
|
{ to: '/admin/crm-settings', label: 'CRM Sichtbarkeit' },
|
|
{ to: '/admin/master-data', label: 'Stammdaten' },
|
|
];
|
|
|
|
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>
|
|
);
|
|
}
|