build and format3
This commit is contained in:
@@ -31,11 +31,7 @@ const ConfirmRoadSafetyDialog = ({ row, handleClose, rowId, mutate }) => {
|
|||||||
{loading ? (
|
{loading ? (
|
||||||
<DialogLoading loadingOpen={loading} />
|
<DialogLoading loadingOpen={loading} />
|
||||||
) : data ? (
|
) : data ? (
|
||||||
<ConfirmRoadSafetyFormContext
|
<ConfirmRoadSafetyFormContext rowId={rowId} mutate={mutate} handleClose={handleClose} />
|
||||||
rowId={rowId}
|
|
||||||
mutate={mutate}
|
|
||||||
handleClose={handleClose}
|
|
||||||
/>
|
|
||||||
) : (
|
) : (
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<Typography textAlign={"center"}>اطلاعات درخواست در سامانه یافت نشد</Typography>
|
<Typography textAlign={"center"}>اطلاعات درخواست در سامانه یافت نشد</Typography>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import useRequest from "@/lib/hooks/useRequest";
|
|||||||
import { CONFIRM_ROAD_SAFETY_FORM } from "@/core/utils/routes";
|
import { CONFIRM_ROAD_SAFETY_FORM } from "@/core/utils/routes";
|
||||||
|
|
||||||
const ConfirmRoadSafetyFormContext = ({ rowId, mutate, handleClose }) => {
|
const ConfirmRoadSafetyFormContext = ({ rowId, mutate, handleClose }) => {
|
||||||
const requestServer = useRequest({notificationShow : true, notificationSuccess : true});
|
const requestServer = useRequest({ notificationShow: true, notificationSuccess: true });
|
||||||
const [description, setDescription] = useState("");
|
const [description, setDescription] = useState("");
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [error, setError] = useState(null);
|
const [error, setError] = useState(null);
|
||||||
@@ -30,7 +30,7 @@ const ConfirmRoadSafetyFormContext = ({ rowId, mutate, handleClose }) => {
|
|||||||
setSuccess(true);
|
setSuccess(true);
|
||||||
mutate();
|
mutate();
|
||||||
setDescription("");
|
setDescription("");
|
||||||
handleClose()
|
handleClose();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
setError(err.message);
|
setError(err.message);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -31,11 +31,7 @@ const ConfirmRoadSafetyDialog = ({ row, handleClose, rowId, mutate }) => {
|
|||||||
{loading ? (
|
{loading ? (
|
||||||
<DialogLoading loadingOpen={loading} />
|
<DialogLoading loadingOpen={loading} />
|
||||||
) : data ? (
|
) : data ? (
|
||||||
<ConfirmRoadSafetyFormContext
|
<ConfirmRoadSafetyFormContext rowId={rowId} mutate={mutate} handleClose={handleClose} />
|
||||||
rowId={rowId}
|
|
||||||
mutate={mutate}
|
|
||||||
handleClose={handleClose}
|
|
||||||
/>
|
|
||||||
) : (
|
) : (
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<Typography textAlign={"center"}>اطلاعات درخواست در سامانه یافت نشد</Typography>
|
<Typography textAlign={"center"}>اطلاعات درخواست در سامانه یافت نشد</Typography>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { CONFIRM_VERIFY_ROAD_SAFETY_FORM } from "@/core/utils/routes";
|
|||||||
import { Alert, Box, Button, CircularProgress, DialogContent, TextField } from "@mui/material";
|
import { Alert, Box, Button, CircularProgress, DialogContent, TextField } from "@mui/material";
|
||||||
|
|
||||||
const ConfirmRoadSafetyFormContext = ({ rowId, mutate, handleClose }) => {
|
const ConfirmRoadSafetyFormContext = ({ rowId, mutate, handleClose }) => {
|
||||||
const requestServer = useRequest({notificationShow : true, notificationSuccess : true});
|
const requestServer = useRequest({ notificationShow: true, notificationSuccess: true });
|
||||||
const [description, setDescription] = useState("");
|
const [description, setDescription] = useState("");
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [error, setError] = useState(null);
|
const [error, setError] = useState(null);
|
||||||
@@ -30,7 +30,7 @@ const ConfirmRoadSafetyFormContext = ({ rowId, mutate, handleClose }) => {
|
|||||||
setSuccess(true);
|
setSuccess(true);
|
||||||
mutate();
|
mutate();
|
||||||
setDescription("");
|
setDescription("");
|
||||||
handleClose()
|
handleClose();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
setError(err.message);
|
setError(err.message);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -249,7 +249,6 @@ export const CONFIRM_ROAD_SAFETY_FORM = api + "/api/v3/harim/technical_deputy/co
|
|||||||
export const CONFIRM_VERIFY_ROAD_SAFETY_FORM = api + "/api/v3/harim/technical_deputy/confirm_road_access";
|
export const CONFIRM_VERIFY_ROAD_SAFETY_FORM = api + "/api/v3/harim/technical_deputy/confirm_road_access";
|
||||||
export const CONFIRM_VERIFY_LICENSE_FORM = api + "/api/v3/harim/technical_deputy/confirm_payment";
|
export const CONFIRM_VERIFY_LICENSE_FORM = api + "/api/v3/harim/technical_deputy/confirm_payment";
|
||||||
|
|
||||||
|
|
||||||
// History
|
// History
|
||||||
export const GET_HISTORY_LIST = api + "/api/v3/harim/detail/histories";
|
export const GET_HISTORY_LIST = api + "/api/v3/harim/detail/histories";
|
||||||
export const GET_REQUEST_INQUIRY_PRIVACY = api + "/api/v3/harim/technical_deputy";
|
export const GET_REQUEST_INQUIRY_PRIVACY = api + "/api/v3/harim/technical_deputy";
|
||||||
|
|||||||
Reference in New Issue
Block a user