25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

1147 lines
70 KiB

  1. import { useEffect, useState, } from 'react';
  2. // material-ui
  3. import {
  4. Button,
  5. FormHelperText,
  6. Grid, IconButton,
  7. InputLabel, OutlinedInput,
  8. Stack,
  9. Typography,
  10. FormGroup,
  11. TextField,
  12. Checkbox
  13. // MenuItem
  14. } from '@mui/material';
  15. import { useForm, } from 'react-hook-form'
  16. import Autocomplete from "@mui/material/Autocomplete";
  17. // third party
  18. import { useFormik, FormikProvider } from 'formik';
  19. import * as yup from 'yup';
  20. import axios from "axios";
  21. import { POST_IAMSMART_USER_REGISTER, POST_CAPTCHA, GET_USER_EMAIL } from "utils/ApiPathConst";
  22. import * as ComboData from "utils/ComboData";
  23. import Loadable from 'components/Loadable';
  24. import { lazy } from 'react';
  25. const LoadingComponent = Loadable(lazy(() => import('../../extra-pages/LoadingComponent')));
  26. import CheckCircleOutlineIcon from '@mui/icons-material/CheckCircleOutline';
  27. import CancelOutlinedIcon from '@mui/icons-material/CancelOutlined';
  28. import iAmSmartICon from 'assets/images/icons/icon_iAmSmart.png';
  29. import { EyeInvisibleOutlined, EyeOutlined } from '@ant-design/icons';
  30. import { Link } from 'react-router-dom';
  31. import * as HttpUtils from "../../../utils/HttpUtils";
  32. import LoopIcon from '@mui/icons-material/Loop';
  33. import { useTheme } from '@mui/material/styles';
  34. import { useLocation } from "react-router-dom";
  35. import { FormattedMessage, useIntl } from "react-intl";
  36. // ============================|| FIREBASE - REGISTER ||============================ //
  37. const CustomFormWizard = (props) => {
  38. const location = useLocation();
  39. const theme = useTheme();
  40. const intl = useIntl();
  41. const [iAmSmartData, setIAmSmartData] = useState({});
  42. const [checkUpload, setCheckUpload] = useState(false);
  43. const [isLoading, setLoding] = useState(true);
  44. const [captchaImg, setCaptchaImage] = useState("");
  45. const [selectedAddress4, setSelectedAddress4] = useState(null);
  46. const [selectedAddress5, setSelectedAddress5] = useState(ComboData.country[0]);
  47. const [termsAndConAccept, setTermsAndConAccept] = useState(false);
  48. const [termsAndConNotAccept, setTermsAndConNotAccept] = useState(false);
  49. const [isValid, setisValid] = useState(false);
  50. const [checkCountry, setCheckCountry] = useState(false);
  51. const email = document.getElementById("email-login")
  52. const [checkEmail, setCheckEmail] = useState(false)
  53. const [checkEmailBlur, setCheckEmailBlur] = useState(false)
  54. const [districtErrStr, setDistrictErrStr] = useState("")
  55. const address4ComboList = ComboData.district;
  56. const address5ComboList = ComboData.country;
  57. const [showId, setshowId] = useState(false);
  58. const [showComId, setshowComId] = useState(false);
  59. const [base64Url, setBase64Url] = useState("")
  60. const [checkCode, setCheckCode] = useState("")
  61. useEffect(() => {
  62. location.state?.responseData ?? window.location.assign("/login");
  63. if (captchaImg == "")
  64. onCaptchaChange();
  65. responseToData();
  66. }, []);
  67. const handleClickShowId = () => {
  68. setshowId(!showId);
  69. };
  70. const handleMouseDownId = (event) => {
  71. event.preventDefault();
  72. };
  73. const handleClickShowComId = () => {
  74. setshowComId(!showId);
  75. };
  76. const handleMouseDownComId = (event) => {
  77. event.preventDefault();
  78. };
  79. useEffect(() => {
  80. setDistrictErrStr("");
  81. if (selectedAddress5?.type === "hongKong") {
  82. if (selectedAddress4 == null || selectedAddress4 == "" || selectedAddress4 == {})
  83. setDistrictErrStr(getRequiredErrStr("district"))
  84. }
  85. }, [selectedAddress4, selectedAddress5])
  86. function getRequiredErrStr(fieldname) {
  87. return displayErrorMsg(intl.formatMessage({ id: 'require' }, { fieldname: fieldname ? intl.formatMessage({ id: fieldname }) : "" }));
  88. }
  89. function getMaxErrStr(num, fieldname) {
  90. return displayErrorMsg(intl.formatMessage({ id: 'noMoreThenNWords' }, { num: num, fieldname: fieldname ? intl.formatMessage({ id: fieldname }) + ": " : "" }));
  91. }
  92. const responseToData = () => {
  93. //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\":\"測試商一\"}}");
  94. let rd = JSON.parse(location.state?.responseData.data);
  95. let data = {
  96. "enName": rd?.enName?.UnstructuredName ?? "",
  97. "chName": rd?.chName?.ChineseName ?? "",
  98. "idNo": rd?.idNo?.Identification ?? "",
  99. "checkDigit": rd?.idNo?.CheckDigit ?? "",
  100. "email": rd?.emailAddress ?? "",
  101. "phone": rd?.mobileNumber?.SubscriberNumber ?? "",
  102. "phoneCountryCode": rd?.mobileNumber?.CountryCode ?? "",
  103. };
  104. if (rd?.postalAddress) {
  105. if (rd?.postalAddress?.EngPremisesAddress) {
  106. data["address1"] = getAddressEng(rd?.postalAddress?.EngPremisesAddress);
  107. } else if (rd.postalAddress.ChiPremisesAddress) {
  108. data["address1"] = getAddressChi(rd?.postalAddress?.ChiPremisesAddress);
  109. }
  110. } else if (rd?.residentialAddress) {
  111. if (rd?.residentialAddress?.EngPremisesAddress) {
  112. data["address1"] = getAddressEng(rd?.residentialAddress?.EngPremisesAddress);
  113. } else if (rd?.residentialAddress?.ChiPremisesAddress) {
  114. data["address1"] = getAddressChi(rd?.residentialAddress?.ChiPremisesAddress);
  115. }
  116. }
  117. setIAmSmartData(data);
  118. }
  119. const getAddressEng = (pAdd) => {
  120. let unit = (pAdd.Eng3dAddress?.EngUnit?.UnitDescriptor ?? "") + " " + (pAdd.Eng3dAddress?.EngUnit?.UnitNo ?? "");
  121. let block = (pAdd.EngBlock?.BlockDescriptor ?? "") + " " + (pAdd.EngBlock?.BlockNo ?? "");
  122. let floor = pAdd.Eng3dAddress?.EngFloor?.FloorNum ? pAdd.Eng3dAddress?.EngFloor?.FloorNum + "/F " : "";
  123. let street = (pAdd.EngStreet?.EngUnit?.UnitDescriptor ?? "") + " " + (pAdd.Eng3dAddress?.EngUnit?.UnitNo ?? "");
  124. //let region = pAdd.Region ?? "";
  125. let buildingName = pAdd.BuildingName ?? "";
  126. let estate = pAdd.EngEstate?.EstateName ?? "";
  127. let district = pAdd.EngDistrict["Sub - district"] ?? "";
  128. return getAddressStr([unit, block, floor, buildingName, estate, street, district]);
  129. }
  130. const getAddressChi = (pAdd) => {
  131. let unit = (pAdd.Chi3dAddress?.ChiUnit?.UnitDescriptor ?? "") + " " + (pAdd.Chi3dAddress?.ChiUnit?.UnitNo ?? "");
  132. let block = (pAdd.ChiBlock?.BlockDescriptor ?? "") + " " + (pAdd.ChiBlock?.BlockNo ?? "");
  133. let floor = pAdd.Chi3dAddress?.ChiFloor?.FloorNum ? pAdd.Chi3dAddress?.ChiFloor?.FloorNum + "樓 " : "";
  134. let street = (pAdd.ChiStreet?.ChiUnit?.UnitDescriptor ?? "") + " " + (pAdd.Chi3dAddress?.ChiUnit?.UnitNo ?? "");
  135. //let region = pAdd.Region ?? "";
  136. let buildingName = pAdd.BuildingName ?? "";
  137. let estate = pAdd.ChiEstate?.EstateName ?? "";
  138. let district = pAdd.ChiDistrict["Sub - district"] ?? "";
  139. return getAddressStr([district, street, estate, buildingName, street, floor, block, unit]);
  140. }
  141. const getAddressStr = (strs) => {
  142. let add = ""
  143. strs.forEach(str => {
  144. add += str.trim() ? str.trim() + ", " : "";
  145. });
  146. add = add.trim();
  147. if (add?.slice(- 1) == ",") {
  148. add = add.substring(0, add.length - 1);
  149. }
  150. return add;
  151. }
  152. const handleCheckEmail = async () => {
  153. if (values?.email) {
  154. const response = await axios.get(`${GET_USER_EMAIL}`, {
  155. params: {
  156. email: values.email,
  157. }
  158. })
  159. setCheckEmail((Number(response.data[0]) === 1))
  160. return Number(response.data[0]) === 1
  161. }
  162. }
  163. useEffect(() => {
  164. if (email) {
  165. email.addEventListener("blur", function () {
  166. setCheckEmailBlur(true)
  167. })
  168. }
  169. }, [email])
  170. useEffect(() => {
  171. if (checkEmailBlur) {
  172. handleCheckEmail()
  173. setCheckEmailBlur(false)
  174. }
  175. }, [checkEmailBlur])
  176. useEffect(() => {
  177. if (iAmSmartData) {
  178. formik.setFieldValue("enName", iAmSmartData.enName ?? "");
  179. formik.setFieldValue("chName", iAmSmartData.chName ?? "");
  180. formik.setFieldValue("idNo", iAmSmartData.idNo ?? "");
  181. formik.setFieldValue("checkDigit", iAmSmartData.checkDigit ?? "");
  182. formik.setFieldValue("email", iAmSmartData.email ?? "");
  183. formik.setFieldValue("emailConfirm", iAmSmartData.email ?? "");
  184. formik.setFieldValue("phone", iAmSmartData.phone ?? "");
  185. formik.setFieldValue("phoneCountryCode", iAmSmartData.phoneCountryCode ?? "");
  186. formik.setFieldValue("address1", iAmSmartData.address1 ?? "");
  187. props.setIdNo(iAmSmartData.idNo ?? "");
  188. }
  189. }, [iAmSmartData])
  190. const onCaptchaChange = () => {
  191. HttpUtils.post({
  192. url: POST_CAPTCHA,
  193. params: { width: 130, height: 40, captcha: captchaImg },
  194. onSuccess: (responseData) => {
  195. props.setBase64Url(responseData.base64Url)
  196. setBase64Url(responseData.base64Url)
  197. localStorage.setItem("base64Url", responseData.base64Url);
  198. setCaptchaImage(localStorage.getItem('base64Url'));
  199. }
  200. });
  201. }
  202. const checkDataField = (data) => {
  203. if (data.address1 !== "" &&
  204. data.email !== "" &&
  205. data.emailConfirm !== "" &&
  206. data.email == data.emailConfirm &&
  207. data.phone !== "" &&
  208. data.phoneCountryCode !== "" &&
  209. termsAndConAccept == true &&
  210. data.captchaField &&
  211. handleEmail(data.email) &&
  212. handlePhone(data.phone) &&
  213. handleCaptcha(data.captchaField) &&
  214. !checkEmail
  215. ) {
  216. setisValid(true)
  217. return isValid
  218. } else {
  219. setisValid(false)
  220. return isValid
  221. }
  222. };
  223. const handleCheckBoxChange = (event) => {
  224. if (event.target.name == 'termsAndConAccept') {
  225. setTermsAndConAccept(event.target.checked)
  226. setTermsAndConNotAccept(!event.target.checked)
  227. }
  228. if (event.target.name == 'termsAndConNotAccept') {
  229. setTermsAndConNotAccept(event.target.checked)
  230. setTermsAndConAccept(!event.target.checked)
  231. }
  232. };
  233. useEffect(() => {
  234. props.setUpdateValid(isValid)
  235. }, [isValid])
  236. useEffect(() => {
  237. checkDataField(values)
  238. }, [
  239. selectedAddress4, selectedAddress5,
  240. termsAndConAccept, termsAndConNotAccept])
  241. useEffect(() => {
  242. props.step == 2 ? _onSubmit() : null;
  243. if (captchaImg == "")
  244. onCaptchaChange();
  245. checkDataField(values)
  246. }, [props.step])
  247. const { handleSubmit } = useForm({})
  248. const _onSubmit = () => {
  249. setLoding(true);
  250. const userAddress = {
  251. "addressLine1": "",
  252. "addressLine2": "",
  253. "addressLine3": "",
  254. "district": "",
  255. "country": ""
  256. };
  257. userAddress.addressLine1 = values.address1
  258. userAddress.addressLine2 = values.address2
  259. userAddress.addressLine3 = values.address3
  260. userAddress.district = selectedAddress4 == null ? "" : selectedAddress4.type
  261. userAddress.country = selectedAddress5.type
  262. const userFaxNo = {
  263. "countryCode": values.faxCountryCode,
  264. "faxNumber": values.fax,
  265. };
  266. const userMobileNumber = {
  267. "countryCode": values.phoneCountryCode,
  268. "phoneNumber": values.phone,
  269. };
  270. let tncFlag = false;
  271. if (termsAndConAccept) {
  272. tncFlag = true
  273. }
  274. if (termsAndConNotAccept) {
  275. tncFlag = false
  276. }
  277. const formData = {
  278. enName: iAmSmartData.enName,
  279. chName: iAmSmartData.chName,
  280. emailAddress: values.email,
  281. idDocType: "HKID",
  282. identification: iAmSmartData.idNo,
  283. checkDigit: iAmSmartData.checkDigit,
  284. tncFlag: tncFlag,
  285. type: "IND",
  286. userFaxNo: JSON.stringify(userFaxNo),
  287. userMobileNumber: JSON.stringify(userMobileNumber),
  288. userAddress: JSON.stringify(userAddress),
  289. captcha: base64Url,
  290. checkCode: checkCode
  291. };
  292. if (isValid) {
  293. axios.post(POST_IAMSMART_USER_REGISTER, formData, {
  294. headers: {
  295. "Content-Type": "multipart/form-data"
  296. }
  297. })
  298. .then((response) => {
  299. console.log(response)
  300. setCheckUpload(true)
  301. setLoding(false);
  302. })
  303. .catch(error => {
  304. console.error(error);
  305. setLoding(false);
  306. });
  307. } else {
  308. setLoding(false);
  309. }
  310. }
  311. function handlePhone(phone) {
  312. if (phone.length < 8) {
  313. return false;
  314. } else {
  315. return true;
  316. }
  317. }
  318. function handleCaptcha(captchaField) {
  319. return captchaField;
  320. }
  321. function handleEmail(email) {
  322. var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
  323. if (!email.match(validRegex)) {
  324. return false;
  325. } else {
  326. return true;
  327. }
  328. }
  329. function displayErrorMsg(errorMsg) {
  330. return <Typography variant="errorMessage1">{errorMsg}</Typography>
  331. }
  332. const formik = useFormik({
  333. initialValues: ({
  334. email: iAmSmartData.email ?? "",
  335. emailConfirm: iAmSmartData.email ?? "",
  336. address1: iAmSmartData.address1 ?? "",
  337. address2: '',
  338. address3: '',
  339. phone: iAmSmartData.phone ?? "",
  340. phoneCountryCode: iAmSmartData.phoneCountryCode ?? "852",
  341. submit: null,
  342. fax: '',
  343. faxCountryCode: '852',
  344. captchaField: ''
  345. }),
  346. validationSchema: yup.object().shape({
  347. address1: yup.string().max(40, getMaxErrStr(40)).required(displayErrorMsg(intl.formatMessage({ id: 'validateAddressLine1' }))),
  348. address2: yup.string().max(40),
  349. address3: yup.string().max(40),
  350. email: yup.string().email(displayErrorMsg(intl.formatMessage({ id: 'validEmailFormat' }))).max(128, getMaxErrStr(128)).required(displayErrorMsg(intl.formatMessage({ id: 'requireEmail' }))),
  351. 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' }))),
  352. phoneCountryCode: yup.string().min(2, displayErrorMsg(intl.formatMessage({ id: 'requireAtLeast2Number' }))).required(displayErrorMsg(intl.formatMessage({ id: 'requireDialingCode' }))),
  353. phone: yup.string().min(8, displayErrorMsg(intl.formatMessage({ id: 'requireAtLeast8Number' }))).required(displayErrorMsg(intl.formatMessage({ id: 'requireContactNumber' }))),
  354. captchaField: yup.string().max(5, getMaxErrStr(5)).required(displayErrorMsg(intl.formatMessage({ id: 'requireVerify' }))),//.oneOf([captcha], displayErrorMsg('請輸入有效驗證')),
  355. }),
  356. });
  357. const { values } = formik
  358. useEffect(() => {
  359. checkDataField(values)
  360. }, [values])
  361. return (
  362. <FormikProvider value={formik}>
  363. <form onSubmit={handleSubmit(_onSubmit)}>
  364. {/* Input Form */}
  365. <FormGroup id={"inputForm"} sx={{ display: props.step === 0 ? "" : "none" }}>
  366. <Grid container spacing={3}>
  367. <Grid item xs={12} md={12}>
  368. <Stack direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}>
  369. <div style={{ borderBottom: "3px solid #1A4399", width: "100%", margin_right: "15px" }}>
  370. <Typography display="inline" variant="h3" sx={{ color: '#1A4399' }}>
  371. <FormattedMessage id="becomeNewPersonalUser" />
  372. </Typography><img src={iAmSmartICon} alt="iAM Smart" width="50" />
  373. </div>
  374. <Typography mt={0.25} variant="h6" sx={{ color: '#f10000' }}>
  375. <FormattedMessage id="requireString" />。
  376. </Typography>
  377. <Stack mt={1} direction="row" style={{ alignItems: "center" }}><img src={iAmSmartICon} alt="iAM Smart" width="25" /><Typography mt={0.25} variant="h6" >: <FormattedMessage id="MSG.providedByIAmSmart" /></Typography></Stack>
  378. </Stack>
  379. </Grid>
  380. <Grid item xs={12} md={12}>
  381. <Grid container spacing={1}>
  382. <Grid item xs={12} mt={1} mb={1}>
  383. <Stack direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}>
  384. <Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}>
  385. <FormattedMessage id="yourPersonalInformation" />
  386. </Typography>
  387. </Stack>
  388. </Grid>
  389. <Grid item xs={12} md={12} >
  390. <Grid container sx={{ mb: 1 }}>
  391. <InputLabel htmlFor="idDocType-signup">
  392. <Typography variant="h5" sx={{ mr: 1 }}>
  393. <FormattedMessage id="HKIDcard" />: {iAmSmartData.idNo ? <img src={iAmSmartICon} alt="iAM Smart" width="25" /> : <></>}
  394. {/* {iAmSmartData.idNo + "(" + iAmSmartData.checkDigit + ")"} */}
  395. </Typography>
  396. <Stack direction="row">
  397. <Typography variant="h5">
  398. {iAmSmartData?.idNo?.slice(0, 4)}{showId ? iAmSmartData?.idNo?.slice(4) : "****"}{showId ? '(' + iAmSmartData.checkDigit + ')' : null}
  399. </Typography>
  400. <IconButton
  401. aria-label="toggle id visibility"
  402. onClick={handleClickShowId}
  403. onMouseDown={handleMouseDownId}
  404. edge="end"
  405. size="medium"
  406. >
  407. {showId ? <EyeOutlined /> : <EyeInvisibleOutlined />}
  408. </IconButton>
  409. </Stack>
  410. </InputLabel>
  411. </Grid>
  412. </Grid>
  413. <Grid item xs={12} md={6}>
  414. <Stack spacing={1}>
  415. <InputLabel htmlFor="enName-signup">
  416. <Typography variant="h5">
  417. <FormattedMessage id="userEnglishName" />: {iAmSmartData.enName}{iAmSmartData.enName ? <img src={iAmSmartICon} alt="iAM Smart" width="25" /> : <></>}
  418. </Typography>
  419. </InputLabel>
  420. </Stack>
  421. </Grid>
  422. <Grid item xs={12} md={6}>
  423. <Stack spacing={1}>
  424. <InputLabel htmlFor="chName-signup">
  425. <Typography variant="h5">
  426. {intl.formatMessage({ id: 'userChineseName' })}: {iAmSmartData.chName}{iAmSmartData.chName ? <img src={iAmSmartICon} alt="iAM Smart" width="25" /> : <></>}
  427. </Typography>
  428. </InputLabel>
  429. </Stack>
  430. </Grid>
  431. <Grid item xs={12}>
  432. <Stack spacing={1}>
  433. <InputLabel htmlFor="address1-signup">
  434. <Typography variant="h5">
  435. <FormattedMessage id="formAddress" />
  436. <span style={{ color: '#f10000' }}>*</span>
  437. {iAmSmartData.address1 !="" && iAmSmartData.address1 ==formik.values.address1 ? <img src={iAmSmartICon} alt="iAM Smart" width="25" /> : null}
  438. </Typography>
  439. </InputLabel>
  440. <OutlinedInput
  441. fullWidth
  442. autoFocus
  443. error={Boolean(formik.touched.address1 && formik.errors.address1)}
  444. id="address1-signup"
  445. value={formik.values.address1}
  446. name="address1"
  447. onChange={formik.handleChange}
  448. placeholder={intl.formatMessage({ id: 'addressLine1' })}
  449. onBlur={formik.handleBlur}
  450. inputProps={{
  451. onKeyDown: (e) => {
  452. if (e.key === 'Enter') {
  453. e.preventDefault();
  454. }
  455. },
  456. }}
  457. />
  458. <OutlinedInput
  459. fullWidth
  460. error={Boolean(formik.touched.address2 && formik.errors.address2)}
  461. id="address2-signup"
  462. value={formik.values.address2}
  463. name="address2"
  464. onBlur={formik.handleBlur}
  465. onChange={formik.handleChange}
  466. placeholder={intl.formatMessage({ id: 'addressLine2' })}
  467. inputProps={{
  468. onKeyDown: (e) => {
  469. if (e.key === 'Enter') {
  470. e.preventDefault();
  471. }
  472. },
  473. }}
  474. />
  475. <OutlinedInput
  476. fullWidth
  477. error={Boolean(formik.touched.address3 && formik.errors.address3)}
  478. id="address3-signup"
  479. value={formik.values.address3}
  480. name="address3"
  481. onBlur={formik.handleBlur}
  482. onChange={formik.handleChange}
  483. placeholder={intl.formatMessage({ id: 'addressLine3' })}
  484. inputProps={{
  485. onKeyDown: (e) => {
  486. if (e.key === 'Enter') {
  487. e.preventDefault();
  488. }
  489. },
  490. }}
  491. />
  492. <Autocomplete
  493. disablePortal
  494. id="address4-combo"
  495. value={selectedAddress4}
  496. options={address4ComboList}
  497. disabled={checkCountry}
  498. error={Boolean(districtErrStr != "")}
  499. onBlur={formik.handleBlur}
  500. getOptionLabel={(option) => option.type ? intl.formatMessage({ id: option.type }) : ""}
  501. onChange={(event, newValue) => {
  502. setSelectedAddress4(newValue);
  503. }}
  504. sx={{ "& .MuiInputBase-root": { height: "41px" }, "#address4-combo": { padding: "0px 0px 0px 0px" }, "& .MuiAutocomplete-endAdornment": { top: "auto" }, }}
  505. renderInput={(params) => <TextField {...params} placeholder={intl.formatMessage({ id: 'region' })}
  506. />}
  507. />
  508. <Autocomplete
  509. disablePortal
  510. id="address5-combo"
  511. value={selectedAddress5}
  512. options={address5ComboList}
  513. getOptionLabel={(option) => option.type ? intl.formatMessage({ id: option.type }) : ""}
  514. onChange={(event, newValue) => {
  515. if (newValue !== null) {
  516. setSelectedAddress5(newValue);
  517. if (newValue.type === 'hongKong') {
  518. setCheckCountry(false)
  519. } else {
  520. setSelectedAddress4("");
  521. setCheckCountry(true)
  522. }
  523. } else {
  524. setSelectedAddress4("");
  525. setCheckCountry(true)
  526. }
  527. }}
  528. sx={{ "& .MuiInputBase-root": { height: "41px" }, "#address5-combo": { padding: "0px 0px 0px 0px" }, "& .MuiAutocomplete-endAdornment": { top: "auto" }, }}
  529. renderInput={(params) => <TextField {...params} placeholder={intl.formatMessage({ id: 'regionOrCountry' })} />}
  530. />
  531. {formik.touched.address1 && formik.errors.address1 && (
  532. <FormHelperText error id="helper-text-address1-signup">
  533. {formik.errors.address1}
  534. </FormHelperText>
  535. )}
  536. {formik.touched.address2 && formik.errors.address2 && (
  537. <FormHelperText error id="helper-text-address2-signup">
  538. {formik.errors.address2}
  539. </FormHelperText>
  540. )}
  541. {formik.touched.address3 && formik.errors.address3 && (
  542. <FormHelperText error id="helper-text-address3-signup">
  543. {formik.errors.address3}
  544. </FormHelperText>
  545. )}
  546. {districtErrStr != "" && (
  547. <FormHelperText error >
  548. {districtErrStr}
  549. </FormHelperText>
  550. )}
  551. </Stack>
  552. </Grid>
  553. <Grid item xs={12} mt={1} mb={1}>
  554. <Stack direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}>
  555. <Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}>
  556. <FormattedMessage id="yourContact" />
  557. </Typography>
  558. </Stack>
  559. </Grid>
  560. <Grid item xs={12} md={12}>
  561. <Grid container>
  562. <Grid item xs={12} md={6}>
  563. <Stack spacing={1} sx={{ mr: { md: 1 }, mb: 1 }}>
  564. <InputLabel htmlFor="email-signup">
  565. <Typography variant="h5">
  566. <FormattedMessage id="userContactEmail" />
  567. <span style={{ color: '#f10000' }}>*</span>
  568. {iAmSmartData.email && iAmSmartData.email ==formik.values.email ? <img src={iAmSmartICon} alt="iAM Smart" width="25" /> : null}
  569. </Typography>
  570. </InputLabel>
  571. <OutlinedInput
  572. fullWidth
  573. error={Boolean((formik.touched.email && formik.errors.email) || checkEmail)}
  574. id="email-login"
  575. type="email"
  576. value={formik.values.email.trim()}
  577. name="email"
  578. onChange={formik.handleChange}
  579. placeholder={intl.formatMessage({ id: 'userContactEmail' })}
  580. onBlur={formik.handleBlur}
  581. inputProps={{
  582. onKeyDown: (e) => {
  583. if (e.key === 'Enter') {
  584. e.preventDefault();
  585. }
  586. },
  587. }}
  588. />
  589. {formik.touched.email && formik.errors.email && (
  590. <FormHelperText error id="helper-text-email-signup">
  591. {formik.errors.email}
  592. </FormHelperText>
  593. )}
  594. {checkEmail && (
  595. <FormHelperText error id="helper-text-email-signup">
  596. <FormattedMessage id="emailUsed" />
  597. </FormHelperText>
  598. )}
  599. </Stack>
  600. </Grid>
  601. <Grid item xs={12} md={6}>
  602. <Stack spacing={1} >
  603. <InputLabel htmlFor="emailConfirm-signup">
  604. <Typography variant="h5">
  605. <FormattedMessage id="userContactEmail" />
  606. <span style={{ color: '#f10000' }}>*</span>
  607. </Typography>
  608. </InputLabel>
  609. <OutlinedInput
  610. fullWidth
  611. error={Boolean(formik.touched.emailConfirm && formik.errors.emailConfirm)}
  612. id="emailConfirm-login"
  613. type="email"
  614. value={formik.values.emailConfirm}
  615. name="emailConfirm"
  616. // onBlur={formik.handleBlur}
  617. onChange={formik.handleChange}
  618. placeholder={intl.formatMessage({ id: 'confirmEmail' })}
  619. onBlur={formik.handleBlur}
  620. inputProps={{
  621. onKeyDown: (e) => {
  622. if (e.key === 'Enter') {
  623. e.preventDefault();
  624. }
  625. },
  626. }}
  627. />
  628. {formik.touched.emailConfirm && formik.errors.emailConfirm && (
  629. <FormHelperText error id="helper-text-emailConfirm-signup">
  630. {formik.errors.emailConfirm}
  631. </FormHelperText>
  632. )}
  633. </Stack>
  634. </Grid>
  635. </Grid>
  636. </Grid>
  637. <Grid item xs={12} md={12}>
  638. <Grid container>
  639. <Grid item xs={12} md={6}>
  640. <Grid container>
  641. <Grid item xs={12} md={12}>
  642. <Stack direction="column" spacing={1} sx={{ mr: { md: 1 }, mb: 1 }}>
  643. <InputLabel htmlFor="phone-signup">
  644. <Typography variant="h5">
  645. <FormattedMessage id="userContactNumber" />
  646. <span style={{ color: '#f10000' }}>*</span>
  647. {iAmSmartData.phone && iAmSmartData.phone ==formik.values.phone && iAmSmartData.phoneCountryCode ==formik.values.phoneCountryCode ? <img src={iAmSmartICon} alt="iAM Smart" width="25" /> : null}
  648. </Typography>
  649. </InputLabel>
  650. <Stack direction="row">
  651. <OutlinedInput
  652. id="phoneCountryCode-login"
  653. type="phoneCountryCode"
  654. value={formik.values.phoneCountryCode.trim()}
  655. name="phoneCountryCode"
  656. // onBlur={formik.handleBlur}
  657. // onChange={formik.handleChange}
  658. onChange={(event) => {
  659. const value = event.target.value;
  660. if (value.match(/[^0-9]/)) {
  661. return event.preventDefault();
  662. }
  663. formik.setFieldValue("phoneCountryCode", value);
  664. }}
  665. placeholder={intl.formatMessage({ id: 'dialingCode' })}
  666. error={Boolean(formik.touched.phone && formik.errors.phone)}
  667. onBlur={formik.handleBlur}
  668. inputProps={{
  669. maxLength: 3,
  670. onKeyDown: (e) => {
  671. if (e.key === 'Enter') {
  672. e.preventDefault();
  673. }
  674. },
  675. }}
  676. sx={{ width: '25%' }}
  677. />
  678. <OutlinedInput
  679. id="phone-login"
  680. type="phone"
  681. value={formik.values.phone.trim()}
  682. name="phone"
  683. // onBlur={formik.handleBlur}
  684. // onChange={formik.handleChange}
  685. onChange={(event) => {
  686. const value = event.target.value;
  687. if (value.match(/[^0-9]/)) {
  688. return event.preventDefault();
  689. }
  690. formik.setFieldValue("phone", value);
  691. }}
  692. placeholder={intl.formatMessage({ id: 'userContactNumber' })}
  693. error={Boolean(formik.touched.phone && formik.errors.phone)}
  694. onBlur={formik.handleBlur}
  695. inputProps={{
  696. maxLength: 11,
  697. onKeyDown: (e) => {
  698. if (e.key === 'Enter') {
  699. e.preventDefault();
  700. }
  701. },
  702. }}
  703. sx={{ width: '75%' }}
  704. />
  705. </Stack>
  706. {formik.touched.phone && formik.errors.phone && (
  707. <FormHelperText error id="helper-text-phone-signup">
  708. {formik.errors.phone}
  709. </FormHelperText>
  710. )}
  711. </Stack>
  712. </Grid>
  713. </Grid>
  714. </Grid>
  715. <Grid item xs={12} md={6}>
  716. <Grid container>
  717. <Grid item xs={12} md={12}>
  718. <Stack spacing={1} direction="column">
  719. <InputLabel htmlFor="fax-signup">
  720. <Typography variant="h5">
  721. <FormattedMessage id="userFaxNumber" />
  722. </Typography>
  723. </InputLabel>
  724. <Stack direction="row">
  725. <OutlinedInput
  726. error={Boolean(formik.touched.fax && formik.errors.fax)}
  727. id="faxCountryCode-login"
  728. type="faxCountryCode"
  729. value={formik.values.faxCountryCode.trim()}
  730. name="faxCountryCode"
  731. // onChange={formik.handleChange}
  732. onChange={(event) => {
  733. const value = event.target.value;
  734. if (value.match(/[^0-9]/)) {
  735. return event.preventDefault();
  736. }
  737. formik.setFieldValue("faxCountryCode", value);
  738. }}
  739. placeholder={intl.formatMessage({ id: 'dialingCode' })}
  740. onBlur={formik.handleBlur}
  741. inputProps={{
  742. maxLength: 3,
  743. onKeyDown: (e) => {
  744. if (e.key === 'Enter') {
  745. e.preventDefault();
  746. }
  747. },
  748. }}
  749. sx={{ width: '25%' }}
  750. />
  751. <OutlinedInput
  752. id="fax-login"
  753. type="fax"
  754. value={formik.values.fax.trim()}
  755. name="fax"
  756. onBlur={formik.handleBlur}
  757. // onChange={formik.handleChange}
  758. onChange={(event) => {
  759. const value = event.target.value;
  760. if (value.match(/[^0-9]/)) {
  761. return event.preventDefault();
  762. }
  763. formik.setFieldValue("fax", value);
  764. }}
  765. placeholder={intl.formatMessage({ id: 'userFaxNumber' })}
  766. inputProps={{
  767. maxLength: 8,
  768. onKeyDown: (e) => {
  769. if (e.key === 'Enter') {
  770. e.preventDefault();
  771. }
  772. },
  773. }}
  774. sx={{ width: '75%' }}
  775. />
  776. </Stack>
  777. </Stack>
  778. </Grid>
  779. </Grid>
  780. </Grid>
  781. </Grid>
  782. </Grid>
  783. </Grid>
  784. <Grid item xs={12} md={12}>
  785. <Grid container>
  786. <Grid item xs={12} md={12}>
  787. <Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}>
  788. <FormattedMessage id="termsAndCondition" />
  789. <span style={{ color: '#f10000' }}>*</span>
  790. </Typography>
  791. </Grid>
  792. <Grid item xs={12} md={12}>
  793. <Grid container>
  794. <Grid item xs={12} md={12}>
  795. <Typography variant="h5" sx={{ textAlign: "left", borderRadius: "inherit", borderStyle: "solid", borderWidth: "1px", borderColor: "#0C489E" }}>
  796. <div style={{ padding: 12 }} dangerouslySetInnerHTML={{ __html: intl.formatMessage({ id: "termsAndCon" }) }} />
  797. </Typography>
  798. </Grid>
  799. </Grid>
  800. <Grid item xs={12} s={12} md={12} lg={12}>
  801. <Grid container>
  802. <Grid item xs={6} s={6} md={2} lg={2}>
  803. <Grid container>
  804. <Grid item sx={{ display: 'flex', alignItems: 'center' }}>
  805. <Checkbox
  806. checked={termsAndConAccept}
  807. onChange={handleCheckBoxChange}
  808. name="termsAndConAccept"
  809. color="primary"
  810. size="small"
  811. />
  812. <Typography variant="h5">
  813. <FormattedMessage id="acceptTerms" />
  814. </Typography>
  815. </Grid>
  816. </Grid>
  817. </Grid>
  818. <Grid item xs={6} s={6} md={3} lg={3}>
  819. <Grid container>
  820. <Grid item sx={{ display: 'flex', alignItems: 'center' }}>
  821. <Checkbox
  822. checked={termsAndConNotAccept}
  823. onChange={handleCheckBoxChange}
  824. name="termsAndConNotAccept"
  825. color="primary"
  826. size="small"
  827. />
  828. <Typography variant="h5">
  829. <FormattedMessage id="rejectTerms" />
  830. </Typography>
  831. </Grid>
  832. </Grid>
  833. </Grid>
  834. </Grid>
  835. </Grid>
  836. </Grid>
  837. </Grid>
  838. </Grid>
  839. <Grid item xs={12} lg={12}>
  840. <Grid container>
  841. <Stack direction="column">
  842. <Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}>
  843. <FormattedMessage id="verify" />
  844. <span style={{ color: '#f10000' }}>*</span>
  845. </Typography>
  846. <Stack spacing={1} direction="row">
  847. <Grid item xs={5} lg={5} style={{ "border": "1px solid black" }}>
  848. <img src={captchaImg} alt="" />
  849. </Grid>
  850. <Grid item xs={1} lg={1} style={{ "border": "0px solid black" }}>
  851. <IconButton aria-label="refrashCaptcha" size="large" onClick={() => { onCaptchaChange() }}>
  852. <LoopIcon fontSize="inherit" />
  853. </IconButton>
  854. </Grid>
  855. <Grid item xs={6} lg={6}>
  856. <OutlinedInput
  857. fullWidth
  858. id="captchaField"
  859. type="text"
  860. value={formik.values.captchaField.trim()}
  861. onBlur={formik.handleBlur}
  862. error={Boolean(formik.touched.captchaField && formik.errors.captchaField)}
  863. name="captchaField"
  864. onChange={(event) => {
  865. const value = event.target.value;
  866. props.setCheckCode(event.target.value);
  867. setCheckCode(event.target.value);
  868. formik.setFieldValue("captchaField", value);
  869. }}
  870. sx={{ width: '75%' }}
  871. />
  872. </Grid>
  873. </Stack>
  874. {formik.touched.captchaField && formik.errors.captchaField && (
  875. <FormHelperText error id="helper-text-captcha-signup">
  876. {formik.errors.captchaField}
  877. </FormHelperText>
  878. )}
  879. </Stack>
  880. </Grid>
  881. </Grid>
  882. </Grid>
  883. </Grid>
  884. </FormGroup>
  885. {/* Preview Form */}
  886. <FormGroup id={"previewForm"} sx={{ display: props.step === 1 ? "" : "none" }}>
  887. <Grid container spacing={3}>
  888. <Grid item xs={12} md={12}>
  889. <Stack direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}>
  890. <div style={{ borderBottom: "3px solid #1A4399", width: "100%", margin_right: "15px" }}>
  891. <Typography display="inline" variant="h3" sx={{ color: '#1A4399' }}>
  892. <FormattedMessage id="becomeNewPersonalUser" />
  893. </Typography>
  894. </div>
  895. </Stack>
  896. </Grid>
  897. <Grid item xs={12} md={12}>
  898. <Grid container spacing={2}>
  899. <Grid item xs={12} mt={1} mb={1}>
  900. <Stack direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}>
  901. <Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}>
  902. <FormattedMessage id="yourPersonalInformation" />
  903. </Typography>
  904. {/* <Typography component={Link} to="/login" variant="body1" sx={{ textDecoration: 'none' }} color="primary">
  905. Already have an account?
  906. </Typography> */}
  907. </Stack>
  908. </Grid>
  909. <Grid item xs={12} md={12} >
  910. <Stack direction="row">
  911. <Typography variant="h5" color={theme.palette.grey[600]} sx={{ mr: 1 }}>
  912. <FormattedMessage id="userIdDoc" />
  913. </Typography>
  914. <Typography variant="h5" name="preview-idDocType-1">
  915. {formik?.values?.idNo?.slice(0, 4)}
  916. {/* {formik.values.idNo + "(" + formik.values.checkDigit + ")"} */}
  917. </Typography>
  918. <Typography variant="h5" name="preview-idDocType-2">
  919. {showComId ? formik?.values?.idNo?.slice(4) : "****"}{showComId ? '(' + formik.values.checkDigit + ')' : null}
  920. {/* {formik.values.idNo + "(" + formik.values.checkDigit + ")"} */}
  921. </Typography>
  922. <IconButton
  923. aria-label="toggle id visibility"
  924. onClick={handleClickShowComId}
  925. onMouseDown={handleMouseDownComId}
  926. edge="end"
  927. size="medium"
  928. >
  929. {showComId ? <EyeOutlined /> : <EyeInvisibleOutlined />}
  930. </IconButton>
  931. </Stack>
  932. </Grid>
  933. <Grid item xs={12} md={6}>
  934. <Stack spacing={1} direction="row">
  935. <Typography variant="h5" color={theme.palette.grey[600]}>
  936. <FormattedMessage id="userEnglishName" />:
  937. </Typography>
  938. <Typography variant="h5" id="preview-enName-signup">
  939. {formik.values.enName}
  940. </Typography>
  941. {iAmSmartData.enName ? <img src={iAmSmartICon} alt="iAM Smart" width="25" /> : <></>}
  942. </Stack>
  943. </Grid>
  944. <Grid item xs={12} md={6}>
  945. <Stack spacing={1} direction="row">
  946. <Typography variant="h5" color={theme.palette.grey[600]}>
  947. <FormattedMessage id="userChineseName" />:
  948. </Typography>
  949. <Typography variant="h5" id="preview-chName-signup">
  950. {formik.values.chName}
  951. </Typography>
  952. </Stack>
  953. </Grid>
  954. <Grid item xs={12}>
  955. <Stack spacing={1} direction="column">
  956. <Typography variant="h5" color={theme.palette.grey[600]}>
  957. <FormattedMessage id="formAddress" />:
  958. </Typography>
  959. <Stack spacing={1} direction="column">
  960. <Typography variant="h5" id="preview-address1-signup">
  961. {formik.values.address1}
  962. </Typography>
  963. {formik.values.address2 != null ?
  964. <Typography variant="h5" id="preview-address2-signup">
  965. {formik.values.address2}
  966. </Typography>
  967. : null}
  968. {formik.values.address3 != null ?
  969. <Typography variant="h5" id="preview-address3-signup">
  970. {formik.values.address3}
  971. </Typography>
  972. : null}
  973. {selectedAddress5.type === "hongKong" ?
  974. <Stack direction="column">
  975. <Typography variant="h5" color={theme.palette.grey[600]} id="preview-address4-signup">
  976. <FormattedMessage id="region" />:
  977. </Typography>
  978. <Typography variant="h5">
  979. {!selectedAddress4 ? "" : intl.formatMessage({ id: selectedAddress4.type })}
  980. </Typography>
  981. </Stack>
  982. : null}
  983. <Stack direction="column">
  984. <Typography variant="h5" color={theme.palette.grey[600]} id="preview-address5-signup">
  985. <FormattedMessage id="regionOrCountry" />:
  986. </Typography>
  987. <Typography variant="h5">
  988. {intl.formatMessage({ id: selectedAddress5.type })}
  989. </Typography>
  990. </Stack>
  991. </Stack>
  992. </Stack>
  993. </Grid>
  994. <Grid item xs={12} mt={1} mb={1}>
  995. <Stack direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}>
  996. <Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}>
  997. <FormattedMessage id="yourContact" />
  998. </Typography>
  999. </Stack>
  1000. </Grid>
  1001. <Grid item xs={12} md={12}>
  1002. <Stack spacing={1} direction="row">
  1003. <Typography variant="h5" color={theme.palette.grey[600]}>
  1004. <FormattedMessage id="userContactEmail" />:
  1005. </Typography>
  1006. <Typography variant="h5" id="preview-email-signup">
  1007. {formik.values.email}
  1008. </Typography>
  1009. </Stack>
  1010. </Grid>
  1011. <Grid item xs={12} md={6}>
  1012. <Stack spacing={1} direction="row">
  1013. <Typography variant="h5" color={theme.palette.grey[600]}>
  1014. <FormattedMessage id="userContactNumber" />:
  1015. </Typography>
  1016. <Typography variant="h5" id="preview-phone-signup">
  1017. +{formik.values.phoneCountryCode} {formik.values.phone}
  1018. </Typography>
  1019. </Stack>
  1020. </Grid>
  1021. {formik.values.faxCountryCode != "" && formik.values.fax != "" ?
  1022. <Grid item xs={12} md={6}>
  1023. <Stack spacing={1} direction="row">
  1024. <Typography variant="h5" color={theme.palette.grey[600]}>
  1025. <FormattedMessage id="userFaxNumber" />:
  1026. </Typography>
  1027. <Typography variant="h5" id="preview-fax-signup">
  1028. +{formik.values.faxCountryCode} {formik.values.fax}
  1029. </Typography>
  1030. </Stack>
  1031. </Grid>
  1032. : null}
  1033. </Grid>
  1034. </Grid>
  1035. </Grid>
  1036. </FormGroup>
  1037. {/* Submit page */}
  1038. <FormGroup id={"submitForm"} sx={{ display: props.step === 2 ? "" : "none" }}>
  1039. <Grid container spacing={3}>
  1040. {isLoading ?
  1041. <LoadingComponent /> :
  1042. <Grid item xs={12}>
  1043. {checkUpload ?
  1044. // SUCCESS page
  1045. <Stack mt={1} direction="column" justifyContent="flex-start" alignItems="center" spacing={2}>
  1046. <CheckCircleOutlineIcon color="success" sx={{ width: "200px", height: "200px" }} />
  1047. <Typography display="inline" variant="h4">
  1048. <FormattedMessage id="registerSubmitted" />
  1049. </Typography>
  1050. <Typography display="inline" variant="h4">
  1051. <FormattedMessage id="emailSent" />
  1052. </Typography>
  1053. <Button variant="outlined" component={Link} to="/login" ><Typography variant="h5">
  1054. <FormattedMessage id="backToLogin" />
  1055. </Typography></Button>
  1056. </Stack>
  1057. :
  1058. // ERROR page
  1059. <Stack mt={1} direction="column" justifyContent="flex-start" alignItems="center" spacing={2}>
  1060. {/* <Button disabled={true} hidden={true} variant="contained" type="submit" sx={{ fontSize: 12,height:'25px'}}>Submit</Button> */}
  1061. <CancelOutlinedIcon color="error" sx={{ width: "200px", height: "200px" }} />
  1062. <Typography display="inline" variant="h4">
  1063. <FormattedMessage id="registerFail" />
  1064. </Typography>
  1065. <Button color="error" variant="outlined" component={Link} to="/login" ><Typography variant="h5">
  1066. <FormattedMessage id="backToLogin" />
  1067. </Typography></Button>
  1068. </Stack>
  1069. }
  1070. </Grid>
  1071. }
  1072. </Grid>
  1073. </FormGroup>
  1074. </form>
  1075. </FormikProvider>
  1076. );
  1077. }
  1078. export default CustomFormWizard;