Files
expert-front/src/core/data/sidebarMenu.jsx

259 lines
11 KiB
JavaScript

import SpaceDashboardIcon from "@mui/icons-material/SpaceDashboard";
import DirectionsRailwayIcon from "@mui/icons-material/DirectionsRailway";
import AssignmentIndIcon from "@mui/icons-material/AssignmentInd";
import DesktopWindowsIcon from "@mui/icons-material/DesktopWindows";
import GavelIcon from "@mui/icons-material/Gavel";
import BusinessCenterIcon from "@mui/icons-material/BusinessCenter";
import PollIcon from '@mui/icons-material/Poll';
import PaidIcon from "@mui/icons-material/Paid";
import ManageAccountsIcon from "@mui/icons-material/ManageAccounts";
import PersonIcon from "@mui/icons-material/Person";
import AccessibilityIcon from "@mui/icons-material/Accessibility";
import AssessmentIcon from "@mui/icons-material/Assessment";
import SecurityIcon from "@mui/icons-material/Security";
import SettingsIcon from "@mui/icons-material/Settings";
import RepartitionIcon from "@mui/icons-material/Repartition";
import AccountBalanceIcon from "@mui/icons-material/AccountBalance";
import RepeatIcon from "@mui/icons-material/Repeat";
import DisplaySettingsIcon from '@mui/icons-material/DisplaySettings';
const sidebarMenu = [
[
{
key: "sidebar.dashboard",
type: "page",
route: "/dashboard",
icon: <SpaceDashboardIcon sx={{ width: "inherit", height: "inherit" }} />,
selected: false,
permissions: ["all"],
},
{
key: "sidebar.reports",
name: "reports",
type: "page",
route: "/dashboard/reports",
icon: <AssessmentIcon sx={{ width: "inherit", height: "inherit" }} />,
selected: false,
permissions: ["view_reports_navgan"],
},
{
key: "sidebar.loan-history",
secondary: "secondary.loan-history",
name: "loan-history",
type: "page",
route: "/dashboard/loan-history/navgan",
icon: <SecurityIcon sx={{ width: "inherit", height: "inherit" }} />,
selected: false,
permissions: ["view_navgan_loans", "view_navgan_loans_province"],
},
{
key: "sidebar.loan-history-refahi",
secondary: "secondary.loan-history-refahi",
name: "loan-history-refahi",
type: "page",
route: "/dashboard/loan-history/refahi",
icon: <PollIcon sx={{ width: "inherit", height: "inherit" }} />,
selected: false,
permissions: ["view_navgan_loans", "view_navgan_loans_province"],
},
],
[
{
key: "sidebar.reserve-loan",
secondary: "secondary.navgan-province-manager",
name: "reserve_loan",
type: "page",
route: "/dashboard/navgan/reserve-loan",
icon: <RepartitionIcon sx={{ width: "inherit", height: "inherit" }} />,
selected: false,
permissions: ["manage_reserved_loans"],
},
{
key: "sidebar.passenger-boss",
secondary: "secondary.navgan-province-manager",
name: "province_working_group",
type: "page",
route: "/dashboard/navgan/passenger-boss",
icon: <AssignmentIndIcon sx={{ width: "inherit", height: "inherit" }} />,
selected: false,
permissions: ["manage_province_working_group_navgan"],
},
{
key: "sidebar.transportation-assistant",
secondary: "secondary.navgan-province-manager",
name: "transportation_assistant",
type: "page",
route: "/dashboard/navgan/transportation-assistant",
icon: <DirectionsRailwayIcon sx={{ width: "inherit", height: "inherit" }} />,
selected: false,
permissions: ["manage_transportation_navgan"],
},
{
key: "sidebar.navgan-province-manager",
secondary: "secondary.navgan-province-manager",
name: "province_manager_navgan",
type: "page",
route: "/dashboard/navgan/navgan-province-manager",
icon: <DesktopWindowsIcon sx={{ width: "inherit", height: "inherit" }} />,
selected: false,
permissions: ["manage_province_affairs_navgan"],
},
{
key: "sidebar.bank-management",
secondary: "secondary.navgan-province-manager",
name: "management",
type: "page",
route: "/dashboard/navgan/bank-management",
icon: <AccountBalanceIcon sx={{ width: "inherit", height: "inherit" }} />,
selected: false,
permissions: ["tracking_bank_loans"],
},
{
key: "sidebar.loan-followup",
secondary: "secondary.loan-followup",
name: "loan-followup",
type: "page",
route: "/dashboard/navgan/loan-followup",
icon: <RepeatIcon sx={{ width: "inherit", height: "inherit" }} />,
selected: false,
permissions: ["manage_vezarat_eghtesad_loans"], //permission should change
},
{
key: "sidebar.navgan-loan-management",
secondary: "secondary.navgan-loan-management",
name: "navgan_loan_management",
type: "page",
route: "/dashboard/navgan/navgan-loan-management",
icon: <PaidIcon sx={{ width: "inherit", height: "inherit" }} />,
selected: false,
permissions: ["manage_navgan_loan"],
},
],
[
{
key: "sidebar.restore-passenger-boss",
secondary: "secondary.refahi-province-working-group",
name: "refahi_province_working_group",
type: "page",
route: "/dashboard/refahi/passenger-boss",
icon: <AssignmentIndIcon sx={{ width: "inherit", height: "inherit" }} />,
selected: false,
permissions: ["manage_province_working_group_refahi"],
},
// {
// key: "sidebar.build-passenger-boss",
// secondary: "secondary.build-passenger-boss",
// name: "province_working_group_refahi",
// type: "page",
// route: "/dashboard/refahi/passenger-boss/build",
// icon: <AssignmentIndIcon sx={{ width: "inherit", height: "inherit" }} />,
// selected: false,
// permissions: ["manage_province_working_group_refahi"],
// },
{
key: "sidebar.restore-transportation-assistant",
secondary: "secondary.refahi-transportation",
name: "refahi_transportation_assistant",
type: "page",
route: "/dashboard/refahi/transportation-assistant",
icon: <DirectionsRailwayIcon sx={{ width: "inherit", height: "inherit" }} />,
selected: false,
permissions: ["manage_transportation_refahi"],
},
// {
// key: "sidebar.build-transportation-assistant",
// secondary: "secondary.build-transportation-assistant",
// name: "transportation_assistant",
// type: "page",
// route: "/dashboard/refahi/transportation-assistant/build",
// icon: <DirectionsRailwayIcon sx={{ width: "inherit", height: "inherit" }} />,
// selected: false,
// permissions: ["manage_transportation_refahi"],
// },
{
key: "sidebar.restore-province-manager",
secondary: "secondary.refahi-province-manager",
name: "refahi_province_manager_navgan",
type: "page",
route: "/dashboard/refahi/refahi-province-manager",
icon: <DisplaySettingsIcon sx={{ width: "inherit", height: "inherit" }} />,
selected: false,
permissions: ["manage_province_affairs_refahi"],
},
// {
// key: "sidebar.build-province-manager",
// secondary: "secondary.build-province-manager",
// name: "province_manager_refahi",
// type: "page",
// route: "/dashboard/refahi/refahi-province-manager/build",
// icon: <DesktopWindowsIcon sx={{ width: "inherit", height: "inherit" }} />,
// selected: false,
// permissions: ["manage_province_affairs_navgan"],
// },
{
key: "sidebar.refahi-loan-followup",
secondary: "secondary.refahi-loan-followup",
name: "refahi-loan-followup",
type: "page",
route: "/dashboard/refahi/loan-followup",
icon: <GavelIcon sx={{ width: "inherit", height: "inherit" }} />,
selected: false,
permissions: ["manage_vezarat_eghtesad_loans_refahi"],
},
{
key: "sidebar.refahi-loan-management",
secondary: "secondary.refahi-loan-management",
name: "refahi_loan_management",
type: "page",
route: "/dashboard/refahi/refahi-loan-management",
icon: <BusinessCenterIcon sx={{ width: "inherit", height: "inherit" }} />,
selected: false,
permissions: ["manage_refahi_loan"],
},
],
[
{
key: "sidebar.expert-management",
secondary: "secondary.admin-management",
name: "expert_management",
type: "page",
route: "/dashboard/expert-management",
icon: <ManageAccountsIcon sx={{ width: "inherit", height: "inherit" }} />,
selected: false,
permissions: ["manage_experts"],
},
{
key: "sidebar.user-management",
secondary: "secondary.admin-management",
name: "user_management",
type: "page",
route: "/dashboard/user-management",
icon: <PersonIcon sx={{ width: "inherit", height: "inherit" }} />,
selected: false,
permissions: ["manage_users"],
},
{
key: "sidebar.role-management",
secondary: "secondary.admin-management",
name: "role_management",
type: "page",
route: "/dashboard/role-management",
icon: <AccessibilityIcon sx={{ width: "inherit", height: "inherit" }} />,
selected: false,
permissions: ["manage_roles"],
},
{
key: "sidebar.admin-setting",
secondary: "secondary.admin-management",
name: "admin_setting",
type: "page",
route: "/dashboard/admin-setting",
icon: <SettingsIcon sx={{ width: "inherit", height: "inherit" }} />,
selected: false,
permissions: ["view_settings"],
},
],
];
export default sidebarMenu;