155 lines
5.2 KiB
TypeScript
155 lines
5.2 KiB
TypeScript
import type { IconSvgElement } from '@hugeicons/react'
|
|
import {
|
|
DashboardSquare01Icon,
|
|
Location01Icon,
|
|
Route01Icon,
|
|
Car01Icon,
|
|
Building02Icon,
|
|
Package01Icon,
|
|
CatalogueIcon,
|
|
BarCode01Icon,
|
|
Layers01Icon,
|
|
Discount01Icon,
|
|
DiscountTag01Icon,
|
|
UserGroupIcon,
|
|
Store01Icon,
|
|
UserShield01Icon,
|
|
ShieldUserIcon,
|
|
LicenseDraftIcon,
|
|
LicenseIcon,
|
|
ShoppingCart01Icon,
|
|
PackageReceiveIcon,
|
|
TruckIcon,
|
|
DeliveryBox01Icon,
|
|
DeliveryTruck01Icon,
|
|
DollarSquareIcon,
|
|
ClipboardListIcon,
|
|
BankIcon,
|
|
PackageMoving01Icon,
|
|
} from '@hugeicons/core-free-icons'
|
|
|
|
export interface NavItem {
|
|
title: string
|
|
href: string
|
|
icon: IconSvgElement
|
|
permission?: string
|
|
}
|
|
|
|
export interface NavGroup {
|
|
title: string
|
|
icon: IconSvgElement
|
|
items: NavItem[]
|
|
}
|
|
|
|
// Standalone item rendered at top — not inside any collapsible group
|
|
export const DASHBOARD_ITEM: NavItem = {
|
|
title: 'Dashboard',
|
|
href: '/',
|
|
icon: DashboardSquare01Icon,
|
|
}
|
|
|
|
export const NAV_GROUPS: NavGroup[] = [
|
|
{
|
|
title: 'Master Data',
|
|
icon: Building02Icon,
|
|
items: [
|
|
{ title: 'Regions', href: '/master/regions', icon: Location01Icon, permission: 'regions.view' },
|
|
{ title: 'Routes', href: '/master/routes', icon: Route01Icon, permission: 'routes.view' },
|
|
{ title: 'Vehicles', href: '/master/vehicles', icon: Car01Icon, permission: 'vehicles.view' },
|
|
{ title: 'Warehouses', href: '/master/warehouses', icon: Building02Icon, permission: 'warehouses.view' },
|
|
],
|
|
},
|
|
{
|
|
title: 'Catalogue',
|
|
icon: CatalogueIcon,
|
|
items: [
|
|
{ title: 'Items', href: '/catalogue/items', icon: Package01Icon, permission: 'items.view' },
|
|
{ title: 'Categories', href: '/catalogue/categories', icon: CatalogueIcon, permission: 'categories.view' },
|
|
{ title: 'Brands', href: '/catalogue/brands', icon: BarCode01Icon, permission: 'categories.view' },
|
|
{ title: 'UOMs', href: '/catalogue/uoms', icon: Layers01Icon, permission: 'categories.view' },
|
|
],
|
|
},
|
|
{
|
|
title: 'Pricing',
|
|
icon: Discount01Icon,
|
|
items: [
|
|
{ title: 'Price Lists', href: '/pricing/price-lists', icon: Discount01Icon, permission: 'pricelists.view' },
|
|
{ title: 'Schemes', href: '/pricing/schemes', icon: DiscountTag01Icon, permission: 'schemes.view' },
|
|
],
|
|
},
|
|
{
|
|
title: 'Suppliers',
|
|
icon: UserGroupIcon,
|
|
items: [
|
|
{ title: 'Suppliers', href: '/suppliers', icon: UserGroupIcon, permission: 'suppliers.view' },
|
|
],
|
|
},
|
|
{
|
|
title: 'Stores',
|
|
icon: Store01Icon,
|
|
items: [
|
|
{ title: 'Stores', href: '/stores', icon: Store01Icon, permission: 'stores.view' },
|
|
],
|
|
},
|
|
{
|
|
title: 'Users & Access',
|
|
icon: UserShield01Icon,
|
|
items: [
|
|
{ title: 'Users', href: '/users', icon: UserShield01Icon, permission: 'users.view' },
|
|
{ title: 'Roles', href: '/users/roles', icon: ShieldUserIcon, permission: 'roles.view' },
|
|
],
|
|
},
|
|
{
|
|
title: 'Drivers',
|
|
icon: LicenseDraftIcon,
|
|
items: [
|
|
{ title: 'Driver Profiles', href: '/drivers', icon: LicenseDraftIcon, permission: 'driver_profiles.view' },
|
|
{ title: 'Compliance', href: '/drivers/compliance', icon: LicenseIcon, permission: 'compliance.manage' },
|
|
],
|
|
},
|
|
{
|
|
title: 'Procurement',
|
|
icon: ShoppingCart01Icon,
|
|
items: [
|
|
{ title: 'Purchase Orders', href: '/procurement/orders', icon: ShoppingCart01Icon, permission: 'purchase_orders.view' },
|
|
{ title: 'Goods Receipt', href: '/procurement/grn', icon: PackageReceiveIcon, permission: 'purchase_orders.view' },
|
|
],
|
|
},
|
|
{
|
|
title: 'Operations',
|
|
icon: TruckIcon,
|
|
items: [
|
|
{ title: 'Rides', href: '/operations/rides', icon: TruckIcon, permission: 'rides.view' },
|
|
{ title: 'Loading Sheets', href: '/operations/loading', icon: DeliveryBox01Icon, permission: 'loading.view' },
|
|
{ title: 'Delivery Tasks', href: '/operations/deliveries', icon: DeliveryTruck01Icon, permission: 'rides.view' },
|
|
],
|
|
},
|
|
{
|
|
title: 'Sales & Orders',
|
|
icon: DollarSquareIcon,
|
|
items: [
|
|
{ title: 'Sales', href: '/sales', icon: DollarSquareIcon, permission: 'orders.view' },
|
|
{ title: 'Orders', href: '/sales/orders', icon: ClipboardListIcon, permission: 'orders.view' },
|
|
{ title: 'Payments', href: '/sales/payments', icon: BankIcon, permission: 'orders.view' },
|
|
],
|
|
},
|
|
{
|
|
title: 'Stock',
|
|
icon: PackageMoving01Icon,
|
|
items: [
|
|
{ title: 'Stock Balances', href: '/stock', icon: Package01Icon, permission: 'warehouses.view' },
|
|
{ title: 'Stock Movements', href: '/stock/movements', icon: PackageMoving01Icon, permission: 'warehouses.view' },
|
|
],
|
|
},
|
|
]
|
|
|
|
// Ordered candidates for mobile bottom nav — first 5 visible are shown
|
|
export const BOTTOM_NAV_CANDIDATES: NavItem[] = [
|
|
{ title: 'Home', href: '/', icon: DashboardSquare01Icon },
|
|
{ title: 'Stores', href: '/stores', icon: Store01Icon, permission: 'stores.view' },
|
|
{ title: 'Rides', href: '/operations/rides', icon: TruckIcon, permission: 'rides.view' },
|
|
{ title: 'Loading', href: '/operations/loading', icon: DeliveryBox01Icon, permission: 'loading.view' },
|
|
{ title: 'Sales', href: '/sales', icon: DollarSquareIcon, permission: 'orders.view' },
|
|
{ title: 'Items', href: '/catalogue/items', icon: Package01Icon, permission: 'items.view' },
|
|
]
|