Files
frontend/src/core/utils/pageMenu.js
AmirHossein Mahmoodi 752b10c92b change version to 1.7.0
2025-08-27 11:44:13 +03:30

623 lines
27 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import SpaceDashboardIcon from "@mui/icons-material/SpaceDashboard";
import GroupsIcon from "@mui/icons-material/Groups";
import AccountTreeIcon from "@mui/icons-material/AccountTree";
import FactCheckIcon from "@mui/icons-material/FactCheck";
import FireTruckIcon from "@mui/icons-material/FireTruck";
import RouteIcon from "@mui/icons-material/Route";
import DoorbellIcon from "@mui/icons-material/Doorbell";
import ElectricBoltIcon from "@mui/icons-material/ElectricBolt";
import CottageIcon from "@mui/icons-material/Cottage";
import GppMaybeIcon from "@mui/icons-material/GppMaybe";
import GavelIcon from "@mui/icons-material/Gavel";
import BallotIcon from "@mui/icons-material/Ballot";
import AssistantIcon from "@mui/icons-material/Assistant";
import AdminPanelSettingsIcon from "@mui/icons-material/AdminPanelSettings";
import MapIcon from "@mui/icons-material/Map";
import SpeedIcon from "@mui/icons-material/Speed";
import EngineeringIcon from "@mui/icons-material/Engineering";
import ReportIcon from "@mui/icons-material/Report";
import AssessmentIcon from "@mui/icons-material/Assessment";
import AssignmentLateIcon from "@mui/icons-material/AssignmentLate";
import LockPersonIcon from "@mui/icons-material/LockPerson";
import LineAxisIcon from "@mui/icons-material/LineAxis";
import ScienceIcon from "@mui/icons-material/Science";
import HandymanIcon from "@mui/icons-material/Handyman";
import DriveEtaIcon from "@mui/icons-material/DriveEta";
import BiotechIcon from "@mui/icons-material/Biotech";
import Mediation from "@mui/icons-material/Mediation";
export const pageMenu = [
{
id: "dashboard",
label: "پیشخوان",
type: "page",
route: "/dashboard",
icon: <SpaceDashboardIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["all"],
},
{
id: "userManagement",
label: "مدیریت کاربران",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/user_management",
icon: <GroupsIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["full-user-management", "limited-user-management"],
},
{
id: "projectsManagment",
label: "پروژه های راهداری",
type: "menu",
icon: <AccountTreeIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
Subitems: [
{
id: "projectsManagmentFinance",
label: "ثبت قرارداد و پروژه",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/rahdari_projects/finance",
icon: <GavelIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["show-contract", "show-contract-province"],
},
{
id: "projectsManagmentList",
label: "لیست پروژه ها",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/rahdari_projects/projects_list",
icon: <BallotIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["all"],
},
{
id: "projectsManagmentProposal",
label: "پروژه های پیشنهادی",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/rahdari_projects/proposal",
icon: <AssistantIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["show-proposal", "show-proposal-province"],
},
{
id: "projectsManagmentLawmaker",
label: "درخواست نمایندگان",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/rahdari_projects/lawmakers",
icon: <AdminPanelSettingsIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["show-lawmaker", "show-lawmaker-province"],
},
{
id: "projectsManagmentMap",
label: "پراکندگی بر روی نقشه",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/map?type=rahdari_projects",
icon: <MapIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["all"],
},
],
},
{
id: "roadMissionsManagemnet",
label: "ماموریت ها",
type: "menu",
icon: <Mediation sx={{ width: "inherit", height: "inherit" }} />,
badges: [{ key: "mission.total" }],
hasSubitems: true,
Subitems: [
{
id: "roadMissionsManagemnetRequests",
label: "کارتابل",
type: "page",
route: "/dashboard/road-missions/operator",
badges: [{ key: "mission.request_portal" }],
permissions: [
"manage-request-portal-country",
"manage-request-portal-province",
"manage-request-portal-city",
],
},
{
id: "roadMissionsManagemnetNaqlie",
label: "نقلیه",
type: "page",
route: "/dashboard/road-missions/transportation",
badges: [{ key: "mission.transportation" }],
permissions: ["manage-transportation-unit"],
},
{
id: "roadMissionsManagemnetControl",
label: "کنترل",
type: "page",
route: "/dashboard/road-missions/control",
badges: [{ key: "mission.control" }],
permissions: ["manage-control-unit"],
},
],
},
{
id: "roadItemManagment",
label: "فعالیت های روزانه",
type: "menu",
icon: <FactCheckIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
badges: [{ key: "roadItem.total" }],
Subitems: [
{
id: "roadItemManagmentSupervisor",
label: "ارزیابی",
type: "menu",
icon: <SpeedIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
badges: [{ key: "roadItem.supervise_cnt" }],
Subitems: [
{
id: "roadItemManagmentSupervisorCartable",
label: "کارتابل",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/road_items/supervisor/cartable",
permissions: [
"show-road-item-supervise-cartable",
"show-road-item-supervise-cartable-province",
],
},
],
},
{
id: "roadItemManagmentOparation",
label: "عملیات",
type: "menu",
icon: <EngineeringIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
badges: [{ key: "roadItem.operation_cnt" }],
Subitems: [
{
id: "roadItemManagmentOparationCreate",
label: "ثبت فعالیت",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/road_items/operator/create",
permissions: ["create-road-item"],
},
{
id: "roadItemManagmentOparationCartable",
label: "کارتابل",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/road_items/operator/cartable",
permissions: ["create-road-item"],
},
],
},
{
id: "roadItemManagmentMap",
label: "پراکندگی بر روی نقشه",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/map?type=road_items",
icon: <MapIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: [
"show-road-item-supervise-cartable",
"show-road-item-supervise-cartable-province",
"create-road-item",
],
},
{
id: "roadItemManagmentReport",
label: "گزارش ها",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/road_items/report",
icon: <ReportIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: [
"show-road-item-supervise-cartable",
"show-road-item-supervise-cartable-province",
"create-road-item",
],
},
],
},
{
id: "roadPatrolManagment",
label: "گشت راهداری و ترابری",
type: "menu",
icon: <FireTruckIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
Subitems: [
{
id: "roadPatrolManagmentSupervisor",
label: "ارزیابی",
type: "menu",
icon: <SpeedIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
Subitems: [
{
id: "roadPatrolManagmentSupervisorCartable",
label: "کارتابل",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/road_patrols/supervisor/cartable",
permissions: [
"show-road-patrol-supervise-cartable",
"show-road-patrol-supervise-cartable-province",
],
},
],
},
{
id: "roadPatrolManagmentOparation",
label: "عملیات",
type: "menu",
icon: <EngineeringIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
Subitems: [
{
id: "roadPatrolManagmentOparationCreate",
label: "ثبت اقدام",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/road_patrols/operator/create",
permissions: ["add-road-patrol"],
},
{
id: "roadPatrolManagmentOparationCartable",
label: "کارتابل",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/road_patrols/operator/cartable",
permissions: ["add-road-patrol"],
},
],
},
{
id: "roadPatrolManagmentMap",
label: "پراکندگی بر روی نقشه",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/map?type=road_patrols",
icon: <MapIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: [
"add-road-patrol",
"show-road-patrol-supervise-cartable",
"show-road-patrol-supervise-cartable-province",
],
},
{
id: "roadPatrolManagmentReport",
label: "گزارش ها",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/road_patrols/report",
icon: <ReportIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: [
"add-road-patrol",
"show-road-patrol-supervise-cartable",
"show-road-patrol-supervise-cartable-province",
],
},
],
},
{
id: "inquiryPrivacyManagment",
label: "استعلام حریم راه",
type: "menu",
icon: <DoorbellIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
Subitems: [
{
id: "cityAdminZaminGov",
label: "استعلام حرائم پنجره واحد",
type: "page",
route: "/dashboard/inquiry-privacy/city-admin/zamin-gov",
permissions: [],
},
{
id: "provinceAdminZaminGov",
label: "استعلام حرائم پنجره واحد",
type: "page",
route: "/dashboard/inquiry-privacy/province-admin/zamin-gov",
permissions: [],
},
{
id: "assistantZaminGov",
label: "استعلام حرائم پنجره واحد",
type: "page",
route: "/dashboard/inquiry-privacy/assistant/zamin-gov",
permissions: [],
},
{
id: "generalManagerZaminGov",
label: "استعلام حرائم پنجره واحد",
type: "page",
route: "/dashboard/inquiry-privacy/general-manager/zamin-gov",
permissions: [],
},
],
},
{
id: "safetyAndPrivacyManagment",
label: "نگهداری حریم راه",
type: "menu",
icon: <RouteIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
badges: [
{ key: "safetyAndPrivacy.supervise_cnt" },
{ key: "safetyAndPrivacy.step_one", color: "warning" },
{ key: "safetyAndPrivacy.step_two", color: "error" },
],
Subitems: [
{
id: "safetyAndPrivacyManagmentSupervisor",
label: "ارزیابی",
type: "menu",
icon: <SpeedIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
badges: [{ key: "safetyAndPrivacy.supervise_cnt" }],
Subitems: [
{
id: "safetyAndPrivacyManagmentSupervisorCartable",
label: "کارتابل",
type: "page",
route: "/dashboard/road-safety/supervisor",
permissions: [
"show-safety-and-privacy-operator-cartable",
"show-safety-and-privacy-operator-cartable-province",
],
},
],
},
{
id: "safetyAndPrivacyManagmentOparation",
label: "عملیات",
type: "menu",
icon: <EngineeringIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
badges: [
{ key: "safetyAndPrivacy.step_one", color: "warning" },
{ key: "safetyAndPrivacy.step_two", color: "error" },
],
Subitems: [
{
id: "safetyAndPrivacyManagmentOparationCartable",
label: "کارتابل",
type: "page",
route: "/dashboard/road-safety/operator",
permissions: ["show-safety-and-privacy-operator-cartable-edarate-shahri"],
},
],
},
{
id: "safetyAndPrivacyManagmentMap",
label: "پراکندگی بر روی نقشه",
type: "page",
route: "/dashboard/road-safety/reports/map",
icon: <MapIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: [
"show-safety-and-privacy-operator-cartable",
"show-safety-and-privacy-operator-cartable-province",
"show-safety-and-privacy-operator-cartable-edarate-shahri",
],
},
{
id: "safetyAndPrivacyManagmentReport",
label: "گزارش ها",
type: "menu",
icon: <AssessmentIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
Subitems: [
{
id: "safetyAndPrivacyManagmentReportConstructionActivity",
label: "بر اساس ساخت و ساز غیر مجاز",
type: "page",
route: "/dashboard/road-safety/reports/construction-activity",
permissions: [
"show-safety-and-privacy-operator-cartable",
"show-safety-and-privacy-operator-cartable-province",
"show-safety-and-privacy-operator-cartable-edarate-shahri",
],
},
{
id: "safetyAndPrivacyManagmentReportAccessRoad",
label: "بر اساس راه دسترسی غیر مجاز",
type: "page",
route: "/dashboard/road-safety/reports/access-road",
permissions: [
"show-safety-and-privacy-operator-cartable",
"show-safety-and-privacy-operator-cartable-province",
"show-safety-and-privacy-operator-cartable-edarate-shahri",
],
},
{
id: "safetyAndPrivacyManagmentReportUtilityPassingActivity",
label: "بر اساس عبور تاسیسات زیربنایی غیر مجاز",
type: "page",
route: "/dashboard/road-safety/reports/utility-passing-activity",
permissions: [
"show-safety-and-privacy-operator-cartable",
"show-safety-and-privacy-operator-cartable-province",
"show-safety-and-privacy-operator-cartable-edarate-shahri",
],
},
],
},
],
},
{
id: "roadObservationsManagment",
label: "واکنش سریع",
type: "menu",
icon: <ElectricBoltIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
badges: [{ key: "roadObserved.total" }],
Subitems: [
{
id: "roadObservationsManagmentSupervisor",
label: "ارزیابی",
type: "menu",
icon: <SpeedIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
badges: [{ key: "roadObserved.supervise_cnt" }, { key: "roadObserved.complaint_cnt", color: "info" }],
Subitems: [
{
id: "roadObservationsManagmentSupervisorCartable",
label: "کارتابل",
type: "page",
route: "/dashboard/fast-react/supervisor",
permissions: ["show-fast-react", "show-fast-react-province"],
},
],
},
{
id: "roadObservationsManagmentOparation",
label: "عملیات",
type: "menu",
icon: <EngineeringIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
badges: [{ key: "roadObserved.operation_cnt" }, { key: "roadObserved.complaint_cnt", color: "info" }],
Subitems: [
{
id: "roadObservationsManagmentOparationCartable",
label: "کارتابل",
type: "page",
route: "/dashboard/fast-react/operator",
permissions: ["show-fast-react-edarate-shahri"],
},
],
},
{
id: "roadObservationsManagmentMap",
label: "پراکندگی بر روی نقشه",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/map?type=road_observations",
icon: <MapIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["all"],
},
{
id: "roadObservationsManagmentReport",
label: "گزارش ها",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/road_observations/report/index",
icon: <AssessmentIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["all"],
},
],
},
{
id: "winterCampManagment",
label: "قرارگاه زمستانی",
type: "menu",
icon: <CottageIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
Subitems: [
{
id: "winterCampManagmentBlocking",
label: "محور های انسدادی",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/winter_camp",
icon: <LineAxisIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["show-camp", "show-camp-province"],
},
{
id: "winterCampManagmentFirstRing",
label: "محور های حلقه اول",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/map?type=camp",
icon: <LineAxisIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["show-camp", "show-camp-province"],
},
{
id: "winterCampManagmentReport",
label: "گزارش ها",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/map?type=campNew",
icon: <ReportIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["show-camp", "show-camp-province"],
},
],
},
{
id: "receiptManagment",
label: "خسارات وارده بر ابنیه فنی و تاسیسات راه",
type: "menu",
icon: <GppMaybeIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
Subitems: [
{
id: "receiptManagmentOparation",
label: "عملیات",
type: "menu",
icon: <EngineeringIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
Subitems: [
{
id: "receiptManagmentOparationCartable",
label: "کارتابل",
type: "page",
route: "/dashboard/damages/operator",
permissions: ["show-receipt", "show-receipt-province"],
},
],
},
{
id: "damagesManagmentReport",
label: "گزارش ها",
type: "page",
route: "/dashboard/damages/report",
icon: <AssessmentIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["show-receipt", "show-receipt-province"],
},
],
},
{
id: "azmayesh",
label: "آزمایشات (OPTS)",
type: "page",
route: "/dashboard/azmayesh",
icon: <ScienceIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["azmayesh-management"],
},
{
id: "azmayeshType",
label: "نوع آزمایشات",
type: "page",
route: "/dashboard/azmayesh_type",
icon: <BiotechIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["azmayesh-type-management"],
},
{
id: "rahdaran",
label: "راهداران",
type: "page",
route: "/dashboard/rahdaran",
icon: <HandymanIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["show-rahdaran"],
},
{
id: "adminManagement",
label: "مدیریت سامانه",
type: "menu",
icon: <AdminPanelSettingsIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
Subitems: [
{
id: "permissionItem",
label: "سطح دسترسی ها",
type: "page",
route: "/dashboard/permissions",
icon: <LockPersonIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["manage-permissions"],
},
{
id: "userActivities",
label: "انواع فعالیت کاربران",
type: "page",
route: "/dashboard/user-activities",
icon: <AssignmentLateIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["manage-log-list"],
},
{
id: "damageItems",
label: "آیتم خسارات وارده بر ابنیه فنی",
type: "page",
route: "/dashboard/damage-items",
icon: <GppMaybeIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["manage-damage"],
},
{
id: "CarDetails",
label: "اطلاعات خودرو",
type: "page",
route: "/dashboard/car-details",
icon: <DriveEtaIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: [""],
},
],
},
];