diff --git a/.env.example b/.env.example index 39796b8..5df7bca 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,4 @@ HOST="rms.witel.ir" -NEXT_PUBLIC_VERSION="1.3.8" +NEXT_PUBLIC_VERSION="1.3.9" NEXT_PUBLIC_API_URL="https://rms.witel.ir" NEXT_PUBLIC_MAPTILE_ENDPOINT="https://rmsmap.rmto.ir/141map" \ No newline at end of file diff --git a/src/components/dashboard/fastReact/complaintList/RowActions/Refer/ReferContent.jsx b/src/components/dashboard/fastReact/complaintList/RowActions/Refer/ReferContent.jsx index 705fabf..43f249c 100644 --- a/src/components/dashboard/fastReact/complaintList/RowActions/Refer/ReferContent.jsx +++ b/src/components/dashboard/fastReact/complaintList/RowActions/Refer/ReferContent.jsx @@ -7,7 +7,7 @@ import * as Yup from "yup"; import EdarateShahriField from "./EdarateShahriField"; import ProvinceField from "./ProvinceField"; -const ReferContent = ({ rowId, mutate, setOpenReferDialog }) => { +const ReferContent = ({ row, mutate, setOpenReferDialog }) => { const requestServer = useRequest({ notificationSuccess: true }); const validationSchema = Yup.object().shape({ @@ -23,7 +23,7 @@ const ReferContent = ({ rowId, mutate, setOpenReferDialog }) => { formState: { errors, isSubmitting }, } = useForm({ defaultValues: { - province_id: "", + province_id: row.original.province_id, edarat_shahri_id: "", description: "", }, @@ -36,7 +36,7 @@ const ReferContent = ({ rowId, mutate, setOpenReferDialog }) => { formData.append("province_id", data.province_id); formData.append("edarate_shahri_id", data.edarat_shahri_id); formData.append("refer_description", data.description); - await requestServer(`${REFER_FAST_REACT}/${rowId}`, "post", { + await requestServer(`${REFER_FAST_REACT}/${row.original.id}`, "post", { data: formData, hasSidebarUpdate: true, }) @@ -51,13 +51,13 @@ const ReferContent = ({ rowId, mutate, setOpenReferDialog }) => { <> - { return ; }} - /> + /> */} { +const Refer = ({ row, mutate }) => { const [openReferDialog, setOpenReferDialog] = useState(false); + return ( <> @@ -23,9 +24,7 @@ const Refer = ({ rowId, mutate }) => { }} > ارجاع - {openReferDialog && ( - - )} + {openReferDialog && } ); diff --git a/src/components/dashboard/fastReact/complaintList/RowActions/index.jsx b/src/components/dashboard/fastReact/complaintList/RowActions/index.jsx index 081a536..f272407 100644 --- a/src/components/dashboard/fastReact/complaintList/RowActions/index.jsx +++ b/src/components/dashboard/fastReact/complaintList/RowActions/index.jsx @@ -16,7 +16,7 @@ const RowActions = ({ row, mutate, mutateParentTable }) => { rowId={row.getValue("road_observeds__id")} /> )} - + );