From a349a58822504d7bb86b723ea7fbaa8cd4d79ec0 Mon Sep 17 00:00:00 2001 From: Adam Moussa <166072409+amoussa1229@users.noreply.github.com> Date: Mon, 20 Apr 2026 13:49:52 -0400 Subject: [PATCH] Group sidebar nav by purpose Replaces the flat 16-item list with six sections (Overview, Operations, Vendors, Customers & Sites, Internal, System) and adds section titles that collapse into dividers when the sidebar is collapsed. --- src/components/Sidebar.js | 99 +++++++++++++++++++++++++++------------ src/index.css | 34 +++++++++++++- 2 files changed, 102 insertions(+), 31 deletions(-) diff --git a/src/components/Sidebar.js b/src/components/Sidebar.js index 17de7a7b..0225b93a 100644 --- a/src/components/Sidebar.js +++ b/src/components/Sidebar.js @@ -19,29 +19,58 @@ import { FaFileInvoiceDollar, } from "react-icons/fa"; -const navItems = [ - { label: "Dashboard", icon: , path: "/" }, - { label: "Calendar", icon: , path: "/calendar" }, - { label: "Documents", icon: , path: "/documents" }, - { label: "Employees", icon: , path: "/employees" }, - { label: "Accounts", icon: , path: "/accounts" }, - { label: "Contacts", icon: , path: "/contacts" }, - { label: "Reports", icon: , path: "/reports" }, - { label: "Work Orders", icon: , path: "/workorders" }, - { label: "Vendors", icon: , path: "/vendors" }, - { label: "Vendor POs", icon: , path: "/vendor-pos" }, - { label: "Uplifts", icon: , path: "/uplifts" }, - { label: "Follow Ups", icon: , path: "/followups" }, - { label: "PM Schedules", icon: , path: "/pmschedules" }, - { label: "Assets", icon: , path: "/assets" }, - { label: "Locations", icon: , path: "/locations" }, - { label: "Settings", icon: , path: "/settings/dropdowns" }, +const navGroups = [ + { + title: "Overview", + items: [ + { label: "Dashboard", icon: , path: "/" }, + { label: "Calendar", icon: , path: "/calendar" }, + { label: "Reports", icon: , path: "/reports" }, + ], + }, + { + title: "Operations", + items: [ + { label: "Work Orders", icon: , path: "/workorders" }, + { label: "Uplifts", icon: , path: "/uplifts" }, + { label: "Follow Ups", icon: , path: "/followups" }, + { label: "PM Schedules", icon: , path: "/pmschedules" }, + ], + }, + { + title: "Vendors", + items: [ + { label: "Vendors", icon: , path: "/vendors" }, + { label: "Vendor POs", icon: , path: "/vendor-pos" }, + ], + }, + { + title: "Customers & Sites", + items: [ + { label: "Accounts", icon: , path: "/accounts" }, + { label: "Contacts", icon: , path: "/contacts" }, + { label: "Locations", icon: , path: "/locations" }, + { label: "Assets", icon: , path: "/assets" }, + ], + }, + { + title: "Internal", + items: [ + { label: "Employees", icon: , path: "/employees" }, + { label: "Documents", icon: , path: "/documents" }, + ], + }, + { + title: "System", + items: [ + { label: "Settings", icon: , path: "/settings/dropdowns" }, + ], + }, ]; export default function Sidebar() { return (