From 350c546e13d9f29fbfee28a0f243e5b5579d63b9 Mon Sep 17 00:00:00 2001 From: anna Date: Fri, 10 May 2024 14:47:09 +0800 Subject: [PATCH] update iAmSmart UI --- src/components/iAmSmartButton.js | 32 +++++ src/pages/authentication/RegisterCustom.js | 114 +++++++++--------- .../auth-forms/AuthLoginCustom.js | 95 +++++++-------- .../auth-forms/IAmSmartFormWizard.js | 76 ++++++------ src/translations/en.json | 4 +- src/translations/zh-CN.json | 2 +- src/translations/zh-HK.json | 2 +- 7 files changed, 179 insertions(+), 146 deletions(-) create mode 100644 src/components/iAmSmartButton.js diff --git a/src/components/iAmSmartButton.js b/src/components/iAmSmartButton.js new file mode 100644 index 0000000..ab5a01e --- /dev/null +++ b/src/components/iAmSmartButton.js @@ -0,0 +1,32 @@ +// material-ui +import {useState, useEffect} from 'react'; +import iAmSmartICon from 'assets/images/icons/icon_iAmSmart.png'; +import { + Button, + Typography +}from '@mui/material'; + +// ==============================|| EVENT TABLE ||============================== // + +export function IAmSmartButton({ label, onClickFun, fullWidth }) { + + const [_label, set_label] = useState(""); + + useEffect(()=>{ + set_label(label); + } + ,[label]); + + + const doOnClick=()=>{ + onClickFun(); + } + + return ( + + ); +} diff --git a/src/pages/authentication/RegisterCustom.js b/src/pages/authentication/RegisterCustom.js index 6679d7f..d8b18ab 100644 --- a/src/pages/authentication/RegisterCustom.js +++ b/src/pages/authentication/RegisterCustom.js @@ -6,13 +6,13 @@ import { Link, Button, Card, Box, Grid } from '@mui/material'; import Typography from '@mui/material/Typography'; -import iAmSmartICon from 'assets/images/icons/icon_iAmSmart.png'; import banner from 'assets/images/bg_ml.jpg'; import { Stack } from '../../../node_modules/@mui/material/index'; -import { iAmSmartPath, clientId, getBowserType, isAppBowser, iAmSmartCallbackPath} from 'auth/utils' +import { iAmSmartPath, clientId, getBowserType, isAppBowser, iAmSmartCallbackPath } from 'auth/utils' +import { IAmSmartButton } from "components/iAmSmartButton"; import * as React from 'react'; -import {FormattedMessage, useIntl} from "react-intl"; +import { FormattedMessage, useIntl } from "react-intl"; // ================================|| LOGIN ||================================ // @@ -33,31 +33,31 @@ const RegisterCustom = () => { } } - const openQR =()=>{ - let callbackUrl = "https://"+iAmSmartCallbackPath()+"/iamsmart/registrycallback"; + const openQR = () => { + let callbackUrl = "https://" + iAmSmartCallbackPath() + "/iamsmart/registrycallback"; let url = iAmSmartPath + "/api/v1/auth/getQR" + "?clientID=" + clientId + "&responseType=code" - +"&source=" + getBowserType() - +"&redirectURI="+encodeURIComponent(callbackUrl) - +"&scope="+encodeURIComponent("eidapi_auth eidapi_profiles") - +"&lang="+(locale === 'en' ?"en-US":locale === 'zh-HK' ?"zh-HK":"zh-CN") + + "&source=" + getBowserType() + + "&redirectURI=" + encodeURIComponent(callbackUrl) + + "&scope=" + encodeURIComponent("eidapi_auth eidapi_profiles") + + "&lang=" + (locale === 'en' ? "en-US" : locale === 'zh-HK' ? "zh-HK" : "zh-CN") //+"&state=" - +"&brokerPage=false" + + "&brokerPage=false" window.location.assign(url); } const openApp = () => { - let callbackUrl = "https://"+iAmSmartCallbackPath()+"/iamsmart/registrycallback"; + let callbackUrl = "https://" + iAmSmartCallbackPath() + "/iamsmart/registrycallback"; let url = iAmSmartPath + "/api/v1/auth/getQR" + "?clientID=" + clientId + "&responseType=code" - +"&source=" + getBowserType() - +"&redirectURI="+encodeURIComponent(callbackUrl) - +"&scope="+encodeURIComponent("eidapi_auth eidapi_profiles") - +"&lang="+(locale === 'en' ?"en-US":locale === 'zh-HK' ?"zh-HK":"zh-CN") + + "&source=" + getBowserType() + + "&redirectURI=" + encodeURIComponent(callbackUrl) + + "&scope=" + encodeURIComponent("eidapi_auth eidapi_profiles") + + "&lang=" + (locale === 'en' ? "en-US" : locale === 'zh-HK' ? "zh-HK" : "zh-CN") //+"&state=" - +"&brokerPage=true" + + "&brokerPage=true" window.location.assign(url); } @@ -81,14 +81,14 @@ const RegisterCustom = () => { - + - {" " + intl.formatMessage({id: 'registerTitle2'}) + " "} + {" " + intl.formatMessage({ id: 'registerTitle2' }) + " "} - + - {intl.formatMessage({id: 'registerSubTitle'})} + {intl.formatMessage({ id: 'registerSubTitle' })} @@ -96,44 +96,42 @@ const RegisterCustom = () => { - + - - + -
+
- + - + -
+
- + -
+
@@ -142,58 +140,60 @@ const RegisterCustom = () => { setIsPopUp(false)} - PaperProps={{ - sx: { - minWidth: '40vw', - maxWidth: { xs: '90vw', s: '90vw', m: '70vw', lg: '70vw' }, - maxHeight: { xs: '90vh', s: '70vh', m: '70vh', lg: '60vh' } - } - }} + open={isPopUp} + onClose={() => setIsPopUp(false)} + PaperProps={{ + sx: { + minWidth: '40vw', + maxWidth: { xs: '90vw', s: '90vw', m: '70vw', lg: '70vw' }, + maxHeight: { xs: '90vh', s: '70vh', m: '70vh', lg: '60vh' } + } + }} > - + - + - {"- " + intl.formatMessage({id: 'userChineseName'})} + {"- " + intl.formatMessage({ id: 'userChineseName' })} - {"- " + intl.formatMessage({id: 'userEnglishName'})} + {"- " + intl.formatMessage({ id: 'userEnglishName' })} - {"- " + intl.formatMessage({id: 'userIDNo'})} + {"- " + intl.formatMessage({ id: 'userIDNo' })} - {"- " + intl.formatMessage({id: 'userEmailAddress'})} + {"- " + intl.formatMessage({ id: 'userEmailAddress' })} - {"- " + intl.formatMessage({id: 'userPhoneNumber'})} + {"- " + intl.formatMessage({ id: 'userPhoneNumber' })} - {"- " + intl.formatMessage({id: 'userAddress'})} + {"- " + intl.formatMessage({ id: 'userAddress' })} - -
+ + +
- +
diff --git a/src/pages/authentication/auth-forms/AuthLoginCustom.js b/src/pages/authentication/auth-forms/AuthLoginCustom.js index c37f78e..2c03f46 100644 --- a/src/pages/authentication/auth-forms/AuthLoginCustom.js +++ b/src/pages/authentication/auth-forms/AuthLoginCustom.js @@ -1,7 +1,7 @@ -import React, { +import { useEffect, useState, - lazy, + lazy, // useContext } from 'react'; import { Link as RouterLink } from 'react-router-dom'; @@ -36,18 +36,19 @@ import { useFormik, FormikProvider } from 'formik'; import AnimateButton from 'components/@extended/AnimateButton'; import Loadable from 'components/Loadable'; const PasswordAlertDialog = Loadable(lazy(() => import('./PasswordAlertDialog'))); - // assets import { EyeOutlined, EyeInvisibleOutlined } from '@ant-design/icons'; // import axios from "axios"; -import iAmSmartICon from 'assets/images/icons/icon_iAmSmart.png'; + import { useDispatch } from "react-redux"; import { handleLogin } from "auth/index"; import useJwt from "auth/jwt/useJwt"; import { handleLogoutFunction } from 'auth/index'; -import {FormattedMessage, useIntl} from "react-intl"; +import { FormattedMessage, useIntl } from "react-intl"; + +import {IAmSmartButton} from "components/iAmSmartButton"; // import LocaleContext from "components/I18nProvider"; -const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent'))); +const LoadingComponent = Loadable(lazy(() => import('pages/extra-pages/LoadingComponent'))); // ============================|| FIREBASE - LOGIN ||============================ // @@ -65,7 +66,7 @@ const AuthLoginCustom = () => { // let [posts, setPosts] = useState([]); const [isValid, setisValid] = useState(false); - const [open, setOpen] = React.useState(false); + const [open, setOpen] = useState(false); const [isButtonDisabled, setIsButtonDisabled] = useState(true); const [errorMassage, setErrorMassage] = useState(''); const [onLogin, setOnLogin] = useState(false); @@ -97,21 +98,21 @@ const AuthLoginCustom = () => { const data = { ...userData, accessToken: response.data.accessToken, refreshToken: response.data.refreshToken } // setSuccess(true) // console.log(response.data); - if(response.data.type === "GLD"){ + if (response.data.type === "GLD") { // setLocale("en"); - localStorage.setItem('locale','en'); - }else{ - if (response.data.preferLocale ==="zh_HK"){ + localStorage.setItem('locale', 'en'); + } else { + if (response.data.preferLocale === "zh_HK") { // setLocale("zh-HK"); - localStorage.setItem('locale','zh-HK'); + localStorage.setItem('locale', 'zh-HK'); } - if (response.data.preferLocale ==="zh-CN"){ + if (response.data.preferLocale === "zh-CN") { // setLocale("zh-CN"); - localStorage.setItem('locale','zh-CN'); + localStorage.setItem('locale', 'zh-CN'); } - if (response.data.preferLocale ==="en"){ + if (response.data.preferLocale === "en") { // setLocale("zh-CN"); - localStorage.setItem('locale','en'); + localStorage.setItem('locale', 'en'); } } dispatch(handleLogin(data)) @@ -123,9 +124,9 @@ const AuthLoginCustom = () => { console.log(error) // setSuccess(false) setOnLogin(false) - if(error.response!= undefined){ + if (error.response != undefined) { setErrorMassage(error.response.data.error) - }else{ + } else { setErrorMassage("CONNECTION_ERROR") } setOpen(true) @@ -143,12 +144,12 @@ const AuthLoginCustom = () => { }), validationSchema: yup.object().shape({ // username: yup.string().min(6,'用戶名稱最少6位').required('請輸入用戶名稱'), - username: yup.string().required(intl.formatMessage({id: 'requireUsername'})), - password: yup.string().min(8, intl.formatMessage({id: 'atLeast8CharPassword'})).required(intl.formatMessage({id: 'requirePassword'})) - .matches(/^(?=.*[a-z])/, intl.formatMessage({id: 'atLeastOneSmallLetter'})) - .matches(/^(?=.*[A-Z])/, intl.formatMessage({id: 'atLeastOneCapLetter'})) - .matches(/^(?=.*[0-9])/, intl.formatMessage({id: 'atLeast1Number'})) - .matches(/^(?=.*[!@#%&])/, intl.formatMessage({id: 'atLeast1SpecialChar'})), + username: yup.string().required(intl.formatMessage({ id: 'requireUsername' })), + password: yup.string().min(8, intl.formatMessage({ id: 'atLeast8CharPassword' })).required(intl.formatMessage({ id: 'requirePassword' })) + .matches(/^(?=.*[a-z])/, intl.formatMessage({ id: 'atLeastOneSmallLetter' })) + .matches(/^(?=.*[A-Z])/, intl.formatMessage({ id: 'atLeastOneCapLetter' })) + .matches(/^(?=.*[0-9])/, intl.formatMessage({ id: 'atLeast1Number' })) + .matches(/^(?=.*[!@#%&])/, intl.formatMessage({ id: 'atLeast1SpecialChar' })), }), }); @@ -201,7 +202,7 @@ const AuthLoginCustom = () => { const { handleSubmit } = useForm({}) - const getQRWithIAmSmart = () => { + function getQRWithIAmSmart(){ if (isAppBowser()) { openApp(); } else { @@ -217,10 +218,10 @@ const AuthLoginCustom = () => { + "&source=" + getBowserType() + "&redirectURI=" + encodeURIComponent(callbackUrl) + "&scope=" + encodeURIComponent("eidapi_auth eidapi_profiles") - +"&lang="+(locale === 'en' ?"en-US":locale === 'zh-HK' ?"zh-HK":"zh-CN") + + "&lang=" + (locale === 'en' ? "en-US" : locale === 'zh-HK' ? "zh-HK" : "zh-CN") //+"&state=" + "&brokerPage=false" - window.location=url; + window.location = url; } const openApp = () => { @@ -249,10 +250,10 @@ const AuthLoginCustom = () => { + "&source=" + getBowserType() + "&redirectURI=" + encodeURIComponent(callbackUrl) + "&scope=" + encodeURIComponent("eidapi_auth eidapi_profiles") - +"&lang="+(locale === 'en' ?"en-US":locale === 'zh-HK' ?"zh-HK":"zh-CN") + + "&lang=" + (locale === 'en' ? "en-US" : locale === 'zh-HK' ? "zh-HK" : "zh-CN") //+"&state=" + "&brokerPage=true" - window.location=url; + window.location = url; } @@ -265,7 +266,7 @@ const AuthLoginCustom = () => { - + { - + { - {onLogin? - - : + {onLogin ? + + : } @@ -357,17 +358,17 @@ const AuthLoginCustom = () => { - + - ? + ? | - + - ? + ? @@ -378,18 +379,18 @@ const AuthLoginCustom = () => { - + - + - { intl.formatMessage({id: 'learnMore'})+" >"} + {intl.formatMessage({ id: 'learnMore' }) + " >"} @@ -399,7 +400,7 @@ const AuthLoginCustom = () => { diff --git a/src/pages/authentication/auth-forms/IAmSmartFormWizard.js b/src/pages/authentication/auth-forms/IAmSmartFormWizard.js index ad55cc4..16e78e4 100644 --- a/src/pages/authentication/auth-forms/IAmSmartFormWizard.js +++ b/src/pages/authentication/auth-forms/IAmSmartFormWizard.js @@ -85,7 +85,7 @@ const CustomFormWizard = (props) => { const handleMouseDownId = (event) => { event.preventDefault(); }; - + const handleClickShowComId = () => { setshowComId(!showId); }; @@ -102,18 +102,18 @@ const CustomFormWizard = (props) => { } }, [selectedAddress4, selectedAddress5]) - function getRequiredErrStr(fieldname){ - return displayErrorMsg(intl.formatMessage({ id: 'require'},{fieldname:fieldname?intl.formatMessage({ id: fieldname}):""})); + function getRequiredErrStr(fieldname) { + return displayErrorMsg(intl.formatMessage({ id: 'require' }, { fieldname: fieldname ? intl.formatMessage({ id: fieldname }) : "" })); } - function getMaxErrStr(num, fieldname){ - return displayErrorMsg(intl.formatMessage({ id: 'noMoreThenNWords' },{num:num, fieldname:fieldname?intl.formatMessage({ id: fieldname})+": ":""})); + function getMaxErrStr(num, fieldname) { + return displayErrorMsg(intl.formatMessage({ id: 'noMoreThenNWords' }, { num: num, fieldname: fieldname ? intl.formatMessage({ id: fieldname }) + ": " : "" })); } const responseToData = () => { - //let rd = JSON.parse("{\"emailAddress\":\"test@gmail.com\",\"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 = JSON.parse(location.state?.responseData.data); + let rd = JSON.parse("{\"emailAddress\":\"test@gmail.com\",\"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 = JSON.parse(location.state?.responseData.data); let data = { "enName": rd?.enName?.UnstructuredName ?? "", "chName": rd?.chName?.ChineseName ?? "", @@ -213,6 +213,7 @@ const CustomFormWizard = (props) => { formik.setFieldValue("idNo", iAmSmartData.idNo ?? ""); formik.setFieldValue("checkDigit", iAmSmartData.checkDigit ?? ""); formik.setFieldValue("email", iAmSmartData.email ?? ""); + formik.setFieldValue("emailConfirm", iAmSmartData.email ?? ""); formik.setFieldValue("phone", iAmSmartData.phone ?? ""); formik.setFieldValue("phoneCountryCode", iAmSmartData.phoneCountryCode ?? ""); formik.setFieldValue("address1", iAmSmartData.address1 ?? ""); @@ -393,11 +394,11 @@ const CustomFormWizard = (props) => { address1: yup.string().max(40, getMaxErrStr(40)).required(displayErrorMsg(intl.formatMessage({ id: 'validateAddressLine1' }))), address2: yup.string().max(40), address3: yup.string().max(40), - email: yup.string().email(displayErrorMsg(intl.formatMessage({ id: 'validEmailFormat' }))).max(128, getMaxErrStr(128)).required(displayErrorMsg(intl.formatMessage({ id: 'requireEmail' }))), - emailConfirm: yup.string().email(displayErrorMsg(intl.formatMessage({ id: 'validEmailFormat' }))).max(128, getMaxErrStr(128)).required(displayErrorMsg(intl.formatMessage({ id: 'requireEmail' }))).oneOf([yup.ref('email'), null], displayErrorMsg(intl.formatMessage({ id: 'validSameEmail' }))), + email: yup.string().email(displayErrorMsg(intl.formatMessage({ id: 'validEmailFormat' }))).max(128, getMaxErrStr(128)).required(displayErrorMsg(intl.formatMessage({ id: 'requireEmail' }))), + emailConfirm: yup.string().email(displayErrorMsg(intl.formatMessage({ id: 'validEmailFormat' }))).max(128, getMaxErrStr(128)).required(displayErrorMsg(intl.formatMessage({ id: 'requireEmail' }))).oneOf([yup.ref('email'), null], displayErrorMsg(intl.formatMessage({ id: 'validSameEmail' }))), phoneCountryCode: yup.string().min(2, displayErrorMsg(intl.formatMessage({ id: 'requireAtLeast2Number' }))).required(displayErrorMsg(intl.formatMessage({ id: 'requireDialingCode' }))), phone: yup.string().min(8, displayErrorMsg(intl.formatMessage({ id: 'requireAtLeast8Number' }))).required(displayErrorMsg(intl.formatMessage({ id: 'requireContactNumber' }))), - captchaField: yup.string().max(5, getMaxErrStr(5)).required(displayErrorMsg(intl.formatMessage({ id: 'requireVerify' }))),//.oneOf([captcha], displayErrorMsg('請輸入有效驗證')), + captchaField: yup.string().max(5, getMaxErrStr(5)).required(displayErrorMsg(intl.formatMessage({ id: 'requireVerify' }))),//.oneOf([captcha], displayErrorMsg('請輸入有效驗證')), }), }); @@ -442,17 +443,15 @@ const CustomFormWizard = (props) => { - - - - : - {/* {iAmSmartData.idNo + "(" + iAmSmartData.checkDigit + ")"} */} - - - {iAmSmartData?.idNo?.slice(0, 4)} - + + + + : {iAmSmartData.idNo ? iAM Smart : <>} + {/* {iAmSmartData.idNo + "(" + iAmSmartData.checkDigit + ")"} */} + + - {showId ?iAmSmartData?.idNo?.slice(4):"****"}{showId ? '(' + iAmSmartData.checkDigit + ')' :null} + {iAmSmartData?.idNo?.slice(0, 4)}{showId ? iAmSmartData?.idNo?.slice(4) : "****"}{showId ? '(' + iAmSmartData.checkDigit + ')' : null} { size="medium" > {showId ? : } - - - + + + + - : {iAmSmartData.enName} + : {iAmSmartData.enName}{iAmSmartData.enName ? iAM Smart : <>} - + - {intl.formatMessage({ id: 'userChineseName' })}: {iAmSmartData.chName} + {intl.formatMessage({ id: 'userChineseName' })}: {iAmSmartData.chName}{iAmSmartData.chName ? iAM Smart : <>} @@ -492,7 +492,7 @@ const CustomFormWizard = (props) => { * - {iAmSmartData.address1 ? iAM Smart : null} + {iAmSmartData.address1 !="" && iAmSmartData.address1 ==formik.values.address1 ? iAM Smart : null} { value={selectedAddress4} options={address4ComboList} disabled={checkCountry} - error={Boolean(districtErrStr!="")} + error={Boolean(districtErrStr != "")} onBlur={formik.handleBlur} getOptionLabel={(option) => option.type ? intl.formatMessage({ id: option.type }) : ""} onChange={(event, newValue) => { @@ -625,7 +625,7 @@ const CustomFormWizard = (props) => { * - {iAmSmartData.email ? iAM Smart : null} + {iAmSmartData.email && iAmSmartData.email ==formik.values.email ? iAM Smart : null} { error={Boolean(formik.touched.emailConfirm && formik.errors.emailConfirm)} id="emailConfirm-login" type="email" - value={formik.values.emailConfirm.trim()} + value={formik.values.emailConfirm} name="emailConfirm" // onBlur={formik.handleBlur} onChange={formik.handleChange} @@ -704,7 +704,7 @@ const CustomFormWizard = (props) => { * - {iAmSmartData.phone ? iAM Smart : null} + {iAmSmartData.phone && iAmSmartData.phone ==formik.values.phone && iAmSmartData.phoneCountryCode ==formik.values.phoneCountryCode ? iAM Smart : null} @@ -852,9 +852,9 @@ const CustomFormWizard = (props) => { - - -
+ + +
@@ -968,7 +968,7 @@ const CustomFormWizard = (props) => { - + @@ -976,7 +976,7 @@ const CustomFormWizard = (props) => { {/* {formik.values.idNo + "(" + formik.values.checkDigit + ")"} */} - {showComId ?formik?.values?.idNo?.slice(4):"****"}{showComId ? '(' + formik.values.checkDigit + ')' : null} + {showComId ? formik?.values?.idNo?.slice(4) : "****"}{showComId ? '(' + formik.values.checkDigit + ')' : null} {/* {formik.values.idNo + "(" + formik.values.checkDigit + ")"} */} { size="medium" > {showComId ? : } - + - @@ -999,6 +998,7 @@ const CustomFormWizard = (props) => { {formik.values.enName} + {iAmSmartData.enName ? iAM Smart : <>} diff --git a/src/translations/en.json b/src/translations/en.json index 0a18e63..49c93d1 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -113,11 +113,11 @@ "login": "Login", "logout": "Logout", - "iAmSmartLogin": "iAM Smart Login", + "iAmSmartLogin": "Login with iAM Smart", "continueWithIAmSmart": "Continue with iAM Smart", "authorizeIAmSmartForInfo": "Authorize iAmSmart to provide personal information", "iAmSmartSubTitle": "In order to complete the account opening and establish a connection with \"iAmStart\", please authorize \"iAmSmart\" to provide the following personal information:", - "iAmSmartAutoFillIn": "Use \"iAmSmart\" to automatically fill in", + "iAmSmartAutoFillIn": "Open iAM Smart", "register": "Register", "userLoginName": "Username", "userPassword": "Password", diff --git a/src/translations/zh-CN.json b/src/translations/zh-CN.json index 16b23e3..77d333f 100644 --- a/src/translations/zh-CN.json +++ b/src/translations/zh-CN.json @@ -115,7 +115,7 @@ "continueWithIAmSmart": "以「智方便」继续", "authorizeIAmSmartForInfo": "授权「智方便」提供个人资料", "iAmSmartSubTitle": "为完成开户并建立与「智方便」的连接,请授权「智方便」提供以下个人资料:", - "iAmSmartAutoFillIn": "使用「智方便」自动填表", + "iAmSmartAutoFillIn": "开启智方便", "register": "申请", "userLoginName": "用户登入名称", "userPassword": "密码", diff --git a/src/translations/zh-HK.json b/src/translations/zh-HK.json index b09e8bf..ebe3b22 100644 --- a/src/translations/zh-HK.json +++ b/src/translations/zh-HK.json @@ -115,7 +115,7 @@ "continueWithIAmSmart": "以「智方便」繼續", "authorizeIAmSmartForInfo": "授權「智方便」提供個人資料", "iAmSmartSubTitle": "為完成開戶並建立與「智方便」的連接,請授權「智方便」提供以下個人資料:", - "iAmSmartAutoFillIn": "使用「智方便」自動填表", + "iAmSmartAutoFillIn": "開啟智方便", "register": "申請", "userLoginName": "用戶登入名稱", "userPassword": "密碼",