fotmattiong
This commit is contained in:
@@ -25,15 +25,17 @@ const HeaderBottom = () => {
|
|||||||
<Typography sx={{ color: (theme) => theme.palette.primary2.contrastText }}>rms.rmto.ir</Typography>
|
<Typography sx={{ color: (theme) => theme.palette.primary2.contrastText }}>rms.rmto.ir</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack sx={{ display: { xs: 'none', sm: 'flex' } }}>
|
<Stack sx={{ display: { xs: "none", sm: "flex" } }}>
|
||||||
<Box sx={{
|
<Box
|
||||||
p: 1,
|
sx={{
|
||||||
background: "#fff",
|
p: 1,
|
||||||
border: 2,
|
background: "#fff",
|
||||||
borderColor: (theme) => theme.palette.primary.main,
|
border: 2,
|
||||||
borderRadius: 2,
|
borderColor: (theme) => theme.palette.primary.main,
|
||||||
borderStyle: "dashed",
|
borderRadius: 2,
|
||||||
}}>
|
borderStyle: "dashed",
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Image alt="" priority src={HeaderLogo.src} width={140} height={32} />
|
<Image alt="" priority src={HeaderLogo.src} width={140} height={32} />
|
||||||
</Box>
|
</Box>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
@@ -1,5 +1,15 @@
|
|||||||
import { ExpandLess, ExpandMore } from "@mui/icons-material";
|
import { ExpandLess, ExpandMore } from "@mui/icons-material";
|
||||||
import { Collapse, List, ListItem, ListItemButton, ListItemIcon, ListItemText, Stack, useMediaQuery, useTheme } from "@mui/material";
|
import {
|
||||||
|
Collapse,
|
||||||
|
List,
|
||||||
|
ListItem,
|
||||||
|
ListItemButton,
|
||||||
|
ListItemIcon,
|
||||||
|
ListItemText,
|
||||||
|
Stack,
|
||||||
|
useMediaQuery,
|
||||||
|
useTheme,
|
||||||
|
} from "@mui/material";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import SidebarBadge from "./SidebarBadge";
|
import SidebarBadge from "./SidebarBadge";
|
||||||
import SidebarSubitems from "./SidebarSubitems";
|
import SidebarSubitems from "./SidebarSubitems";
|
||||||
@@ -21,7 +31,7 @@ const SidebarListItems = ({ menuItem, dispatch, handleDrawerClose }) => {
|
|||||||
dispatch({ type: "COLLAPSE_MENU", id: menuItem.id });
|
dispatch({ type: "COLLAPSE_MENU", id: menuItem.id });
|
||||||
} else {
|
} else {
|
||||||
if (isMobile) {
|
if (isMobile) {
|
||||||
handleDrawerClose()
|
handleDrawerClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@@ -62,7 +72,14 @@ const SidebarListItems = ({ menuItem, dispatch, handleDrawerClose }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{menuItem.Subitems.map((subitem, index) => {
|
{menuItem.Subitems.map((subitem, index) => {
|
||||||
return <SidebarSubitems handleDrawerClose={handleDrawerClose} key={index} dispatch={dispatch} subitem={subitem} />;
|
return (
|
||||||
|
<SidebarSubitems
|
||||||
|
handleDrawerClose={handleDrawerClose}
|
||||||
|
key={index}
|
||||||
|
dispatch={dispatch}
|
||||||
|
subitem={subitem}
|
||||||
|
/>
|
||||||
|
);
|
||||||
})}
|
})}
|
||||||
</List>
|
</List>
|
||||||
) : null}
|
) : null}
|
||||||
|
|||||||
@@ -54,16 +54,16 @@ function reducer(state, action) {
|
|||||||
return state.map((item) =>
|
return state.map((item) =>
|
||||||
item.hasSubitems
|
item.hasSubitems
|
||||||
? {
|
? {
|
||||||
...item,
|
...item,
|
||||||
Subitems: item.Subitems.map((subitem) =>
|
Subitems: item.Subitems.map((subitem) =>
|
||||||
subitem.hasSubitems
|
subitem.hasSubitems
|
||||||
? {
|
? {
|
||||||
...subitem,
|
...subitem,
|
||||||
Subitems: toggleSubitems(subitem.Subitems, action.id),
|
Subitems: toggleSubitems(subitem.Subitems, action.id),
|
||||||
}
|
}
|
||||||
: subitem
|
: subitem
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
: item
|
: item
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -105,7 +105,14 @@ const SidebarMenu = ({ handleDrawerClose }) => {
|
|||||||
{userPermissions && (
|
{userPermissions && (
|
||||||
<List sx={{ overflow: "auto", flex: 1 }} disablePadding dense>
|
<List sx={{ overflow: "auto", flex: 1 }} disablePadding dense>
|
||||||
{menuItems.map((menuItem) => {
|
{menuItems.map((menuItem) => {
|
||||||
return <SidebarListItems handleDrawerClose={handleDrawerClose} dispatch={dispatch} key={menuItem.id} menuItem={menuItem} />;
|
return (
|
||||||
|
<SidebarListItems
|
||||||
|
handleDrawerClose={handleDrawerClose}
|
||||||
|
dispatch={dispatch}
|
||||||
|
key={menuItem.id}
|
||||||
|
menuItem={menuItem}
|
||||||
|
/>
|
||||||
|
);
|
||||||
})}
|
})}
|
||||||
</List>
|
</List>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -1,5 +1,16 @@
|
|||||||
import { ExpandLess, ExpandMore } from "@mui/icons-material";
|
import { ExpandLess, ExpandMore } from "@mui/icons-material";
|
||||||
import { Box, Collapse, List, ListItem, ListItemButton, ListItemIcon, ListItemText, Stack, useMediaQuery, useTheme } from "@mui/material";
|
import {
|
||||||
|
Box,
|
||||||
|
Collapse,
|
||||||
|
List,
|
||||||
|
ListItem,
|
||||||
|
ListItemButton,
|
||||||
|
ListItemIcon,
|
||||||
|
ListItemText,
|
||||||
|
Stack,
|
||||||
|
useMediaQuery,
|
||||||
|
useTheme,
|
||||||
|
} from "@mui/material";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import SidebarBadge from "./SidebarBadge";
|
import SidebarBadge from "./SidebarBadge";
|
||||||
|
|
||||||
@@ -20,7 +31,7 @@ const SidebarSubitems = ({ subitem, dispatch, handleDrawerClose }) => {
|
|||||||
dispatch({ type: "COLLAPSE_SUB_ITEMS", id: subitem.id });
|
dispatch({ type: "COLLAPSE_SUB_ITEMS", id: subitem.id });
|
||||||
} else {
|
} else {
|
||||||
if (isMobile) {
|
if (isMobile) {
|
||||||
handleDrawerClose()
|
handleDrawerClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@@ -71,7 +82,14 @@ const SidebarSubitems = ({ subitem, dispatch, handleDrawerClose }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{subitem.Subitems.map((subSubitem, index) => {
|
{subitem.Subitems.map((subSubitem, index) => {
|
||||||
return <SidebarSubitems handleDrawerClose={handleDrawerClose} key={index} dispatch={dispatch} subitem={subSubitem} />;
|
return (
|
||||||
|
<SidebarSubitems
|
||||||
|
handleDrawerClose={handleDrawerClose}
|
||||||
|
key={index}
|
||||||
|
dispatch={dispatch}
|
||||||
|
subitem={subSubitem}
|
||||||
|
/>
|
||||||
|
);
|
||||||
})}
|
})}
|
||||||
</List>
|
</List>
|
||||||
) : null}
|
) : null}
|
||||||
|
|||||||
@@ -146,12 +146,16 @@ export const REJECT_ROAD_SAFETY_BY_SUPERVISOR = api + "/api/v3/safety_and_privac
|
|||||||
|
|
||||||
export const DESERIALIZE_JUDICIARY_DOCUMENT = api + "/api/v3/safety_and_privacy/deserialize";
|
export const DESERIALIZE_JUDICIARY_DOCUMENT = api + "/api/v3/safety_and_privacy/deserialize";
|
||||||
export const GET_SAFETY_AND_PRIVACY_ITEM = api + "/api/v3/safety_and_privacy/sub_items";
|
export const GET_SAFETY_AND_PRIVACY_ITEM = api + "/api/v3/safety_and_privacy/sub_items";
|
||||||
export const GET_ROAD_SAFETY_PROVINCE_ACTIVITY_REPORT = api + "/api/v3/safety_and_privacy_report/operator/country_activity";
|
export const GET_ROAD_SAFETY_PROVINCE_ACTIVITY_REPORT =
|
||||||
export const GET_ROAD_SAFETY_CITY_ACTIVITY_REPORT = api + "/api/v3/safety_and_privacy_report/operator/province_activity";
|
api + "/api/v3/safety_and_privacy_report/operator/country_activity";
|
||||||
|
export const GET_ROAD_SAFETY_CITY_ACTIVITY_REPORT =
|
||||||
|
api + "/api/v3/safety_and_privacy_report/operator/province_activity";
|
||||||
export const GET_ROAD_SAFETY_REPORT_MAP = api + "/api/v3/safety_and_privacy/map";
|
export const GET_ROAD_SAFETY_REPORT_MAP = api + "/api/v3/safety_and_privacy/map";
|
||||||
export const GET_ROAD_SAFETY_DETAILS = api + "/api/v3/safety_and_privacy/operator";
|
export const GET_ROAD_SAFETY_DETAILS = api + "/api/v3/safety_and_privacy/operator";
|
||||||
export const EXPORT_COUNTRY_ROAD_SAFETY_REPORT = api + "/api/v3/safety_and_privacy_report/operator/country_excel_activity";
|
export const EXPORT_COUNTRY_ROAD_SAFETY_REPORT =
|
||||||
export const EXPORT_PROVINCE_ROAD_SAFETY_REPORT = api + "/api/v3/safety_and_privacy_report/operator/province_excel_activity";
|
api + "/api/v3/safety_and_privacy_report/operator/country_excel_activity";
|
||||||
|
export const EXPORT_PROVINCE_ROAD_SAFETY_REPORT =
|
||||||
|
api + "/api/v3/safety_and_privacy_report/operator/province_excel_activity";
|
||||||
|
|
||||||
// permission table
|
// permission table
|
||||||
export const GET_PERMISSION_TABLE_LIST = api + "/api/v3/permissions";
|
export const GET_PERMISSION_TABLE_LIST = api + "/api/v3/permissions";
|
||||||
|
|||||||
Reference in New Issue
Block a user