Anna Ho pirms 1 gada
vecāks
revīzija
5587cc7367
2 mainītis faili ar 19 papildinājumiem un 19 dzēšanām
  1. +1
    -1
      src/pages/authentication/auth-forms/CustomFormWizard.js
  2. +18
    -18
      src/pages/authentication/auth-forms/IAmSmartFormWizard.js

+ 1
- 1
src/pages/authentication/auth-forms/CustomFormWizard.js Parādīt failu

@@ -884,7 +884,7 @@ const CustomFormWizard = (props) => {
filterOptions={(options) => options}
inputValue={selectedIdDocInputType}
onChange={(event, newValue) => {
if (newValue != null && newValue !== {}) {
if (newValue != null ) {
setSelectedIdDocInputType(newValue.label);
setSelectedIdDocType(newValue);
if (newValue.type !== "HKID") {


+ 18
- 18
src/pages/authentication/auth-forms/IAmSmartFormWizard.js Parādīt failu

@@ -50,7 +50,7 @@ const CustomFormWizard = (props) => {
const [checkUpload, setCheckUpload] = useState(false);
const [isLoading, setLoding] = useState(true);

const [captchaImg, setCaptchaImage] = useState([]);
const [captchaImg, setCaptchaImage] = useState("");

const [selectedAddress4, setSelectedAddress4] = useState(null);
const [selectedAddress5, setSelectedAddress5] = useState(ComboData.country[0]);
@@ -83,28 +83,28 @@ const CustomFormWizard = (props) => {

const responseToData = () => {
//let rd = JSON.parse("{\"emailAddress\":\"[email protected]\",\"postalAddress\":{\"EngPremisesAddress\":{\"EngDistrict\":{\"DcDistrict\":\"KC\",\"Sub-district\":\"TSING YI\"},\"EngEstate\":{\"EstateName\":\"Cheung Hang Estate\",\"EngPhase\":{\"PhaseName\":\"N/A\"}},\"BuildingName\":\"Hang Lai House\",\"EngBlock\":{\"BlockDescriptor\":\"Block\",\"BlockNo\":\"2\"},\"Region\":\"NT\",\"EngStreet\":{\"StreetName\":\"Liu To Road\",\"BuildingNoFrom\":\"6\"},\"Eng3dAddress\":{\"EngFloor\":{\"FloorNum\":\"33\"},\"EngUnit\":{\"UnitDescriptor\":\"Room\",\"UnitNo\":\"3301\"}}}},\"mobileNumber\":{\"CountryCode\":\"852\",\"SubscriberNumber\":\"99999999\"},\"residentialAddress\":{\"ChiPremisesAddress\":{\"Chi3dAddress\":{\"ChiUnit\":{\"UnitDescriptor\":\"室\",\"UnitNo\":\"1010\"},\"ChiFloor\":{\"FloorNum\":\"10\"}},\"ChiBlock\":{\"BlockDescriptor\":\"座\",\"BlockNo\":\"2\"},\"BuildingName\":\"亨麗樓(第2座)\",\"ChiDistrict\":{\"DcDistrict\":\"KC\",\"Sub-district\":\"青衣\"},\"Region\":\"新界\",\"ChiEstate\":{\"EstateName\":\"長亨邨\"},\"ChiStreet\":{\"StreetName\":\"寮肚路\",\"BuildingNoFrom\":\"6\"}}},\"enName\":{\"UnstructuredName\":\"Testing Co One\"},\"idNo\":{\"Identification\":\"G561107\",\"CheckDigit\":\"4\"},\"chName\":{\"ChineseName\":\"測試商一\"}}");
let rd = props.state.responseData;
let rd = location.state?.responseData;
let data = {
"enName": rd.enName?.UnstructuredName ?? "",
"chName": rd.chName?.ChineseName ?? "",
"idNo": rd.idNo?.Identification ?? "",
"checkDigit": rd.idNo?.CheckDigit ?? "",
"email": rd.emailAddress ?? "",
"phone": rd.mobileNumber?.SubscriberNumber ?? "",
"phoneCountryCode": rd.mobileNumber?.CountryCode ?? "",
"enName": rd?.enName?.UnstructuredName ?? "",
"chName": rd?.chName?.ChineseName ?? "",
"idNo": rd?.idNo?.Identification ?? "",
"checkDigit": rd?.idNo?.CheckDigit ?? "",
"email": rd?.emailAddress ?? "",
"phone": rd?.mobileNumber?.SubscriberNumber ?? "",
"phoneCountryCode": rd?.mobileNumber?.CountryCode ?? "",
};

if (rd.postalAddress) {
if (rd.postalAddress.EngPremisesAddress) {
data["address1"] = getAddressEng(rd.postalAddress.EngPremisesAddress);
if (rd?.postalAddress) {
if (rd?.postalAddress?.EngPremisesAddress) {
data["address1"] = getAddressEng(rd?.postalAddress?.EngPremisesAddress);
} else if (rd.postalAddress.ChiPremisesAddress) {
data["address1"] = getAddressChi(rd.postalAddress.ChiPremisesAddress);
data["address1"] = getAddressChi(rd?.postalAddress?.ChiPremisesAddress);
}
} else if (rd.residentialAddress) {
if (rd.residentialAddress.EngPremisesAddress) {
data["address1"] = getAddressEng(rd.residentialAddress.EngPremisesAddress);
} else if (rd.residentialAddress.ChiPremisesAddress) {
data["address1"] = getAddressChi(rd.residentialAddress.ChiPremisesAddress);
} else if (rd?.residentialAddress) {
if (rd?.residentialAddress?.EngPremisesAddress) {
data["address1"] = getAddressEng(rd?.residentialAddress?.EngPremisesAddress);
} else if (rd?.residentialAddress?.ChiPremisesAddress) {
data["address1"] = getAddressChi(rd?.residentialAddress?.ChiPremisesAddress);
}
}



Notiek ielāde…
Atcelt
Saglabāt