diff --git a/src/pages/authentication/auth-forms/BusCustomFormWizard.js b/src/pages/authentication/auth-forms/BusCustomFormWizard.js index 298e707..8a6db56 100644 --- a/src/pages/authentication/auth-forms/BusCustomFormWizard.js +++ b/src/pages/authentication/auth-forms/BusCustomFormWizard.js @@ -1026,7 +1026,28 @@ const BusCustomFormWizard = (props) => { setSelectedAddress5(newValue); if (newValue.type === 'hongKong') { setCheckCountry(false) + if(formik.values.phone==""){ + formik.values.phoneCountryCode = "852"; + } + if(formik.values.fax==""){ + formik.values.faxCountryCode = "852"; + } } else { + if (newValue.type === 'mainland'){ + if(formik.values.phone==""){ + formik.values.phoneCountryCode = "86"; + } + if(formik.values.fax==""){ + formik.values.faxCountryCode = "86"; + } + }else if(newValue.type === 'macau'){ + if(formik.values.phone==""){ + formik.values.phoneCountryCode = "853"; + } + if(formik.values.fax==""){ + formik.values.faxCountryCode = "853"; + } + } setSelectedAddress4(""); setCheckCountry(true) } diff --git a/src/pages/authentication/auth-forms/CustomFormWizard.js b/src/pages/authentication/auth-forms/CustomFormWizard.js index f0cfbf2..abac62f 100644 --- a/src/pages/authentication/auth-forms/CustomFormWizard.js +++ b/src/pages/authentication/auth-forms/CustomFormWizard.js @@ -1269,7 +1269,29 @@ const CustomFormWizard = (props) => { setSelectedAddress5(newValue); if (newValue.type === 'hongKong') { setCheckCountry(false) + if(formik.values.phone==""){ + formik.values.phoneCountryCode = "852"; + } + if(formik.values.fax==""){ + formik.values.faxCountryCode = "852"; + } } else { + if (newValue.type === 'mainland'){ + if(formik.values.phone==""){ + formik.values.phoneCountryCode = "86"; + } + if(formik.values.fax==""){ + formik.values.faxCountryCode = "86"; + } + }else if(newValue.type === 'macau'){ + if(formik.values.phone==""){ + formik.values.phoneCountryCode = "853"; + } + if(formik.values.fax==""){ + formik.values.faxCountryCode = "853"; + } + } + setSelectedAddress4(""); setCheckCountry(true) }