LFFE-9 Implementation of Layout in _app and Change Pages that use Dashboard Layout

This commit is contained in:
AmirHossein Mahmoodi
2023-11-04 15:09:03 +03:30
parent cc01bd6708
commit d1ed4350e1
40 changed files with 531 additions and 651 deletions

View File

@@ -1,17 +1,14 @@
import CenterLayout from "@/layouts/CenterLayout";
import {Container} from "@mui/material";
import ChangePasswordForm from "@/components/dashboard/change-password/change-password-form";
import DashboardLayouts from "@/components/layouts/Dashboard";
const DashboardChangePasswordComponent = () => {
return (
<DashboardLayouts>
<CenterLayout>
<Container maxWidth="sm">
<ChangePasswordForm />
</Container>
</CenterLayout>
</DashboardLayouts>
<CenterLayout>
<Container maxWidth="sm">
<ChangePasswordForm/>
</Container>
</CenterLayout>
);
};
export default DashboardChangePasswordComponent;

View File

@@ -6,7 +6,6 @@ import TableRowActions from "./TableRowActions";
import moment from "jalali-moment";
import DataTable from "@/core/components/DataTable";
import MuiDatePicker from "@/core/components/MuiDatePicker";
import DashboardLayouts from "@/components/layouts/Dashboard";
function DashboardCommercialChiefComponent() {
const t = useTranslations();
@@ -126,30 +125,28 @@ function DashboardCommercialChiefComponent() {
);
return (
<DashboardLayouts>
<Box sx={{px: 3}}>
<DataTable
tableUrl={GET_COMMERCIAL_CHIEF}
columns={columns}
selectableRow={false}
enableCustomToolbar={false}
enableLastUpdate={true}
sorting={[{
id: 'id', desc: false
}]}
enablePinning={true}
enableDensityToggle={false}
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
enableColumnFilters={true}
enableHiding={true}
enableFullScreenToggle={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
enableRowActions={true}
TableRowAction={TableRowActions}
/>
</Box>
</DashboardLayouts>
<Box sx={{px: 3}}>
<DataTable
tableUrl={GET_COMMERCIAL_CHIEF}
columns={columns}
selectableRow={false}
enableCustomToolbar={false}
enableLastUpdate={true}
sorting={[{
id: 'id', desc: false
}]}
enablePinning={true}
enableDensityToggle={false}
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
enableColumnFilters={true}
enableHiding={true}
enableFullScreenToggle={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
enableRowActions={true}
TableRowAction={TableRowActions}
/>
</Box>
);
}

View File

@@ -6,7 +6,6 @@ import TableRowActions from "./TableRowActions";
import moment from "jalali-moment";
import DataTable from "@/core/components/DataTable";
import MuiDatePicker from "@/core/components/MuiDatePicker";
import DashboardLayouts from "@/components/layouts/Dashboard";
function DashboardDevelopmentAssistantComponent() {
const t = useTranslations();
@@ -125,32 +124,30 @@ function DashboardDevelopmentAssistantComponent() {
],
[]
);
return (
<DashboardLayouts>
<Box sx={{px: 3}}>
<DataTable
tableUrl={GET_DEVELOPMENT_ASSISTANT}
columns={columns}
selectableRow={false}
enableCustomToolbar={false}
enableLastUpdate={true}
enablePinning={true}
enableDensityToggle={false}
sorting={[{
id: 'id', desc: false
}]}
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
enableColumnFilters={true}
enableHiding={true}
enableFullScreenToggle={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
enableRowActions={true}
TableRowAction={TableRowActions}
/>
</Box>
</DashboardLayouts>
<Box sx={{px: 3}}>
<DataTable
tableUrl={GET_DEVELOPMENT_ASSISTANT}
columns={columns}
selectableRow={false}
enableCustomToolbar={false}
enableLastUpdate={true}
enablePinning={true}
enableDensityToggle={false}
sorting={[{
id: 'id', desc: false
}]}
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
enableColumnFilters={true}
enableHiding={true}
enableFullScreenToggle={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
enableRowActions={true}
TableRowAction={TableRowActions}
/>
</Box>
);
}

View File

@@ -11,7 +11,6 @@ import {UPDATE_AVATAR} from "@/core/data/apiRoutes";
import useDirection from "@/lib/app/hooks/useDirection";
import Notifications from "@/core/components/notifications";
import ImageResizer from "@/core/components/ImageConvertor";
import DashboardLayouts from "@/components/layouts/Dashboard";
const DashboardEditProfile = () => {
const t = useTranslations();
@@ -54,169 +53,167 @@ const DashboardEditProfile = () => {
const validationSchema = Yup.object().shape({});
return (
<DashboardLayouts>
<CenterLayout>
<Container maxWidth="sm">
<Formik
initialValues={initialValues}
onSubmit={handleSubmit}
validationSchema={validationSchema}
>
{(props) => (
<StyledForm
onSubmit={(e) => {
e.preventDefault();
props.handleSubmit();
}}
>
<Paper elevation={0}>
<Stack spacing={3} sx={{p: 5}} component="div">
<Typography margin={2} variant="h4" textAlign="center">
{t("UpdateProfile.typography_edit_profile")}
</Typography>
<Box
sx={{
display: "flex",
flexDirection: "column",
alignItems: "center",
justifyContent: "center",
}}
>
<AvatarUpload
user={user}
setFieldValue={props.setFieldValue}
valueAvatar="expert_avatar"
changeFlag="change_avatar"
<CenterLayout>
<Container maxWidth="sm">
<Formik
initialValues={initialValues}
onSubmit={handleSubmit}
validationSchema={validationSchema}
>
{(props) => (
<StyledForm
onSubmit={(e) => {
e.preventDefault();
props.handleSubmit();
}}
>
<Paper elevation={0}>
<Stack spacing={3} sx={{p: 5}} component="div">
<Typography margin={2} variant="h4" textAlign="center">
{t("UpdateProfile.typography_edit_profile")}
</Typography>
<Box
sx={{
display: "flex",
flexDirection: "column",
alignItems: "center",
justifyContent: "center",
}}
>
<AvatarUpload
user={user}
setFieldValue={props.setFieldValue}
valueAvatar="expert_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>
</Stack>
</Paper>
</StyledForm>
)}
</Formik>
</Container>
</CenterLayout>
</DashboardLayouts>
<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>
</Stack>
</Paper>
</StyledForm>
)}
</Formik>
</Container>
</CenterLayout>
);
};

View File

@@ -7,7 +7,6 @@ import DataTable from "@/core/components/DataTable";
import TableToolbar from "@/components/dashboard/expert-management/TableToolbar";
import moment from "jalali-moment";
import MuiDatePicker from "@/core/components/MuiDatePicker";
import DashboardLayouts from "@/components/layouts/Dashboard";
function DashboardExpertManagementComponent() {
const t = useTranslations();
@@ -138,33 +137,31 @@ function DashboardExpertManagementComponent() {
],
[]
);
return (
<DashboardLayouts>
<Box sx={{px: 3}}>
<DataTable
tableUrl={GET_EXPERT_MANAGEMENT}
columns={columns}
selectableRow={false}
CustomToolbar={TableToolbar}
sorting={[{
id: 'id', desc: true
}]}
enableCustomToolbar={true}
enableLastUpdate={true}
enablePinning={true}
enableDensityToggle={false}
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
enableColumnFilters={true}
enableHiding={true}
enableFullScreenToggle={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
enableRowActions={true}
TableRowAction={TableRowActions}
/>
</Box>
</DashboardLayouts>
<Box sx={{px: 3}}>
<DataTable
tableUrl={GET_EXPERT_MANAGEMENT}
columns={columns}
selectableRow={false}
CustomToolbar={TableToolbar}
sorting={[{
id: 'id', desc: true
}]}
enableCustomToolbar={true}
enableLastUpdate={true}
enablePinning={true}
enableDensityToggle={false}
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
enableColumnFilters={true}
enableHiding={true}
enableFullScreenToggle={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
enableRowActions={true}
TableRowAction={TableRowActions}
/>
</Box>
);
}

View File

@@ -1,8 +1,5 @@
import DashboardLayouts from "@/components/layouts/Dashboard";
const DashboardFirstComponent = () => {
return <DashboardLayouts></DashboardLayouts>
return <></>
};
export default DashboardFirstComponent;

View File

@@ -6,7 +6,6 @@ import TableRowActions from "./TableRowActions";
import moment from "jalali-moment";
import DataTable from "@/core/components/DataTable";
import MuiDatePicker from "@/core/components/MuiDatePicker";
import DashboardLayouts from "@/components/layouts/Dashboard";
function DashboardInspectorExpertComponent() {
const t = useTranslations();
@@ -124,32 +123,30 @@ function DashboardInspectorExpertComponent() {
],
[]
);
return (
<DashboardLayouts>
<Box sx={{px: 3}}>
<DataTable
tableUrl={GET_INSPECTOR_EXPERT}
columns={columns}
selectableRow={false}
enableCustomToolbar={false}
enableLastUpdate={true}
enablePinning={true}
sorting={[{
id: 'id', desc: false
}]}
enableDensityToggle={false}
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
enableColumnFilters={true}
enableHiding={true}
enableFullScreenToggle={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
enableRowActions={true}
TableRowAction={TableRowActions}
/>
</Box>
</DashboardLayouts>
<Box sx={{px: 3}}>
<DataTable
tableUrl={GET_INSPECTOR_EXPERT}
columns={columns}
selectableRow={false}
enableCustomToolbar={false}
enableLastUpdate={true}
enablePinning={true}
sorting={[{
id: 'id', desc: false
}]}
enableDensityToggle={false}
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
enableColumnFilters={true}
enableHiding={true}
enableFullScreenToggle={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
enableRowActions={true}
TableRowAction={TableRowActions}
/>
</Box>
);
}

View File

@@ -6,7 +6,6 @@ import TableRowActions from "./TableRowActions";
import moment from "jalali-moment";
import DataTable from "@/core/components/DataTable";
import MuiDatePicker from "@/core/components/MuiDatePicker";
import DashboardLayouts from "@/components/layouts/Dashboard";
function DashboardMachinaryOfficeComponent() {
const t = useTranslations();
@@ -156,30 +155,28 @@ function DashboardMachinaryOfficeComponent() {
[]
);
return (
<DashboardLayouts>
<Box sx={{px: 3}}>
<DataTable
tableUrl={GET_MACHINARY_OFFICE}
columns={columns}
selectableRow={false}
enableCustomToolbar={false}
enableLastUpdate={true}
sorting={[{
id: 'id', desc: false
}]}
enablePinning={true}
enableDensityToggle={false}
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
enableColumnFilters={true}
enableHiding={true}
enableFullScreenToggle={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
enableRowActions={true}
TableRowAction={TableRowActions}
/>
</Box>
</DashboardLayouts>
<Box sx={{px: 3}}>
<DataTable
tableUrl={GET_MACHINARY_OFFICE}
columns={columns}
selectableRow={false}
enableCustomToolbar={false}
enableLastUpdate={true}
sorting={[{
id: 'id', desc: false
}]}
enablePinning={true}
enableDensityToggle={false}
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
enableColumnFilters={true}
enableHiding={true}
enableFullScreenToggle={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
enableRowActions={true}
TableRowAction={TableRowActions}
/>
</Box>
);
}

View File

@@ -6,7 +6,6 @@ import TableRowActions from "./TableRowActions";
import DataTable from "@/core/components/DataTable";
import moment from "jalali-moment";
import MuiDatePicker from "@/core/components/MuiDatePicker";
import DashboardLayouts from "@/components/layouts/Dashboard";
function DashboardNavganLoanManagementComponent() {
const t = useTranslations();
@@ -134,32 +133,30 @@ function DashboardNavganLoanManagementComponent() {
],
[]
);
return (
<DashboardLayouts>
<Box sx={{px: 3}}>
<DataTable
tableUrl={GET_LOAN_MANAGEMENT_NAVGAN}
columns={columns}
selectableRow={false}
enableCustomToolbar={false}
enableLastUpdate={true}
sorting={[{
id: 'id', desc: false
}]}
enablePinning={true}
enableDensityToggle={false}
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
enableColumnFilters={true}
enableHiding={true}
enableFullScreenToggle={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
enableRowActions={true}
TableRowAction={TableRowActions}
/>
</Box>
</DashboardLayouts>
<Box sx={{px: 3}}>
<DataTable
tableUrl={GET_LOAN_MANAGEMENT_NAVGAN}
columns={columns}
selectableRow={false}
enableCustomToolbar={false}
enableLastUpdate={true}
sorting={[{
id: 'id', desc: false
}]}
enablePinning={true}
enableDensityToggle={false}
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
enableColumnFilters={true}
enableHiding={true}
enableFullScreenToggle={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
enableRowActions={true}
TableRowAction={TableRowActions}
/>
</Box>
);
}

View File

@@ -6,7 +6,6 @@ import TableRowActions from "./TableRowActions";
import moment from "jalali-moment";
import DataTable from "@/core/components/DataTable";
import MuiDatePicker from "@/core/components/MuiDatePicker";
import DashboardLayouts from "@/components/layouts/Dashboard";
function DashboardNavganProvinceManagerComponent() {
const t = useTranslations();
@@ -156,32 +155,30 @@ function DashboardNavganProvinceManagerComponent() {
],
[]
);
return (
<DashboardLayouts>
<Box sx={{px: 3}}>
<DataTable
tableUrl={GET_NAVGAN_PROVINCE_MANAGER}
columns={columns}
selectableRow={false}
enableCustomToolbar={false}
enableLastUpdate={true}
sorting={[{
id: 'id', desc: false
}]}
enablePinning={true}
enableDensityToggle={false}
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
enableColumnFilters={true}
enableHiding={true}
enableFullScreenToggle={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
enableRowActions={true}
TableRowAction={TableRowActions}
/>
</Box>
</DashboardLayouts>
<Box sx={{px: 3}}>
<DataTable
tableUrl={GET_NAVGAN_PROVINCE_MANAGER}
columns={columns}
selectableRow={false}
enableCustomToolbar={false}
enableLastUpdate={true}
sorting={[{
id: 'id', desc: false
}]}
enablePinning={true}
enableDensityToggle={false}
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
enableColumnFilters={true}
enableHiding={true}
enableFullScreenToggle={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
enableRowActions={true}
TableRowAction={TableRowActions}
/>
</Box>
);
}

View File

@@ -6,7 +6,6 @@ import TableRowActions from "./TableRowActions";
import moment from "jalali-moment";
import DataTable from "@/core/components/DataTable";
import MuiDatePicker from "@/core/components/MuiDatePicker";
import DashboardLayouts from "@/components/layouts/Dashboard";
function DashboardPassengerOfficeComponent() {
const t = useTranslations();
@@ -157,30 +156,28 @@ function DashboardPassengerOfficeComponent() {
[]
);
return (
<DashboardLayouts>
<Box sx={{px: 3}}>
<DataTable
tableUrl={GET_PASSENGER_BOSS}
columns={columns}
selectableRow={false}
enableCustomToolbar={false}
enableLastUpdate={true}
sorting={[{
id: 'id', desc: false
}]}
enablePinning={true}
enableDensityToggle={false}
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
enableColumnFilters={true}
enableHiding={true}
enableFullScreenToggle={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
enableRowActions={true}
TableRowAction={TableRowActions}
/>
</Box>
</DashboardLayouts>
<Box sx={{px: 3}}>
<DataTable
tableUrl={GET_PASSENGER_BOSS}
columns={columns}
selectableRow={false}
enableCustomToolbar={false}
enableLastUpdate={true}
sorting={[{
id: 'id', desc: false
}]}
enablePinning={true}
enableDensityToggle={false}
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
enableColumnFilters={true}
enableHiding={true}
enableFullScreenToggle={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
enableRowActions={true}
TableRowAction={TableRowActions}
/>
</Box>
);
}

View File

@@ -6,7 +6,6 @@ import TableRowActions from "./TableRowActions";
import moment from "jalali-moment";
import DataTable from "@/core/components/DataTable";
import MuiDatePicker from "@/core/components/MuiDatePicker";
import DashboardLayouts from "@/components/layouts/Dashboard";
function DashboardPassengerOfficeComponent() {
const t = useTranslations();
@@ -157,30 +156,28 @@ function DashboardPassengerOfficeComponent() {
[]
);
return (
<DashboardLayouts>
<Box sx={{px: 3}}>
<DataTable
tableUrl={GET_PASSENGER_OFFICE}
columns={columns}
selectableRow={false}
enableCustomToolbar={false}
enableLastUpdate={true}
sorting={[{
id: 'id', desc: false
}]}
enablePinning={true}
enableDensityToggle={false}
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
enableColumnFilters={true}
enableHiding={true}
enableFullScreenToggle={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
enableRowActions={true}
TableRowAction={TableRowActions}
/>
</Box>
</DashboardLayouts>
<Box sx={{px: 3}}>
<DataTable
tableUrl={GET_PASSENGER_OFFICE}
columns={columns}
selectableRow={false}
enableCustomToolbar={false}
enableLastUpdate={true}
sorting={[{
id: 'id', desc: false
}]}
enablePinning={true}
enableDensityToggle={false}
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
enableColumnFilters={true}
enableHiding={true}
enableFullScreenToggle={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
enableRowActions={true}
TableRowAction={TableRowActions}
/>
</Box>
);
}

View File

@@ -6,7 +6,6 @@ import moment from "jalali-moment";
import DataTable from "@/core/components/DataTable";
import TableRowActions from "./TableRowActions"
import MuiDatePicker from "@/core/components/MuiDatePicker";
import DashboardLayouts from "@/components/layouts/Dashboard";
function DashboardProvinceHeadExpertComponent() {
const t = useTranslations();
@@ -126,30 +125,28 @@ function DashboardProvinceHeadExpertComponent() {
[]
);
return (
<DashboardLayouts>
<Box sx={{px: 3}}>
<DataTable
tableUrl={GET_PROVINCE_HEAD_EXPERT}
columns={columns}
selectableRow={false}
enableCustomToolbar={false}
enableLastUpdate={true}
sorting={[{
id: 'id', desc: false
}]}
enablePinning={true}
enableDensityToggle={false}
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
enableColumnFilters={true}
enableHiding={true}
enableFullScreenToggle={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
enableRowActions={true}
TableRowAction={TableRowActions}
/>
</Box>
</DashboardLayouts>
<Box sx={{px: 3}}>
<DataTable
tableUrl={GET_PROVINCE_HEAD_EXPERT}
columns={columns}
selectableRow={false}
enableCustomToolbar={false}
enableLastUpdate={true}
sorting={[{
id: 'id', desc: false
}]}
enablePinning={true}
enableDensityToggle={false}
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
enableColumnFilters={true}
enableHiding={true}
enableFullScreenToggle={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
enableRowActions={true}
TableRowAction={TableRowActions}
/>
</Box>
);
}

View File

@@ -6,7 +6,6 @@ import TableRowActions from "./TableRowActions";
import DataTable from "@/core/components/DataTable";
import moment from "jalali-moment";
import MuiDatePicker from "@/core/components/MuiDatePicker";
import DashboardLayouts from "@/components/layouts/Dashboard";
function DashboardRefahiLoanManagementComponent() {
const t = useTranslations();
@@ -134,32 +133,30 @@ function DashboardRefahiLoanManagementComponent() {
],
[]
);
return (
<DashboardLayouts>
<Box sx={{px: 3}}>
<DataTable
tableUrl={GET_LOAN_MANAGEMENT_REFAHI}
columns={columns}
selectableRow={false}
enableCustomToolbar={false}
sorting={[{
id: 'id', desc: false
}]}
enableLastUpdate={true}
enablePinning={true}
enableDensityToggle={false}
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
enableColumnFilters={true}
enableHiding={true}
enableFullScreenToggle={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
enableRowActions={true}
TableRowAction={TableRowActions}
/>
</Box>
</DashboardLayouts>
<Box sx={{px: 3}}>
<DataTable
tableUrl={GET_LOAN_MANAGEMENT_REFAHI}
columns={columns}
selectableRow={false}
enableCustomToolbar={false}
sorting={[{
id: 'id', desc: false
}]}
enableLastUpdate={true}
enablePinning={true}
enableDensityToggle={false}
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
enableColumnFilters={true}
enableHiding={true}
enableFullScreenToggle={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
enableRowActions={true}
TableRowAction={TableRowActions}
/>
</Box>
);
}

View File

@@ -6,7 +6,6 @@ import TableRowActions from "./TableRowActions";
import moment from "jalali-moment";
import DataTable from "@/core/components/DataTable";
import MuiDatePicker from "@/core/components/MuiDatePicker";
import DashboardLayouts from "@/components/layouts/Dashboard";
function DashboardRefahiProvinceManagerComponent() {
const t = useTranslations();
@@ -125,32 +124,30 @@ function DashboardRefahiProvinceManagerComponent() {
],
[]
);
return (
<DashboardLayouts>
<Box sx={{px: 3}}>
<DataTable
tableUrl={GET_REFAHI_PROVINCE_MANAGER}
columns={columns}
selectableRow={false}
enableCustomToolbar={false}
sorting={[{
id: 'id', desc: false
}]}
enableLastUpdate={true}
enablePinning={true}
enableDensityToggle={false}
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
enableColumnFilters={true}
enableHiding={true}
enableFullScreenToggle={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
enableRowActions={true}
TableRowAction={TableRowActions}
/>
</Box>
</DashboardLayouts>
<Box sx={{px: 3}}>
<DataTable
tableUrl={GET_REFAHI_PROVINCE_MANAGER}
columns={columns}
selectableRow={false}
enableCustomToolbar={false}
sorting={[{
id: 'id', desc: false
}]}
enableLastUpdate={true}
enablePinning={true}
enableDensityToggle={false}
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
enableColumnFilters={true}
enableHiding={true}
enableFullScreenToggle={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
enableRowActions={true}
TableRowAction={TableRowActions}
/>
</Box>
);
}

View File

@@ -7,7 +7,6 @@ import moment from "jalali-moment";
import MuiDatePicker from "@/core/components/MuiDatePicker";
import TableToolbar from "@/components/dashboard/role-management/TableToolbar";
import TableRowActions from "./TableRowActions"
import DashboardLayouts from "@/components/layouts/Dashboard";
function DashboardRoleManagementComponent() {
const t = useTranslations();
@@ -66,7 +65,7 @@ function DashboardRoleManagementComponent() {
datatype: "numeric",
Cell: ({renderedCellValue}) => (<Typography variant="body2">{renderedCellValue}</Typography>),
}], []);
return (<DashboardLayouts>
return (
<Box sx={{px: 3}}>
<DataTable
tableUrl={GET_ROLE_MANAGEMENT}
@@ -90,7 +89,7 @@ function DashboardRoleManagementComponent() {
TableRowAction={TableRowActions}
/>
</Box>
</DashboardLayouts>);
);
}
export default DashboardRoleManagementComponent;

View File

@@ -6,7 +6,6 @@ import TableRowActions from "./TableRowActions";
import moment from "jalali-moment";
import DataTable from "@/core/components/DataTable";
import MuiDatePicker from "@/core/components/MuiDatePicker";
import DashboardLayouts from "@/components/layouts/Dashboard";
function DashboardTransportationAssistanceComponent() {
const t = useTranslations();
@@ -157,30 +156,28 @@ function DashboardTransportationAssistanceComponent() {
[]
);
return (
<DashboardLayouts>
<Box sx={{px: 3}}>
<DataTable
tableUrl={GET_TRANSPORTATION_ASSISTANCE}
columns={columns}
selectableRow={false}
enableCustomToolbar={false}
enableLastUpdate={true}
sorting={[{
id: 'id', desc: false
}]}
enablePinning={true}
enableDensityToggle={false}
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
enableColumnFilters={true}
enableHiding={true}
enableFullScreenToggle={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
enableRowActions={true}
TableRowAction={TableRowActions}
/>
</Box>
</DashboardLayouts>
<Box sx={{px: 3}}>
<DataTable
tableUrl={GET_TRANSPORTATION_ASSISTANCE}
columns={columns}
selectableRow={false}
enableCustomToolbar={false}
enableLastUpdate={true}
sorting={[{
id: 'id', desc: false
}]}
enablePinning={true}
enableDensityToggle={false}
initialState={{density: 'compact'}} //compact (small) //comfortable (medium) //spacious (large)
enableColumnFilters={true}
enableHiding={true}
enableFullScreenToggle={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
enableRowActions={true}
TableRowAction={TableRowActions}
/>
</Box>
);
}

View File

@@ -8,7 +8,6 @@ import MuiDatePicker from "@/core/components/MuiDatePicker";
import TableToolbar from "@/components/dashboard/user-management/TableToolbar";
import TableRowActions from "./TableRowActions"
import ClearIcon from "@mui/icons-material/Clear";
import DashboardLayouts from "@/components/layouts/Dashboard";
function DashboardUserManagementComponent() {
const t = useTranslations();
@@ -113,7 +112,7 @@ function DashboardUserManagementComponent() {
</Stack>)
}
},], []);
return (<DashboardLayouts>
return (
<Box sx={{px: 3}}>
<DataTable
tableUrl={GET_USER_MANAGEMENT}
@@ -137,7 +136,7 @@ function DashboardUserManagementComponent() {
TableRowAction={TableRowActions}
/>
</Box>
</DashboardLayouts>);
);
}
export default DashboardUserManagementComponent;

View File

@@ -4,6 +4,7 @@ import Sidebar from "./sidebar";
import {Toolbar} from "@mui/material";
import BreadCrumbs from "./breadcrumbs";
import FullPageLayout from "@/layouts/FullPageLayout";
import RolePermissionMiddleware from "@/middlewares/RolePermission";
const drawerWidth = 240;
@@ -34,8 +35,10 @@ const DashboardLayouts = (props) => {
>
<Toolbar/>
<FullPageLayout sx={{mt: 3}}>
<BreadCrumbs isVisible={true}/>
{props.children}
<RolePermissionMiddleware requiredPermissions={props.permissions}>
<BreadCrumbs isVisible={true}/>
{props.children}
</RolePermissionMiddleware>
</FullPageLayout>
</FullPageLayout>
</FullPageLayout>