From 59e32152c6bee1de9bf93f0d31414be332579cd5 Mon Sep 17 00:00:00 2001 From: Arthur Bassi Date: Wed, 17 Jun 2026 17:42:58 -0300 Subject: [PATCH] refactor(menu): migrate nav icons to lucide and trim menu groups --- src/config/menu.ts | 70 +++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 41 deletions(-) diff --git a/src/config/menu.ts b/src/config/menu.ts index cc2bfdc9..95e63a8c 100644 --- a/src/config/menu.ts +++ b/src/config/menu.ts @@ -1,24 +1,18 @@ +import type { LucideIcon } from "lucide-react"; import { - FaAddressBook, - FaBell, - FaClipboardList, - FaCog, - FaCubes, - FaDollarSign, - FaFileInvoiceDollar, - FaMapMarkerAlt, - FaMoneyCheckAlt, - FaTachometerAlt, - FaTools, - FaTruck, - FaUserTie, -} from "react-icons/fa"; -import type { IconType } from "react-icons"; + BarChart2, + BriefcaseBusiness, + Building2, + ClipboardList, + FileText, + LayoutDashboard, +} from "lucide-react"; export type NavItemDef = { label: string; - icon: IconType; + icon: LucideIcon; path: string; + badge?: number; }; export type NavGroup = { @@ -26,42 +20,36 @@ export type NavGroup = { items: NavItemDef[]; }; +export const SIDEBAR_WIDTH = 244; + +export const SIDEBAR_COLLAPSED_WIDTH = 76; + +export function getSidebarWidth(collapsed: boolean): number { + return collapsed ? SIDEBAR_COLLAPSED_WIDTH : SIDEBAR_WIDTH; +} + export const navGroups: NavGroup[] = [ { - title: "Overview", - items: [{ label: "Dashboard", icon: FaTachometerAlt, path: "/" }], - }, - { - title: "Operations", + title: "", items: [ - { label: "Work Orders", icon: FaTools, path: "/workorders" }, - { label: "Uplifts", icon: FaDollarSign, path: "/uplifts" }, - { label: "Follow Ups", icon: FaBell, path: "/followups" }, - { label: "PM Schedules", icon: FaClipboardList, path: "/pmschedules" }, + { label: "Work Orders", icon: ClipboardList, path: "/workorders", badge: 11 }, + { label: "Dashboard", icon: LayoutDashboard, path: "/" }, + { label: "Reports", icon: BarChart2, path: "/reports" }, ], }, { - title: "Vendors", + title: "VENDORS", items: [ - { label: "Vendors", icon: FaTruck, path: "/vendors" }, - { label: "Vendor POs", icon: FaFileInvoiceDollar, path: "/vendor-pos" }, + { label: "Vendors", icon: Building2, path: "/vendors" }, + { label: "Vendor POs", icon: FileText, path: "/vendor-pos" }, ], }, { - title: "Customers & Sites", - items: [ - { label: "Accounts", icon: FaMoneyCheckAlt, path: "/accounts" }, - { label: "Contacts", icon: FaAddressBook, path: "/contacts" }, - { label: "Locations", icon: FaMapMarkerAlt, path: "/locations" }, - { label: "Assets", icon: FaCubes, path: "/assets" }, - ], + title: "CUSTOMERS & SITES", + items: [{ label: "Accounts", icon: BriefcaseBusiness, path: "/accounts" }], }, { - title: "Internal", - items: [{ label: "Employees", icon: FaUserTie, path: "/employees" }], - }, - { - title: "System", - items: [{ label: "Settings", icon: FaCog, path: "/settings/dropdowns" }], + title: "INTERNAL", + items: [{ label: "Documents", icon: FileText, path: "/documents" }], }, ];