diff --git a/src/pages/authentication/auth-forms/AuthLoginCustom.js b/src/pages/authentication/auth-forms/AuthLoginCustom.js index 5fcd3f7..1fd633f 100644 --- a/src/pages/authentication/auth-forms/AuthLoginCustom.js +++ b/src/pages/authentication/auth-forms/AuthLoginCustom.js @@ -229,7 +229,7 @@ const AuthLoginCustom = () => { - diff --git a/src/pages/authentication/auth-forms/CustomFormWizard.js b/src/pages/authentication/auth-forms/CustomFormWizard.js index a1d21bd..4f9efe5 100644 --- a/src/pages/authentication/auth-forms/CustomFormWizard.js +++ b/src/pages/authentication/auth-forms/CustomFormWizard.js @@ -32,6 +32,7 @@ import axios from "axios"; import {POST_PUBLIC_USER_REGISTER} from "utils/ApiPathConst"; import * as HttpUtils from 'utils/HttpUtils'; import UploadFileTable from './UploadFileTable'; +import LoadingComponent from "../../extra-pages/LoadingComponent"; // assets import { EyeInvisibleOutlined, EyeOutlined } from '@ant-design/icons'; @@ -74,6 +75,7 @@ const CustomFormWizard = (props) => { const [termsAndConAccept, setTermsAndConAccept] = useState(false); const [termsAndConNotAccept, setTermsAndConNotAccept] = useState(false); const [isValid, setisValid] = useState(false); + const [isLoading, setLoding] = useState(true); const idDocTypeComboList = ComboData.idDocType; const address4ComboList = ComboData.district; @@ -166,6 +168,7 @@ const CustomFormWizard = (props) => { const {handleSubmit} = useForm({}) const _onSubmit = () => { + setLoding(true); values.idDocType = selectedIdDocType values.address4 = selectedAddress4 values.address5 = selectedAddress5 @@ -225,13 +228,17 @@ const CustomFormWizard = (props) => { onSuccess: (response)=>{ console.log(response); // setOpen(true); + setLoding(false); } } ); }) .catch(error => { console.error(error); + setLoding(false); }); + }else{ + setLoding(false); } } @@ -1230,6 +1237,8 @@ const CustomFormWizard = (props) => { {/* Submit page */} + {isLoading ? + : {checkUpload? // SUCCESS page @@ -1249,6 +1258,7 @@ const CustomFormWizard = (props) => { } + }