feat: add app shortcuts to sidebar (quotes + crm leads)

- Add 'App' section in sidebar footer
- Link to 'Nuovo Preventivo' (/admin/quotes/new)
- Link to 'CRM Lead' (/admin/leads)
- Uses FileText and UserCheck icons from lucide-react
- Same styling as main nav items with active state

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-06-11 15:06:10 +02:00
parent 0bca8a6c4d
commit 5d75752e2d
+34 -1
View File
@@ -11,6 +11,8 @@ import {
TrendingUp,
BookOpen,
Settings,
FileText,
UserCheck,
LogOut,
} from "lucide-react";
@@ -24,6 +26,11 @@ const NAV_ITEMS = [
{ href: "/admin/impostazioni", label: "Impostazioni", icon: Settings },
];
const APP_ITEMS = [
{ href: "/admin/quotes/new", label: "Nuovo Preventivo", icon: FileText },
{ href: "/admin/leads", label: "CRM Lead", icon: UserCheck },
];
export function AdminSidebar() {
const pathname = usePathname();
@@ -58,8 +65,34 @@ export function AdminSidebar() {
})}
</nav>
{/* Logout */}
{/* Apps */}
<div className="px-3 py-4 border-t border-white/10">
<div className="text-xs font-semibold text-white/50 uppercase tracking-wider mb-3 px-3">
App
</div>
<div className="flex flex-col gap-0.5">
{APP_ITEMS.map(({ href, label, icon: Icon }) => {
const active = isActive(href);
return (
<Link
key={href}
href={href}
className={`flex items-center gap-3 px-3 py-2 rounded-md text-sm transition-colors ${
active
? "bg-white/15 text-white font-medium"
: "text-white/65 hover:text-white hover:bg-white/10"
}`}
>
<Icon size={16} strokeWidth={1.8} />
{label}
</Link>
);
})}
</div>
</div>
{/* Logout */}
<div className="px-3 py-3 border-t border-white/10">
<button
onClick={() => signOut({ callbackUrl: "/admin/login" })}
className="flex items-center gap-3 px-3 py-2 w-full rounded-md text-sm text-white/65 hover:text-white hover:bg-white/10 transition-colors"