Merge branch 'feature/permission_check' into 'develop'
Feature/permission check See merge request witel-front-end/loan-facilities/expert-v2!21
This commit is contained in:
@@ -238,6 +238,7 @@
|
||||
"vehicle_type": "نوع ماشین",
|
||||
"state_name": "وضعیت درخواست",
|
||||
"revert": "بازگشت به معاون حمل و نقل",
|
||||
"revert_refahi": "بازگشت به معاون توسعه",
|
||||
"confirm": "تایید نهایی و ارجاع به بانک",
|
||||
"upload_file_unit": "فایل بارگذاری شده باید حداکثر 5Mb باشد",
|
||||
"upload_file_format": "فرمت قابل قبول : png,jpg,pdf",
|
||||
|
||||
@@ -7,7 +7,7 @@ const BuildTableUserInfo = ({row}) => {
|
||||
return(
|
||||
<>
|
||||
<Grid container spacing={2} sx={{ my: 2 }}>
|
||||
<Grid item xs={12} sm={4}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.project_physical_progress")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
@@ -16,7 +16,7 @@ const BuildTableUserInfo = ({row}) => {
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={4}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.basic_approval_number")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
@@ -25,15 +25,6 @@ const BuildTableUserInfo = ({row}) => {
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={4}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.basic_approval_renewal_date")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Typography variant="body1">
|
||||
{row.original.basic_approval_renewal_date || t("UserInfoDialog.no_info")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid container spacing={2} sx={{ my: 2 }}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
@@ -73,6 +64,17 @@ const BuildTableUserInfo = ({row}) => {
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid container spacing={2} sx={{ my: 2 }}>
|
||||
<Grid item xs={12} sm={12}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.basic_approval_renewal_date")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Typography variant="body1">
|
||||
{row.original.basic_approval_renewal_date || t("UserInfoDialog.no_info")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ const Revert = ({ rowId, mutate }) => {
|
||||
},
|
||||
}}
|
||||
>
|
||||
<DialogTitle>{t("NavganProvinceManager.revert")}</DialogTitle>
|
||||
<DialogTitle>{t("NavganProvinceManager.revert_refahi")}</DialogTitle>
|
||||
<RevertContent mutate={mutate} rowId={rowId} setOpenRevertDialog={setOpenRevertDialog} />
|
||||
</Dialog>
|
||||
</>
|
||||
|
||||
@@ -7,7 +7,7 @@ const BuildTableUserInfo = ({row}) => {
|
||||
return(
|
||||
<>
|
||||
<Grid container spacing={2} sx={{ my: 2 }}>
|
||||
<Grid item xs={12} sm={4}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.project_physical_progress")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
@@ -16,7 +16,7 @@ const BuildTableUserInfo = ({row}) => {
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={4}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.basic_approval_number")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
@@ -25,15 +25,6 @@ const BuildTableUserInfo = ({row}) => {
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={4}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.basic_approval_renewal_date")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Typography variant="body1">
|
||||
{row.original.basic_approval_renewal_date || t("UserInfoDialog.no_info")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid container spacing={2} sx={{ my: 2 }}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
@@ -73,6 +64,17 @@ const BuildTableUserInfo = ({row}) => {
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid container spacing={2} sx={{ my: 2 }}>
|
||||
<Grid item xs={12} sm={12}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.basic_approval_renewal_date")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Typography variant="body1">
|
||||
{row.original.basic_approval_renewal_date || t("UserInfoDialog.no_info")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,16 @@
|
||||
import { Chip, DialogContent, DialogTitle, Divider, Grid, Stack, Typography } from "@mui/material";
|
||||
import {
|
||||
Chip,
|
||||
DialogContent,
|
||||
DialogTitle,
|
||||
Divider,
|
||||
Grid,
|
||||
Stack,
|
||||
Typography
|
||||
} from "@mui/material";
|
||||
import { useTranslations } from "next-intl";
|
||||
import moment from "jalali-moment";
|
||||
import BuildTableUserInfo from "./BuildTableUserInfo";
|
||||
import RestoreTableUserInfo from "./RestoreTableUserInfo";
|
||||
|
||||
const LegalTableContent = ({ rowId, row }) => {
|
||||
const t = useTranslations();
|
||||
@@ -27,19 +37,19 @@ const LegalTableContent = ({ rowId, row }) => {
|
||||
<Grid container spacing={2} sx={{ my: 2 }}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.navgan_plan_id")} sx={{ mr: 1 }} />
|
||||
<Chip label={t("UserInfoDialog.activity_type")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Typography variant="body1">
|
||||
{row.original.project_title || t("UserInfoDialog.no_info")}
|
||||
{row.original.activity_category_name || t("UserInfoDialog.no_info")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.activity_type")} sx={{ mr: 1 }} />
|
||||
<Chip label={t("UserInfoDialog.navgan_plan_id")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Typography variant="body1">
|
||||
{row.original.activity_category_name || t("UserInfoDialog.no_info")}
|
||||
{row.original.project_title || t("UserInfoDialog.no_info")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
@@ -217,26 +227,6 @@ const LegalTableContent = ({ rowId, row }) => {
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid container spacing={2} sx={{ my: 2 }}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.navgan_id")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Typography variant="body1">
|
||||
{row.original.navgan_id || t("UserInfoDialog.no_info")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.navgan_type")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Typography variant="body1">
|
||||
{row.original.navgan_type || t("UserInfoDialog.no_info")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid container spacing={2} sx={{ my: 2 }}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
@@ -260,26 +250,44 @@ const LegalTableContent = ({ rowId, row }) => {
|
||||
<Grid container spacing={2} sx={{ my: 2 }}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.vehicle_type")} sx={{ mr: 1 }} />
|
||||
<Chip label={t("UserInfoDialog.project_province_name")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Typography variant="body1">
|
||||
{row.original.vehicle_type || t("UserInfoDialog.no_info")}
|
||||
{row.original.project_province_name || t("UserInfoDialog.no_info")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.investment")} sx={{ mr: 1 }} />
|
||||
<Chip label={t("UserInfoDialog.project_city_name")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Typography variant="body1">{row.original.project_city_name}</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid container spacing={2} sx={{ my: 2 }}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.investment_amount")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Typography variant="body1">
|
||||
{row.original.investment_amount / 1000000 >= 1000
|
||||
? t("UserInfoDialog.milyard", {
|
||||
value: row.original.investment_amount / 1000000000,
|
||||
})
|
||||
value: row.original.investment_amount / 1000000000,
|
||||
})
|
||||
: t("UserInfoDialog.toman", { value: row.original.investment_amount / 1000000 })}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.welfare_complex_degree")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Typography variant="body1">
|
||||
{row.original.welfare_complex_degree || t("UserInfoDialog.no_info")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid container spacing={2} sx={{ my: 2 }}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
@@ -289,11 +297,11 @@ const LegalTableContent = ({ rowId, row }) => {
|
||||
<Typography variant="body1">
|
||||
{row.original.requested_facility_amount / 1000000 >= 1000
|
||||
? t("UserInfoDialog.milyard", {
|
||||
value: row.original.requested_facility_amount / 1000000000,
|
||||
})
|
||||
value: row.original.requested_facility_amount / 1000000000,
|
||||
})
|
||||
: t("UserInfoDialog.toman", {
|
||||
value: row.original.requested_facility_amount / 1000000,
|
||||
})}
|
||||
value: row.original.requested_facility_amount / 1000000,
|
||||
})}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
@@ -329,53 +337,46 @@ const LegalTableContent = ({ rowId, row }) => {
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid container spacing={2} sx={{ my: 2 }}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.project_axis")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Typography variant="body1">
|
||||
{row.original.project_axis || t("UserInfoDialog.no_info")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.project_direction")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Typography variant="body1">
|
||||
{row.original.project_direction || t("UserInfoDialog.no_info")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
{row.original.refahi_type === 1 ? (<BuildTableUserInfo row={row} />) : (<RestoreTableUserInfo row={row} />) }
|
||||
<Grid container spacing={2} sx={{ my: 2 }}>
|
||||
<Grid item xs={12} sm={12}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.plate")} sx={{ mr: 1 }} />
|
||||
<Chip label={t("UserInfoDialog.project_kilometer_marker")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Stack sx={{ border: 1, borderColor: "divider", borderRadius: 1 }} direction={"row"}>
|
||||
<Stack
|
||||
sx={{
|
||||
borderRight: 1,
|
||||
borderColor: "divider",
|
||||
textAlign: "center",
|
||||
width: "100%",
|
||||
px: 1,
|
||||
}}
|
||||
>
|
||||
{row.original.plate_number.split("-")[3] || t("UserInfoDialog.no_info")}
|
||||
</Stack>
|
||||
<Stack spacing={1} direction={"row"} sx={{ width: "100%" }}>
|
||||
<Stack
|
||||
sx={{
|
||||
textAlign: "center",
|
||||
width: "100%",
|
||||
pl: 1,
|
||||
}}
|
||||
>
|
||||
{row.original.plate_number.split("-")[2] || t("UserInfoDialog.no_info")}
|
||||
</Stack>
|
||||
<Stack
|
||||
sx={{
|
||||
textAlign: "center",
|
||||
width: "100%",
|
||||
pl: 1,
|
||||
}}
|
||||
>
|
||||
{row.original.plate_number.split("-")[1] || t("UserInfoDialog.no_info")}
|
||||
</Stack>
|
||||
<Stack
|
||||
sx={{
|
||||
textAlign: "center",
|
||||
width: "100%",
|
||||
px: 1,
|
||||
}}
|
||||
>
|
||||
{row.original.plate_number.split("-")[0] || t("UserInfoDialog.no_info")}
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Stack>
|
||||
<Typography variant="body1">
|
||||
{row.original.project_kilometer_marker || t("UserInfoDialog.no_info")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid container spacing={2} sx={{ my: 2 }}>
|
||||
<Grid item xs={12} sm={12}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.project_address")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Typography variant="body1">
|
||||
{row.original.project_address || t("UserInfoDialog.no_info")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { Chip, DialogContent, DialogTitle, Divider, Grid, Stack, Typography } from "@mui/material";
|
||||
import { Button, Chip, DialogContent, DialogTitle, Divider, Grid, Link, Stack, Typography } from "@mui/material";
|
||||
import { useTranslations } from "next-intl";
|
||||
import moment from "jalali-moment";
|
||||
import DownloadIcon from "@mui/icons-material/Download";
|
||||
import BuildTableUserInfo from "./BuildTableUserInfo";
|
||||
import RestoreTableUserInfo from "./RestoreTableUserInfo";
|
||||
|
||||
const RealTableContent = ({ rowId, row }) => {
|
||||
const t = useTranslations();
|
||||
@@ -27,19 +30,19 @@ const RealTableContent = ({ rowId, row }) => {
|
||||
<Grid container spacing={2} sx={{ my: 2 }}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.navgan_plan_id")} sx={{ mr: 1 }} />
|
||||
<Chip label={t("UserInfoDialog.activity_type")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Typography variant="body1">
|
||||
{row.original.project_title || t("UserInfoDialog.no_info")}
|
||||
{row.original.activity_category_name || t("UserInfoDialog.no_info")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.activity_type")} sx={{ mr: 1 }} />
|
||||
<Chip label={t("UserInfoDialog.navgan_plan_id")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Typography variant="body1">
|
||||
{row.original.activity_category_name || t("UserInfoDialog.no_info")}
|
||||
{row.original.project_title || t("UserInfoDialog.no_info")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
@@ -193,26 +196,6 @@ const RealTableContent = ({ rowId, row }) => {
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid container spacing={2} sx={{ my: 2 }}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.navgan_id")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Typography variant="body1">
|
||||
{row.original.navgan_id || t("UserInfoDialog.no_info")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.navgan_type")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Typography variant="body1">
|
||||
{row.original.navgan_type || t("UserInfoDialog.no_info")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid container spacing={2} sx={{ my: 2 }}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
@@ -236,26 +219,44 @@ const RealTableContent = ({ rowId, row }) => {
|
||||
<Grid container spacing={2} sx={{ my: 2 }}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.vehicle_type")} sx={{ mr: 1 }} />
|
||||
<Chip label={t("UserInfoDialog.project_province_name")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Typography variant="body1">
|
||||
{row.original.vehicle_type || t("UserInfoDialog.no_info")}
|
||||
{row.original.project_province_name || t("UserInfoDialog.no_info")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.investment")} sx={{ mr: 1 }} />
|
||||
<Chip label={t("UserInfoDialog.project_city_name")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Typography variant="body1">{row.original.project_city_name}</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid container spacing={2} sx={{ my: 2 }}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.investment_amount")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Typography variant="body1">
|
||||
{row.original.investment_amount / 1000000 >= 1000
|
||||
? t("UserInfoDialog.milyard", {
|
||||
value: row.original.investment_amount / 1000000000,
|
||||
})
|
||||
value: row.original.investment_amount / 1000000000,
|
||||
})
|
||||
: t("UserInfoDialog.toman", { value: row.original.investment_amount / 1000000 })}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.welfare_complex_degree")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Typography variant="body1">
|
||||
{row.original.welfare_complex_degree || t("UserInfoDialog.no_info")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid container spacing={2} sx={{ my: 2 }}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
@@ -265,11 +266,11 @@ const RealTableContent = ({ rowId, row }) => {
|
||||
<Typography variant="body1">
|
||||
{row.original.requested_facility_amount / 1000000 >= 1000
|
||||
? t("UserInfoDialog.milyard", {
|
||||
value: row.original.requested_facility_amount / 1000000000,
|
||||
})
|
||||
value: row.original.requested_facility_amount / 1000000000,
|
||||
})
|
||||
: t("UserInfoDialog.toman", {
|
||||
value: row.original.requested_facility_amount / 1000000,
|
||||
})}
|
||||
value: row.original.requested_facility_amount / 1000000,
|
||||
})}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
@@ -285,53 +286,46 @@ const RealTableContent = ({ rowId, row }) => {
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid container spacing={2} sx={{ my: 2 }}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.project_axis")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Typography variant="body1">
|
||||
{row.original.project_axis || t("UserInfoDialog.no_info")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.project_direction")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Typography variant="body1">
|
||||
{row.original.project_direction || t("UserInfoDialog.no_info")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
{row.original.refahi_type === 1 ? (<BuildTableUserInfo row={row} />) : (<RestoreTableUserInfo row={row} />) }
|
||||
<Grid container spacing={2} sx={{ my: 2 }}>
|
||||
<Grid item xs={12} sm={12}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.plate")} sx={{ mr: 1 }} />
|
||||
<Chip label={t("UserInfoDialog.project_kilometer_marker")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Stack sx={{ border: 1, borderColor: "divider", borderRadius: 1 }} direction={"row"}>
|
||||
<Stack
|
||||
sx={{
|
||||
borderRight: 1,
|
||||
borderColor: "divider",
|
||||
textAlign: "center",
|
||||
width: "100%",
|
||||
px: 1,
|
||||
}}
|
||||
>
|
||||
{row.original.plate_number.split("-")[3] || t("UserInfoDialog.no_info")}
|
||||
</Stack>
|
||||
<Stack spacing={1} direction={"row"} sx={{ width: "100%" }}>
|
||||
<Stack
|
||||
sx={{
|
||||
textAlign: "center",
|
||||
width: "100%",
|
||||
pl: 1,
|
||||
}}
|
||||
>
|
||||
{row.original.plate_number.split("-")[2] || t("UserInfoDialog.no_info")}
|
||||
</Stack>
|
||||
<Stack
|
||||
sx={{
|
||||
textAlign: "center",
|
||||
width: "100%",
|
||||
pl: 1,
|
||||
}}
|
||||
>
|
||||
{row.original.plate_number.split("-")[1] || t("UserInfoDialog.no_info")}
|
||||
</Stack>
|
||||
<Stack
|
||||
sx={{
|
||||
textAlign: "center",
|
||||
width: "100%",
|
||||
px: 1,
|
||||
}}
|
||||
>
|
||||
{row.original.plate_number.split("-")[0] || t("UserInfoDialog.no_info")}
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Stack>
|
||||
<Typography variant="body1">
|
||||
{row.original.project_kilometer_marker || t("UserInfoDialog.no_info")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid container spacing={2} sx={{ my: 2 }}>
|
||||
<Grid item xs={12} sm={12}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.project_address")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Typography variant="body1">
|
||||
{row.original.project_address || t("UserInfoDialog.no_info")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
@@ -39,6 +39,9 @@ const UserInfoForm = ({ rowId, row }) => {
|
||||
<Button onClick={() => setOpenUserInfoDialog(false)} variant="outlined" color="secondary" autoFocus>
|
||||
{t("UserInfoDialog.button-cancel")}
|
||||
</Button>
|
||||
<Button onClick={() => window.open(`/dashboard/refahi/passenger-boss/print-report?id=${row.original.id}`, "_blank")} variant="contained" color="primary" autoFocus>
|
||||
{t("UserInfoDialog.button-report")}
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
</>
|
||||
|
||||
@@ -7,7 +7,7 @@ const BuildTableUserInfo = ({row}) => {
|
||||
return(
|
||||
<>
|
||||
<Grid container spacing={2} sx={{ my: 2 }}>
|
||||
<Grid item xs={12} sm={4}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.project_physical_progress")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
@@ -16,7 +16,7 @@ const BuildTableUserInfo = ({row}) => {
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={4}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.basic_approval_number")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
@@ -25,15 +25,6 @@ const BuildTableUserInfo = ({row}) => {
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={4}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.basic_approval_renewal_date")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Typography variant="body1">
|
||||
{row.original.basic_approval_renewal_date || t("UserInfoDialog.no_info")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid container spacing={2} sx={{ my: 2 }}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
@@ -73,6 +64,17 @@ const BuildTableUserInfo = ({row}) => {
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid container spacing={2} sx={{ my: 2 }}>
|
||||
<Grid item xs={12} sm={12}>
|
||||
<Stack direction="row" alignItems="center" sx={{ width: "100%" }}>
|
||||
<Chip label={t("UserInfoDialog.basic_approval_renewal_date")} sx={{ mr: 1 }} />
|
||||
<Divider sx={{ flexGrow: 1, mx: 1 }} />
|
||||
<Typography variant="body1">
|
||||
{row.original.basic_approval_renewal_date || t("UserInfoDialog.no_info")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ export async function getServerSideProps({ req, locale }) {
|
||||
title: "Dashboard.transportation_assistance",
|
||||
isBot,
|
||||
locale,
|
||||
layout: { name: "DashboardLayout", props: { permissions: ["manage_transportation_navgan"] } }, //پرمیشن باید عوض بشه
|
||||
layout: { name: "DashboardLayout", props: { permissions: ["manage_transportation_refahi"] } }, //پرمیشن باید عوض بشه
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user