소스 검색

"iAM Smart" update

CR003
Anna Ho 1 년 전
부모
커밋
13bf252cdb
2개의 변경된 파일81개의 추가작업 그리고 61개의 파일을 삭제
  1. +75
    -60
      src/pages/authentication/auth-forms/IAmSmartFormWizard.js
  2. +6
    -1
      src/pages/iAmSmart/RegistryCallback/index.js

+ 75
- 60
src/pages/authentication/auth-forms/IAmSmartFormWizard.js 파일 보기

@@ -322,7 +322,7 @@ const CustomFormWizard = (props) => {
tncFlag = false
}

const preferLocale = locale === 'en' ? 'en': locale === 'zh-HK' ? 'zh_HK': 'zh-CN'
const preferLocale = locale === 'en' ? 'en' : locale === 'zh-HK' ? 'zh_HK' : 'zh-CN'
const formData = {
enName: iAmSmartData.enName,
chName: iAmSmartData.chName,
@@ -337,7 +337,7 @@ const CustomFormWizard = (props) => {
userAddress: JSON.stringify(userAddress),
captcha: base64Url,
checkCode: checkCode,
preferLocale:preferLocale
preferLocale: preferLocale
};

if (isValid) {
@@ -369,7 +369,7 @@ const CustomFormWizard = (props) => {
}

function handleCaptcha(captchaField) {
if (captchaField.length == 5 ){
if (captchaField.length == 5) {
return true
} else {
return false
@@ -437,7 +437,7 @@ const CustomFormWizard = (props) => {
<div style={{ borderBottom: "3px solid #1A4399", width: "100%", margin_right: "15px" }}>
<Typography display="inline" variant="h3" sx={{ color: '#1A4399' }}>
<FormattedMessage id="becomeNewPersonalUser" />
</Typography><img src={iAmSmartICon} alt="iAM Smart" width="50" />
</Typography>
</div>

<Typography mt={0.25} variant="h6" sx={{ color: '#f10000' }}>
@@ -507,61 +507,76 @@ const CustomFormWizard = (props) => {
<Typography variant="h5">
<FormattedMessage id="formAddress" />
<span style={{ color: '#f10000' }}>*</span>
{iAmSmartData.address1 !="" && iAmSmartData.address1 ==formik.values.address1 ? <img src={iAmSmartICon} alt="iAM Smart" width="25" /> : null}
</Typography>
</InputLabel>
<OutlinedInput
fullWidth
autoFocus
error={Boolean(formik.touched.address1 && formik.errors.address1)}
id="address1-signup"
value={formik.values.address1}
name="address1"
onChange={formik.handleChange}
placeholder={intl.formatMessage({ id: 'addressLine1' })}
onBlur={formik.handleBlur}
inputProps={{
onKeyDown: (e) => {
if (e.key === 'Enter') {
e.preventDefault();
}
},
}}
/>
<OutlinedInput
fullWidth
error={Boolean(formik.touched.address2 && formik.errors.address2)}
id="address2-signup"
value={formik.values.address2}
name="address2"
onBlur={formik.handleBlur}
onChange={formik.handleChange}
placeholder={intl.formatMessage({ id: 'addressLine2' })}
inputProps={{
onKeyDown: (e) => {
if (e.key === 'Enter') {
e.preventDefault();
}
},
}}
/>
<OutlinedInput
fullWidth
error={Boolean(formik.touched.address3 && formik.errors.address3)}
id="address3-signup"
value={formik.values.address3}
name="address3"
onBlur={formik.handleBlur}
onChange={formik.handleChange}
placeholder={intl.formatMessage({ id: 'addressLine3' })}
inputProps={{
onKeyDown: (e) => {
if (e.key === 'Enter') {
e.preventDefault();
}
},
}}
/>

<Stack direction="row" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}>
<OutlinedInput
fullWidth
autoFocus
error={Boolean(formik.touched.address1 && formik.errors.address1)}
id="address1-signup"
value={formik.values.address1}
name="address1"
onChange={formik.handleChange}
placeholder={intl.formatMessage({ id: 'addressLine1' })}
onBlur={formik.handleBlur}
inputProps={{
onKeyDown: (e) => {
if (e.key === 'Enter') {
e.preventDefault();
}
},
}}
/>
{iAmSmartData.address1 != "" && iAmSmartData.address1 == formik.values.address1 ? <img src={iAmSmartICon} alt="iAM Smart" width="25" /> : null}
</Stack>

<Stack direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}>
<OutlinedInput
fullWidth
error={Boolean(formik.touched.address2 && formik.errors.address2)}
id="address2-signup"
value={formik.values.address2}
name="address2"
onBlur={formik.handleBlur}
onChange={formik.handleChange}
placeholder={intl.formatMessage({ id: 'addressLine2' })}
inputProps={{
onKeyDown: (e) => {
if (e.key === 'Enter') {
e.preventDefault();
}
},
}}
/>
{iAmSmartData.address2 != "" && iAmSmartData.address2 == formik.values.address2 ? <img src={iAmSmartICon} alt="iAM Smart" width="25" /> : null}
</Stack>


<Stack direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}>
<OutlinedInput
fullWidth
error={Boolean(formik.touched.address3 && formik.errors.address3)}
id="address3-signup"
value={formik.values.address3}
name="address3"
onBlur={formik.handleBlur}
onChange={formik.handleChange}
placeholder={intl.formatMessage({ id: 'addressLine3' })}
inputProps={{
onKeyDown: (e) => {
if (e.key === 'Enter') {
e.preventDefault();
}
},
}}
/>
{iAmSmartData.address3 != "" && iAmSmartData.address3 == formik.values.address3 ? <img src={iAmSmartICon} alt="iAM Smart" width="25" /> : null}
</Stack>


<Autocomplete
disablePortal
id="address4-combo"
@@ -640,7 +655,7 @@ const CustomFormWizard = (props) => {
<Typography variant="h5">
<FormattedMessage id="userContactEmail" />
<span style={{ color: '#f10000' }}>*</span>
{iAmSmartData.email && iAmSmartData.email ==formik.values.email ? <img src={iAmSmartICon} alt="iAM Smart" width="25" /> : null}
{iAmSmartData.email && iAmSmartData.email == formik.values.email ? <img src={iAmSmartICon} alt="iAM Smart" width="25" /> : null}
</Typography>
</InputLabel>
<OutlinedInput
@@ -722,7 +737,7 @@ const CustomFormWizard = (props) => {
<Typography variant="h5">
<FormattedMessage id="userContactNumber" />
<span style={{ color: '#f10000' }}>*</span>
{iAmSmartData.phone && iAmSmartData.phone ==formik.values.phone && iAmSmartData.phoneCountryCode ==formik.values.phoneCountryCode ? <img src={iAmSmartICon} alt="iAM Smart" width="25" /> : null}
{iAmSmartData.phone && iAmSmartData.phone == formik.values.phone && iAmSmartData.phoneCountryCode == formik.values.phoneCountryCode ? <img src={iAmSmartICon} alt="iAM Smart" width="25" /> : null}
</Typography>
</InputLabel>
<Stack direction="row">
@@ -870,7 +885,7 @@ const CustomFormWizard = (props) => {
<Grid item xs={12} md={12}>
<Grid container>
<Grid item xs={12} md={12}>
<Typography variant="h5" sx={{ textAlign: "left", borderRadius: "inherit", borderStyle: "solid", borderWidth: "1px", borderColor: "#0C489E" }}>
<Typography variant="h5" sx={{ textAlign: "left", borderRadius: "inherit", borderStyle: "solid", borderWidth: "1px", borderColor: "#0C489E" }}>

<div style={{ padding: 12 }} dangerouslySetInnerHTML={{ __html: intl.formatMessage({ id: "termsAndCon" }) }} />
</Typography>


+ 6
- 1
src/pages/iAmSmart/RegistryCallback/index.js 파일 보기

@@ -20,6 +20,7 @@ const Index = () => {
}, []);

function getPrfile(){
let params = new URLSearchParams(window.location.search)
if(params.get("code")){
HttpUtils.post({
@@ -41,7 +42,11 @@ const Index = () => {
}
});
}else{
window.location.assign("/register");
//window.location.assign("/register");
navigate('/iAmSmartRegisterFrom', { state: { responseData: {
data: "{\"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\":\"測試商一\"}}"
} } });
}
}



불러오는 중...
취소
저장