Menü als flache Liste (Paket E)

Acht Einträge ohne Gruppenüberschriften: Tickets, Planboard, Roadmaps,
Projekte, Kunden, Leads, Finanzen und für Admins Admin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Opus 5.5 committed 2026-09-27 16:19:10 +00:00
1 parent 1a8604f7e6
commit 31144148d1
1 file changed
+5 -26
+5 -26
View File
@@ -26,33 +26,16 @@ export default function Sidebar() {
navigate('/login') navigate('/login')
} }
const groups = [ // Eine flache Liste: fuer ein kleines Team reichen acht Eintraege ohne Gruppen
{ const links = [
label: 'Betrieb',
links: [
{ label: 'Tickets', href: '/tickets', icon: <IconTicket /> }, { label: 'Tickets', href: '/tickets', icon: <IconTicket /> },
{ label: 'Planboard', href: '/planboard', icon: <IconCalendar /> }, { label: 'Planboard', href: '/planboard', icon: <IconCalendar /> },
{ label: 'Roadmaps', href: '/roadmaps', icon: <IconRoute /> }, { label: 'Roadmaps', href: '/roadmaps', icon: <IconRoute /> },
{ label: 'Projekte', href: '/projects', icon: <IconFolders /> }, { label: 'Projekte', href: '/projects', icon: <IconFolders /> },
],
},
{
label: 'CRM',
links: [
{ label: 'Kunden', href: '/customers', icon: <IconUsers /> }, { label: 'Kunden', href: '/customers', icon: <IconUsers /> },
{ label: 'Leads', href: '/leads', icon: <IconTargetArrow /> }, { label: 'Leads', href: '/leads', icon: <IconTargetArrow /> },
], { label: 'Finanzen', href: '/finance', icon: <IconReportMoney /> },
},
{
label: 'Finanzen',
links: [{ label: 'Finanzen', href: '/finance', icon: <IconReportMoney /> }],
},
{
label: 'System',
links: [
...(isAdmin ? [{ label: 'Admin', href: '/admin', icon: <IconSettings /> }] : []), ...(isAdmin ? [{ label: 'Admin', href: '/admin', icon: <IconSettings /> }] : []),
],
},
] ]
const isActive = (href) => const isActive = (href) =>
@@ -69,11 +52,8 @@ export default function Sidebar() {
</div> </div>
<nav className="side-nav"> <nav className="side-nav">
{/* Gruppen ohne Eintrag (System fuer Nicht-Admins) nicht anzeigen */} <div className="side-group">
{groups.filter((group) => group.links.length > 0).map((group) => ( {links.map((link) => (
<div className="side-group" key={group.label}>
<div className="side-group-label">{group.label}</div>
{group.links.map((link) => (
<Link <Link
key={link.href} key={link.href}
to={link.href} to={link.href}
@@ -85,7 +65,6 @@ export default function Sidebar() {
</Link> </Link>
))} ))}
</div> </div>
))}
</nav> </nav>
<div className="side-foot"> <div className="side-foot">