mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-07 09:19:19 +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 {
|
import {
|
||||||
FaAddressBook,
|
BarChart2,
|
||||||
FaBell,
|
BriefcaseBusiness,
|
||||||
FaClipboardList,
|
Building2,
|
||||||
FaCog,
|
ClipboardList,
|
||||||
FaCubes,
|
FileText,
|
||||||
FaDollarSign,
|
LayoutDashboard,
|
||||||
FaFileInvoiceDollar,
|
} from "lucide-react";
|
||||||
FaMapMarkerAlt,
|
|
||||||
FaMoneyCheckAlt,
|
|
||||||
FaTachometerAlt,
|
|
||||||
FaTools,
|
|
||||||
FaTruck,
|
|
||||||
FaUserTie,
|
|
||||||
} from "react-icons/fa";
|
|
||||||
import type { IconType } from "react-icons";
|
|
||||||
|
|
||||||
export type NavItemDef = {
|
export type NavItemDef = {
|
||||||
label: string;
|
label: string;
|
||||||
icon: IconType;
|
icon: LucideIcon;
|
||||||
path: string;
|
path: string;
|
||||||
|
badge?: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type NavGroup = {
|
export type NavGroup = {
|
||||||
|
|
@ -26,42 +20,36 @@ export type NavGroup = {
|
||||||
items: NavItemDef[];
|
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[] = [
|
export const navGroups: NavGroup[] = [
|
||||||
{
|
{
|
||||||
title: "Overview",
|
title: "",
|
||||||
items: [{ label: "Dashboard", icon: FaTachometerAlt, path: "/" }],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Operations",
|
|
||||||
items: [
|
items: [
|
||||||
{ label: "Work Orders", icon: FaTools, path: "/workorders" },
|
{ label: "Work Orders", icon: ClipboardList, path: "/workorders", badge: 11 },
|
||||||
{ label: "Uplifts", icon: FaDollarSign, path: "/uplifts" },
|
{ label: "Dashboard", icon: LayoutDashboard, path: "/" },
|
||||||
{ label: "Follow Ups", icon: FaBell, path: "/followups" },
|
{ label: "Reports", icon: BarChart2, path: "/reports" },
|
||||||
{ label: "PM Schedules", icon: FaClipboardList, path: "/pmschedules" },
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Vendors",
|
title: "VENDORS",
|
||||||
items: [
|
items: [
|
||||||
{ label: "Vendors", icon: FaTruck, path: "/vendors" },
|
{ label: "Vendors", icon: Building2, path: "/vendors" },
|
||||||
{ label: "Vendor POs", icon: FaFileInvoiceDollar, path: "/vendor-pos" },
|
{ label: "Vendor POs", icon: FileText, path: "/vendor-pos" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Customers & Sites",
|
title: "CUSTOMERS & SITES",
|
||||||
items: [
|
items: [{ label: "Accounts", icon: BriefcaseBusiness, path: "/accounts" }],
|
||||||
{ 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: "Internal",
|
title: "INTERNAL",
|
||||||
items: [{ label: "Employees", icon: FaUserTie, path: "/employees" }],
|
items: [{ label: "Documents", icon: FileText, path: "/documents" }],
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "System",
|
|
||||||
items: [{ label: "Settings", icon: FaCog, path: "/settings/dropdowns" }],
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue