LFFE-9 Merge branch 'feature/LFFE-9_Layout_app' into 'develop'
This commit is contained in:
@@ -1,17 +1,14 @@
|
|||||||
import CenterLayout from "@/layouts/CenterLayout";
|
import CenterLayout from "@/layouts/CenterLayout";
|
||||||
import {Container} from "@mui/material";
|
import {Container} from "@mui/material";
|
||||||
import ChangePasswordForm from "@/components/dashboard/change-password/change-password-form";
|
import ChangePasswordForm from "@/components/dashboard/change-password/change-password-form";
|
||||||
import DashboardLayouts from "@/components/layouts/Dashboard";
|
|
||||||
|
|
||||||
const DashboardChangePasswordComponent = () => {
|
const DashboardChangePasswordComponent = () => {
|
||||||
return (
|
return (
|
||||||
<DashboardLayouts>
|
<CenterLayout>
|
||||||
<CenterLayout>
|
<Container maxWidth="sm">
|
||||||
<Container maxWidth="sm">
|
<ChangePasswordForm/>
|
||||||
<ChangePasswordForm />
|
</Container>
|
||||||
</Container>
|
</CenterLayout>
|
||||||
</CenterLayout>
|
|
||||||
</DashboardLayouts>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
export default DashboardChangePasswordComponent;
|
export default DashboardChangePasswordComponent;
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import TableRowActions from "./TableRowActions";
|
|||||||
import moment from "jalali-moment";
|
import moment from "jalali-moment";
|
||||||
import DataTable from "@/core/components/DataTable";
|
import DataTable from "@/core/components/DataTable";
|
||||||
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
||||||
import DashboardLayouts from "@/components/layouts/Dashboard";
|
|
||||||
|
|
||||||
function DashboardCommercialChiefComponent() {
|
function DashboardCommercialChiefComponent() {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
@@ -126,30 +125,28 @@ function DashboardCommercialChiefComponent() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DashboardLayouts>
|
<Box sx={{px: 3}}>
|
||||||
<Box sx={{px: 3}}>
|
<DataTable
|
||||||
<DataTable
|
tableUrl={GET_COMMERCIAL_CHIEF}
|
||||||
tableUrl={GET_COMMERCIAL_CHIEF}
|
columns={columns}
|
||||||
columns={columns}
|
selectableRow={false}
|
||||||
selectableRow={false}
|
enableCustomToolbar={false}
|
||||||
enableCustomToolbar={false}
|
enableLastUpdate={true}
|
||||||
enableLastUpdate={true}
|
sorting={[{
|
||||||
sorting={[{
|
id: 'id', desc: false
|
||||||
id: 'id', desc: false
|
}]}
|
||||||
}]}
|
enablePinning={true}
|
||||||
enablePinning={true}
|
enableDensityToggle={false}
|
||||||
enableDensityToggle={false}
|
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
|
||||||
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
|
enableColumnFilters={true}
|
||||||
enableColumnFilters={true}
|
enableHiding={true}
|
||||||
enableHiding={true}
|
enableFullScreenToggle={false}
|
||||||
enableFullScreenToggle={false}
|
enableGlobalFilter={false}
|
||||||
enableGlobalFilter={false}
|
enableColumnResizing={false} // if you want true this you should change renderRowActions props ** see https://www.material-react-table.com/docs/guides/row-actions
|
||||||
enableColumnResizing={false} // if you want true this you should change renderRowActions props ** see https://www.material-react-table.com/docs/guides/row-actions
|
enableRowActions={true}
|
||||||
enableRowActions={true}
|
TableRowAction={TableRowActions}
|
||||||
TableRowAction={TableRowActions}
|
/>
|
||||||
/>
|
</Box>
|
||||||
</Box>
|
|
||||||
</DashboardLayouts>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import TableRowActions from "./TableRowActions";
|
|||||||
import moment from "jalali-moment";
|
import moment from "jalali-moment";
|
||||||
import DataTable from "@/core/components/DataTable";
|
import DataTable from "@/core/components/DataTable";
|
||||||
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
||||||
import DashboardLayouts from "@/components/layouts/Dashboard";
|
|
||||||
|
|
||||||
function DashboardDevelopmentAssistantComponent() {
|
function DashboardDevelopmentAssistantComponent() {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
@@ -125,32 +124,30 @@ function DashboardDevelopmentAssistantComponent() {
|
|||||||
],
|
],
|
||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DashboardLayouts>
|
<Box sx={{px: 3}}>
|
||||||
<Box sx={{px: 3}}>
|
<DataTable
|
||||||
<DataTable
|
tableUrl={GET_DEVELOPMENT_ASSISTANT}
|
||||||
tableUrl={GET_DEVELOPMENT_ASSISTANT}
|
columns={columns}
|
||||||
columns={columns}
|
selectableRow={false}
|
||||||
selectableRow={false}
|
enableCustomToolbar={false}
|
||||||
enableCustomToolbar={false}
|
enableLastUpdate={true}
|
||||||
enableLastUpdate={true}
|
enablePinning={true}
|
||||||
enablePinning={true}
|
enableDensityToggle={false}
|
||||||
enableDensityToggle={false}
|
sorting={[{
|
||||||
sorting={[{
|
id: 'id', desc: false
|
||||||
id: 'id', desc: false
|
}]}
|
||||||
}]}
|
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
|
||||||
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
|
enableColumnFilters={true}
|
||||||
enableColumnFilters={true}
|
enableHiding={true}
|
||||||
enableHiding={true}
|
enableFullScreenToggle={false}
|
||||||
enableFullScreenToggle={false}
|
enableGlobalFilter={false}
|
||||||
enableGlobalFilter={false}
|
enableColumnResizing={false} // if you want true this you should change renderRowActions props ** see https://www.material-react-table.com/docs/guides/row-actions
|
||||||
enableColumnResizing={false} // if you want true this you should change renderRowActions props ** see https://www.material-react-table.com/docs/guides/row-actions
|
enableRowActions={true}
|
||||||
enableRowActions={true}
|
TableRowAction={TableRowActions}
|
||||||
TableRowAction={TableRowActions}
|
/>
|
||||||
/>
|
</Box>
|
||||||
</Box>
|
|
||||||
</DashboardLayouts>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import {UPDATE_AVATAR} from "@/core/data/apiRoutes";
|
|||||||
import useDirection from "@/lib/app/hooks/useDirection";
|
import useDirection from "@/lib/app/hooks/useDirection";
|
||||||
import Notifications from "@/core/components/notifications";
|
import Notifications from "@/core/components/notifications";
|
||||||
import ImageResizer from "@/core/components/ImageConvertor";
|
import ImageResizer from "@/core/components/ImageConvertor";
|
||||||
import DashboardLayouts from "@/components/layouts/Dashboard";
|
|
||||||
|
|
||||||
const DashboardEditProfile = () => {
|
const DashboardEditProfile = () => {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
@@ -54,169 +53,167 @@ const DashboardEditProfile = () => {
|
|||||||
const validationSchema = Yup.object().shape({});
|
const validationSchema = Yup.object().shape({});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DashboardLayouts>
|
<CenterLayout>
|
||||||
<CenterLayout>
|
<Container maxWidth="sm">
|
||||||
<Container maxWidth="sm">
|
<Formik
|
||||||
<Formik
|
initialValues={initialValues}
|
||||||
initialValues={initialValues}
|
onSubmit={handleSubmit}
|
||||||
onSubmit={handleSubmit}
|
validationSchema={validationSchema}
|
||||||
validationSchema={validationSchema}
|
>
|
||||||
>
|
{(props) => (
|
||||||
{(props) => (
|
<StyledForm
|
||||||
<StyledForm
|
onSubmit={(e) => {
|
||||||
onSubmit={(e) => {
|
e.preventDefault();
|
||||||
e.preventDefault();
|
props.handleSubmit();
|
||||||
props.handleSubmit();
|
}}
|
||||||
}}
|
>
|
||||||
>
|
<Paper elevation={0}>
|
||||||
<Paper elevation={0}>
|
<Stack spacing={3} sx={{p: 5}} component="div">
|
||||||
<Stack spacing={3} sx={{p: 5}} component="div">
|
<Typography margin={2} variant="h4" textAlign="center">
|
||||||
<Typography margin={2} variant="h4" textAlign="center">
|
{t("UpdateProfile.typography_edit_profile")}
|
||||||
{t("UpdateProfile.typography_edit_profile")}
|
</Typography>
|
||||||
</Typography>
|
<Box
|
||||||
<Box
|
sx={{
|
||||||
sx={{
|
display: "flex",
|
||||||
display: "flex",
|
flexDirection: "column",
|
||||||
flexDirection: "column",
|
alignItems: "center",
|
||||||
alignItems: "center",
|
justifyContent: "center",
|
||||||
justifyContent: "center",
|
}}
|
||||||
}}
|
>
|
||||||
>
|
<AvatarUpload
|
||||||
<AvatarUpload
|
user={user}
|
||||||
user={user}
|
setFieldValue={props.setFieldValue}
|
||||||
setFieldValue={props.setFieldValue}
|
valueAvatar="expert_avatar"
|
||||||
valueAvatar="expert_avatar"
|
changeFlag="change_avatar"
|
||||||
changeFlag="change_avatar"
|
/>
|
||||||
|
</Box>
|
||||||
|
<Grid container spacing={2} sx={{pb: 2}}>
|
||||||
|
<Grid item xs={12} sm={6}>
|
||||||
|
<Field
|
||||||
|
as={TextField}
|
||||||
|
name="username"
|
||||||
|
label={t("UpdateProfile.text_field_username")}
|
||||||
|
variant="outlined"
|
||||||
|
margin="normal"
|
||||||
|
size="small"
|
||||||
|
disabled={true}
|
||||||
|
error={
|
||||||
|
props.touched.username && props.errors.username
|
||||||
|
? true
|
||||||
|
: false
|
||||||
|
}
|
||||||
|
helperText={
|
||||||
|
props.touched.username
|
||||||
|
? props.errors.username
|
||||||
|
: null
|
||||||
|
}
|
||||||
|
sx={{
|
||||||
|
width: "100%",
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</Box>
|
|
||||||
<Grid container spacing={2} sx={{pb: 2}}>
|
|
||||||
<Grid item xs={12} sm={6}>
|
|
||||||
<Field
|
|
||||||
as={TextField}
|
|
||||||
name="username"
|
|
||||||
label={t("UpdateProfile.text_field_username")}
|
|
||||||
variant="outlined"
|
|
||||||
margin="normal"
|
|
||||||
size="small"
|
|
||||||
disabled={true}
|
|
||||||
error={
|
|
||||||
props.touched.username && props.errors.username
|
|
||||||
? true
|
|
||||||
: false
|
|
||||||
}
|
|
||||||
helperText={
|
|
||||||
props.touched.username
|
|
||||||
? props.errors.username
|
|
||||||
: null
|
|
||||||
}
|
|
||||||
sx={{
|
|
||||||
width: "100%",
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</Grid>
|
|
||||||
<Grid item xs={12} sm={6}>
|
|
||||||
<Field
|
|
||||||
as={TextField}
|
|
||||||
name="name"
|
|
||||||
label={t("UpdateProfile.text_field_name")}
|
|
||||||
variant="outlined"
|
|
||||||
margin="normal"
|
|
||||||
size="small"
|
|
||||||
disabled={true}
|
|
||||||
error={
|
|
||||||
props.touched.name && props.errors.name
|
|
||||||
? true
|
|
||||||
: false
|
|
||||||
}
|
|
||||||
helperText={
|
|
||||||
props.touched.name ? props.errors.name : null
|
|
||||||
}
|
|
||||||
sx={{
|
|
||||||
width: "100%",
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</Grid>
|
|
||||||
<Grid item xs={12} sm={6}>
|
|
||||||
<Field
|
|
||||||
as={TextField}
|
|
||||||
name="email"
|
|
||||||
label={t("UpdateProfile.text_field_email")}
|
|
||||||
variant="outlined"
|
|
||||||
margin="normal"
|
|
||||||
size="small"
|
|
||||||
disabled={true}
|
|
||||||
error={
|
|
||||||
props.touched.email && props.errors.email
|
|
||||||
? true
|
|
||||||
: false
|
|
||||||
}
|
|
||||||
helperText={
|
|
||||||
props.touched.email ? props.errors.email : null
|
|
||||||
}
|
|
||||||
sx={{
|
|
||||||
width: "100%",
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<Grid item xs={12} sm={6}>
|
|
||||||
<Field
|
|
||||||
as={TextField}
|
|
||||||
name="province_name"
|
|
||||||
label={t("UpdateProfile.text_field_province_name")}
|
|
||||||
variant="outlined"
|
|
||||||
margin="normal"
|
|
||||||
size="small"
|
|
||||||
disabled={true}
|
|
||||||
error={
|
|
||||||
props.touched.province_name &&
|
|
||||||
props.errors.province_name
|
|
||||||
? true
|
|
||||||
: false
|
|
||||||
}
|
|
||||||
helperText={
|
|
||||||
props.touched.province_name
|
|
||||||
? props.errors.province_name
|
|
||||||
: null
|
|
||||||
}
|
|
||||||
sx={{
|
|
||||||
width: "100%",
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</Grid>
|
|
||||||
<Grid item xs={12} sm={6}>
|
|
||||||
<Field
|
|
||||||
as={TextField}
|
|
||||||
name="position"
|
|
||||||
label={t("UpdateProfile.text_field_position")}
|
|
||||||
variant="outlined"
|
|
||||||
margin="normal"
|
|
||||||
size="small"
|
|
||||||
disabled={true}
|
|
||||||
error={
|
|
||||||
props.touched.position && props.errors.position
|
|
||||||
? true
|
|
||||||
: false
|
|
||||||
}
|
|
||||||
helperText={
|
|
||||||
props.touched.position
|
|
||||||
? props.errors.position
|
|
||||||
: null
|
|
||||||
}
|
|
||||||
sx={{
|
|
||||||
width: "100%",
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</Grid>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Stack>
|
<Grid item xs={12} sm={6}>
|
||||||
</Paper>
|
<Field
|
||||||
</StyledForm>
|
as={TextField}
|
||||||
)}
|
name="name"
|
||||||
</Formik>
|
label={t("UpdateProfile.text_field_name")}
|
||||||
</Container>
|
variant="outlined"
|
||||||
</CenterLayout>
|
margin="normal"
|
||||||
</DashboardLayouts>
|
size="small"
|
||||||
|
disabled={true}
|
||||||
|
error={
|
||||||
|
props.touched.name && props.errors.name
|
||||||
|
? true
|
||||||
|
: false
|
||||||
|
}
|
||||||
|
helperText={
|
||||||
|
props.touched.name ? props.errors.name : null
|
||||||
|
}
|
||||||
|
sx={{
|
||||||
|
width: "100%",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={12} sm={6}>
|
||||||
|
<Field
|
||||||
|
as={TextField}
|
||||||
|
name="email"
|
||||||
|
label={t("UpdateProfile.text_field_email")}
|
||||||
|
variant="outlined"
|
||||||
|
margin="normal"
|
||||||
|
size="small"
|
||||||
|
disabled={true}
|
||||||
|
error={
|
||||||
|
props.touched.email && props.errors.email
|
||||||
|
? true
|
||||||
|
: false
|
||||||
|
}
|
||||||
|
helperText={
|
||||||
|
props.touched.email ? props.errors.email : null
|
||||||
|
}
|
||||||
|
sx={{
|
||||||
|
width: "100%",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Grid item xs={12} sm={6}>
|
||||||
|
<Field
|
||||||
|
as={TextField}
|
||||||
|
name="province_name"
|
||||||
|
label={t("UpdateProfile.text_field_province_name")}
|
||||||
|
variant="outlined"
|
||||||
|
margin="normal"
|
||||||
|
size="small"
|
||||||
|
disabled={true}
|
||||||
|
error={
|
||||||
|
props.touched.province_name &&
|
||||||
|
props.errors.province_name
|
||||||
|
? true
|
||||||
|
: false
|
||||||
|
}
|
||||||
|
helperText={
|
||||||
|
props.touched.province_name
|
||||||
|
? props.errors.province_name
|
||||||
|
: null
|
||||||
|
}
|
||||||
|
sx={{
|
||||||
|
width: "100%",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={12} sm={6}>
|
||||||
|
<Field
|
||||||
|
as={TextField}
|
||||||
|
name="position"
|
||||||
|
label={t("UpdateProfile.text_field_position")}
|
||||||
|
variant="outlined"
|
||||||
|
margin="normal"
|
||||||
|
size="small"
|
||||||
|
disabled={true}
|
||||||
|
error={
|
||||||
|
props.touched.position && props.errors.position
|
||||||
|
? true
|
||||||
|
: false
|
||||||
|
}
|
||||||
|
helperText={
|
||||||
|
props.touched.position
|
||||||
|
? props.errors.position
|
||||||
|
: null
|
||||||
|
}
|
||||||
|
sx={{
|
||||||
|
width: "100%",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Stack>
|
||||||
|
</Paper>
|
||||||
|
</StyledForm>
|
||||||
|
)}
|
||||||
|
</Formik>
|
||||||
|
</Container>
|
||||||
|
</CenterLayout>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import DataTable from "@/core/components/DataTable";
|
|||||||
import TableToolbar from "@/components/dashboard/expert-management/TableToolbar";
|
import TableToolbar from "@/components/dashboard/expert-management/TableToolbar";
|
||||||
import moment from "jalali-moment";
|
import moment from "jalali-moment";
|
||||||
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
||||||
import DashboardLayouts from "@/components/layouts/Dashboard";
|
|
||||||
|
|
||||||
function DashboardExpertManagementComponent() {
|
function DashboardExpertManagementComponent() {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
@@ -138,33 +137,31 @@ function DashboardExpertManagementComponent() {
|
|||||||
],
|
],
|
||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DashboardLayouts>
|
<Box sx={{px: 3}}>
|
||||||
<Box sx={{px: 3}}>
|
<DataTable
|
||||||
<DataTable
|
tableUrl={GET_EXPERT_MANAGEMENT}
|
||||||
tableUrl={GET_EXPERT_MANAGEMENT}
|
columns={columns}
|
||||||
columns={columns}
|
selectableRow={false}
|
||||||
selectableRow={false}
|
CustomToolbar={TableToolbar}
|
||||||
CustomToolbar={TableToolbar}
|
sorting={[{
|
||||||
sorting={[{
|
id: 'id', desc: true
|
||||||
id: 'id', desc: true
|
}]}
|
||||||
}]}
|
enableCustomToolbar={true}
|
||||||
enableCustomToolbar={true}
|
enableLastUpdate={true}
|
||||||
enableLastUpdate={true}
|
enablePinning={true}
|
||||||
enablePinning={true}
|
enableDensityToggle={false}
|
||||||
enableDensityToggle={false}
|
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
|
||||||
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
|
enableColumnFilters={true}
|
||||||
enableColumnFilters={true}
|
enableHiding={true}
|
||||||
enableHiding={true}
|
enableFullScreenToggle={false}
|
||||||
enableFullScreenToggle={false}
|
enableGlobalFilter={false}
|
||||||
enableGlobalFilter={false}
|
enableColumnResizing={false} // if you want true this you should change renderRowActions props ** see https://www.material-react-table.com/docs/guides/row-actions
|
||||||
enableColumnResizing={false} // if you want true this you should change renderRowActions props ** see https://www.material-react-table.com/docs/guides/row-actions
|
enableRowActions={true}
|
||||||
enableRowActions={true}
|
TableRowAction={TableRowActions}
|
||||||
TableRowAction={TableRowActions}
|
/>
|
||||||
/>
|
</Box>
|
||||||
</Box>
|
|
||||||
</DashboardLayouts>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
import DashboardLayouts from "@/components/layouts/Dashboard";
|
|
||||||
|
|
||||||
|
|
||||||
const DashboardFirstComponent = () => {
|
const DashboardFirstComponent = () => {
|
||||||
return <DashboardLayouts></DashboardLayouts>
|
return <></>
|
||||||
};
|
};
|
||||||
|
|
||||||
export default DashboardFirstComponent;
|
export default DashboardFirstComponent;
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import TableRowActions from "./TableRowActions";
|
|||||||
import moment from "jalali-moment";
|
import moment from "jalali-moment";
|
||||||
import DataTable from "@/core/components/DataTable";
|
import DataTable from "@/core/components/DataTable";
|
||||||
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
||||||
import DashboardLayouts from "@/components/layouts/Dashboard";
|
|
||||||
|
|
||||||
function DashboardInspectorExpertComponent() {
|
function DashboardInspectorExpertComponent() {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
@@ -124,32 +123,30 @@ function DashboardInspectorExpertComponent() {
|
|||||||
],
|
],
|
||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DashboardLayouts>
|
<Box sx={{px: 3}}>
|
||||||
<Box sx={{px: 3}}>
|
<DataTable
|
||||||
<DataTable
|
tableUrl={GET_INSPECTOR_EXPERT}
|
||||||
tableUrl={GET_INSPECTOR_EXPERT}
|
columns={columns}
|
||||||
columns={columns}
|
selectableRow={false}
|
||||||
selectableRow={false}
|
enableCustomToolbar={false}
|
||||||
enableCustomToolbar={false}
|
enableLastUpdate={true}
|
||||||
enableLastUpdate={true}
|
enablePinning={true}
|
||||||
enablePinning={true}
|
sorting={[{
|
||||||
sorting={[{
|
id: 'id', desc: false
|
||||||
id: 'id', desc: false
|
}]}
|
||||||
}]}
|
enableDensityToggle={false}
|
||||||
enableDensityToggle={false}
|
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
|
||||||
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
|
enableColumnFilters={true}
|
||||||
enableColumnFilters={true}
|
enableHiding={true}
|
||||||
enableHiding={true}
|
enableFullScreenToggle={false}
|
||||||
enableFullScreenToggle={false}
|
enableGlobalFilter={false}
|
||||||
enableGlobalFilter={false}
|
enableColumnResizing={false} // if you want true this you shold change renderRowActions props ** see https://www.material-react-table.com/docs/guides/row-actions
|
||||||
enableColumnResizing={false} // if you want true this you shold change renderRowActions props ** see https://www.material-react-table.com/docs/guides/row-actions
|
enableRowActions={true}
|
||||||
enableRowActions={true}
|
TableRowAction={TableRowActions}
|
||||||
TableRowAction={TableRowActions}
|
/>
|
||||||
/>
|
</Box>
|
||||||
</Box>
|
|
||||||
</DashboardLayouts>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import TableRowActions from "./TableRowActions";
|
|||||||
import moment from "jalali-moment";
|
import moment from "jalali-moment";
|
||||||
import DataTable from "@/core/components/DataTable";
|
import DataTable from "@/core/components/DataTable";
|
||||||
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
||||||
import DashboardLayouts from "@/components/layouts/Dashboard";
|
|
||||||
|
|
||||||
function DashboardMachinaryOfficeComponent() {
|
function DashboardMachinaryOfficeComponent() {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
@@ -156,30 +155,28 @@ function DashboardMachinaryOfficeComponent() {
|
|||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<DashboardLayouts>
|
<Box sx={{px: 3}}>
|
||||||
<Box sx={{px: 3}}>
|
<DataTable
|
||||||
<DataTable
|
tableUrl={GET_MACHINARY_OFFICE}
|
||||||
tableUrl={GET_MACHINARY_OFFICE}
|
columns={columns}
|
||||||
columns={columns}
|
selectableRow={false}
|
||||||
selectableRow={false}
|
enableCustomToolbar={false}
|
||||||
enableCustomToolbar={false}
|
enableLastUpdate={true}
|
||||||
enableLastUpdate={true}
|
sorting={[{
|
||||||
sorting={[{
|
id: 'id', desc: false
|
||||||
id: 'id', desc: false
|
}]}
|
||||||
}]}
|
enablePinning={true}
|
||||||
enablePinning={true}
|
enableDensityToggle={false}
|
||||||
enableDensityToggle={false}
|
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
|
||||||
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
|
enableColumnFilters={true}
|
||||||
enableColumnFilters={true}
|
enableHiding={true}
|
||||||
enableHiding={true}
|
enableFullScreenToggle={false}
|
||||||
enableFullScreenToggle={false}
|
enableGlobalFilter={false}
|
||||||
enableGlobalFilter={false}
|
enableColumnResizing={false} // if you want true this you shold change renderRowActions props ** see https://www.material-react-table.com/docs/guides/row-actions
|
||||||
enableColumnResizing={false} // if you want true this you shold change renderRowActions props ** see https://www.material-react-table.com/docs/guides/row-actions
|
enableRowActions={true}
|
||||||
enableRowActions={true}
|
TableRowAction={TableRowActions}
|
||||||
TableRowAction={TableRowActions}
|
/>
|
||||||
/>
|
</Box>
|
||||||
</Box>
|
|
||||||
</DashboardLayouts>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import TableRowActions from "./TableRowActions";
|
|||||||
import DataTable from "@/core/components/DataTable";
|
import DataTable from "@/core/components/DataTable";
|
||||||
import moment from "jalali-moment";
|
import moment from "jalali-moment";
|
||||||
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
||||||
import DashboardLayouts from "@/components/layouts/Dashboard";
|
|
||||||
|
|
||||||
function DashboardNavganLoanManagementComponent() {
|
function DashboardNavganLoanManagementComponent() {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
@@ -134,32 +133,30 @@ function DashboardNavganLoanManagementComponent() {
|
|||||||
],
|
],
|
||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DashboardLayouts>
|
<Box sx={{px: 3}}>
|
||||||
<Box sx={{px: 3}}>
|
<DataTable
|
||||||
<DataTable
|
tableUrl={GET_LOAN_MANAGEMENT_NAVGAN}
|
||||||
tableUrl={GET_LOAN_MANAGEMENT_NAVGAN}
|
columns={columns}
|
||||||
columns={columns}
|
selectableRow={false}
|
||||||
selectableRow={false}
|
enableCustomToolbar={false}
|
||||||
enableCustomToolbar={false}
|
enableLastUpdate={true}
|
||||||
enableLastUpdate={true}
|
sorting={[{
|
||||||
sorting={[{
|
id: 'id', desc: false
|
||||||
id: 'id', desc: false
|
}]}
|
||||||
}]}
|
enablePinning={true}
|
||||||
enablePinning={true}
|
enableDensityToggle={false}
|
||||||
enableDensityToggle={false}
|
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
|
||||||
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
|
enableColumnFilters={true}
|
||||||
enableColumnFilters={true}
|
enableHiding={true}
|
||||||
enableHiding={true}
|
enableFullScreenToggle={false}
|
||||||
enableFullScreenToggle={false}
|
enableGlobalFilter={false}
|
||||||
enableGlobalFilter={false}
|
enableColumnResizing={false} // if you want true this you should change renderRowActions props ** see https://www.material-react-table.com/docs/guides/row-actions
|
||||||
enableColumnResizing={false} // if you want true this you should change renderRowActions props ** see https://www.material-react-table.com/docs/guides/row-actions
|
enableRowActions={true}
|
||||||
enableRowActions={true}
|
TableRowAction={TableRowActions}
|
||||||
TableRowAction={TableRowActions}
|
/>
|
||||||
/>
|
</Box>
|
||||||
</Box>
|
|
||||||
</DashboardLayouts>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import TableRowActions from "./TableRowActions";
|
|||||||
import moment from "jalali-moment";
|
import moment from "jalali-moment";
|
||||||
import DataTable from "@/core/components/DataTable";
|
import DataTable from "@/core/components/DataTable";
|
||||||
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
||||||
import DashboardLayouts from "@/components/layouts/Dashboard";
|
|
||||||
|
|
||||||
function DashboardNavganProvinceManagerComponent() {
|
function DashboardNavganProvinceManagerComponent() {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
@@ -156,32 +155,30 @@ function DashboardNavganProvinceManagerComponent() {
|
|||||||
],
|
],
|
||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DashboardLayouts>
|
<Box sx={{px: 3}}>
|
||||||
<Box sx={{px: 3}}>
|
<DataTable
|
||||||
<DataTable
|
tableUrl={GET_NAVGAN_PROVINCE_MANAGER}
|
||||||
tableUrl={GET_NAVGAN_PROVINCE_MANAGER}
|
columns={columns}
|
||||||
columns={columns}
|
selectableRow={false}
|
||||||
selectableRow={false}
|
enableCustomToolbar={false}
|
||||||
enableCustomToolbar={false}
|
enableLastUpdate={true}
|
||||||
enableLastUpdate={true}
|
sorting={[{
|
||||||
sorting={[{
|
id: 'id', desc: false
|
||||||
id: 'id', desc: false
|
}]}
|
||||||
}]}
|
enablePinning={true}
|
||||||
enablePinning={true}
|
enableDensityToggle={false}
|
||||||
enableDensityToggle={false}
|
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
|
||||||
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
|
enableColumnFilters={true}
|
||||||
enableColumnFilters={true}
|
enableHiding={true}
|
||||||
enableHiding={true}
|
enableFullScreenToggle={false}
|
||||||
enableFullScreenToggle={false}
|
enableGlobalFilter={false}
|
||||||
enableGlobalFilter={false}
|
enableColumnResizing={false} // if you want true this you shold change renderRowActions props ** see https://www.material-react-table.com/docs/guides/row-actions
|
||||||
enableColumnResizing={false} // if you want true this you shold change renderRowActions props ** see https://www.material-react-table.com/docs/guides/row-actions
|
enableRowActions={true}
|
||||||
enableRowActions={true}
|
TableRowAction={TableRowActions}
|
||||||
TableRowAction={TableRowActions}
|
/>
|
||||||
/>
|
</Box>
|
||||||
</Box>
|
|
||||||
</DashboardLayouts>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import TableRowActions from "./TableRowActions";
|
|||||||
import moment from "jalali-moment";
|
import moment from "jalali-moment";
|
||||||
import DataTable from "@/core/components/DataTable";
|
import DataTable from "@/core/components/DataTable";
|
||||||
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
||||||
import DashboardLayouts from "@/components/layouts/Dashboard";
|
|
||||||
|
|
||||||
function DashboardPassengerOfficeComponent() {
|
function DashboardPassengerOfficeComponent() {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
@@ -157,30 +156,28 @@ function DashboardPassengerOfficeComponent() {
|
|||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<DashboardLayouts>
|
<Box sx={{px: 3}}>
|
||||||
<Box sx={{px: 3}}>
|
<DataTable
|
||||||
<DataTable
|
tableUrl={GET_PASSENGER_BOSS}
|
||||||
tableUrl={GET_PASSENGER_BOSS}
|
columns={columns}
|
||||||
columns={columns}
|
selectableRow={false}
|
||||||
selectableRow={false}
|
enableCustomToolbar={false}
|
||||||
enableCustomToolbar={false}
|
enableLastUpdate={true}
|
||||||
enableLastUpdate={true}
|
sorting={[{
|
||||||
sorting={[{
|
id: 'id', desc: false
|
||||||
id: 'id', desc: false
|
}]}
|
||||||
}]}
|
enablePinning={true}
|
||||||
enablePinning={true}
|
enableDensityToggle={false}
|
||||||
enableDensityToggle={false}
|
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
|
||||||
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
|
enableColumnFilters={true}
|
||||||
enableColumnFilters={true}
|
enableHiding={true}
|
||||||
enableHiding={true}
|
enableFullScreenToggle={false}
|
||||||
enableFullScreenToggle={false}
|
enableGlobalFilter={false}
|
||||||
enableGlobalFilter={false}
|
enableColumnResizing={false} // if you want true this you shold change renderRowActions props ** see https://www.material-react-table.com/docs/guides/row-actions
|
||||||
enableColumnResizing={false} // if you want true this you shold change renderRowActions props ** see https://www.material-react-table.com/docs/guides/row-actions
|
enableRowActions={true}
|
||||||
enableRowActions={true}
|
TableRowAction={TableRowActions}
|
||||||
TableRowAction={TableRowActions}
|
/>
|
||||||
/>
|
</Box>
|
||||||
</Box>
|
|
||||||
</DashboardLayouts>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import TableRowActions from "./TableRowActions";
|
|||||||
import moment from "jalali-moment";
|
import moment from "jalali-moment";
|
||||||
import DataTable from "@/core/components/DataTable";
|
import DataTable from "@/core/components/DataTable";
|
||||||
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
||||||
import DashboardLayouts from "@/components/layouts/Dashboard";
|
|
||||||
|
|
||||||
function DashboardPassengerOfficeComponent() {
|
function DashboardPassengerOfficeComponent() {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
@@ -157,30 +156,28 @@ function DashboardPassengerOfficeComponent() {
|
|||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<DashboardLayouts>
|
<Box sx={{px: 3}}>
|
||||||
<Box sx={{px: 3}}>
|
<DataTable
|
||||||
<DataTable
|
tableUrl={GET_PASSENGER_OFFICE}
|
||||||
tableUrl={GET_PASSENGER_OFFICE}
|
columns={columns}
|
||||||
columns={columns}
|
selectableRow={false}
|
||||||
selectableRow={false}
|
enableCustomToolbar={false}
|
||||||
enableCustomToolbar={false}
|
enableLastUpdate={true}
|
||||||
enableLastUpdate={true}
|
sorting={[{
|
||||||
sorting={[{
|
id: 'id', desc: false
|
||||||
id: 'id', desc: false
|
}]}
|
||||||
}]}
|
enablePinning={true}
|
||||||
enablePinning={true}
|
enableDensityToggle={false}
|
||||||
enableDensityToggle={false}
|
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
|
||||||
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
|
enableColumnFilters={true}
|
||||||
enableColumnFilters={true}
|
enableHiding={true}
|
||||||
enableHiding={true}
|
enableFullScreenToggle={false}
|
||||||
enableFullScreenToggle={false}
|
enableGlobalFilter={false}
|
||||||
enableGlobalFilter={false}
|
enableColumnResizing={false} // if you want true this you shold change renderRowActions props ** see https://www.material-react-table.com/docs/guides/row-actions
|
||||||
enableColumnResizing={false} // if you want true this you shold change renderRowActions props ** see https://www.material-react-table.com/docs/guides/row-actions
|
enableRowActions={true}
|
||||||
enableRowActions={true}
|
TableRowAction={TableRowActions}
|
||||||
TableRowAction={TableRowActions}
|
/>
|
||||||
/>
|
</Box>
|
||||||
</Box>
|
|
||||||
</DashboardLayouts>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import moment from "jalali-moment";
|
|||||||
import DataTable from "@/core/components/DataTable";
|
import DataTable from "@/core/components/DataTable";
|
||||||
import TableRowActions from "./TableRowActions"
|
import TableRowActions from "./TableRowActions"
|
||||||
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
||||||
import DashboardLayouts from "@/components/layouts/Dashboard";
|
|
||||||
|
|
||||||
function DashboardProvinceHeadExpertComponent() {
|
function DashboardProvinceHeadExpertComponent() {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
@@ -126,30 +125,28 @@ function DashboardProvinceHeadExpertComponent() {
|
|||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<DashboardLayouts>
|
<Box sx={{px: 3}}>
|
||||||
<Box sx={{px: 3}}>
|
<DataTable
|
||||||
<DataTable
|
tableUrl={GET_PROVINCE_HEAD_EXPERT}
|
||||||
tableUrl={GET_PROVINCE_HEAD_EXPERT}
|
columns={columns}
|
||||||
columns={columns}
|
selectableRow={false}
|
||||||
selectableRow={false}
|
enableCustomToolbar={false}
|
||||||
enableCustomToolbar={false}
|
enableLastUpdate={true}
|
||||||
enableLastUpdate={true}
|
sorting={[{
|
||||||
sorting={[{
|
id: 'id', desc: false
|
||||||
id: 'id', desc: false
|
}]}
|
||||||
}]}
|
enablePinning={true}
|
||||||
enablePinning={true}
|
enableDensityToggle={false}
|
||||||
enableDensityToggle={false}
|
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
|
||||||
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
|
enableColumnFilters={true}
|
||||||
enableColumnFilters={true}
|
enableHiding={true}
|
||||||
enableHiding={true}
|
enableFullScreenToggle={false}
|
||||||
enableFullScreenToggle={false}
|
enableGlobalFilter={false}
|
||||||
enableGlobalFilter={false}
|
enableColumnResizing={false} // if you want true this you should change renderRowActions props ** see https://www.material-react-table.com/docs/guides/row-actions
|
||||||
enableColumnResizing={false} // if you want true this you should change renderRowActions props ** see https://www.material-react-table.com/docs/guides/row-actions
|
enableRowActions={true}
|
||||||
enableRowActions={true}
|
TableRowAction={TableRowActions}
|
||||||
TableRowAction={TableRowActions}
|
/>
|
||||||
/>
|
</Box>
|
||||||
</Box>
|
|
||||||
</DashboardLayouts>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import TableRowActions from "./TableRowActions";
|
|||||||
import DataTable from "@/core/components/DataTable";
|
import DataTable from "@/core/components/DataTable";
|
||||||
import moment from "jalali-moment";
|
import moment from "jalali-moment";
|
||||||
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
||||||
import DashboardLayouts from "@/components/layouts/Dashboard";
|
|
||||||
|
|
||||||
function DashboardRefahiLoanManagementComponent() {
|
function DashboardRefahiLoanManagementComponent() {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
@@ -134,32 +133,30 @@ function DashboardRefahiLoanManagementComponent() {
|
|||||||
],
|
],
|
||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DashboardLayouts>
|
<Box sx={{px: 3}}>
|
||||||
<Box sx={{px: 3}}>
|
<DataTable
|
||||||
<DataTable
|
tableUrl={GET_LOAN_MANAGEMENT_REFAHI}
|
||||||
tableUrl={GET_LOAN_MANAGEMENT_REFAHI}
|
columns={columns}
|
||||||
columns={columns}
|
selectableRow={false}
|
||||||
selectableRow={false}
|
enableCustomToolbar={false}
|
||||||
enableCustomToolbar={false}
|
sorting={[{
|
||||||
sorting={[{
|
id: 'id', desc: false
|
||||||
id: 'id', desc: false
|
}]}
|
||||||
}]}
|
enableLastUpdate={true}
|
||||||
enableLastUpdate={true}
|
enablePinning={true}
|
||||||
enablePinning={true}
|
enableDensityToggle={false}
|
||||||
enableDensityToggle={false}
|
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
|
||||||
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
|
enableColumnFilters={true}
|
||||||
enableColumnFilters={true}
|
enableHiding={true}
|
||||||
enableHiding={true}
|
enableFullScreenToggle={false}
|
||||||
enableFullScreenToggle={false}
|
enableGlobalFilter={false}
|
||||||
enableGlobalFilter={false}
|
enableColumnResizing={false} // if you want true this you should change renderRowActions props ** see https://www.material-react-table.com/docs/guides/row-actions
|
||||||
enableColumnResizing={false} // if you want true this you should change renderRowActions props ** see https://www.material-react-table.com/docs/guides/row-actions
|
enableRowActions={true}
|
||||||
enableRowActions={true}
|
TableRowAction={TableRowActions}
|
||||||
TableRowAction={TableRowActions}
|
/>
|
||||||
/>
|
</Box>
|
||||||
</Box>
|
|
||||||
</DashboardLayouts>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import TableRowActions from "./TableRowActions";
|
|||||||
import moment from "jalali-moment";
|
import moment from "jalali-moment";
|
||||||
import DataTable from "@/core/components/DataTable";
|
import DataTable from "@/core/components/DataTable";
|
||||||
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
||||||
import DashboardLayouts from "@/components/layouts/Dashboard";
|
|
||||||
|
|
||||||
function DashboardRefahiProvinceManagerComponent() {
|
function DashboardRefahiProvinceManagerComponent() {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
@@ -125,32 +124,30 @@ function DashboardRefahiProvinceManagerComponent() {
|
|||||||
],
|
],
|
||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DashboardLayouts>
|
<Box sx={{px: 3}}>
|
||||||
<Box sx={{px: 3}}>
|
<DataTable
|
||||||
<DataTable
|
tableUrl={GET_REFAHI_PROVINCE_MANAGER}
|
||||||
tableUrl={GET_REFAHI_PROVINCE_MANAGER}
|
columns={columns}
|
||||||
columns={columns}
|
selectableRow={false}
|
||||||
selectableRow={false}
|
enableCustomToolbar={false}
|
||||||
enableCustomToolbar={false}
|
sorting={[{
|
||||||
sorting={[{
|
id: 'id', desc: false
|
||||||
id: 'id', desc: false
|
}]}
|
||||||
}]}
|
enableLastUpdate={true}
|
||||||
enableLastUpdate={true}
|
enablePinning={true}
|
||||||
enablePinning={true}
|
enableDensityToggle={false}
|
||||||
enableDensityToggle={false}
|
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
|
||||||
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
|
enableColumnFilters={true}
|
||||||
enableColumnFilters={true}
|
enableHiding={true}
|
||||||
enableHiding={true}
|
enableFullScreenToggle={false}
|
||||||
enableFullScreenToggle={false}
|
enableGlobalFilter={false}
|
||||||
enableGlobalFilter={false}
|
enableColumnResizing={false} // if you want true this you should change renderRowActions props ** see https://www.material-react-table.com/docs/guides/row-actions
|
||||||
enableColumnResizing={false} // if you want true this you should change renderRowActions props ** see https://www.material-react-table.com/docs/guides/row-actions
|
enableRowActions={true}
|
||||||
enableRowActions={true}
|
TableRowAction={TableRowActions}
|
||||||
TableRowAction={TableRowActions}
|
/>
|
||||||
/>
|
</Box>
|
||||||
</Box>
|
|
||||||
</DashboardLayouts>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import moment from "jalali-moment";
|
|||||||
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
||||||
import TableToolbar from "@/components/dashboard/role-management/TableToolbar";
|
import TableToolbar from "@/components/dashboard/role-management/TableToolbar";
|
||||||
import TableRowActions from "./TableRowActions"
|
import TableRowActions from "./TableRowActions"
|
||||||
import DashboardLayouts from "@/components/layouts/Dashboard";
|
|
||||||
|
|
||||||
function DashboardRoleManagementComponent() {
|
function DashboardRoleManagementComponent() {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
@@ -66,7 +65,7 @@ function DashboardRoleManagementComponent() {
|
|||||||
datatype: "numeric",
|
datatype: "numeric",
|
||||||
Cell: ({renderedCellValue}) => (<Typography variant="body2">{renderedCellValue}</Typography>),
|
Cell: ({renderedCellValue}) => (<Typography variant="body2">{renderedCellValue}</Typography>),
|
||||||
}], []);
|
}], []);
|
||||||
return (<DashboardLayouts>
|
return (
|
||||||
<Box sx={{px: 3}}>
|
<Box sx={{px: 3}}>
|
||||||
<DataTable
|
<DataTable
|
||||||
tableUrl={GET_ROLE_MANAGEMENT}
|
tableUrl={GET_ROLE_MANAGEMENT}
|
||||||
@@ -90,7 +89,7 @@ function DashboardRoleManagementComponent() {
|
|||||||
TableRowAction={TableRowActions}
|
TableRowAction={TableRowActions}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
</DashboardLayouts>);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default DashboardRoleManagementComponent;
|
export default DashboardRoleManagementComponent;
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import TableRowActions from "./TableRowActions";
|
|||||||
import moment from "jalali-moment";
|
import moment from "jalali-moment";
|
||||||
import DataTable from "@/core/components/DataTable";
|
import DataTable from "@/core/components/DataTable";
|
||||||
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
||||||
import DashboardLayouts from "@/components/layouts/Dashboard";
|
|
||||||
|
|
||||||
function DashboardTransportationAssistanceComponent() {
|
function DashboardTransportationAssistanceComponent() {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
@@ -157,30 +156,28 @@ function DashboardTransportationAssistanceComponent() {
|
|||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<DashboardLayouts>
|
<Box sx={{px: 3}}>
|
||||||
<Box sx={{px: 3}}>
|
<DataTable
|
||||||
<DataTable
|
tableUrl={GET_TRANSPORTATION_ASSISTANCE}
|
||||||
tableUrl={GET_TRANSPORTATION_ASSISTANCE}
|
columns={columns}
|
||||||
columns={columns}
|
selectableRow={false}
|
||||||
selectableRow={false}
|
enableCustomToolbar={false}
|
||||||
enableCustomToolbar={false}
|
enableLastUpdate={true}
|
||||||
enableLastUpdate={true}
|
sorting={[{
|
||||||
sorting={[{
|
id: 'id', desc: false
|
||||||
id: 'id', desc: false
|
}]}
|
||||||
}]}
|
enablePinning={true}
|
||||||
enablePinning={true}
|
enableDensityToggle={false}
|
||||||
enableDensityToggle={false}
|
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
|
||||||
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
|
enableColumnFilters={true}
|
||||||
enableColumnFilters={true}
|
enableHiding={true}
|
||||||
enableHiding={true}
|
enableFullScreenToggle={false}
|
||||||
enableFullScreenToggle={false}
|
enableGlobalFilter={false}
|
||||||
enableGlobalFilter={false}
|
enableColumnResizing={false} // if you want true this you should change renderRowActions props ** see https://www.material-react-table.com/docs/guides/row-actions
|
||||||
enableColumnResizing={false} // if you want true this you should change renderRowActions props ** see https://www.material-react-table.com/docs/guides/row-actions
|
enableRowActions={true}
|
||||||
enableRowActions={true}
|
TableRowAction={TableRowActions}
|
||||||
TableRowAction={TableRowActions}
|
/>
|
||||||
/>
|
</Box>
|
||||||
</Box>
|
|
||||||
</DashboardLayouts>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import MuiDatePicker from "@/core/components/MuiDatePicker";
|
|||||||
import TableToolbar from "@/components/dashboard/user-management/TableToolbar";
|
import TableToolbar from "@/components/dashboard/user-management/TableToolbar";
|
||||||
import TableRowActions from "./TableRowActions"
|
import TableRowActions from "./TableRowActions"
|
||||||
import ClearIcon from "@mui/icons-material/Clear";
|
import ClearIcon from "@mui/icons-material/Clear";
|
||||||
import DashboardLayouts from "@/components/layouts/Dashboard";
|
|
||||||
|
|
||||||
function DashboardUserManagementComponent() {
|
function DashboardUserManagementComponent() {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
@@ -113,7 +112,7 @@ function DashboardUserManagementComponent() {
|
|||||||
</Stack>)
|
</Stack>)
|
||||||
}
|
}
|
||||||
},], []);
|
},], []);
|
||||||
return (<DashboardLayouts>
|
return (
|
||||||
<Box sx={{px: 3}}>
|
<Box sx={{px: 3}}>
|
||||||
<DataTable
|
<DataTable
|
||||||
tableUrl={GET_USER_MANAGEMENT}
|
tableUrl={GET_USER_MANAGEMENT}
|
||||||
@@ -137,7 +136,7 @@ function DashboardUserManagementComponent() {
|
|||||||
TableRowAction={TableRowActions}
|
TableRowAction={TableRowActions}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
</DashboardLayouts>);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default DashboardUserManagementComponent;
|
export default DashboardUserManagementComponent;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import Sidebar from "./sidebar";
|
|||||||
import {Toolbar} from "@mui/material";
|
import {Toolbar} from "@mui/material";
|
||||||
import BreadCrumbs from "./breadcrumbs";
|
import BreadCrumbs from "./breadcrumbs";
|
||||||
import FullPageLayout from "@/layouts/FullPageLayout";
|
import FullPageLayout from "@/layouts/FullPageLayout";
|
||||||
|
import RolePermissionMiddleware from "@/middlewares/RolePermission";
|
||||||
|
|
||||||
const drawerWidth = 240;
|
const drawerWidth = 240;
|
||||||
|
|
||||||
@@ -34,8 +35,10 @@ const DashboardLayouts = (props) => {
|
|||||||
>
|
>
|
||||||
<Toolbar/>
|
<Toolbar/>
|
||||||
<FullPageLayout sx={{mt: 3}}>
|
<FullPageLayout sx={{mt: 3}}>
|
||||||
<BreadCrumbs isVisible={true}/>
|
<RolePermissionMiddleware requiredPermissions={props.permissions}>
|
||||||
{props.children}
|
<BreadCrumbs isVisible={true}/>
|
||||||
|
{props.children}
|
||||||
|
</RolePermissionMiddleware>
|
||||||
</FullPageLayout>
|
</FullPageLayout>
|
||||||
</FullPageLayout>
|
</FullPageLayout>
|
||||||
</FullPageLayout>
|
</FullPageLayout>
|
||||||
|
|||||||
20
src/layouts/index.jsx
Normal file
20
src/layouts/index.jsx
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
import DashboardLayout from "@/layouts/DashboardLayout";
|
||||||
|
import {Fragment} from "react";
|
||||||
|
|
||||||
|
const layoutList = {
|
||||||
|
DashboardLayout
|
||||||
|
}
|
||||||
|
|
||||||
|
const Layout = ({layout = {}, children}) => {
|
||||||
|
|
||||||
|
const Component = layoutList[layout?.name] || Fragment
|
||||||
|
const props = layout.props || {}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Component {...props}>
|
||||||
|
{children}
|
||||||
|
</Component>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Layout
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
import useUser from "@/lib/app/hooks/useUser";
|
import useUser from "@/lib/app/hooks/useUser";
|
||||||
import RolePermissionComponent from "@/core/components/Middleware/RolePermissionComponent";
|
import RolePermissionComponent from "@/core/components/Middleware/RolePermissionComponent";
|
||||||
|
|
||||||
const RolePermissionMiddleware = ({children, requiredPermissions}) => {
|
const RolePermissionMiddleware = ({children, requiredPermissions = []}) => {
|
||||||
const {user} = useUser();
|
const {user} = useUser();
|
||||||
|
|
||||||
const hasPermission = requiredPermissions.some((permission) =>
|
const hasPermission = requiredPermissions.length === 0 ? true : requiredPermissions.some((permission) =>
|
||||||
user?.permissions?.includes(permission)
|
user?.permissions?.includes(permission)
|
||||||
);
|
);
|
||||||
|
|
||||||
return !hasPermission ? <RolePermissionComponent /> : <>{children}</>;
|
return !hasPermission ? <RolePermissionComponent/> : <>{children}</>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default RolePermissionMiddleware;
|
export default RolePermissionMiddleware;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import {UserProvider} from "@/lib/app/contexts/user";
|
|||||||
import "moment/locale/fa";
|
import "moment/locale/fa";
|
||||||
import {NextIntlProvider} from "next-intl";
|
import {NextIntlProvider} from "next-intl";
|
||||||
import TitlePage from "@/core/components/TitlePage";
|
import TitlePage from "@/core/components/TitlePage";
|
||||||
|
import Layout from "@/layouts";
|
||||||
|
|
||||||
const App = ({Component, pageProps}) => {
|
const App = ({Component, pageProps}) => {
|
||||||
|
|
||||||
@@ -19,7 +20,9 @@ const App = ({Component, pageProps}) => {
|
|||||||
{pageProps.messages ? <TitlePage text={pageProps.title}/> : ''}
|
{pageProps.messages ? <TitlePage text={pageProps.title}/> : ''}
|
||||||
<LoadingProvider>
|
<LoadingProvider>
|
||||||
<AppLayout isBot={pageProps.isBot}>
|
<AppLayout isBot={pageProps.isBot}>
|
||||||
<Component {...pageProps} />
|
<Layout layout={pageProps.layout}>
|
||||||
|
<Component {...pageProps} />
|
||||||
|
</Layout>
|
||||||
</AppLayout>
|
</AppLayout>
|
||||||
</LoadingProvider>
|
</LoadingProvider>
|
||||||
</MuiLayout>
|
</MuiLayout>
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
import DashboardChangePasswordComponent from "@/components/dashboard/change-password";
|
import DashboardChangePasswordComponent from "@/components/dashboard/change-password";
|
||||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
|
||||||
import {parse} from "next-useragent";
|
import {parse} from "next-useragent";
|
||||||
|
|
||||||
export default function LoanFollowUp() {
|
export default function LoanFollowUp() {
|
||||||
return (
|
return (
|
||||||
<WithAuthMiddleware>
|
<DashboardChangePasswordComponent/>
|
||||||
<DashboardChangePasswordComponent/>
|
|
||||||
</WithAuthMiddleware>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -17,6 +14,7 @@ export async function getServerSideProps({req, locale}) {
|
|||||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||||
title: "Dashboard.change_password",
|
title: "Dashboard.change_password",
|
||||||
isBot,
|
isBot,
|
||||||
|
layout: {name: 'DashboardLayout'}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,9 @@
|
|||||||
import RolePermissionMiddleware from "@/middlewares/RolePermission";
|
|
||||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
|
||||||
import {parse} from "next-useragent";
|
import {parse} from "next-useragent";
|
||||||
import DashboardCommercialChiefComponent from "@/components/dashboard/commercial-chief";
|
import DashboardCommercialChiefComponent from "@/components/dashboard/commercial-chief";
|
||||||
|
|
||||||
const requiredPermissions = ["manage_commercial_refahi"];
|
|
||||||
export default function CommercialChief() {
|
export default function CommercialChief() {
|
||||||
return (
|
return (
|
||||||
<WithAuthMiddleware>
|
<DashboardCommercialChiefComponent/>
|
||||||
<RolePermissionMiddleware requiredPermissions={requiredPermissions}>
|
|
||||||
<DashboardCommercialChiefComponent/>
|
|
||||||
</RolePermissionMiddleware>
|
|
||||||
</WithAuthMiddleware>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,6 +14,7 @@ export async function getServerSideProps({req, locale}) {
|
|||||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||||
title: "Dashboard.commercial_chief_page",
|
title: "Dashboard.commercial_chief_page",
|
||||||
isBot,
|
isBot,
|
||||||
|
layout: {name: 'DashboardLayout', props: {permissions: ["manage_commercial_refahi"]}}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,9 @@
|
|||||||
import RolePermissionMiddleware from "@/middlewares/RolePermission";
|
|
||||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
|
||||||
import {parse} from "next-useragent";
|
import {parse} from "next-useragent";
|
||||||
import DashboardDevelopmentAssistantComponent from "@/components/dashboard/development-assistant";
|
import DashboardDevelopmentAssistantComponent from "@/components/dashboard/development-assistant";
|
||||||
|
|
||||||
const requiredPermissions = ["manage_development_refahi"];
|
|
||||||
export default function DevelopmentAssistant() {
|
export default function DevelopmentAssistant() {
|
||||||
return (
|
return (
|
||||||
<WithAuthMiddleware>
|
<DashboardDevelopmentAssistantComponent/>
|
||||||
<RolePermissionMiddleware requiredPermissions={requiredPermissions}>
|
|
||||||
<DashboardDevelopmentAssistantComponent/>
|
|
||||||
</RolePermissionMiddleware>
|
|
||||||
</WithAuthMiddleware>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,6 +14,7 @@ export async function getServerSideProps({req, locale}) {
|
|||||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||||
title: "Dashboard.development_assistant_page",
|
title: "Dashboard.development_assistant_page",
|
||||||
isBot,
|
isBot,
|
||||||
|
layout: {name: 'DashboardLayout', props: {permissions: ["manage_development_refahi"]}}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
import DashboardEditProfile from "@/components/dashboard/edit-profile";
|
import DashboardEditProfile from "@/components/dashboard/edit-profile";
|
||||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
|
||||||
import {parse} from "next-useragent";
|
import {parse} from "next-useragent";
|
||||||
|
|
||||||
export default function LoanFollowUp() {
|
export default function LoanFollowUp() {
|
||||||
return (
|
return (
|
||||||
<WithAuthMiddleware>
|
<DashboardEditProfile/>
|
||||||
<DashboardEditProfile/>
|
|
||||||
</WithAuthMiddleware>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -17,6 +14,7 @@ export async function getServerSideProps({req, locale}) {
|
|||||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||||
title: "Dashboard.edit_profile",
|
title: "Dashboard.edit_profile",
|
||||||
isBot,
|
isBot,
|
||||||
|
layout: {name: 'DashboardLayout'}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,9 @@
|
|||||||
import RolePermissionMiddleware from "@/middlewares/RolePermission";
|
|
||||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
|
||||||
import {parse} from "next-useragent";
|
import {parse} from "next-useragent";
|
||||||
import DashboardExpertManagementComponent from "@/components/dashboard/expert-management";
|
import DashboardExpertManagementComponent from "@/components/dashboard/expert-management";
|
||||||
|
|
||||||
const requiredPermissions = ["manage_transportation_navgan"];
|
|
||||||
export default function ExpertManagement() {
|
export default function ExpertManagement() {
|
||||||
return (
|
return (
|
||||||
<WithAuthMiddleware>
|
<DashboardExpertManagementComponent/>
|
||||||
<RolePermissionMiddleware requiredPermissions={requiredPermissions}>
|
|
||||||
<DashboardExpertManagementComponent/>
|
|
||||||
</RolePermissionMiddleware>
|
|
||||||
</WithAuthMiddleware>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,6 +14,7 @@ export async function getServerSideProps({req, locale}) {
|
|||||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||||
title: "Dashboard.expert_management",
|
title: "Dashboard.expert_management",
|
||||||
isBot,
|
isBot,
|
||||||
|
layout: {name: 'DashboardLayout', props: {permissions: ["manage_transportation_navgan"]}}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
import DashboardFirstComponent from "@/components/dashboard/first";
|
import DashboardFirstComponent from "@/components/dashboard/first";
|
||||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
|
||||||
import {parse} from "next-useragent";
|
import {parse} from "next-useragent";
|
||||||
|
|
||||||
export default function Dashboard() {
|
export default function Dashboard() {
|
||||||
return (
|
return (
|
||||||
<WithAuthMiddleware>
|
<DashboardFirstComponent/>
|
||||||
<DashboardFirstComponent/>
|
|
||||||
</WithAuthMiddleware>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -17,6 +14,7 @@ export async function getServerSideProps({req, locale}) {
|
|||||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||||
title: "Dashboard.dashboard_page",
|
title: "Dashboard.dashboard_page",
|
||||||
isBot,
|
isBot,
|
||||||
|
layout: {name: 'DashboardLayout'}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,9 @@
|
|||||||
import RolePermissionMiddleware from "@/middlewares/RolePermission";
|
|
||||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
|
||||||
import {parse} from "next-useragent";
|
import {parse} from "next-useragent";
|
||||||
import DashboardInspectorExpertComponent from "@/components/dashboard/inspector-expert";
|
import DashboardInspectorExpertComponent from "@/components/dashboard/inspector-expert";
|
||||||
|
|
||||||
const requiredPermissions = ["manage_inspector_refahi"];
|
|
||||||
export default function InspectorExpert() {
|
export default function InspectorExpert() {
|
||||||
return (
|
return (
|
||||||
<WithAuthMiddleware>
|
<DashboardInspectorExpertComponent/>
|
||||||
<RolePermissionMiddleware requiredPermissions={requiredPermissions}>
|
|
||||||
<DashboardInspectorExpertComponent/>
|
|
||||||
</RolePermissionMiddleware>
|
|
||||||
</WithAuthMiddleware>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,6 +14,7 @@ export async function getServerSideProps({req, locale}) {
|
|||||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||||
title: "Dashboard.inspector_expert_page",
|
title: "Dashboard.inspector_expert_page",
|
||||||
isBot,
|
isBot,
|
||||||
|
layout: {name: 'DashboardLayout', props: {permissions: ["manage_inspector_refahi"]}}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,9 @@
|
|||||||
import DashboardMachineryOfficeComponent from "@/components/dashboard/machinary-office";
|
import DashboardMachineryOfficeComponent from "@/components/dashboard/machinary-office";
|
||||||
import RolePermissionMiddleware from "@/middlewares/RolePermission";
|
|
||||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
|
||||||
import {parse} from "next-useragent";
|
import {parse} from "next-useragent";
|
||||||
|
|
||||||
const requiredPermissions = ["manage_machinery_navgan"];
|
|
||||||
export default function PassengerOffice() {
|
export default function PassengerOffice() {
|
||||||
return (
|
return (
|
||||||
<WithAuthMiddleware>
|
<DashboardMachineryOfficeComponent/>
|
||||||
<RolePermissionMiddleware requiredPermissions={requiredPermissions}>
|
|
||||||
<DashboardMachineryOfficeComponent/>
|
|
||||||
</RolePermissionMiddleware>
|
|
||||||
</WithAuthMiddleware>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,6 +14,7 @@ export async function getServerSideProps({req, locale}) {
|
|||||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||||
title: "Dashboard.machinary_office_page",
|
title: "Dashboard.machinary_office_page",
|
||||||
isBot,
|
isBot,
|
||||||
|
layout: {name: 'DashboardLayout', props: {permissions: ["manage_machinery_navgan"]}}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,9 @@
|
|||||||
import RolePermissionMiddleware from "@/middlewares/RolePermission";
|
|
||||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
|
||||||
import {parse} from "next-useragent";
|
import {parse} from "next-useragent";
|
||||||
import DashboardNavganLoanManagementComponent from "@/components/dashboard/navgan-loan-management";
|
import DashboardNavganLoanManagementComponent from "@/components/dashboard/navgan-loan-management";
|
||||||
|
|
||||||
const requiredPermissions = ["manage_navgan_loan"];
|
|
||||||
export default function NavganLoanManagement() {
|
export default function NavganLoanManagement() {
|
||||||
return (
|
return (
|
||||||
<WithAuthMiddleware>
|
<DashboardNavganLoanManagementComponent/>
|
||||||
<RolePermissionMiddleware requiredPermissions={requiredPermissions}>
|
|
||||||
<DashboardNavganLoanManagementComponent/>
|
|
||||||
</RolePermissionMiddleware>
|
|
||||||
</WithAuthMiddleware>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,6 +14,7 @@ export async function getServerSideProps({req, locale}) {
|
|||||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||||
title: "Dashboard.loan_management_page",
|
title: "Dashboard.loan_management_page",
|
||||||
isBot,
|
isBot,
|
||||||
|
layout: {name: 'DashboardLayout', props: {permissions: ["manage_navgan_loan"]}}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,9 @@
|
|||||||
import DashboardNavganProvinceManagerComponent from "src/components/dashboard/navgan-province-manager";
|
import DashboardNavganProvinceManagerComponent from "src/components/dashboard/navgan-province-manager";
|
||||||
import RolePermissionMiddleware from "@/middlewares/RolePermission";
|
|
||||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
|
||||||
import {parse} from "next-useragent";
|
import {parse} from "next-useragent";
|
||||||
|
|
||||||
const requiredPermissions = ["manage_province_affairs_navgan"];
|
|
||||||
export default function PassengerOffice() {
|
export default function PassengerOffice() {
|
||||||
return (
|
return (
|
||||||
<WithAuthMiddleware>
|
<DashboardNavganProvinceManagerComponent/>
|
||||||
<RolePermissionMiddleware requiredPermissions={requiredPermissions}>
|
|
||||||
<DashboardNavganProvinceManagerComponent/>
|
|
||||||
</RolePermissionMiddleware>
|
|
||||||
</WithAuthMiddleware>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,6 +14,7 @@ export async function getServerSideProps({req, locale}) {
|
|||||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||||
title: "Dashboard.province_manager_page",
|
title: "Dashboard.province_manager_page",
|
||||||
isBot,
|
isBot,
|
||||||
|
layout: {name: 'DashboardLayout', props: {permissions: ["manage_province_affairs_navgan"]}}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,9 @@
|
|||||||
import DashboardPassengerBossComponent from "@/components/dashboard/passenger-boss";
|
import DashboardPassengerBossComponent from "@/components/dashboard/passenger-boss";
|
||||||
import RolePermissionMiddleware from "@/middlewares/RolePermission";
|
|
||||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
|
||||||
import {parse} from "next-useragent";
|
import {parse} from "next-useragent";
|
||||||
|
|
||||||
const requiredPermissions = ["manage_province_working_group_navgan"];
|
|
||||||
export default function PassengerBoss() {
|
export default function PassengerBoss() {
|
||||||
return (
|
return (
|
||||||
<WithAuthMiddleware>
|
<DashboardPassengerBossComponent/>
|
||||||
<RolePermissionMiddleware requiredPermissions={requiredPermissions}>
|
|
||||||
<DashboardPassengerBossComponent/>
|
|
||||||
</RolePermissionMiddleware>
|
|
||||||
</WithAuthMiddleware>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,6 +14,7 @@ export async function getServerSideProps({req, locale}) {
|
|||||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||||
title: "Dashboard.passenger_boss_page",
|
title: "Dashboard.passenger_boss_page",
|
||||||
isBot,
|
isBot,
|
||||||
|
layout: {name: 'DashboardLayout', props: {permissions: ["manage_province_working_group_navgan"]}}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,9 @@
|
|||||||
import DashboardPassengerOfficeComponent from "@/components/dashboard/passenger-office";
|
import DashboardPassengerOfficeComponent from "@/components/dashboard/passenger-office";
|
||||||
import RolePermissionMiddleware from "@/middlewares/RolePermission";
|
|
||||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
|
||||||
import {parse} from "next-useragent";
|
import {parse} from "next-useragent";
|
||||||
|
|
||||||
const requiredPermissions = ["manage_passenger_office_navgan"];
|
|
||||||
export default function PassengerOffice() {
|
export default function PassengerOffice() {
|
||||||
return (
|
return (
|
||||||
<WithAuthMiddleware>
|
<DashboardPassengerOfficeComponent/>
|
||||||
<RolePermissionMiddleware requiredPermissions={requiredPermissions}>
|
|
||||||
<DashboardPassengerOfficeComponent/>
|
|
||||||
</RolePermissionMiddleware>
|
|
||||||
</WithAuthMiddleware>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,6 +14,7 @@ export async function getServerSideProps({req, locale}) {
|
|||||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||||
title: "Dashboard.passenger_office_page",
|
title: "Dashboard.passenger_office_page",
|
||||||
isBot,
|
isBot,
|
||||||
|
layout: {name: 'DashboardLayout', props: {permissions: ["manage_passenger_office_navgan"]}}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,9 @@
|
|||||||
import RolePermissionMiddleware from "@/middlewares/RolePermission";
|
|
||||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
|
||||||
import {parse} from "next-useragent";
|
import {parse} from "next-useragent";
|
||||||
import DashboardProvinceHeadExpertComponent from "@/components/dashboard/province-head-expert";
|
import DashboardProvinceHeadExpertComponent from "@/components/dashboard/province-head-expert";
|
||||||
|
|
||||||
const requiredPermissions = ["manage_province_headquarter_refahi"];
|
|
||||||
export default function ProvinceHeadExpertOffice() {
|
export default function ProvinceHeadExpertOffice() {
|
||||||
return (
|
return (
|
||||||
<WithAuthMiddleware>
|
<DashboardProvinceHeadExpertComponent/>
|
||||||
<RolePermissionMiddleware requiredPermissions={requiredPermissions}>
|
|
||||||
<DashboardProvinceHeadExpertComponent/>
|
|
||||||
</RolePermissionMiddleware>
|
|
||||||
</WithAuthMiddleware>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,6 +14,7 @@ export async function getServerSideProps({req, locale}) {
|
|||||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||||
title: "Dashboard.province_head_expert",
|
title: "Dashboard.province_head_expert",
|
||||||
isBot,
|
isBot,
|
||||||
|
layout: {name: 'DashboardLayout', props: {permissions: ["manage_province_headquarter_refahi"]}}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,9 @@
|
|||||||
import RolePermissionMiddleware from "@/middlewares/RolePermission";
|
|
||||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
|
||||||
import {parse} from "next-useragent";
|
import {parse} from "next-useragent";
|
||||||
import DashboardRefahiLoanManagementComponent from "@/components/dashboard/refahi-loan-management";
|
import DashboardRefahiLoanManagementComponent from "@/components/dashboard/refahi-loan-management";
|
||||||
|
|
||||||
const requiredPermissions = ["manage_refahi_loan"];
|
|
||||||
export default function RefahiLoanManagement() {
|
export default function RefahiLoanManagement() {
|
||||||
return (
|
return (
|
||||||
<WithAuthMiddleware>
|
<DashboardRefahiLoanManagementComponent/>
|
||||||
<RolePermissionMiddleware requiredPermissions={requiredPermissions}>
|
|
||||||
<DashboardRefahiLoanManagementComponent/>
|
|
||||||
</RolePermissionMiddleware>
|
|
||||||
</WithAuthMiddleware>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,6 +14,7 @@ export async function getServerSideProps({req, locale}) {
|
|||||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||||
title: "Dashboard.loan_management_page",
|
title: "Dashboard.loan_management_page",
|
||||||
isBot,
|
isBot,
|
||||||
|
layout: {name: 'DashboardLayout', props: {permissions: ["manage_refahi_loan"]}}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,9 @@
|
|||||||
import RolePermissionMiddleware from "@/middlewares/RolePermission";
|
|
||||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
|
||||||
import {parse} from "next-useragent";
|
import {parse} from "next-useragent";
|
||||||
import DashboardRefahiProvinceManagerComponent from "@/components/dashboard/refahi-province-manager";
|
import DashboardRefahiProvinceManagerComponent from "@/components/dashboard/refahi-province-manager";
|
||||||
|
|
||||||
const requiredPermissions = ["manage_province_affairs_refahi"];
|
|
||||||
export default function RefahiProvinceManager() {
|
export default function RefahiProvinceManager() {
|
||||||
return (
|
return (
|
||||||
<WithAuthMiddleware>
|
<DashboardRefahiProvinceManagerComponent/>
|
||||||
<RolePermissionMiddleware requiredPermissions={requiredPermissions}>
|
|
||||||
<DashboardRefahiProvinceManagerComponent/>
|
|
||||||
</RolePermissionMiddleware>
|
|
||||||
</WithAuthMiddleware>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,6 +14,7 @@ export async function getServerSideProps({req, locale}) {
|
|||||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||||
title: "Dashboard.province_manager_page",
|
title: "Dashboard.province_manager_page",
|
||||||
isBot,
|
isBot,
|
||||||
|
layout: {name: 'DashboardLayout', props: {permissions: ["manage_province_affairs_refahi"]}}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,9 @@
|
|||||||
import RolePermissionMiddleware from "@/middlewares/RolePermission";
|
|
||||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
|
||||||
import {parse} from "next-useragent";
|
import {parse} from "next-useragent";
|
||||||
import DashboardRoleManagementComponent from "@/components/dashboard/role-management";
|
import DashboardRoleManagementComponent from "@/components/dashboard/role-management";
|
||||||
|
|
||||||
const requiredPermissions = ["manage_roles"];
|
|
||||||
export default function RoleManagement() {
|
export default function RoleManagement() {
|
||||||
return (
|
return (
|
||||||
<WithAuthMiddleware>
|
<DashboardRoleManagementComponent/>
|
||||||
<RolePermissionMiddleware requiredPermissions={requiredPermissions}>
|
|
||||||
<DashboardRoleManagementComponent/>
|
|
||||||
</RolePermissionMiddleware>
|
|
||||||
</WithAuthMiddleware>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,6 +14,7 @@ export async function getServerSideProps({req, locale}) {
|
|||||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||||
title: "Dashboard.role_management_page",
|
title: "Dashboard.role_management_page",
|
||||||
isBot,
|
isBot,
|
||||||
|
layout: {name: 'DashboardLayout', props: {permissions: ["manage_roles"]}}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,9 @@
|
|||||||
import DashboardTransportationAssistanceComponent from "@/components/dashboard/transportation-assistance";
|
import DashboardTransportationAssistanceComponent from "@/components/dashboard/transportation-assistance";
|
||||||
import RolePermissionMiddleware from "@/middlewares/RolePermission";
|
|
||||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
|
||||||
import {parse} from "next-useragent";
|
import {parse} from "next-useragent";
|
||||||
|
|
||||||
const requiredPermissions = ["manage_transportation_navgan"];
|
|
||||||
export default function TransportationAssistance() {
|
export default function TransportationAssistance() {
|
||||||
return (
|
return (
|
||||||
<WithAuthMiddleware>
|
<DashboardTransportationAssistanceComponent/>
|
||||||
<RolePermissionMiddleware requiredPermissions={requiredPermissions}>
|
|
||||||
<DashboardTransportationAssistanceComponent/>
|
|
||||||
</RolePermissionMiddleware>
|
|
||||||
</WithAuthMiddleware>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,6 +14,7 @@ export async function getServerSideProps({req, locale}) {
|
|||||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||||
title: "Dashboard.transportation_assistance",
|
title: "Dashboard.transportation_assistance",
|
||||||
isBot,
|
isBot,
|
||||||
|
layout: {name: 'DashboardLayout', props: {permissions: ["manage_transportation_navgan"]}}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,9 @@
|
|||||||
import RolePermissionMiddleware from "@/middlewares/RolePermission";
|
|
||||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
|
||||||
import {parse} from "next-useragent";
|
import {parse} from "next-useragent";
|
||||||
import DashboardUserManagementComponent from "@/components/dashboard/user-management";
|
import DashboardUserManagementComponent from "@/components/dashboard/user-management";
|
||||||
|
|
||||||
const requiredPermissions = ["manage_users"];
|
|
||||||
export default function UserManagement() {
|
export default function UserManagement() {
|
||||||
return (
|
return (
|
||||||
<WithAuthMiddleware>
|
<DashboardUserManagementComponent/>
|
||||||
<RolePermissionMiddleware requiredPermissions={requiredPermissions}>
|
|
||||||
<DashboardUserManagementComponent/>
|
|
||||||
</RolePermissionMiddleware>
|
|
||||||
</WithAuthMiddleware>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,6 +14,7 @@ export async function getServerSideProps({req, locale}) {
|
|||||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||||
title: "Dashboard.user_management_page",
|
title: "Dashboard.user_management_page",
|
||||||
isBot,
|
isBot,
|
||||||
|
layout: {name: 'DashboardLayout', props: {permissions: ["manage_users"]}}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user