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:
1 parent
1a8604f7e6
commit
31144148d1
1 file changed
+23
-44
+23
-44
@@ -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',
|
{ label: 'Tickets', href: '/tickets', icon: <IconTicket /> },
|
||||||
links: [
|
{ label: 'Planboard', href: '/planboard', icon: <IconCalendar /> },
|
||||||
{ label: 'Tickets', href: '/tickets', icon: <IconTicket /> },
|
{ label: 'Roadmaps', href: '/roadmaps', icon: <IconRoute /> },
|
||||||
{ label: 'Planboard', href: '/planboard', icon: <IconCalendar /> },
|
{ label: 'Projekte', href: '/projects', icon: <IconFolders /> },
|
||||||
{ label: 'Roadmaps', href: '/roadmaps', icon: <IconRoute /> },
|
{ label: 'Kunden', href: '/customers', icon: <IconUsers /> },
|
||||||
{ label: 'Projekte', href: '/projects', icon: <IconFolders /> },
|
{ label: 'Leads', href: '/leads', icon: <IconTargetArrow /> },
|
||||||
],
|
{ label: 'Finanzen', href: '/finance', icon: <IconReportMoney /> },
|
||||||
},
|
...(isAdmin ? [{ label: 'Admin', href: '/admin', icon: <IconSettings /> }] : []),
|
||||||
{
|
|
||||||
label: 'CRM',
|
|
||||||
links: [
|
|
||||||
{ label: 'Kunden', href: '/customers', icon: <IconUsers /> },
|
|
||||||
{ label: 'Leads', href: '/leads', icon: <IconTargetArrow /> },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'Finanzen',
|
|
||||||
links: [{ label: 'Finanzen', href: '/finance', icon: <IconReportMoney /> }],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'System',
|
|
||||||
links: [
|
|
||||||
...(isAdmin ? [{ label: 'Admin', href: '/admin', icon: <IconSettings /> }] : []),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
|
|
||||||
const isActive = (href) =>
|
const isActive = (href) =>
|
||||||
@@ -69,23 +52,19 @@ 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}>
|
<Link
|
||||||
<div className="side-group-label">{group.label}</div>
|
key={link.href}
|
||||||
{group.links.map((link) => (
|
to={link.href}
|
||||||
<Link
|
className={`side-link ${isActive(link.href) ? 'active' : ''}`}
|
||||||
key={link.href}
|
title={link.label}
|
||||||
to={link.href}
|
>
|
||||||
className={`side-link ${isActive(link.href) ? 'active' : ''}`}
|
{link.icon}
|
||||||
title={link.label}
|
<span className="side-link-label">{link.label}</span>
|
||||||
>
|
</Link>
|
||||||
{link.icon}
|
))}
|
||||||
<span className="side-link-label">{link.label}</span>
|
</div>
|
||||||
</Link>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div className="side-foot">
|
<div className="side-foot">
|
||||||
|
|||||||
Reference in new issue
Block a user