fixed bugs for dashboard layout

This commit is contained in:
AmirHossein Mahmoodi
2023-12-11 16:29:59 +03:30
parent 61d947cac6
commit fc944c0d35
3 changed files with 21 additions and 10 deletions

View File

@@ -16,7 +16,7 @@
"@mui/icons-material": "^5.11.16",
"@mui/lab": "^5.0.0-alpha.152",
"@mui/material": "^5.12.0",
"@witel/webapp-builder": "^1.0.2",
"@witel/webapp-builder": "^1.0.6",
"axios": "^1.4.0",
"colord": "^2.9.3",
"eslint": "8.36.0",

View File

@@ -6,27 +6,30 @@ const sidebarMenu = [
[
{
key: "sidebar.dashboard",
name: "sidebar.dashboard",
type: "page",
route: "/dashboard",
icon: <SpaceDashboardIcon/>,
icon: <SpaceDashboardIcon sx={{width: 'inherit', height: 'inherit'}}/>,
selected: false,
permission_name: "all"
permission: "all"
},
{
key: "sidebar.add-request-loan",
name: "sidebar.add-request-loan",
type: "page",
route: "/dashboard/navgan/add-request-loan",
icon: <DataSaverOnIcon/>,
icon: <DataSaverOnIcon sx={{width: 'inherit', height: 'inherit'}}/>,
selected: false,
permission_name: "can_request_a_new_loan"
permission: "can_request_a_new_loan"
},
{
key: "sidebar.followUp-loan",
name: "sidebar.followUp-loan",
type: "page",
route: "/dashboard/navgan/followUp-loan",
icon: <BookmarkAddedIcon/>,
icon: <BookmarkAddedIcon sx={{width: 'inherit', height: 'inherit'}}/>,
selected: false,
permission_name: "all"
permission: "all"
},
],
];

View File

@@ -1,13 +1,21 @@
import {DashboardLayout as DashboardLayoutPure} from "@witel/webapp-builder";
import {DashboardLayout as DashboardLayoutPure, useUser} from "@witel/webapp-builder";
import headerProfileItems from "@/core/data/headerProfileItems";
import sidebarMenu from "@/core/data/sidebarMenu";
import {GET_SIDEBAR_NOTIFICATION} from "@/core/data/apiRoutes";
const DashboardLayout = (props) => {
const {user} = useUser()
return (
<>
<DashboardLayoutPure headerProfileItems={headerProfileItems} sidebarMenu={sidebarMenu}
urlNotification={GET_SIDEBAR_NOTIFICATION} {...props} />
<DashboardLayoutPure
loginUrl={'/login'}
user_introduction={user.type_name}
headerProfileItems={headerProfileItems}
sidebarMenu={sidebarMenu}
urlNotification={GET_SIDEBAR_NOTIFICATION}
BC_segmentsToRemove={[]}
{...props}
/>
</>
)
}