mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-06 04:12:09 +00:00
refactor(menu): migrate nav icons to lucide and trim menu groups
This commit is contained in:
parent
198ba5151a
commit
59e32152c6
1 changed files with 29 additions and 41 deletions
|
|
@ -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" }],
|
||||
},
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue