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