build and format
This commit is contained in:
@@ -1,4 +1,14 @@
|
||||
import { Box, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, CircularProgress, Typography } from "@mui/material";
|
||||
import {
|
||||
Box,
|
||||
Table,
|
||||
TableBody,
|
||||
TableCell,
|
||||
TableContainer,
|
||||
TableHead,
|
||||
TableRow,
|
||||
CircularProgress,
|
||||
Typography,
|
||||
} from "@mui/material";
|
||||
import "moment/locale/fa";
|
||||
import { useHistory } from "@/lib/hooks/useHistory";
|
||||
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
import { Box, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, CircularProgress, Typography } from "@mui/material";
|
||||
import {
|
||||
Box,
|
||||
Table,
|
||||
TableBody,
|
||||
TableCell,
|
||||
TableContainer,
|
||||
TableHead,
|
||||
TableRow,
|
||||
CircularProgress,
|
||||
Typography,
|
||||
} from "@mui/material";
|
||||
import "moment/locale/fa";
|
||||
import { useHistory } from "@/lib/hooks/useHistory";
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import ThumbUpIcon from "@mui/icons-material/ThumbUp";
|
||||
import { IconButton, Tooltip } from "@mui/material";
|
||||
|
||||
const ConfirmAction = ({ onClick, disabled }) => {
|
||||
if (disabled) return
|
||||
if (disabled) return;
|
||||
return (
|
||||
<>
|
||||
<Tooltip title="تایید اقدام">
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
import { Box, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, CircularProgress, Typography } from "@mui/material";
|
||||
import {
|
||||
Box,
|
||||
Table,
|
||||
TableBody,
|
||||
TableCell,
|
||||
TableContainer,
|
||||
TableHead,
|
||||
TableRow,
|
||||
CircularProgress,
|
||||
Typography,
|
||||
} from "@mui/material";
|
||||
import "moment/locale/fa";
|
||||
import { useHistory } from "@/lib/hooks/useHistory";
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Reply } from "@mui/icons-material";
|
||||
import { IconButton, Tooltip } from "@mui/material";
|
||||
|
||||
const ReferralAction = ({ onClick, disabled }) => {
|
||||
if (disabled) return
|
||||
if (disabled) return;
|
||||
return (
|
||||
<>
|
||||
<Tooltip title="ارجاع درخواست">
|
||||
|
||||
@@ -2,7 +2,7 @@ import ThumbDownIcon from "@mui/icons-material/ThumbDown";
|
||||
import { IconButton, Tooltip } from "@mui/material";
|
||||
|
||||
const RejectAction = ({ onClick, disabled }) => {
|
||||
if (disabled) return
|
||||
if (disabled) return;
|
||||
return (
|
||||
<>
|
||||
<Tooltip title="عدم تایید اقدام">
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import { Card, CardContent, CircularProgress, Stack, Typography } from "@mui/material";
|
||||
|
||||
const PrevCartableOpinion = ({ item }) => {
|
||||
|
||||
return (
|
||||
<Stack>
|
||||
<Card variant="outlined">
|
||||
<CardContent>
|
||||
<Typography variant="body2">{item.previous_state_name}: {item.action_name}</Typography>
|
||||
<Typography variant="body2">
|
||||
{item.previous_state_name}: {item.action_name}
|
||||
</Typography>
|
||||
<Typography variant="body2">توضیحات: {item.expert_description}</Typography>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
Stack,
|
||||
Typography
|
||||
} from "@mui/material";
|
||||
import { Card, CardContent, Stack, Typography } from "@mui/material";
|
||||
|
||||
const QuestionVerifyNeedRoadForm = ({ row }) => {
|
||||
return (
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
Stack,
|
||||
Typography
|
||||
} from "@mui/material";
|
||||
import { Card, CardContent, Stack, Typography } from "@mui/material";
|
||||
|
||||
const QuestionVerifyRoadSafetyForm = ({ row }) => {
|
||||
return (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Close } from "@mui/icons-material";
|
||||
import { Button, Dialog, DialogTitle, IconButton } from "@mui/material"
|
||||
import { Button, Dialog, DialogTitle, IconButton } from "@mui/material";
|
||||
import { useState } from "react";
|
||||
import ReferForm from "./Form";
|
||||
|
||||
@@ -8,10 +8,23 @@ const Refer = ({ rowId, mutate, handleClose, isSubmitting }) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Button onClick={() => setOpenReferDialog(true)} variant="contained" color="error" disabled={isSubmitting} size="large">
|
||||
<Button
|
||||
onClick={() => setOpenReferDialog(true)}
|
||||
variant="contained"
|
||||
color="error"
|
||||
disabled={isSubmitting}
|
||||
size="large"
|
||||
>
|
||||
مخالفت
|
||||
</Button>
|
||||
<Dialog open={openReferDialog} onClose={() => { setOpenReferDialog(false) }} maxWidth="xs" fullWidth>
|
||||
<Dialog
|
||||
open={openReferDialog}
|
||||
onClose={() => {
|
||||
setOpenReferDialog(false);
|
||||
}}
|
||||
maxWidth="xs"
|
||||
fullWidth
|
||||
>
|
||||
<IconButton
|
||||
aria-label="close"
|
||||
onClick={() => setOpenReferDialog(false)}
|
||||
@@ -26,9 +39,16 @@ const Refer = ({ rowId, mutate, handleClose, isSubmitting }) => {
|
||||
<Close />
|
||||
</IconButton>
|
||||
<DialogTitle>مخالفت و ارجاع به دفتر حریم</DialogTitle>
|
||||
{openReferDialog && <ReferForm handleClose={handleClose} setOpenReferDialog={setOpenReferDialog} rowId={rowId} mutate={mutate} />}
|
||||
{openReferDialog && (
|
||||
<ReferForm
|
||||
handleClose={handleClose}
|
||||
setOpenReferDialog={setOpenReferDialog}
|
||||
rowId={rowId}
|
||||
mutate={mutate}
|
||||
/>
|
||||
)}
|
||||
</Dialog>
|
||||
</>
|
||||
)
|
||||
}
|
||||
export default Refer
|
||||
);
|
||||
};
|
||||
export default Refer;
|
||||
|
||||
@@ -6,8 +6,6 @@ import { useState } from "react";
|
||||
import PrevCartableOpinion from "./PrevCartableOpinion";
|
||||
import Questions from "./Questions";
|
||||
|
||||
|
||||
|
||||
const ConfirmRoadSafetyFormContext = ({ row, data, rowId, mutate, handleClose }) => {
|
||||
const [tabState, setTabState] = useState(0);
|
||||
|
||||
@@ -56,7 +54,7 @@ const ConfirmRoadSafetyFormContext = ({ row, data, rowId, mutate, handleClose })
|
||||
>
|
||||
{"بستن"}
|
||||
</Button>
|
||||
<Button variant="contained" size="large" onClick={() => setTabState(s => s + 1)}>
|
||||
<Button variant="contained" size="large" onClick={() => setTabState((s) => s + 1)}>
|
||||
مرحله بعد
|
||||
</Button>
|
||||
</DialogActions>
|
||||
@@ -70,15 +68,10 @@ const ConfirmRoadSafetyFormContext = ({ row, data, rowId, mutate, handleClose })
|
||||
</Stack>
|
||||
</DialogContent>
|
||||
<DialogActions sx={{ alignItems: "center", justifyContent: "center" }}>
|
||||
<Button
|
||||
onClick={handlePrev}
|
||||
variant="outlined"
|
||||
color="secondary"
|
||||
size="large"
|
||||
>
|
||||
<Button onClick={handlePrev} variant="outlined" color="secondary" size="large">
|
||||
مرحله قبل
|
||||
</Button>
|
||||
<Button variant="contained" size="large" onClick={() => setTabState(s => s + 1)}>
|
||||
<Button variant="contained" size="large" onClick={() => setTabState((s) => s + 1)}>
|
||||
مرحله بعد
|
||||
</Button>
|
||||
</DialogActions>
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import { Card, CardContent, CircularProgress, Stack, Typography } from "@mui/material";
|
||||
|
||||
const PrevCartableOpinion = ({ item }) => {
|
||||
|
||||
return (
|
||||
<Stack>
|
||||
<Card variant="outlined">
|
||||
<CardContent>
|
||||
<Typography variant="body2">{item.previous_state_name}: {item.action_name}</Typography>
|
||||
<Typography variant="body2">
|
||||
{item.previous_state_name}: {item.action_name}
|
||||
</Typography>
|
||||
<Typography variant="body2">توضیحات: {item.expert_description}</Typography>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
Stack,
|
||||
Typography
|
||||
} from "@mui/material";
|
||||
import { Card, CardContent, Stack, Typography } from "@mui/material";
|
||||
|
||||
const QuestionVerifyNeedRoadForm = () => {
|
||||
return (
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
Stack,
|
||||
Typography
|
||||
} from "@mui/material";
|
||||
import { Card, CardContent, Stack, Typography } from "@mui/material";
|
||||
|
||||
const QuestionVerifyRoadSafetyForm = ({ row }) => {
|
||||
return (
|
||||
|
||||
@@ -23,15 +23,15 @@ const ReferForm = ({ rowId, mutate, handleClose, setOpenReferDialog }) => {
|
||||
const onSubmit = async (data) => {
|
||||
await requestServer(`${REFER_VERIFY_NEADROAD_ROAD_INQUIRY_PRIVACY_ZAMIN_GOV_ASSISTANT}/${rowId}`, "post", {
|
||||
data: {
|
||||
expert_description: data.description
|
||||
expert_description: data.description,
|
||||
},
|
||||
})
|
||||
.then(() => {
|
||||
handleClose();
|
||||
setOpenReferDialog(false)
|
||||
setOpenReferDialog(false);
|
||||
mutate();
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -60,11 +60,17 @@ const ReferForm = ({ rowId, mutate, handleClose, setOpenReferDialog }) => {
|
||||
</Stack>
|
||||
</DialogContent>
|
||||
<DialogActions sx={{ alignItems: "center", justifyContent: "center" }}>
|
||||
<Button variant="contained" size="large" disabled={isSubmitting} type="button" onClick={handleSubmit(onSubmit)}>
|
||||
<Button
|
||||
variant="contained"
|
||||
size="large"
|
||||
disabled={isSubmitting}
|
||||
type="button"
|
||||
onClick={handleSubmit(onSubmit)}
|
||||
>
|
||||
ثبت
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</>
|
||||
)
|
||||
}
|
||||
export default ReferForm
|
||||
);
|
||||
};
|
||||
export default ReferForm;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Close } from "@mui/icons-material";
|
||||
import { Button, Dialog, DialogTitle, IconButton } from "@mui/material"
|
||||
import { Button, Dialog, DialogTitle, IconButton } from "@mui/material";
|
||||
import { useState } from "react";
|
||||
import ReferForm from "./Form";
|
||||
|
||||
@@ -8,10 +8,23 @@ const Refer = ({ rowId, mutate, handleClose, isSubmitting }) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Button onClick={() => setOpenReferDialog(true)} variant="contained" color="error" disabled={isSubmitting} size="large">
|
||||
<Button
|
||||
onClick={() => setOpenReferDialog(true)}
|
||||
variant="contained"
|
||||
color="error"
|
||||
disabled={isSubmitting}
|
||||
size="large"
|
||||
>
|
||||
مخالفت
|
||||
</Button>
|
||||
<Dialog open={openReferDialog} onClose={() => { setOpenReferDialog(false) }} maxWidth="xs" fullWidth>
|
||||
<Dialog
|
||||
open={openReferDialog}
|
||||
onClose={() => {
|
||||
setOpenReferDialog(false);
|
||||
}}
|
||||
maxWidth="xs"
|
||||
fullWidth
|
||||
>
|
||||
<IconButton
|
||||
aria-label="close"
|
||||
onClick={() => setOpenReferDialog(false)}
|
||||
@@ -26,9 +39,16 @@ const Refer = ({ rowId, mutate, handleClose, isSubmitting }) => {
|
||||
<Close />
|
||||
</IconButton>
|
||||
<DialogTitle>مخالفت و ارجاع به دفتر حریم</DialogTitle>
|
||||
{openReferDialog && <ReferForm handleClose={handleClose} setOpenReferDialog={setOpenReferDialog} rowId={rowId} mutate={mutate} />}
|
||||
{openReferDialog && (
|
||||
<ReferForm
|
||||
handleClose={handleClose}
|
||||
setOpenReferDialog={setOpenReferDialog}
|
||||
rowId={rowId}
|
||||
mutate={mutate}
|
||||
/>
|
||||
)}
|
||||
</Dialog>
|
||||
</>
|
||||
)
|
||||
}
|
||||
export default Refer
|
||||
);
|
||||
};
|
||||
export default Refer;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import StyledForm from "@/core/components/StyledForm";
|
||||
import { CONFIRM_INQUIRY_PRIVACY_ZAMIN_GOV_ASSISTANT, CONFIRM_VERIFY_NEADROAD_ROAD_INQUIRY_PRIVACY_ZAMIN_GOV_ASSISTANT } from "@/core/utils/routes";
|
||||
import {
|
||||
CONFIRM_INQUIRY_PRIVACY_ZAMIN_GOV_ASSISTANT,
|
||||
CONFIRM_VERIFY_NEADROAD_ROAD_INQUIRY_PRIVACY_ZAMIN_GOV_ASSISTANT,
|
||||
} from "@/core/utils/routes";
|
||||
import useRequest from "@/lib/hooks/useRequest";
|
||||
import { yupResolver } from "@hookform/resolvers/yup";
|
||||
import { Button, DialogActions, DialogContent, Stack } from "@mui/material";
|
||||
@@ -30,27 +33,33 @@ const Questions = ({ row, rowId, mutate, handleClose, handlePrev }) => {
|
||||
const onSubmit = async (data) => {
|
||||
await requestServer(`${CONFIRM_VERIFY_NEADROAD_ROAD_INQUIRY_PRIVACY_ZAMIN_GOV_ASSISTANT}/${rowId}`, "post", {
|
||||
data: {
|
||||
expert_description: data.description
|
||||
expert_description: data.description,
|
||||
},
|
||||
})
|
||||
.then(() => {
|
||||
handleClose();
|
||||
mutate();
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
};
|
||||
|
||||
return (
|
||||
<StyledForm onSubmit={handleSubmit(onSubmit)}>
|
||||
<DialogContent dividers>
|
||||
<Stack >
|
||||
<Stack>
|
||||
<QuestionVerifyNeedRoadForm row={row} />
|
||||
<DescriptionForm control={control} />
|
||||
</Stack>
|
||||
</DialogContent>
|
||||
<DialogActions sx={{ alignItems: "center", justifyContent: "space-between" }}>
|
||||
<Stack spacing={1} direction={'row'}>
|
||||
<Button onClick={handlePrev} variant="outlined" color="secondary" disabled={isSubmitting} size="large">
|
||||
<Stack spacing={1} direction={"row"}>
|
||||
<Button
|
||||
onClick={handlePrev}
|
||||
variant="outlined"
|
||||
color="secondary"
|
||||
disabled={isSubmitting}
|
||||
size="large"
|
||||
>
|
||||
{"مرحله قبلی"}
|
||||
</Button>
|
||||
<Refer rowId={rowId} mutate={mutate} handleClose={handleClose} isSubmitting={isSubmitting} />
|
||||
@@ -60,6 +69,6 @@ const Questions = ({ row, rowId, mutate, handleClose, handlePrev }) => {
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</StyledForm>
|
||||
)
|
||||
}
|
||||
export default Questions
|
||||
);
|
||||
};
|
||||
export default Questions;
|
||||
|
||||
@@ -30,7 +30,13 @@ const ConfirmRoadSafetyDialog = ({ row, handleClose, rowId, mutate }) => {
|
||||
{loading ? (
|
||||
<DialogLoading />
|
||||
) : data ? (
|
||||
<ConfirmRoadSafetyFormContext row={row} rowId={rowId} data={data} mutate={mutate} handleClose={handleClose} />
|
||||
<ConfirmRoadSafetyFormContext
|
||||
row={row}
|
||||
rowId={rowId}
|
||||
data={data}
|
||||
mutate={mutate}
|
||||
handleClose={handleClose}
|
||||
/>
|
||||
) : (
|
||||
<DialogContent>
|
||||
<Typography textAlign={"center"}>اطلاعات درخواست در سامانه یافت نشد</Typography>
|
||||
@@ -38,6 +44,5 @@ const ConfirmRoadSafetyDialog = ({ row, handleClose, rowId, mutate }) => {
|
||||
)}
|
||||
</>
|
||||
);
|
||||
|
||||
}
|
||||
export default ConfirmRoadSafetyDialog
|
||||
};
|
||||
export default ConfirmRoadSafetyDialog;
|
||||
|
||||
@@ -6,8 +6,6 @@ import { useState } from "react";
|
||||
import PrevCartableOpinion from "./PrevCartableOpinion";
|
||||
import Questions from "./Questions";
|
||||
|
||||
|
||||
|
||||
const ConfirmRoadSafetyFormContext = ({ row, data, rowId, mutate, handleClose }) => {
|
||||
const [tabState, setTabState] = useState(0);
|
||||
|
||||
@@ -56,7 +54,7 @@ const ConfirmRoadSafetyFormContext = ({ row, data, rowId, mutate, handleClose })
|
||||
>
|
||||
{"بستن"}
|
||||
</Button>
|
||||
<Button variant="contained" size="large" onClick={() => setTabState(s => s + 1)}>
|
||||
<Button variant="contained" size="large" onClick={() => setTabState((s) => s + 1)}>
|
||||
مرحله بعد
|
||||
</Button>
|
||||
</DialogActions>
|
||||
@@ -70,15 +68,10 @@ const ConfirmRoadSafetyFormContext = ({ row, data, rowId, mutate, handleClose })
|
||||
</Stack>
|
||||
</DialogContent>
|
||||
<DialogActions sx={{ alignItems: "center", justifyContent: "center" }}>
|
||||
<Button
|
||||
onClick={handlePrev}
|
||||
variant="outlined"
|
||||
color="secondary"
|
||||
size="large"
|
||||
>
|
||||
<Button onClick={handlePrev} variant="outlined" color="secondary" size="large">
|
||||
مرحله قبل
|
||||
</Button>
|
||||
<Button variant="contained" size="large" onClick={() => setTabState(s => s + 1)}>
|
||||
<Button variant="contained" size="large" onClick={() => setTabState((s) => s + 1)}>
|
||||
مرحله بعد
|
||||
</Button>
|
||||
</DialogActions>
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import { Card, CardContent, CircularProgress, Stack, Typography } from "@mui/material";
|
||||
|
||||
const PrevCartableOpinion = ({ item }) => {
|
||||
|
||||
return (
|
||||
<Stack>
|
||||
<Card variant="outlined">
|
||||
<CardContent>
|
||||
<Typography variant="body2">{item.previous_state_name}: {item.action_name}</Typography>
|
||||
<Typography variant="body2">
|
||||
{item.previous_state_name}: {item.action_name}
|
||||
</Typography>
|
||||
<Typography variant="body2">توضیحات: {item.expert_description}</Typography>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
Stack,
|
||||
Typography
|
||||
} from "@mui/material";
|
||||
import { Card, CardContent, Stack, Typography } from "@mui/material";
|
||||
|
||||
const QuestionVerifyNeedRoadForm = ({ row }) => {
|
||||
return (
|
||||
|
||||
@@ -23,15 +23,15 @@ const ReferForm = ({ rowId, mutate, handleClose, setOpenReferDialog }) => {
|
||||
const onSubmit = async (data) => {
|
||||
await requestServer(`${REFER_VERIFY_NEADROAD_ROAD_INQUIRY_PRIVACY_ZAMIN_GOV_ASSISTANT}/${rowId}`, "post", {
|
||||
data: {
|
||||
expert_description: data.description
|
||||
expert_description: data.description,
|
||||
},
|
||||
})
|
||||
.then(() => {
|
||||
handleClose();
|
||||
setOpenReferDialog(false)
|
||||
setOpenReferDialog(false);
|
||||
mutate();
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -60,11 +60,17 @@ const ReferForm = ({ rowId, mutate, handleClose, setOpenReferDialog }) => {
|
||||
</Stack>
|
||||
</DialogContent>
|
||||
<DialogActions sx={{ alignItems: "center", justifyContent: "center" }}>
|
||||
<Button variant="contained" size="large" disabled={isSubmitting} type="button" onClick={handleSubmit(onSubmit)}>
|
||||
<Button
|
||||
variant="contained"
|
||||
size="large"
|
||||
disabled={isSubmitting}
|
||||
type="button"
|
||||
onClick={handleSubmit(onSubmit)}
|
||||
>
|
||||
ثبت
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</>
|
||||
)
|
||||
}
|
||||
export default ReferForm
|
||||
);
|
||||
};
|
||||
export default ReferForm;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Close } from "@mui/icons-material";
|
||||
import { Button, Dialog, DialogTitle, IconButton } from "@mui/material"
|
||||
import { Button, Dialog, DialogTitle, IconButton } from "@mui/material";
|
||||
import { useState } from "react";
|
||||
import ReferForm from "./Form";
|
||||
|
||||
@@ -8,10 +8,23 @@ const Refer = ({ rowId, mutate, handleClose, isSubmitting }) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Button onClick={() => setOpenReferDialog(true)} variant="contained" color="error" disabled={isSubmitting} size="large">
|
||||
<Button
|
||||
onClick={() => setOpenReferDialog(true)}
|
||||
variant="contained"
|
||||
color="error"
|
||||
disabled={isSubmitting}
|
||||
size="large"
|
||||
>
|
||||
مخالفت
|
||||
</Button>
|
||||
<Dialog open={openReferDialog} onClose={() => { setOpenReferDialog(false) }} maxWidth="xs" fullWidth>
|
||||
<Dialog
|
||||
open={openReferDialog}
|
||||
onClose={() => {
|
||||
setOpenReferDialog(false);
|
||||
}}
|
||||
maxWidth="xs"
|
||||
fullWidth
|
||||
>
|
||||
<IconButton
|
||||
aria-label="close"
|
||||
onClick={() => setOpenReferDialog(false)}
|
||||
@@ -26,9 +39,16 @@ const Refer = ({ rowId, mutate, handleClose, isSubmitting }) => {
|
||||
<Close />
|
||||
</IconButton>
|
||||
<DialogTitle>مخالفت و ارجاع به دفتر حریم</DialogTitle>
|
||||
{openReferDialog && <ReferForm handleClose={handleClose} setOpenReferDialog={setOpenReferDialog} rowId={rowId} mutate={mutate} />}
|
||||
{openReferDialog && (
|
||||
<ReferForm
|
||||
handleClose={handleClose}
|
||||
setOpenReferDialog={setOpenReferDialog}
|
||||
rowId={rowId}
|
||||
mutate={mutate}
|
||||
/>
|
||||
)}
|
||||
</Dialog>
|
||||
</>
|
||||
)
|
||||
}
|
||||
export default Refer
|
||||
);
|
||||
};
|
||||
export default Refer;
|
||||
|
||||
@@ -29,27 +29,33 @@ const Questions = ({ row, rowId, mutate, handleClose, handlePrev }) => {
|
||||
const onSubmit = async (data) => {
|
||||
await requestServer(`${CONFIRM_VERIFY_NEADROAD_ROAD_INQUIRY_PRIVACY_ZAMIN_GOV_ASSISTANT}/${rowId}`, "post", {
|
||||
data: {
|
||||
expert_description: data.description
|
||||
expert_description: data.description,
|
||||
},
|
||||
})
|
||||
.then(() => {
|
||||
handleClose();
|
||||
mutate();
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
};
|
||||
|
||||
return (
|
||||
<StyledForm onSubmit={handleSubmit(onSubmit)}>
|
||||
<DialogContent dividers>
|
||||
<Stack >
|
||||
<Stack>
|
||||
<QuestionVerifyNeedRoadForm row={row} />
|
||||
<DescriptionForm control={control} />
|
||||
</Stack>
|
||||
</DialogContent>
|
||||
<DialogActions sx={{ alignItems: "center", justifyContent: "space-between" }}>
|
||||
<Stack spacing={1} direction={'row'}>
|
||||
<Button onClick={handlePrev} variant="outlined" color="secondary" disabled={isSubmitting} size="large">
|
||||
<Stack spacing={1} direction={"row"}>
|
||||
<Button
|
||||
onClick={handlePrev}
|
||||
variant="outlined"
|
||||
color="secondary"
|
||||
disabled={isSubmitting}
|
||||
size="large"
|
||||
>
|
||||
{"مرحله قبلی"}
|
||||
</Button>
|
||||
<Refer rowId={rowId} mutate={mutate} handleClose={handleClose} isSubmitting={isSubmitting} />
|
||||
@@ -59,6 +65,6 @@ const Questions = ({ row, rowId, mutate, handleClose, handlePrev }) => {
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</StyledForm>
|
||||
)
|
||||
}
|
||||
export default Questions
|
||||
);
|
||||
};
|
||||
export default Questions;
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
import { Box, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, CircularProgress, Typography } from "@mui/material";
|
||||
import {
|
||||
Box,
|
||||
Table,
|
||||
TableBody,
|
||||
TableCell,
|
||||
TableContainer,
|
||||
TableHead,
|
||||
TableRow,
|
||||
CircularProgress,
|
||||
Typography,
|
||||
} from "@mui/material";
|
||||
import "moment/locale/fa";
|
||||
import { useHistory } from "@/lib/hooks/useHistory";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user