@@ -71,6 +71,8 @@ const BusCustomFormWizard = (props) => { | |||
// const [userNameList, setUserNameList] = useState([]); | |||
const [captchaImg, setCaptchaImage] = useState(""); | |||
const [base64Url, setBase64Url] = useState("") | |||
const [checkCode, setCheckCode] = useState("") | |||
const handleClickShowPassword = () => { | |||
setShowPassword(!showPassword); | |||
@@ -186,6 +188,7 @@ const BusCustomFormWizard = (props) => { | |||
params: { width: 130, height: 40, captcha: captchaImg}, | |||
onSuccess: (responseData) => { | |||
props.setBase64Url(responseData.base64Url) | |||
setBase64Url(responseData.base64Url) | |||
localStorage.setItem("base64Url", responseData.base64Url); | |||
setCaptchaImage(localStorage.getItem('base64Url')); | |||
} | |||
@@ -375,7 +378,9 @@ const BusCustomFormWizard = (props) => { | |||
brExpiryDate: values.brExpiryDate, | |||
contactPerson: values.enName, | |||
tncFlag: tncFlag, | |||
type: "ORG" | |||
type: "ORG", | |||
captcha: base64Url, | |||
checkCode: checkCode | |||
}; | |||
var formData = new FormData(); | |||
@@ -1429,6 +1434,7 @@ const BusCustomFormWizard = (props) => { | |||
onChange={(event) => { | |||
const value = event.target.value; | |||
props.setCheckCode(event.target.value); | |||
setCheckCode(event.target.value); | |||
formik.setFieldValue("captchaField", value); | |||
}} | |||
sx={{ width: '75%' }} | |||
@@ -66,7 +66,8 @@ const CustomFormWizard = (props) => { | |||
const [isLoading, setLoding] = useState(true); | |||
const [updateRows, setUpdateRows] = useState([]); | |||
const [captchaImg, setCaptchaImage] = useState(""); | |||
const [base64Url, setBase64Url] = useState("") | |||
const [checkCode, setCheckCode] = useState("") | |||
const handleClickShowPassword = () => { | |||
setShowPassword(!showPassword); | |||
@@ -179,6 +180,7 @@ const CustomFormWizard = (props) => { | |||
params: { width: 130, height: 40, captcha: captchaImg }, | |||
onSuccess: (responseData) => { | |||
props.setBase64Url(responseData.base64Url) | |||
setBase64Url(responseData.base64Url) | |||
localStorage.setItem("base64Url", responseData.base64Url); | |||
setCaptchaImage(localStorage.getItem('base64Url')); | |||
} | |||
@@ -370,6 +372,8 @@ const CustomFormWizard = (props) => { | |||
checkDigit: values.checkDigit, | |||
tncFlag: tncFlag, | |||
type: "IND", | |||
captcha: base64Url, | |||
checkCode: checkCode | |||
}; | |||
var formData = new FormData(); | |||
@@ -1626,6 +1630,7 @@ const CustomFormWizard = (props) => { | |||
onChange={(event) => { | |||
const value = event.target.value; | |||
props.setCheckCode(event.target.value); | |||
setCheckCode(event.target.value); | |||
formik.setFieldValue("captchaField", value); | |||
}} | |||
sx={{ width: '75%' }} | |||
@@ -71,6 +71,9 @@ const CustomFormWizard = (props) => { | |||
const [showId, setshowId] = useState(false); | |||
const [showComId, setshowComId] = useState(false); | |||
const [base64Url, setBase64Url] = useState("") | |||
const [checkCode, setCheckCode] = useState("") | |||
useEffect(() => { | |||
location.state?.responseData ?? {} | |||
if (captchaImg == "") | |||
@@ -227,6 +230,7 @@ const CustomFormWizard = (props) => { | |||
params: { width: 130, height: 40, captcha: captchaImg }, | |||
onSuccess: (responseData) => { | |||
props.setBase64Url(responseData.base64Url) | |||
setBase64Url(responseData.base64Url) | |||
localStorage.setItem("base64Url", responseData.base64Url); | |||
setCaptchaImage(localStorage.getItem('base64Url')); | |||
} | |||
@@ -328,7 +332,9 @@ const CustomFormWizard = (props) => { | |||
type: "IND", | |||
userFaxNo: JSON.stringify(userFaxNo), | |||
userMobileNumber: JSON.stringify(userMobileNumber), | |||
userAddress: JSON.stringify(userAddress) | |||
userAddress: JSON.stringify(userAddress), | |||
captcha: base64Url, | |||
checkCode: checkCode | |||
}; | |||
if (isValid) { | |||
@@ -925,6 +931,7 @@ const CustomFormWizard = (props) => { | |||
onChange={(event) => { | |||
const value = event.target.value; | |||
props.setCheckCode(event.target.value); | |||
setCheckCode(event.target.value); | |||
formik.setFieldValue("captchaField", value); | |||
}} | |||
sx={{ width: '75%' }} | |||