diff --git a/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmVerifyLicenseForm/PrevCartableOpinion.jsx b/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmVerifyLicenseForm/PrevCartableOpinion.jsx deleted file mode 100644 index f6ca361..0000000 --- a/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmVerifyLicenseForm/PrevCartableOpinion.jsx +++ /dev/null @@ -1,17 +0,0 @@ -import { Card, CardContent, CircularProgress, Stack, Typography } from "@mui/material"; - -const PrevCartableOpinion = ({ item }) => { - return ( - - - - - {item.previous_state_name}: {item.action_name} - - توضیحات: {item.expert_description} - - - - ); -}; -export default PrevCartableOpinion; diff --git a/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmVerifyLicenseForm/Questions/DescriptionForm.jsx b/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmVerifyLicenseForm/Questions/DescriptionForm.jsx deleted file mode 100644 index a7099e7..0000000 --- a/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmVerifyLicenseForm/Questions/DescriptionForm.jsx +++ /dev/null @@ -1,29 +0,0 @@ -import { Stack, TextField } from "@mui/material"; -import { Controller } from "react-hook-form"; - -const DescriptionForm = ({ control }) => { - return ( - - ( - - )} - /> - - ); -}; -export default DescriptionForm; diff --git a/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmVerifyLicenseForm/Questions/QuestionVerifyNeedRoadForm.jsx b/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmVerifyLicenseForm/Questions/QuestionVerifyNeedRoadForm.jsx deleted file mode 100644 index 927ef9e..0000000 --- a/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmVerifyLicenseForm/Questions/QuestionVerifyNeedRoadForm.jsx +++ /dev/null @@ -1,29 +0,0 @@ -import { Card, CardContent, Stack, Typography } from "@mui/material"; - -const QuestionVerifyNeedRoadForm = () => { - return ( - - - - - آیا ضمانت نامه ها مورد تایید است؟ - - - دفتر حریم راه : - - بله - - - - - - ); -}; -export default QuestionVerifyNeedRoadForm; diff --git a/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmVerifyLicenseForm/Questions/QuestionVerifyRoadSafetyForm.jsx b/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmVerifyLicenseForm/Questions/QuestionVerifyRoadSafetyForm.jsx deleted file mode 100644 index 8c1e4e3..0000000 --- a/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmVerifyLicenseForm/Questions/QuestionVerifyRoadSafetyForm.jsx +++ /dev/null @@ -1,29 +0,0 @@ -import { Card, CardContent, Stack, Typography } from "@mui/material"; - -const QuestionVerifyRoadSafetyForm = ({ row }) => { - return ( - - - - - آیا ایمنی راه این طرح مورد تایید است؟ - - - دفتر حریم راه : - - {row.original.isSafety ? "بله" : "خیر"} - - - - - - ); -}; -export default QuestionVerifyRoadSafetyForm; diff --git a/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmVerifyLicenseForm/Questions/Refer/Form.jsx b/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmVerifyLicenseForm/Questions/Refer/Form.jsx deleted file mode 100644 index c3a58b1..0000000 --- a/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmVerifyLicenseForm/Questions/Refer/Form.jsx +++ /dev/null @@ -1,76 +0,0 @@ -import { REFER_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, TextField } from "@mui/material"; -import { Controller, useForm } from "react-hook-form"; -import { object, string } from "yup"; -const validationSchema = object({ - description: string().required("وارد کردن توضیحات الزامیست!"), -}); - -const defaultValues = { - description: "", -}; - -const ReferForm = ({ rowId, mutate, handleClose, setOpenReferDialog }) => { - const requestServer = useRequest({ notificationSuccess: true }); - const { - control, - handleSubmit, - formState: { isSubmitting }, - } = useForm({ defaultValues, resolver: yupResolver(validationSchema), mode: "all" }); - - const onSubmit = async (data) => { - await requestServer(`${REFER_VERIFY_NEADROAD_ROAD_INQUIRY_PRIVACY_ZAMIN_GOV_ASSISTANT}/${rowId}`, "post", { - data: { - expert_description: data.description, - }, - }) - .then(() => { - handleClose(); - setOpenReferDialog(false); - mutate(); - }) - .catch(() => {}); - }; - - return ( - <> - - - ( - - )} - /> - - - - - - - ); -}; -export default ReferForm; diff --git a/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmVerifyLicenseForm/Questions/Refer/index.jsx b/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmVerifyLicenseForm/Questions/Refer/index.jsx deleted file mode 100644 index e18024f..0000000 --- a/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmVerifyLicenseForm/Questions/Refer/index.jsx +++ /dev/null @@ -1,54 +0,0 @@ -import { Close } from "@mui/icons-material"; -import { Button, Dialog, DialogTitle, IconButton } from "@mui/material"; -import { useState } from "react"; -import ReferForm from "./Form"; - -const Refer = ({ rowId, mutate, handleClose, isSubmitting }) => { - const [openReferDialog, setOpenReferDialog] = useState(false); - - return ( - <> - - { - setOpenReferDialog(false); - }} - maxWidth="xs" - fullWidth - > - setOpenReferDialog(false)} - sx={{ - position: "absolute", - right: 8, - top: 8, - zIndex: 10, - color: (theme) => theme.palette.grey[500], - }} - > - - - مخالفت و ارجاع به دفتر حریم - {openReferDialog && ( - - )} - - - ); -}; -export default Refer; diff --git a/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmVerifyLicenseForm/Questions/index.jsx b/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmVerifyLicenseForm/Questions/index.jsx deleted file mode 100644 index 2f89a8f..0000000 --- a/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmVerifyLicenseForm/Questions/index.jsx +++ /dev/null @@ -1,74 +0,0 @@ -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 useRequest from "@/lib/hooks/useRequest"; -import { yupResolver } from "@hookform/resolvers/yup"; -import { Button, DialogActions, DialogContent, Stack } from "@mui/material"; -import { useForm } from "react-hook-form"; -import { object, string } from "yup"; -import QuestionVerifyNeedRoadForm from "./QuestionVerifyNeedRoadForm"; -import QuestionVerifyRoadSafetyForm from "./QuestionVerifyRoadSafetyForm"; -import Refer from "./Refer"; -import DescriptionForm from "./DescriptionForm"; - -const validationSchema = object({ - description: string().required("وارد کردن توضیحات الزامیست!"), -}); - -const defaultValues = { - description: "", -}; - -const Questions = ({ row, rowId, mutate, handleClose, handlePrev }) => { - const requestServer = useRequest({ notificationSuccess: true }); - - const { - control, - handleSubmit, - formState: { isSubmitting }, - } = useForm({ defaultValues, resolver: yupResolver(validationSchema), mode: "all" }); - - const onSubmit = async (data) => { - await requestServer(`${CONFIRM_VERIFY_NEADROAD_ROAD_INQUIRY_PRIVACY_ZAMIN_GOV_ASSISTANT}/${rowId}`, "post", { - data: { - expert_description: data.description, - }, - }) - .then(() => { - handleClose(); - mutate(); - }) - .catch(() => {}); - }; - - return ( - - - - - - - - - - - - - - - - ); -}; -export default Questions;