Files
hats-app/lib/data-sidebar.tsx
T
Ichsan Kurniawan b149903b2e Add hierarchical role permission controls
Make parent menus gate child permissions and cascade select or clear actions through descendants. Update role detail rendering for nested menus and the revised API shape, with related RBAC UI and sidebar adjustments.
2026-11-05 21:59:25 +07:00

168 lines
4.2 KiB
TypeScript

import { LayoutDashboard, Settings, MonitorSmartphone, Database, ShieldAlert, FileText, ScanFace, MenuSquare, CalendarX2, FolderGit2, ShieldCheck } from 'lucide-react'
const SIDEBAR_MENU = [
{
title: "Dashboard",
Icon: <LayoutDashboard size={18} />,
path: ''
},
{
title: "Administration",
Icon: <ShieldAlert size={18} />,
submenuId: 1,
submenuItems: [
{
title: "Company",
path: '/administration/company'
},
{
title: "Area",
path: '/administration/area'
},
{
title: "Division",
path: '/administration/division'
},
{
title: "User",
path: '/administration/user'
},
]
},
{
title: "RBAC",
Icon: <ShieldCheck size={18} />,
submenuId: 7,
submenuItems: [
{
title: "Access Permissions",
path: '/rbac/action-permissions'
},
{
title: "Menu Management",
path: '/rbac/menu'
},
{
title: "User Role",
path: '/rbac/user-role'
},
]
},
{
title: "Device",
Icon: <MonitorSmartphone size={18} />,
submenuId: 2,
submenuItems: [
{
title: "Device",
path: '/device/device'
},
{
title: "Device Type",
path: '/device/device-type'
},
]
},
{
title: "Global Parameter",
Icon: <Settings size={18} />,
path: '/global-parameter'
},
{
title: "Day Off",
Icon: <CalendarX2 size={18} />,
path: '/day-off'
},
{
title: "Report",
Icon: <Database size={18} />,
submenuId: 3,
submenuItems: [
{
title: "Attendance History",
path: '/report/history'
},
{
title: "Attendance Distribution",
path: '/report/distribution'
},
{
title: "Leave, Permit & Sick",
path: '/report/leave-permit-sick'
},
{
title: "Summary Report",
path: '/report/monthly-presence'
}
]
},
{
title: "Audit Trail",
Icon: <FileText size={18} />,
path: '/audit-trail'
},
{
title: "Manual Attendance & Approval",
submenuId: 4,
Icon: <ScanFace size={18} />,
submenuItems: [
{
title: "Manual Attendance",
path: '/manual/manual-presence'
},
{
title: "Approval Non WFO",
path: '/manual/approval'
},
{
title: "Approval Auto Checkout",
path: '/manual/approval-autocheckout'
}
]
},
{
title: "Project Assignment",
Icon: <FolderGit2 size={18} />,
submenuId: 5,
submenuItems: [
{
title: "Client",
path: '/project-assignment/client'
},
{
title: "End User",
path: '/project-assignment/end-user'
},
{
title: "Project Management",
path: '/project-assignment/project-management'
},
]
},
{
title: "Information",
Icon: <ShieldAlert size={18} />,
submenuId: 6,
submenuItems: [
{
title: "Master Status",
path: '/information/master-status'
},
{
title: "Working Status",
path: '/information/working-status'
},
{
title: "Employee Position",
path: '/information/position'
},
{
title: "Employee Type",
path: '/information/employee-type'
},
]
},
]
export default SIDEBAR_MENU