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:
@@ -11,6 +11,8 @@ import {
|
|||||||
TrendingUp,
|
TrendingUp,
|
||||||
BookOpen,
|
BookOpen,
|
||||||
Settings,
|
Settings,
|
||||||
|
FileText,
|
||||||
|
UserCheck,
|
||||||
LogOut,
|
LogOut,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
|
|
||||||
@@ -24,6 +26,11 @@ const NAV_ITEMS = [
|
|||||||
{ href: "/admin/impostazioni", label: "Impostazioni", icon: Settings },
|
{ 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() {
|
export function AdminSidebar() {
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
|
|
||||||
@@ -58,8 +65,34 @@ export function AdminSidebar() {
|
|||||||
})}
|
})}
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
{/* Logout */}
|
{/* Apps */}
|
||||||
<div className="px-3 py-4 border-t border-white/10">
|
<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
|
<button
|
||||||
onClick={() => signOut({ callbackUrl: "/admin/login" })}
|
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"
|
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"
|
||||||
|
|||||||
Reference in New Issue
Block a user