From e466c59e7edf396d7b97aeae9d348014741a3039 Mon Sep 17 00:00:00 2001 From: "jason.lam" Date: Tue, 16 Jan 2024 11:34:27 +0800 Subject: [PATCH] bug fix --- .../authentication/auth-forms/BusCustomFormWizard.js | 4 ++-- .../authentication/auth-forms/CustomFormWizard.js | 6 ++++-- .../authentication/auth-forms/IAmSmartFormWizard.js | 12 +++++++++--- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/pages/authentication/auth-forms/BusCustomFormWizard.js b/src/pages/authentication/auth-forms/BusCustomFormWizard.js index 9918105..a1519a3 100644 --- a/src/pages/authentication/auth-forms/BusCustomFormWizard.js +++ b/src/pages/authentication/auth-forms/BusCustomFormWizard.js @@ -1536,13 +1536,13 @@ const BusCustomFormWizard = (props) => { {formik.values.address3} : null} - {selectedAddress5.label === "hongKong" ? + {selectedAddress5.type === "hongKong" ? : - {selectedAddress4} + {!selectedAddress4? "" : intl.formatMessage({id: selectedAddress4.type})} : null} diff --git a/src/pages/authentication/auth-forms/CustomFormWizard.js b/src/pages/authentication/auth-forms/CustomFormWizard.js index f2a7144..e692802 100644 --- a/src/pages/authentication/auth-forms/CustomFormWizard.js +++ b/src/pages/authentication/auth-forms/CustomFormWizard.js @@ -1713,7 +1713,9 @@ const CustomFormWizard = (props) => { : - {selectedAddress4} + + {!selectedAddress4? "" : intl.formatMessage({id: selectedAddress4.type})} + : null} @@ -1721,7 +1723,7 @@ const CustomFormWizard = (props) => { : - {intl.formatMessage({id: selectedAddress5.label})} + {intl.formatMessage({id: selectedAddress5.type})} diff --git a/src/pages/authentication/auth-forms/IAmSmartFormWizard.js b/src/pages/authentication/auth-forms/IAmSmartFormWizard.js index 1f9ee73..4b36712 100644 --- a/src/pages/authentication/auth-forms/IAmSmartFormWizard.js +++ b/src/pages/authentication/auth-forms/IAmSmartFormWizard.js @@ -507,6 +507,7 @@ const CustomFormWizard = (props) => { value={selectedAddress4} options={address4ComboList} disabled={checkCountry} + getOptionLabel={(option) => option.type? intl.formatMessage({ id: option.type }) : ""} onChange={(event, newValue) => { setSelectedAddress4(newValue); }} @@ -519,6 +520,7 @@ const CustomFormWizard = (props) => { id="address5-combo" value={selectedAddress5} options={address5ComboList} + getOptionLabel={(option) => option.type? intl.formatMessage({ id: option.type }) : ""} onChange={(event, newValue) => { if (newValue !== null) { setSelectedAddress5(newValue); @@ -959,19 +961,23 @@ const CustomFormWizard = (props) => { {formik.values.address3} : null} - {selectedAddress5 == ("香港") ? + {selectedAddress5.type === "hongKong" ? : - {selectedAddress4} + + {!selectedAddress4? "" : intl.formatMessage({id: selectedAddress4.type})} + : null} : - {selectedAddress5} + + {intl.formatMessage({id: selectedAddress5.type})} +