formatting
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
export const formatCounter = (counter) => {
|
||||
const minutes = Math.floor(counter / 60).toString().padStart(2, '0');
|
||||
const seconds = (counter % 60).toString().padStart(2, '0');
|
||||
const minutes = Math.floor(counter / 60)
|
||||
.toString()
|
||||
.padStart(2, "0");
|
||||
const seconds = (counter % 60).toString().padStart(2, "0");
|
||||
return `${minutes}:${seconds}`;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -28,7 +28,7 @@ export const pageMenu = [
|
||||
label: "پیشخوان",
|
||||
type: "page",
|
||||
route: "/dashboard",
|
||||
icon: <SpaceDashboardIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <SpaceDashboardIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
permissions: ["all"],
|
||||
},
|
||||
{
|
||||
@@ -36,14 +36,14 @@ export const pageMenu = [
|
||||
label: "مدیریت کاربران",
|
||||
type: "page",
|
||||
route: process.env.NEXT_PUBLIC_API_URL + "/v2/user_management",
|
||||
icon: <GroupsIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
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"}}/>,
|
||||
icon: <AccountTreeIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
hasSubitems: true,
|
||||
Subitems: [
|
||||
{
|
||||
@@ -51,7 +51,7 @@ export const pageMenu = [
|
||||
label: "ثبت قرارداد و پروژه",
|
||||
type: "page",
|
||||
route: process.env.NEXT_PUBLIC_API_URL + "/v2/rahdari_projects/finance",
|
||||
icon: <GavelIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <GavelIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
permissions: ["show-contract", "show-contract-province"],
|
||||
},
|
||||
{
|
||||
@@ -59,7 +59,7 @@ export const pageMenu = [
|
||||
label: "لیست پروژه ها",
|
||||
type: "page",
|
||||
route: process.env.NEXT_PUBLIC_API_URL + "/v2/rahdari_projects/projects_list",
|
||||
icon: <BallotIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <BallotIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
permissions: ["all"],
|
||||
},
|
||||
{
|
||||
@@ -67,7 +67,7 @@ export const pageMenu = [
|
||||
label: "پروژه های پیشنهادی",
|
||||
type: "page",
|
||||
route: process.env.NEXT_PUBLIC_API_URL + "/v2/rahdari_projects/proposal",
|
||||
icon: <AssistantIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <AssistantIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
permissions: ["show-proposal", "show-proposal-province"],
|
||||
},
|
||||
{
|
||||
@@ -75,7 +75,7 @@ export const pageMenu = [
|
||||
label: "درخواست نمایندگان",
|
||||
type: "page",
|
||||
route: process.env.NEXT_PUBLIC_API_URL + "/v2/rahdari_projects/lawmakers",
|
||||
icon: <AdminPanelSettingsIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <AdminPanelSettingsIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
permissions: ["show-lawmaker", "show-lawmaker-province"],
|
||||
},
|
||||
{
|
||||
@@ -83,7 +83,7 @@ export const pageMenu = [
|
||||
label: "پراکندگی بر روی نقشه",
|
||||
type: "page",
|
||||
route: process.env.NEXT_PUBLIC_API_URL + "/v2/map?type=rahdari_projects",
|
||||
icon: <MapIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <MapIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
permissions: ["all"],
|
||||
},
|
||||
],
|
||||
@@ -92,7 +92,7 @@ export const pageMenu = [
|
||||
id: "roadItemManagment",
|
||||
label: "فعالیت های روزانه",
|
||||
type: "menu",
|
||||
icon: <FactCheckIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <FactCheckIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
hasSubitems: true,
|
||||
badges: ["road_items.total"],
|
||||
Subitems: [
|
||||
@@ -100,7 +100,7 @@ export const pageMenu = [
|
||||
id: "roadItemManagmentSupervisor",
|
||||
label: "ارزیابی",
|
||||
type: "menu",
|
||||
icon: <SpeedIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <SpeedIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
hasSubitems: true,
|
||||
badges: ["road_items.supervise_cnt"],
|
||||
Subitems: [
|
||||
@@ -120,7 +120,7 @@ export const pageMenu = [
|
||||
id: "roadItemManagmentOparation",
|
||||
label: "عملیات",
|
||||
type: "menu",
|
||||
icon: <EngineeringIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <EngineeringIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
hasSubitems: true,
|
||||
badges: ["road_items.operation_cnt"],
|
||||
Subitems: [
|
||||
@@ -138,7 +138,7 @@ export const pageMenu = [
|
||||
label: "پراکندگی بر روی نقشه",
|
||||
type: "page",
|
||||
route: process.env.NEXT_PUBLIC_API_URL + "/v2/map?type=road_items",
|
||||
icon: <MapIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <MapIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
permissions: [
|
||||
"show-road-item-supervise-cartable",
|
||||
"show-road-item-supervise-cartable-province",
|
||||
@@ -150,7 +150,7 @@ export const pageMenu = [
|
||||
label: "گزارش ها",
|
||||
type: "page",
|
||||
route: process.env.NEXT_PUBLIC_API_URL + "/v2/road_items/report",
|
||||
icon: <AssessmentIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <AssessmentIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
permissions: [
|
||||
"show-road-item-supervise-cartable",
|
||||
"show-road-item-supervise-cartable-province",
|
||||
@@ -163,7 +163,7 @@ export const pageMenu = [
|
||||
id: "roadPatrolManagment",
|
||||
label: "گشت راهداری و ترابری",
|
||||
type: "menu",
|
||||
icon: <FireTruckIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <FireTruckIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
hasSubitems: true,
|
||||
badges: ["road_patrols.total"],
|
||||
Subitems: [
|
||||
@@ -171,7 +171,7 @@ export const pageMenu = [
|
||||
id: "roadPatrolManagmentSupervisor",
|
||||
label: "ارزیابی",
|
||||
type: "menu",
|
||||
icon: <SpeedIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <SpeedIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
hasSubitems: true,
|
||||
badges: ["road_patrols.supervise_cnt"],
|
||||
Subitems: [
|
||||
@@ -191,7 +191,7 @@ export const pageMenu = [
|
||||
id: "roadPatrolManagmentOparation",
|
||||
label: "عملیات",
|
||||
type: "menu",
|
||||
icon: <EngineeringIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <EngineeringIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
hasSubitems: true,
|
||||
badges: ["road_patrols.operation_cnt"],
|
||||
Subitems: [
|
||||
@@ -209,7 +209,7 @@ export const pageMenu = [
|
||||
label: "پراکندگی بر روی نقشه",
|
||||
type: "page",
|
||||
route: process.env.NEXT_PUBLIC_API_URL + "/v2/map?type=road_patrols",
|
||||
icon: <MapIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <MapIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
permissions: [
|
||||
"add-road-patrol",
|
||||
"show-road-patrol-supervise-cartable",
|
||||
@@ -221,7 +221,7 @@ export const pageMenu = [
|
||||
label: "گزارش ها",
|
||||
type: "page",
|
||||
route: process.env.NEXT_PUBLIC_API_URL + "/v2/road_patrols/report",
|
||||
icon: <AssessmentIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <AssessmentIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
permissions: [
|
||||
"add-road-patrol",
|
||||
"show-road-patrol-supervise-cartable",
|
||||
@@ -234,7 +234,7 @@ export const pageMenu = [
|
||||
id: "inquiryPrivacyManagment",
|
||||
label: "استعلام حریم راه",
|
||||
type: "menu",
|
||||
icon: <DoorbellIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <DoorbellIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
hasSubitems: true,
|
||||
Subitems: [
|
||||
{
|
||||
@@ -271,7 +271,7 @@ export const pageMenu = [
|
||||
id: "safetyAndPrivacyManagment",
|
||||
label: "نگهداری حریم راه",
|
||||
type: "menu",
|
||||
icon: <RouteIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <RouteIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
hasSubitems: true,
|
||||
badges: ["safety_and_privacy.step_one", "safety_and_privacy.step_two"],
|
||||
Subitems: [
|
||||
@@ -279,7 +279,7 @@ export const pageMenu = [
|
||||
id: "safetyAndPrivacyManagmentOparation",
|
||||
label: "عملیات",
|
||||
type: "menu",
|
||||
icon: <EngineeringIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <EngineeringIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
hasSubitems: true,
|
||||
Subitems: [
|
||||
{
|
||||
@@ -307,7 +307,7 @@ export const pageMenu = [
|
||||
label: "پراکندگی بر روی نقشه",
|
||||
type: "page",
|
||||
route: process.env.NEXT_PUBLIC_API_URL + "/v2/map?type=safety_and_privacy",
|
||||
icon: <MapIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <MapIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
permissions: [
|
||||
"show-safety-and-privacy-operator-cartable",
|
||||
"show-safety-and-privacy-operator-cartable-province",
|
||||
@@ -320,7 +320,7 @@ export const pageMenu = [
|
||||
label: "گزارش ها",
|
||||
type: "page",
|
||||
route: process.env.NEXT_PUBLIC_API_URL + "/v2/safety_and_privacy/report",
|
||||
icon: <AssessmentIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <AssessmentIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
permissions: [
|
||||
"show-safety-and-privacy-operator-cartable",
|
||||
"show-safety-and-privacy-operator-cartable-province",
|
||||
@@ -334,7 +334,7 @@ export const pageMenu = [
|
||||
id: "roadObservationsManagment",
|
||||
label: "واکنش سریع",
|
||||
type: "menu",
|
||||
icon: <ElectricBoltIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <ElectricBoltIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
hasSubitems: true,
|
||||
badges: ["road_observations.total"],
|
||||
Subitems: [
|
||||
@@ -342,7 +342,7 @@ export const pageMenu = [
|
||||
id: "roadObservationsManagmentSupervisor",
|
||||
label: "ارزیابی",
|
||||
type: "menu",
|
||||
icon: <SpeedIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <SpeedIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
hasSubitems: true,
|
||||
badges: ["road_observations.supervise_cnt"],
|
||||
Subitems: [
|
||||
@@ -360,14 +360,14 @@ export const pageMenu = [
|
||||
label: "رسیدگی به شکایات",
|
||||
type: "page",
|
||||
route: process.env.NEXT_PUBLIC_API_URL + "/v2/road_observations",
|
||||
icon: <AssignmentLateIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <AssignmentLateIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
permissions: ["show-fast-react", "show-fast-react-province", "show-fast-react-edarate-shahri"],
|
||||
},
|
||||
{
|
||||
id: "roadObservationsManagmentOparation",
|
||||
label: "عملیات",
|
||||
type: "menu",
|
||||
icon: <EngineeringIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <EngineeringIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
hasSubitems: true,
|
||||
badges: ["road_observations.operation_cnt"],
|
||||
Subitems: [
|
||||
@@ -385,7 +385,7 @@ export const pageMenu = [
|
||||
label: "پراکندگی بر روی نقشه",
|
||||
type: "page",
|
||||
route: process.env.NEXT_PUBLIC_API_URL + "/v2/map?type=road_observations",
|
||||
icon: <MapIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <MapIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
permissions: ["all"],
|
||||
},
|
||||
{
|
||||
@@ -393,7 +393,7 @@ export const pageMenu = [
|
||||
label: "گزارش ها",
|
||||
type: "page",
|
||||
route: process.env.NEXT_PUBLIC_API_URL + "/v2/road_observations/report/index",
|
||||
icon: <AssessmentIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <AssessmentIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
permissions: ["all"],
|
||||
},
|
||||
],
|
||||
@@ -402,7 +402,7 @@ export const pageMenu = [
|
||||
id: "winterCampManagment",
|
||||
label: "قرارگاه زمستانی",
|
||||
type: "menu",
|
||||
icon: <CottageIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <CottageIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
hasSubitems: true,
|
||||
Subitems: [
|
||||
{
|
||||
@@ -410,7 +410,7 @@ export const pageMenu = [
|
||||
label: "محور های انسدادی",
|
||||
type: "page",
|
||||
route: process.env.NEXT_PUBLIC_API_URL + "/v2/winter_camp",
|
||||
icon: <LineAxisIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <LineAxisIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
permissions: ["show-camp", "show-camp-province"],
|
||||
},
|
||||
{
|
||||
@@ -418,7 +418,7 @@ export const pageMenu = [
|
||||
label: "محور های حلقه اول",
|
||||
type: "page",
|
||||
route: process.env.NEXT_PUBLIC_API_URL + "/v2/map?type=camp",
|
||||
icon: <LineAxisIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <LineAxisIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
permissions: ["show-camp", "show-camp-province"],
|
||||
},
|
||||
{
|
||||
@@ -426,7 +426,7 @@ export const pageMenu = [
|
||||
label: "گزارش ها",
|
||||
type: "page",
|
||||
route: process.env.NEXT_PUBLIC_API_URL + "/v2/map?type=campNew",
|
||||
icon: <AssessmentIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <AssessmentIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
permissions: ["show-camp", "show-camp-province"],
|
||||
},
|
||||
],
|
||||
@@ -435,14 +435,14 @@ export const pageMenu = [
|
||||
id: "receiptManagment",
|
||||
label: "خسارات وارده بر ابنیه فنی و تاسیسات راه",
|
||||
type: "menu",
|
||||
icon: <GppMaybeIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <GppMaybeIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
hasSubitems: true,
|
||||
Subitems: [
|
||||
{
|
||||
id: "receiptManagmentOparation",
|
||||
label: "عملیات",
|
||||
type: "menu",
|
||||
icon: <EngineeringIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <EngineeringIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
hasSubitems: true,
|
||||
Subitems: [
|
||||
{
|
||||
@@ -459,7 +459,7 @@ export const pageMenu = [
|
||||
label: "گزارش ها",
|
||||
type: "page",
|
||||
route: process.env.NEXT_PUBLIC_API_URL + "/v2/receipt/report",
|
||||
icon: <AssessmentIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <AssessmentIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
permissions: ["all"],
|
||||
},
|
||||
],
|
||||
@@ -469,7 +469,7 @@ export const pageMenu = [
|
||||
label: "آزمایشات (OPTS)",
|
||||
type: "page",
|
||||
route: "/dashboard/azmayesh",
|
||||
icon: <ScienceIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <ScienceIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
permissions: ["azmayesh-management"],
|
||||
},
|
||||
{
|
||||
@@ -477,7 +477,7 @@ export const pageMenu = [
|
||||
label: "نوع آزمایشات",
|
||||
type: "page",
|
||||
route: "/dashboard/azmayesh_type",
|
||||
icon: <BiotechIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <BiotechIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
permissions: ["azmayesh-type-management"],
|
||||
},
|
||||
{
|
||||
@@ -485,7 +485,7 @@ export const pageMenu = [
|
||||
label: "اطلاعات خودرو",
|
||||
type: "page",
|
||||
route: "/dashboard/car-details",
|
||||
icon: <DriveEtaIcon sx={{width: "inherit", height: "inherit"}}/>,
|
||||
icon: <DriveEtaIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
permissions: [""],
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user