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
This commit is contained in:
2026-06-02 16:42:52 +00:00
parent 12947b88ba
commit 056ea8f502
+23 -8
View File
@@ -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 (
<svg className={className ?? "w-4 h-4"} fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={1.5} aria-hidden="true">
<path strokeLinecap="round" strokeLinejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" />
</svg>
);
}
function ShieldIcon({ className }: { className?: string }) {
return (
<svg className={className ?? "w-4 h-4"} fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={1.5} aria-hidden="true">
<path strokeLinecap="round" strokeLinejoin="round" d="M9 12.75L11.25 15 15 9.75m-3-7.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285z" />
</svg>
);
}
const ICON_MAP: Record<string, React.ReactNode> = {
grid: <GridIcon />,
"shopping-cart": <CartIcon />,
@@ -198,6 +211,8 @@ const ICON_MAP: Record<string, React.ReactNode> = {
sparkles: <SparkleIcon />,
truck: <TruckIcon />,
square: <SquareIcon />,
users: <UsersIcon />,
shield: <ShieldIcon />,
};
type SidebarProps = {