diff --git a/src/core/components/SidebarListItems.jsx b/src/components/layouts/dashboard/headerWithSidebar/Sidebar/SidebarListItems.jsx
similarity index 97%
rename from src/core/components/SidebarListItems.jsx
rename to src/components/layouts/dashboard/headerWithSidebar/Sidebar/SidebarListItems.jsx
index 050d9a6..05ee6df 100644
--- a/src/core/components/SidebarListItems.jsx
+++ b/src/components/layouts/dashboard/headerWithSidebar/Sidebar/SidebarListItems.jsx
@@ -1,7 +1,7 @@
-import SidebarSubitems from "@/core/components/SidebarSubitems";
import { ExpandLess, ExpandMore } from "@mui/icons-material";
import { Collapse, List, ListItem, ListItemButton, ListItemIcon, ListItemText } from "@mui/material";
import Link from "next/link";
+import SidebarSubitems from "./SidebarSubitems";
const SidebarListItems = ({ menuItem, dispatch }) => {
return (
diff --git a/src/core/components/SidebarMenu.jsx b/src/components/layouts/dashboard/headerWithSidebar/Sidebar/SidebarMenu.jsx
similarity index 91%
rename from src/core/components/SidebarMenu.jsx
rename to src/components/layouts/dashboard/headerWithSidebar/Sidebar/SidebarMenu.jsx
index 704fb5d..0a3026c 100644
--- a/src/core/components/SidebarMenu.jsx
+++ b/src/components/layouts/dashboard/headerWithSidebar/Sidebar/SidebarMenu.jsx
@@ -1,12 +1,12 @@
"use client";
-import SidebarListItems from "@/core/components/SidebarListItems";
import { usePermissions } from "@/lib/hooks/usePermissions";
import { List } from "@mui/material";
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";
+import { filterMenuItems } from "@/core/utils/filterMenuItems";
+import { pageMenu } from "@/core/utils/pageMenu";
+import SidebarListItems from "./SidebarListItems";
function selectPage(item, route) {
if (item.type === "page") {
@@ -106,10 +106,10 @@ 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 (
@@ -117,7 +117,7 @@ const SidebarMenu = () => {
{
userPermissions && (
-
+
{menuItems.map((menuItem) => {
return ;
})}
diff --git a/src/core/components/SidebarSubitems.jsx b/src/components/layouts/dashboard/headerWithSidebar/Sidebar/SidebarSubitems.jsx
similarity index 100%
rename from src/core/components/SidebarSubitems.jsx
rename to src/components/layouts/dashboard/headerWithSidebar/Sidebar/SidebarSubitems.jsx
diff --git a/src/components/layouts/dashboard/headerWithSidebar/index.jsx b/src/components/layouts/dashboard/headerWithSidebar/index.jsx
index 99cb198..c4e3fde 100644
--- a/src/components/layouts/dashboard/headerWithSidebar/index.jsx
+++ b/src/components/layouts/dashboard/headerWithSidebar/index.jsx
@@ -1,5 +1,4 @@
"use client";
-import SidebarMenu from "@/core/components/SidebarMenu";
import ChevronRightIcon from "@mui/icons-material/ChevronRight";
import MenuIcon from "@mui/icons-material/Menu";
import { Box, Drawer, IconButton, Stack, styled, Toolbar, Typography } from "@mui/material";
@@ -8,6 +7,7 @@ import { useState } from "react";
import HeaderMenu from "./HeaderMenu";
import moment from "jalali-moment";
import { headerMenu } from "@/core/utils/headerMenu";
+import SidebarMenu from "./Sidebar/SidebarMenu";
const drawerWidth = 300;
const headersHeight = 136
@@ -57,7 +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 now = moment().locale("fa").format("YYYY/MM/DD");
const handleDrawerOpen = () => {
setOpen(true);