Merge branch 'feature/profile_and_icons' into 'develop'

Feature/profile and icons

See merge request witel-front-end/rms!17
This commit is contained in:
AmirHossein Mahmoodi
2024-08-19 10:15:49 +00:00
8 changed files with 288 additions and 80 deletions

View File

@@ -6,6 +6,7 @@ import { Box, Drawer, IconButton, Stack, styled, Toolbar, Typography } from "@mu
import MuiAppBar from "@mui/material/AppBar";
import { useState } from "react";
import HeaderMenu from "./HeaderMenu";
import moment from "jalali-moment";
import { headerMenu } from "@/core/utils/headerMenu";
const drawerWidth = 300;
@@ -56,6 +57,7 @@ const DrawerHeader = styled("div")(({ theme }) => ({
const HeaderWithSidebar = ({ children }) => {
const [open, setOpen] = useState(true);
const now = moment().locale("fa").format("HH:mm | YYYY/MM/DD");
const handleDrawerOpen = () => {
setOpen(true);
@@ -101,7 +103,8 @@ const HeaderWithSidebar = ({ children }) => {
anchor="left"
open={open}
>
<DrawerHeader>
<DrawerHeader sx={{ display: "flex", alignItems: "center", justifyContent: "space-between" }}>
<Typography variant="subtitle2" color="#757575" sx={{ px: 1 }}>تاریخ امروز: {now}</Typography>
<IconButton onClick={handleDrawerClose}>
<ChevronRightIcon />
</IconButton>

View File

@@ -0,0 +1,52 @@
"use client";
import {
Box,
Button,
Dialog,
DialogActions,
DialogContent,
DialogTitle,
IconButton,
useMediaQuery,
} from "@mui/material";
import { useTheme } from "@mui/material/styles";
import CloseIcon from "@mui/icons-material/Close";
const ChangePass = ({ open, setOpen }) => {
const theme = useTheme();
const fullScreen = useMediaQuery(theme.breakpoints.down("sm"));
return (
<Dialog fullScreen={fullScreen} maxWidth="sm" fullWidth={true} open={open}
onClose={() => {
setOpen(false);
}}>
<Box sx={{ display: "flex", alignItems: "center", justifyContent: "space-between", mx: 1 }}>
<DialogTitle sx={{ py: 2, px: 1 }}>
تغییر رمز عبور
</DialogTitle>
<IconButton
aria-label="بستن تغییر رمز عبور"
onClick={() => {
setOpen(false);
}}
sx={{ color: (theme) => theme.palette.grey[500] }}
>
<CloseIcon />
</IconButton>
</Box>
<DialogContent dividers>
تست
</DialogContent>
<DialogActions>
<Button autoFocus variant="outlined" onClick={() => {
setOpen(false);
}}>
ثبت
</Button>
</DialogActions>
</Dialog>
);
};
export default ChangePass;

View File

@@ -0,0 +1,52 @@
"use client";
import {
Box,
Button,
Dialog,
DialogActions,
DialogContent,
DialogTitle,
IconButton,
useMediaQuery,
} from "@mui/material";
import { useTheme } from "@mui/material/styles";
import CloseIcon from "@mui/icons-material/Close";
const Update = ({ open, setOpen }) => {
const theme = useTheme();
const fullScreen = useMediaQuery(theme.breakpoints.down("sm"));
return (
<Dialog fullScreen={fullScreen} maxWidth="sm" fullWidth={true} open={open}
onClose={() => {
setOpen(false);
}}>
<Box sx={{ display: "flex", alignItems: "center", justifyContent: "space-between", mx: 1 }}>
<DialogTitle sx={{ py: 2, px: 1 }}>
ویرایش پروفایل
</DialogTitle>
<IconButton
aria-label="بستن ویرایش پروفایل"
onClick={() => {
setOpen(false);
}}
sx={{ color: (theme) => theme.palette.grey[500] }}
>
<CloseIcon />
</IconButton>
</Box>
<DialogContent dividers>
form will come here
</DialogContent>
<DialogActions>
<Button autoFocus variant="outlined" onClick={() => {
setOpen(false);
}}>
ثبت
</Button>
</DialogActions>
</Dialog>
);
};
export default Update;

View File

@@ -0,0 +1,75 @@
"use client";
import { Avatar, Box, Chip, Divider, IconButton, Stack, Tooltip, Typography } from "@mui/material";
import PowerSettingsNewIcon from "@mui/icons-material/PowerSettingsNew";
import ModeEditIcon from "@mui/icons-material/ModeEdit";
import VpnKeyIcon from "@mui/icons-material/VpnKey";
import { useState } from "react";
import Update from "@/core/components/Profile/Update";
import ChangePass from "@/core/components/Profile/ChangePass";
const Profile = () => {
const [openUpdate, setOpenUpdate] = useState(false);
const [openChangePass, setOpenChangePass] = useState(false);
return (
<>
<Stack sx={{
px: 2,
background: "#f7f7f7",
borderTop: "1px dashed #e1e1e1",
borderBottom: "1px dashed #e1e1e1",
}}>
<Box sx={{ display: "flex", alignItems: "center", my: 0.5 }}>
<Avatar
alt="User Image"
src=""
sx={{ width: 56, height: 56 }}
/>
<Stack sx={{ ml: 1 }}>
<Box sx={{ display: "flex", alignItems: "end", gap: 0.7 }}>
<Typography variant="h6">حسن محمد زاده عبدالله</Typography>
</Box>
<Typography variant="caption">.: اداره کل ستاد :.</Typography>
</Stack>
</Box>
<Box sx={{ display: "flex", alignItems: "center", my: 0.5 }}>
<Typography variant="button" color="#757575">آخرین ورود</Typography>
<Divider sx={{ mx: 2, flexGrow: 1 }} />
<Typography variant="subtitle2" color="#757575">1 ساعت پیش</Typography>
</Box>
<Box sx={{ my: 0.5 }}>
<Divider>
<Chip size="small" label="userName" color="success" variant="outlined" />
</Divider>
</Box>
<Box sx={{ display: "flex", justifyContent: "center" }}>
<Tooltip title="ویرایش پروفایل" arrow>
<IconButton aria-label="ویرایش پروفایل" color="success" onClick={() => {
setOpenUpdate(true);
}}>
<ModeEditIcon />
</IconButton>
</Tooltip>
<Divider orientation="vertical" variant="middle" flexItem sx={{ mx: 1 }} />
<Tooltip title="خروج" arrow>
<IconButton aria-label="خروج" color="error">
<PowerSettingsNewIcon />
</IconButton>
</Tooltip>
<Divider orientation="vertical" variant="middle" flexItem sx={{ mx: 1 }} />
<Tooltip title="تغییر رمز عبور" arrow>
<IconButton aria-label="تغییر رمز عبور" color="primary" onClick={() => {
setOpenChangePass(true);
}}>
<VpnKeyIcon />
</IconButton>
</Tooltip>
</Box>
</Stack>
<Update open={openUpdate} setOpen={setOpenUpdate} />
<ChangePass open={openChangePass} setOpen={setOpenChangePass} />
</>
);
};
export default Profile;

View File

@@ -6,6 +6,7 @@ import { usePathname } from "next/navigation";
import { useEffect, useReducer, useState } from "react";
import { filterMenuItems } from "../utils/filterMenuItems";
import { pageMenu } from "../utils/pageMenu";
import Profile from "@/core/components/Profile";
function selectPage(item, route) {
if (item.type === "page") {
@@ -35,48 +36,48 @@ function reducer(state, action) {
return state.map((item) =>
action.id == item.id
? {
...item,
showSubitems: !item.showSubitems,
}
: item
...item,
showSubitems: !item.showSubitems,
}
: item,
);
case "COLLAPSE_SUB_ITEMS":
return state.map((item) => {
return item.hasSubitems
? {
...item,
Subitems: item.Subitems.map((subitem) =>
action.id === subitem.id
? {
...subitem,
showSubitems: !subitem.showSubitems,
}
: subitem
),
}
...item,
Subitems: item.Subitems.map((subitem) =>
action.id === subitem.id
? {
...subitem,
showSubitems: !subitem.showSubitems,
}
: subitem,
),
}
: item;
});
case "COLLAPSE_SUB_SECOND_ITEMS":
return state.map((item) => {
return item.hasSubitems
? {
...item,
Subitems: item.Subitems.map((subitem) => {
return subitem.hasSubitems
? {
...subitem,
Subitems: subitem.Subitems.map((secondSubitem) =>
action.id === secondSubitem.id
? {
...secondSubitem,
showSubitems: !secondSubitem.showSubitems,
}
: secondSubitem
),
}
: subitem;
}),
}
...item,
Subitems: item.Subitems.map((subitem) => {
return subitem.hasSubitems
? {
...subitem,
Subitems: subitem.Subitems.map((secondSubitem) =>
action.id === secondSubitem.id
? {
...secondSubitem,
showSubitems: !secondSubitem.showSubitems,
}
: secondSubitem,
),
}
: subitem;
}),
}
: item;
});
case "SELECTED":
@@ -105,20 +106,25 @@ const SidebarMenu = () => {
useEffect(() => {
selectedKey &&
document.querySelector(`[data-route="${selectedKey}"]`)?.scrollIntoView({
behavior: "smooth",
block: "center",
});
document.querySelector(`[data-route="${selectedKey}"]`)?.scrollIntoView({
behavior: "smooth",
block: "center",
});
}, [selectedKey]);
return (
userPermissions && (
<List sx={{ overflow: "auto", flex: 1 }} disablePadding dense>
{menuItems.map((menuItem) => {
return <SidebarListItems dispatch={dispatch} key={menuItem.id} menuItem={menuItem} />;
})}
</List>
)
<>
<Profile />
{
userPermissions && (
<List sx={{ overflow: "auto", flex: 1 }} disablePadding dense>
{menuItems.map((menuItem) => {
return <SidebarListItems dispatch={dispatch} key={menuItem.id} menuItem={menuItem} />;
})}
</List>
)
}
</>
);
};
export default SidebarMenu;

View File

@@ -1,4 +1,23 @@
import { Security } from "@mui/icons-material";
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 AssignmentLateIcon from "@mui/icons-material/AssignmentLate";
import LineAxisIcon from "@mui/icons-material/LineAxis";
export const pageMenu = [
{
@@ -6,7 +25,7 @@ export const pageMenu = [
label: "پیشخوان",
type: "page",
route: "/dashboard",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <SpaceDashboardIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["all"],
},
{
@@ -14,14 +33,14 @@ export const pageMenu = [
label: "مدیریت کاربران",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/user_management",
icon: <Security 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: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <AccountTreeIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
Subitems: [
{
@@ -29,7 +48,7 @@ export const pageMenu = [
label: "ثبت قرارداد و پروژه",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/rahdari_projects/finance",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <GavelIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["show-contract", "show-contract-province"],
},
{
@@ -37,7 +56,7 @@ export const pageMenu = [
label: "لیست پروژه ها",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/rahdari_projects/projects_list",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <BallotIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["all"],
},
{
@@ -45,7 +64,7 @@ export const pageMenu = [
label: "پروژه های پیشنهادی",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/rahdari_projects/proposal",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <AssistantIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["show-proposal", "show-proposal-province"],
},
{
@@ -53,7 +72,7 @@ export const pageMenu = [
label: "درخواست نمایندگان",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/rahdari_projects/lawmakers",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <AdminPanelSettingsIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["show-lawmaker", "show-lawmaker-province"],
},
{
@@ -61,7 +80,7 @@ export const pageMenu = [
label: "پراکندگی بر روی نقشه",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/map?type=rahdari_projects",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <MapIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["all"],
},
],
@@ -70,14 +89,14 @@ export const pageMenu = [
id: "roadItemManagment",
label: "فعالیت های روزانه",
type: "menu",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <FactCheckIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
Subitems: [
{
id: "roadItemManagmentSupervisor",
label: "ارزیابی",
type: "menu",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <SpeedIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
Subitems: [
{
@@ -96,7 +115,7 @@ export const pageMenu = [
id: "roadItemManagmentOparation",
label: "عملیات",
type: "menu",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <EngineeringIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
Subitems: [
{
@@ -120,7 +139,7 @@ export const pageMenu = [
label: "پراکندگی بر روی نقشه",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/map?type=road_items",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <MapIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: [
"show-road-item-supervise-cartable",
"show-road-item-supervise-cartable-province",
@@ -132,7 +151,7 @@ export const pageMenu = [
label: "گزارش ها",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/road_items/report",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <ReportIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: [
"show-road-item-supervise-cartable",
"show-road-item-supervise-cartable-province",
@@ -145,14 +164,14 @@ export const pageMenu = [
id: "roadPatrolManagment",
label: "گشت راهداری و ترابری",
type: "menu",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <FireTruckIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
Subitems: [
{
id: "roadPatrolManagmentSupervisor",
label: "ارزیابی",
type: "menu",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <SpeedIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
Subitems: [
{
@@ -171,7 +190,7 @@ export const pageMenu = [
id: "roadPatrolManagmentOparation",
label: "عملیات",
type: "menu",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <EngineeringIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
Subitems: [
{
@@ -195,7 +214,7 @@ export const pageMenu = [
label: "پراکندگی بر روی نقشه",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/map?type=road_patrols",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <MapIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: [
"add-road-patrol",
"show-road-patrol-supervise-cartable",
@@ -207,7 +226,7 @@ export const pageMenu = [
label: "گزارش ها",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/road_patrols/report",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <ReportIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: [
"add-road-patrol",
"show-road-patrol-supervise-cartable",
@@ -220,7 +239,7 @@ export const pageMenu = [
id: "inquiryPrivacyManagment",
label: "استعلام حریم راه",
type: "menu",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <DoorbellIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
Subitems: [
{
@@ -250,14 +269,14 @@ export const pageMenu = [
id: "safetyAndPrivacyManagment",
label: "نگهداری حریم راه",
type: "menu",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <RouteIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
Subitems: [
{
id: "safetyAndPrivacyManagmentOparation",
label: "عملیات",
type: "menu",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <EngineeringIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
Subitems: [
{
@@ -285,7 +304,7 @@ export const pageMenu = [
label: "پراکندگی بر روی نقشه",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/map?type=safety_and_privacy",
icon: <Security 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",
@@ -298,7 +317,7 @@ export const pageMenu = [
label: "گزارش ها",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/safety_and_privacy/report",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <ReportIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: [
"show-safety-and-privacy-operator-cartable",
"show-safety-and-privacy-operator-cartable-province",
@@ -312,14 +331,14 @@ export const pageMenu = [
id: "roadObservationsManagment",
label: "واکنش سریع",
type: "menu",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <ElectricBoltIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
Subitems: [
{
id: "roadObservationsManagmentSupervisor",
label: "ارزیابی",
type: "menu",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <SpeedIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
Subitems: [
{
@@ -336,14 +355,14 @@ export const pageMenu = [
label: "رسیدگی به شکایات",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/road_observations",
icon: <Security 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: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <EngineeringIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
Subitems: [
{
@@ -360,7 +379,7 @@ export const pageMenu = [
label: "پراکندگی بر روی نقشه",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/map?type=road_observations",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <MapIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["all"],
},
{
@@ -368,7 +387,7 @@ export const pageMenu = [
label: "گزارش ها",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/road_observations/report/index",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <ReportIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["all"],
},
],
@@ -377,7 +396,7 @@ export const pageMenu = [
id: "winterCampManagment",
label: "قرارگاه زمستانی",
type: "menu",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <CottageIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
Subitems: [
{
@@ -385,7 +404,7 @@ export const pageMenu = [
label: "محور های انسدادی",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/winter_camp",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <LineAxisIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["show-camp", "show-camp-province"],
},
{
@@ -393,7 +412,7 @@ export const pageMenu = [
label: "محور های حلقه اول",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/map?type=camp",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <LineAxisIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["show-camp", "show-camp-province"],
},
{
@@ -401,7 +420,7 @@ export const pageMenu = [
label: "گزارش ها",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/map?type=campNew",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <ReportIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["show-camp", "show-camp-province"],
},
],
@@ -410,14 +429,14 @@ export const pageMenu = [
id: "receiptManagment",
label: "خسارات وارده بر ابنیه فنی و تاسیسات راه",
type: "menu",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <GppMaybeIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
Subitems: [
{
id: "receiptManagmentOparation",
label: "عملیات",
type: "menu",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <EngineeringIcon sx={{ width: "inherit", height: "inherit" }} />,
hasSubitems: true,
Subitems: [
{
@@ -434,7 +453,7 @@ export const pageMenu = [
label: "گزارش ها",
type: "page",
route: process.env.NEXT_PUBLIC_API_URL + "/v2/receipt/report",
icon: <Security sx={{ width: "inherit", height: "inherit" }} />,
icon: <ReportIcon sx={{ width: "inherit", height: "inherit" }} />,
permissions: ["all"],
},
],

View File

@@ -1,4 +1,5 @@
"use client";
import { createContext, useCallback, useEffect, useState } from "react";
import LZString from "lz-string";