From 056ea8f50217adb5d02d0ac1984c4eeac7ecd749 Mon Sep 17 00:00:00 2001 From: default Date: Tue, 2 Jun 2026 16:42:52 +0000 Subject: [PATCH] refactor: reorganize admin sidebar menu New order: - Dashboard, Orders, Stops & Routes, Products, Communications - Settings section: - General - Workers & PINs - Tasks - Users & Permissions - Integrations - Billing Removed: Route Trace, Time Tracking, Add-ons, AI, Shipping, Square Sync (moved to Integrations or removed) Added icons for users and shield --- src/components/admin/AdminSidebar.tsx | 31 ++++++++++++++++++++------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/src/components/admin/AdminSidebar.tsx b/src/components/admin/AdminSidebar.tsx index 32f2b7d..cd175f5 100644 --- a/src/components/admin/AdminSidebar.tsx +++ b/src/components/admin/AdminSidebar.tsx @@ -22,18 +22,15 @@ const NAV_ITEMS: NavItem[] = [ { href: "/admin/orders", label: "Orders", icon: "shopping-cart" }, { href: "/admin/stops", label: "Stops & Routes", icon: "map-pin" }, { href: "/admin/products", label: "Products", icon: "package" }, - { href: "/admin/route-trace", label: "Route Trace", icon: "clipboard" }, - { href: "/admin/time-tracking", label: "Time Tracking", icon: "clock" }, { href: "/admin/communications", label: "Communications", icon: "mail" }, // Settings section { divider: true, label: "Settings" }, - { href: "/admin/settings", label: "Settings", icon: "settings" }, - { href: "/admin/settings/billing", label: "Billing", icon: "billing" }, - { href: "/admin/settings/apps", label: "Add-ons", icon: "puzzle" }, + { href: "/admin/settings", label: "General", icon: "settings" }, + { href: "/admin/time-tracking", label: "Workers & PINs", icon: "users" }, + { href: "/admin/time-tracking?tab=tasks", label: "Tasks", icon: "clipboard" }, + { href: "/admin/users", label: "Users & Permissions", icon: "shield" }, { href: "/admin/settings/integrations", label: "Integrations", icon: "plug" }, - { href: "/admin/settings/ai", label: "AI", icon: "sparkles" }, - { href: "/admin/settings/shipping", label: "Shipping", icon: "truck" }, - { href: "/admin/settings/square-sync", label: "Square Sync", icon: "square" }, + { href: "/admin/settings/billing", label: "Billing", icon: "billing" }, ]; // Icon components @@ -182,6 +179,22 @@ function LogoutIcon({ className }: { className?: string }) { ); } +function UsersIcon({ className }: { className?: string }) { + return ( + + ); +} + +function ShieldIcon({ className }: { className?: string }) { + return ( + + ); +} + const ICON_MAP: Record = { grid: , "shopping-cart": , @@ -198,6 +211,8 @@ const ICON_MAP: Record = { sparkles: , truck: , square: , + users: , + shield: , }; type SidebarProps = {