LFFE-10 create base folder and page of reports
This commit is contained in:
@@ -34,6 +34,7 @@
|
|||||||
},
|
},
|
||||||
"sidebar": {
|
"sidebar": {
|
||||||
"dashboard": "داشبورد",
|
"dashboard": "داشبورد",
|
||||||
|
"reports": "گزارشات",
|
||||||
"passenger-office-chief": "اداره مسافر",
|
"passenger-office-chief": "اداره مسافر",
|
||||||
"machinery-expert": "ماشین آلات",
|
"machinery-expert": "ماشین آلات",
|
||||||
"passenger-boss": "رئیس مسافر ",
|
"passenger-boss": "رئیس مسافر ",
|
||||||
@@ -93,6 +94,7 @@
|
|||||||
},
|
},
|
||||||
"Dashboard": {
|
"Dashboard": {
|
||||||
"dashboard_page": "داشبورد",
|
"dashboard_page": "داشبورد",
|
||||||
|
"reports": "گزارشات",
|
||||||
"passenger_boss_page": "رئیس مسافر",
|
"passenger_boss_page": "رئیس مسافر",
|
||||||
"transportation_assistance": "معاونت حمل و نقل",
|
"transportation_assistance": "معاونت حمل و نقل",
|
||||||
"change_password": "تغییر رمز عبور",
|
"change_password": "تغییر رمز عبور",
|
||||||
@@ -467,5 +469,7 @@
|
|||||||
"navgan_id": "کد ناوگان",
|
"navgan_id": "کد ناوگان",
|
||||||
"button-cancel": "انصراف",
|
"button-cancel": "انصراف",
|
||||||
"button-add": "ثبت"
|
"button-add": "ثبت"
|
||||||
|
},
|
||||||
|
"reports": {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
5
src/components/dashboard/reports/index.jsx
Normal file
5
src/components/dashboard/reports/index.jsx
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
const DashboardReportsComponent = (props) => (
|
||||||
|
<>hiiiiii</>
|
||||||
|
);
|
||||||
|
|
||||||
|
export default DashboardReportsComponent;
|
||||||
@@ -13,6 +13,7 @@ import PaidIcon from '@mui/icons-material/Paid';
|
|||||||
import ManageAccountsIcon from '@mui/icons-material/ManageAccounts';
|
import ManageAccountsIcon from '@mui/icons-material/ManageAccounts';
|
||||||
import PersonIcon from '@mui/icons-material/Person';
|
import PersonIcon from '@mui/icons-material/Person';
|
||||||
import AccessibilityIcon from '@mui/icons-material/Accessibility';
|
import AccessibilityIcon from '@mui/icons-material/Accessibility';
|
||||||
|
import AssessmentIcon from '@mui/icons-material/Assessment';
|
||||||
|
|
||||||
const sidebarMenu = [
|
const sidebarMenu = [
|
||||||
[
|
[
|
||||||
@@ -24,6 +25,15 @@ const sidebarMenu = [
|
|||||||
selected: false,
|
selected: false,
|
||||||
permission: "all",
|
permission: "all",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: "sidebar.reports",
|
||||||
|
name: "reports",
|
||||||
|
type: "page",
|
||||||
|
route: "/dashboard/reports",
|
||||||
|
icon: <AssessmentIcon/>,
|
||||||
|
selected: false,
|
||||||
|
permission: "all",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: "sidebar.passenger-office-chief",
|
key: "sidebar.passenger-office-chief",
|
||||||
secondary: "secondary.passenger-office",
|
secondary: "secondary.passenger-office",
|
||||||
@@ -146,7 +156,7 @@ const sidebarMenu = [
|
|||||||
route: "/dashboard/expert-management",
|
route: "/dashboard/expert-management",
|
||||||
icon: <ManageAccountsIcon/>,
|
icon: <ManageAccountsIcon/>,
|
||||||
selected: false,
|
selected: false,
|
||||||
permission: "manage_navgan_loan",
|
permission: "manage_experts",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "sidebar.user-management",
|
key: "sidebar.user-management",
|
||||||
|
|||||||
25
src/pages/dashboard/reports/index.jsx
Normal file
25
src/pages/dashboard/reports/index.jsx
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
||||||
|
import {parse} from "next-useragent";
|
||||||
|
import DashboardReportsComponent from "@/components/dashboard/reports";
|
||||||
|
|
||||||
|
// const requiredPermissions = ["reports"];
|
||||||
|
export default function Reports() {
|
||||||
|
return (
|
||||||
|
<WithAuthMiddleware>
|
||||||
|
{/*<RolePermissionMiddleware requiredPermissions={requiredPermissions}>*/}
|
||||||
|
<DashboardReportsComponent/>
|
||||||
|
{/*</RolePermissionMiddleware>*/}
|
||||||
|
</WithAuthMiddleware>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function getServerSideProps({req, locale}) {
|
||||||
|
const {isBot} = parse(req.headers["user-agent"]);
|
||||||
|
return {
|
||||||
|
props: {
|
||||||
|
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||||
|
title: "Dashboard.reports",
|
||||||
|
isBot,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user