@@ -12,6 +12,7 @@ import * as React from "react"; | |||
import * as ComboData from "utils/ComboData"; | |||
import * as DateUtils from "utils/DateUtils"; | |||
import * as FormatUtils from "utils/FormatUtils"; | |||
import {FormattedMessage} from "react-intl"; | |||
// ==============================|| DASHBOARD - DEFAULT ||============================== // | |||
@@ -215,7 +216,9 @@ const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData | |||
textTransform: 'capitalize', | |||
alignItems: 'end' | |||
}}> | |||
<Typography variant="h5">重置</Typography> | |||
<Typography variant="h5"> | |||
<FormattedMessage id="reset"/> | |||
</Typography> | |||
</Button> | |||
</Grid> | |||
@@ -56,8 +56,8 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||
tel_countryCode: yup.string().min(3, displayErrorMsg('請輸入國際區號')), | |||
phoneNumber: yup.string().min(8, displayErrorMsg('請輸入有效聯絡電話')).required(displayErrorMsg('請輸入聯絡電話')), | |||
faxNumber: yup.string().min(8, displayErrorMsg('請輸入8位數字')).nullable(), | |||
brExpiryDate: yup.string().min(8).required(displayErrorMsg('請輸入商業登記證有效日期')), | |||
brNo: yup.string().required(displayErrorMsg('請輸入商業登記證號碼')).test('checkBrNoFormat', displayErrorMsg(displayErrorMsg(`請輸入有效商業登記證號碼`)), function (value) { | |||
brExpiryDate: yup.string().min(8).required(displayErrorMsg(intl.formatMessage({id: 'pleaseFillInBusinessRegCertValidityDate'}))), | |||
brNo: yup.string().required(displayErrorMsg(intl.formatMessage({id: 'pleaseFillInBusinessRegCertNumber'}))).test('checkBrNoFormat', displayErrorMsg(displayErrorMsg(intl.formatMessage({id: 'pleaseFillInValidBusinessRegCertNumber'}))), function (value) { | |||
var brNo_pattern = /[0-9]{8}/ | |||
if (value !== undefined) { | |||
if (value.match(brNo_pattern)) { | |||
@@ -54,8 +54,9 @@ const OrganizationCard_loadFromUser = ({ userData, userId }) => { | |||
tel_countryCode: yup.string().min(3, displayErrorMsg("請輸入國際區號")), | |||
phoneNumber: yup.string().min(8, displayErrorMsg('請輸入有效聯絡電話')).required(displayErrorMsg('請輸入聯絡電話')), | |||
faxNumber: yup.string().min(8).nullable(), | |||
brExpiryDate: yup.string().min(8).required(displayErrorMsg('請輸入商業登記證有效日期')), | |||
brNo: yup.string().max(8).required(displayErrorMsg('請輸入商業登記證號碼')).test('checkBrNoFormat', displayErrorMsg(displayErrorMsg(`請輸入有效商業登記證號碼 (e.g. 12341234)`)), function (value) { | |||
brExpiryDate: yup.string().min(8).required(displayErrorMsg(intl.formatMessage({id: 'pleaseFillInBusinessRegCertValidityDate'}))), | |||
brNo: yup.string().max(8).required(displayErrorMsg(intl.formatMessage({id: 'pleaseFillInBusinessRegCertNumber'}))) | |||
.test('checkBrNoFormat', displayErrorMsg(displayErrorMsg(`${intl.formatMessage({id: 'pleaseFillInValidBusinessRegCertNumber'})} (e.g. 12341234)`)), function (value) { | |||
var brNo_pattern = /[0-9]{8}/ | |||
if (value !== undefined) { | |||
if (value.size==8 && value.match(brNo_pattern)) { | |||
@@ -13,6 +13,7 @@ import * as DateUtils from "utils/DateUtils"; | |||
import * as ComboData from "utils/ComboData"; | |||
import {PNSPS_BUTTON_THEME} from "../../../themes/buttonConst"; | |||
import {ThemeProvider} from "@emotion/react"; | |||
import {FormattedMessage} from "react-intl"; | |||
// ==============================|| DASHBOARD - DEFAULT ||============================== // | |||
@@ -182,7 +183,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||
variant="contained" | |||
onClick={resetForm} | |||
> | |||
重置 | |||
<FormattedMessage id="reset"/> | |||
</Button> | |||
</Grid> | |||
@@ -14,6 +14,7 @@ import * as DateUtils from "utils/DateUtils"; | |||
import * as FormatUtils from "utils/FormatUtils"; | |||
import {PNSPS_BUTTON_THEME} from "../../../themes/buttonConst"; | |||
import {ThemeProvider} from "@emotion/react"; | |||
import {FormattedMessage} from "react-intl"; | |||
// ==============================|| DASHBOARD - DEFAULT ||============================== // | |||
@@ -275,7 +276,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, issueComboData | |||
variant="contained" | |||
onClick={resetForm} | |||
> | |||
重置 | |||
<FormattedMessage id="reset"/> | |||
</Button> | |||
</Grid> | |||
@@ -15,6 +15,7 @@ import { | |||
} from "utils/Utils"; | |||
import {PNSPS_BUTTON_THEME} from "../../../themes/buttonConst"; | |||
import {ThemeProvider} from "@emotion/react"; | |||
import {FormattedMessage} from "react-intl"; | |||
// ==============================|| DASHBOARD - DEFAULT ||============================== // | |||
@@ -212,7 +213,9 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||
variant="contained" | |||
onClick={resetForm} | |||
> | |||
<Typography variant="pnspsButtonText">重置</Typography> | |||
<Typography variant="pnspsButtonText"> | |||
<FormattedMessage id="reset"/> | |||
</Typography> | |||
</Button> | |||
</Grid> | |||
@@ -58,8 +58,9 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => | |||
fax_countryCode: yup.string().min(3, displayErrorMsg('請輸入3位數字')).nullable(), | |||
phoneNumber: yup.string().min(8, displayErrorMsg('請輸入8位數字')).required(displayErrorMsg('請輸入聯絡電話')), | |||
faxNumber: yup.string().min(8, displayErrorMsg('請輸入8位數字')).nullable(), | |||
brExpiryDate: yup.string().min(8, displayErrorMsg('請輸入商業登記證有效日期')), | |||
brNo: yup.string().max(8).required(displayErrorMsg('請輸入商業登記證號碼')).test('checkBrNoFormat', displayErrorMsg(`請輸入有效商業登記證號碼 (e.g. 12341234)`), function (value) { | |||
brExpiryDate: yup.string().min(8, displayErrorMsg(intl.formatMessage({id: 'pleaseFillInBusinessRegCertValidityDate'}))), | |||
brNo: yup.string().max(8).required(displayErrorMsg(intl.formatMessage({id: 'pleaseFillInBusinessRegCertNumber'}))) | |||
.test('checkBrNoFormat', displayErrorMsg(`${intl.formatMessage({id: 'pleaseFillInValidBusinessRegCertNumber'})} (e.g. 12341234)`), function (value) { | |||
var brNo_pattern = /[0-9]{8}/ | |||
if (value !== undefined) { | |||
if (value.match(brNo_pattern)) { | |||
@@ -23,12 +23,11 @@ const AuthWrapper = Loadable(lazy(() => import('./AuthWrapperCustom'))); | |||
import axios from "axios"; | |||
import { GET_USERNAME, POST_VERIFY_CAPTCHA } from "utils/ApiPathConst"; | |||
import {useTheme} from "@emotion/react"; | |||
import {useIntl} from "react-intl"; | |||
// import CustomFormWizard from './auth-forms/BusCustomFormWizard'; | |||
// import AuthWrapper from './AuthWrapperCustom'; | |||
// ================================|| REGISTER ||================================ // | |||
const steps = ['個人資料', '預覽', '完成提交']; | |||
const BusRegister = () => { | |||
const [activeStep, setActiveStep] = useState(0); | |||
const [completed, setCompleted] = useState([false]); | |||
@@ -37,6 +36,13 @@ const BusRegister = () => { | |||
const [base64Url, setBase64Url] = useState("") | |||
const [checkCode, setCheckCode] = useState("") | |||
const theme = useTheme(); | |||
const intl = useIntl(); | |||
const steps = [ | |||
intl.formatMessage({id: 'personalInformation'}), | |||
intl.formatMessage({id: 'preview'}), | |||
intl.formatMessage({id: 'finishSubmission'}) | |||
]; | |||
const stepStyle = { | |||
[theme.breakpoints.up('lg')]: { | |||
width: '40%', | |||
@@ -22,6 +22,7 @@ import Loadable from 'components/Loadable'; | |||
import { lazy } from 'react'; | |||
import { notifyActionError } from 'utils/CommonFunction'; | |||
import axios from "axios"; | |||
import {useIntl} from "react-intl"; | |||
const CustomFormWizard = Loadable(lazy(() => import('./auth-forms/IAmSmartFormWizard'))); | |||
const AuthWrapper = Loadable(lazy(() => import('./AuthWrapperCustom'))); | |||
// ================================|| REGISTER ||================================ // | |||
@@ -49,7 +50,6 @@ const stepStyle = { | |||
} | |||
} | |||
} | |||
const steps = ['個人資料', '預覽', '完成提交']; | |||
const Register = () => { | |||
const [activeStep, setActiveStep] = useState(0); | |||
@@ -58,6 +58,12 @@ const Register = () => { | |||
const [base64Url, setBase64Url] = useState("") | |||
const [checkCode, setCheckCode] = useState("") | |||
const [idNo, setIdNo] = useState(""); | |||
const intl = useIntl(); | |||
const steps = [ | |||
intl.formatMessage({id: 'personalInformation'}), | |||
intl.formatMessage({id: 'preview'}), | |||
intl.formatMessage({id: 'finishSubmission'}) | |||
]; | |||
const totalSteps = () => { | |||
return steps.length; | |||
@@ -23,12 +23,11 @@ import { lazy } from 'react'; | |||
import { notifyActionError } from 'utils/CommonFunction'; | |||
import axios from "axios"; | |||
import {useTheme} from "@emotion/react"; | |||
import {useIntl} from "react-intl"; | |||
const CustomFormWizard = Loadable(lazy(() => import('./auth-forms/CustomFormWizard'))); | |||
const AuthWrapper = Loadable(lazy(() => import('./AuthWrapperCustom'))); | |||
// ================================|| REGISTER ||================================ // | |||
const steps = ['個人資料', '預覽', '完成提交']; | |||
const Register = () => { | |||
const [activeStep, setActiveStep] = useState(0); | |||
const [completed, setCompleted] = useState([false]); | |||
@@ -37,6 +36,13 @@ const Register = () => { | |||
const [base64Url, setBase64Url] = useState("") | |||
const [checkCode, setCheckCode] = useState("") | |||
const theme = useTheme(); | |||
const intl = useIntl(); | |||
const steps = [ | |||
intl.formatMessage({id: 'personalInformation'}), | |||
intl.formatMessage({id: 'preview'}), | |||
intl.formatMessage({id: 'finishSubmission'}) | |||
]; | |||
const stepStyle = { | |||
[theme.breakpoints.up('lg')]: { | |||
width: '40%', | |||
@@ -505,7 +505,7 @@ const BusCustomFormWizard = (props) => { | |||
.matches(/^(?=.*[A-Z])/, { message: displayErrorMsg('請包括最少1個大寫字母') }) | |||
.matches(/^(?=.*[0-9])/, { message: displayErrorMsg('請包括最少1個數字') }) | |||
.matches(/^(?=.*[!@#%&])/, { message: displayErrorMsg('請包括最少1個特殊字符') }), | |||
confirmPassword: yup.string().min(8, displayErrorMsg('請最少輸入8位密碼')).required(displayErrorMsg('請確認密碼')).oneOf([yup.ref('password'), null], displayErrorMsg('請輸入相同密碼')), | |||
confirmPassword: yup.string().min(8, displayErrorMsg('請最少輸入8位密碼')).required(displayErrorMsg(intl.formatMessage({id: 'pleaseConfirmPassword'}))).oneOf([yup.ref('password'), null], displayErrorMsg('請輸入相同密碼')), | |||
enName: yup.string().max(255).required(displayErrorMsg('請輸入英文姓名')), | |||
enCompanyName: yup.string().matches(/^[^$^*()]+$/, { message: displayErrorMsg('No special characters $/^/*/(/)') }).when('chCompanyName', { | |||
is: (chCompanyName) => !chCompanyName || chCompanyName.length === 0, | |||
@@ -525,8 +525,10 @@ const BusCustomFormWizard = (props) => { | |||
faxCountryCode: yup.string().min(2, displayErrorMsg('請輸入最少2位數字')), | |||
phone: yup.string().min(8, displayErrorMsg('請輸入最少8位數字')).required(displayErrorMsg('請輸入聯絡電話')), | |||
fax: yup.string().min(8, displayErrorMsg('請輸入最少8位數字')), | |||
brExpiryDate: yup.date().min(new Date().toISOString().split("T")[0], displayErrorMsg('請輸入商業登記證有效日期')).max("2099-12-31", displayErrorMsg('請輸入商業登記證有效日期')).required(displayErrorMsg('請輸入商業登記證有效日期')), | |||
brNo: yup.string().max(8).required(displayErrorMsg('請輸入商業登記證號碼')).test('checkBrNoFormat', displayErrorMsg(`請輸入有效商業登記證號碼 (e.g. 12341234)`), function (value) { | |||
brExpiryDate: yup.date().min(new Date().toISOString().split("T")[0], displayErrorMsg(intl.formatMessage({id: 'pleaseFillInBusinessRegCertValidityDate'}))) | |||
.max("2099-12-31", displayErrorMsg(intl.formatMessage({id: 'pleaseFillInBusinessRegCertValidityDate'}))). | |||
required(displayErrorMsg(intl.formatMessage({id: 'pleaseFillInBusinessRegCertValidityDate'}))), | |||
brNo: yup.string().max(8).required(displayErrorMsg(intl.formatMessage({id: 'pleaseFillInBusinessRegCertNumber'}))).test('checkBrNoFormat', displayErrorMsg(`${intl.formatMessage({id: 'pleaseFillInValidBusinessRegCertNumber'})} (e.g. 12341234)`), function (value) { | |||
// var brNo_pattern = /[0-9]{8}-[0-9]{3}-(0[1-9]|1[012])-[0-9]{2}-[0-9A-Z]{1}/ | |||
var brNo_pattern = /[0-9]{8}/ | |||
if (value !== undefined) { | |||
@@ -565,14 +567,20 @@ const BusCustomFormWizard = (props) => { | |||
<Grid container spacing={3}> | |||
<Grid item xs={12} md={12}> | |||
<Stack direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}> | |||
<Button variant="outlined" type="reset" onClick={handleReset.bind(null, formik.resetForm)} sx={{ height: '40px' }}><Typography variant="pnspsFormHeader">重置</Typography></Button> | |||
<Button variant="outlined" type="reset" onClick={handleReset.bind(null, formik.resetForm)} sx={{ height: '40px' }}><Typography variant="pnspsFormHeader"> | |||
<FormattedMessage id="reset"/> | |||
</Typography></Button> | |||
<div style={{ borderBottom: "3px solid #1A4399", width: "100%", margin_right: "15px" }}> | |||
<Typography display="inline" variant="h3" sx={{ color: '#1A4399' }}> | |||
<FormattedMessage id="becomeNewBusinessUser"/> | |||
</Typography> | |||
</div> | |||
<Typography mt={0.25} variant="h6" sx={{ color: '#f10000' }}>註有*的項目必須輸入資料</Typography> | |||
<Typography mt={0.25} variant="h4" sx={{ color: 'primary.primary' }}>你的登入資料</Typography> | |||
<Typography mt={0.25} variant="h6" sx={{ color: '#f10000' }}> | |||
<FormattedMessage id="requireString"/> | |||
</Typography> | |||
<Typography mt={0.25} variant="h4" sx={{ color: 'primary.primary' }}> | |||
<FormattedMessage id="yourLoginInformation"/> | |||
</Typography> | |||
{/* <Typography component={Link} to="/login" variant="body1" sx={{ textDecoration: 'none' }} color="primary"> | |||
Already have an account? | |||
</Typography> */} | |||
@@ -697,7 +705,7 @@ const BusCustomFormWizard = (props) => { | |||
<Stack spacing={1}> | |||
<InputLabel htmlFor="confirmPassword-signup"> | |||
<Typography variant="pnspsFormHeader"> | |||
確認密碼 | |||
<FormattedMessage id="confirmPassword"/> | |||
<span style={{ color: '#f10000' }}>*</span> | |||
</Typography> | |||
</InputLabel> | |||
@@ -731,7 +739,7 @@ const BusCustomFormWizard = (props) => { | |||
</IconButton> | |||
</InputAdornment> | |||
} | |||
placeholder="確認密碼" | |||
placeholder={intl.formatMessage({id: 'confirmPassword'})} | |||
fullWidth | |||
error={Boolean(formik.touched.confirmPassword && formik.errors.confirmPassword)} | |||
/> | |||
@@ -756,7 +764,9 @@ const BusCustomFormWizard = (props) => { | |||
</Grid> | |||
<Grid item xs={12} mt={1} mb={1}> | |||
<Stack direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}> | |||
<Typography display="inline" variant="h4" /*sx={{ color: '#1A4399' }}*/>你的機構/公司資料</Typography> | |||
<Typography display="inline" variant="h4" /*sx={{ color: '#1A4399' }}*/> | |||
<FormattedMessage id="yourBusinessInformation"/> | |||
</Typography> | |||
{/* <Typography component={Link} to="/login" variant="body1" sx={{ textDecoration: 'none' }} color="primary"> | |||
Already have an account? | |||
</Typography> */} | |||
@@ -765,15 +775,14 @@ const BusCustomFormWizard = (props) => { | |||
<Grid item xs={12} md={12}> | |||
<Typography variant="subtitle1"> | |||
•請輸入機構/公司英文名稱或中文名稱<br /> | |||
•Please enter the English/Chinese name of the organisation/company | |||
•<FormattedMessage id="pleaseEnterOrgOrCompName"/> | |||
</Typography> | |||
</Grid> | |||
<Grid item xs={12} md={6}> | |||
<Stack spacing={1}> | |||
<InputLabel htmlFor="enCompanyName-signup"> | |||
<Typography variant="pnspsFormHeader"> | |||
機構/公司英文名稱 | |||
<FormattedMessage id="businessEngName"/> | |||
</Typography> | |||
</InputLabel> | |||
<OutlinedInput | |||
@@ -782,7 +791,7 @@ const BusCustomFormWizard = (props) => { | |||
value={formik.values.enCompanyName} | |||
name="enCompanyName" | |||
onChange={formik.handleChange} | |||
placeholder="與商業登記證相同" | |||
placeholder={intl.formatMessage({id: 'sameAsBusinessRegistrationCert'})} | |||
fullWidth | |||
error={Boolean(formik.touched.enCompanyName && formik.errors.enCompanyName && selectedAddress5 !== "內地")} | |||
onBlur={formik.handleBlur} | |||
@@ -805,7 +814,7 @@ const BusCustomFormWizard = (props) => { | |||
<Stack spacing={1}> | |||
<InputLabel htmlFor="chCompanyName-signup"> | |||
<Typography variant="pnspsFormHeader"> | |||
機構/公司中文名稱 | |||
<FormattedMessage id="businessChName"/> | |||
</Typography> | |||
</InputLabel> | |||
<OutlinedInput | |||
@@ -816,7 +825,7 @@ const BusCustomFormWizard = (props) => { | |||
value={formik.values.chCompanyName.trim()} | |||
name="chCompanyName" | |||
onChange={formik.handleChange} | |||
placeholder="與商業登記證相同" | |||
placeholder={intl.formatMessage({id: 'sameAsBusinessRegistrationCert'})} | |||
onBlur={formik.handleBlur} | |||
inputProps={{ | |||
onKeyDown: (e) => { | |||
@@ -837,7 +846,7 @@ const BusCustomFormWizard = (props) => { | |||
<Stack spacing={1}> | |||
<InputLabel htmlFor="brNo-signup" sx={{ whiteSpace: 'pre-wrap', wordWrap: 'break-word' }}> | |||
<Typography variant="pnspsFormHeader"> | |||
商業登記證號碼 (e.g. 12341234) | |||
<FormattedMessage id="businessRegCertNumber"/> (e.g. 12341234) | |||
<span style={{ color: '#f10000' }}>*</span> | |||
</Typography> | |||
</InputLabel> | |||
@@ -850,7 +859,7 @@ const BusCustomFormWizard = (props) => { | |||
name="brNo" | |||
onChange={formik.handleChange} | |||
onBlur={formik.handleBlur} | |||
placeholder="與商業登記證相同" | |||
placeholder={intl.formatMessage({id: 'sameAsBusinessRegistrationCert'})} | |||
inputProps={{ | |||
onKeyDown: (e) => { | |||
if (e.key === 'Enter') { | |||
@@ -870,7 +879,7 @@ const BusCustomFormWizard = (props) => { | |||
<Stack spacing={1}> | |||
<InputLabel htmlFor="brExpiryDate-signup"> | |||
<Typography variant="pnspsFormHeader"> | |||
商業登記證有效日期 | |||
<FormattedMessage id="businessRegCertValidityDate"/> | |||
<span style={{ color: '#f10000' }}>*</span> | |||
</Typography> | |||
</InputLabel> | |||
@@ -883,7 +892,7 @@ const BusCustomFormWizard = (props) => { | |||
name="brExpiryDate" | |||
onChange={formik.handleChange} | |||
onBlur={formik.handleBlur} | |||
placeholder="與商業登記證相同" | |||
placeholder={intl.formatMessage({id: 'sameAsBusinessRegistrationCert'})} | |||
inputProps={{ | |||
max: "2099-12-31", | |||
min: new Date().toISOString().split("T")[0], | |||
@@ -905,7 +914,7 @@ const BusCustomFormWizard = (props) => { | |||
<Stack spacing={1}> | |||
<InputLabel htmlFor="address1-signup"> | |||
<Typography variant="pnspsFormHeader"> | |||
地址 | |||
<FormattedMessage id="formAddress"/> | |||
<span style={{ color: '#f10000' }}>*</span> | |||
</Typography> | |||
</InputLabel> | |||
@@ -916,7 +925,7 @@ const BusCustomFormWizard = (props) => { | |||
value={formik.values.address1} | |||
name="address1" | |||
onChange={formik.handleChange} | |||
placeholder="第一行" | |||
placeholder={intl.formatMessage({id: 'addressLine1'})} | |||
onBlur={formik.handleBlur} | |||
inputProps={{ | |||
onKeyDown: (e) => { | |||
@@ -933,7 +942,7 @@ const BusCustomFormWizard = (props) => { | |||
value={formik.values.address2} | |||
name="address2" | |||
onChange={formik.handleChange} | |||
placeholder="第二行" | |||
placeholder={intl.formatMessage({id: 'addressLine2'})} | |||
inputProps={{ | |||
onKeyDown: (e) => { | |||
if (e.key === 'Enter') { | |||
@@ -949,7 +958,7 @@ const BusCustomFormWizard = (props) => { | |||
value={formik.values.address3} | |||
name="address3" | |||
onChange={formik.handleChange} | |||
placeholder="第三行" | |||
placeholder={intl.formatMessage({id: 'addressLine3'})} | |||
inputProps={{ | |||
onKeyDown: (e) => { | |||
if (e.key === 'Enter') { | |||
@@ -968,7 +977,9 @@ const BusCustomFormWizard = (props) => { | |||
setSelectedAddress4(newValue); | |||
}} | |||
sx={{ "& .MuiInputBase-root": { height: "41px" }, "#address4-combo": { padding: "0px 0px 0px 3px" }, "& .MuiAutocomplete-endAdornment": { top: "auto" }, }} | |||
renderInput={(params) => <TextField {...params} placeholder="區域 (只適用於香港)" />} | |||
renderInput={(params) => <TextField {...params} | |||
placeholder={intl.formatMessage({id: 'region'})} | |||
/>} | |||
/> | |||
<Autocomplete | |||
disablePortal | |||
@@ -1414,7 +1425,9 @@ const BusCustomFormWizard = (props) => { | |||
</Typography> | |||
</div> | |||
{/* <Typography mt={0.25} variant="h6" sx={{ fontSize: 12,color: '#f10000'}}>註有*的項目必須輸入資料</Typography> */} | |||
<Typography mt={0.25} variant="h4" sx={{ color: 'primary.primary' }}>你的登入資料</Typography> | |||
<Typography mt={0.25} variant="h4" sx={{ color: 'primary.primary' }}> | |||
<FormattedMessage id="yourLoginInformation"/> | |||
</Typography> | |||
{/* <Typography component={Link} to="/login" variant="body1" sx={{ textDecoration: 'none' }} color="primary"> | |||
Already have an account? | |||
</Typography> */} | |||
@@ -1434,7 +1447,9 @@ const BusCustomFormWizard = (props) => { | |||
</Grid> | |||
<Grid item xs={12} mt={1} mb={1}> | |||
<Stack direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}> | |||
<Typography display="inline" variant="h4" /*sx={{ color: '#1A4399' }}*/>你的機構/公司資料</Typography> | |||
<Typography display="inline" variant="h4" /*sx={{ color: '#1A4399' }}*/> | |||
<FormattedMessage id="yourBusinessInformation"/> | |||
</Typography> | |||
{/* <Typography component={Link} to="/login" variant="body1" sx={{ textDecoration: 'none' }} color="primary"> | |||
Already have an account? | |||
</Typography> */} | |||
@@ -1444,7 +1459,7 @@ const BusCustomFormWizard = (props) => { | |||
<Grid item xs={12} md={6}> | |||
<Stack spacing={1} direction="row"> | |||
<Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | |||
機構/公司英文名稱: | |||
<FormattedMessage id="businessEngName"/>: | |||
</Typography> | |||
<Typography variant="pnspsFormHeader" id="preview-enCompanyName-signup"> | |||
{formik.values.enCompanyName} | |||
@@ -1454,7 +1469,7 @@ const BusCustomFormWizard = (props) => { | |||
<Grid item xs={12} md={6}> | |||
<Stack spacing={1} direction="row"> | |||
<Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | |||
機構/公司中文名稱: | |||
<FormattedMessage id="businessChName"/>: | |||
</Typography> | |||
<Typography variant="pnspsFormHeader" id="preview-chCompanyName-signup"> | |||
{formik.values.chCompanyName} | |||
@@ -1473,7 +1488,7 @@ const BusCustomFormWizard = (props) => { | |||
<Grid item xs={12} md={6}> | |||
<Stack spacing={1} direction="row"> | |||
<Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | |||
商業登記證號碼: | |||
<FormattedMessage id="businessRegCertNumber"/>: | |||
</Typography> | |||
<Typography variant="pnspsFormHeader" id="brNo-login"> | |||
{formik.values.brNo} | |||
@@ -1483,7 +1498,7 @@ const BusCustomFormWizard = (props) => { | |||
<Grid item xs={12} md={6}> | |||
<Stack spacing={1} direction="row"> | |||
<Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | |||
商業登記證有效日期: | |||
<FormattedMessage id="businessRegCertValidityDate"/>: | |||
</Typography> | |||
<Typography variant="pnspsFormHeader" id="brExpiryDate-login"> | |||
{formik.values.brExpiryDate} | |||
@@ -1494,7 +1509,7 @@ const BusCustomFormWizard = (props) => { | |||
<Grid item xs={12}> | |||
<Stack spacing={1} direction="row"> | |||
<Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | |||
地址: | |||
<FormattedMessage id="formAddress"/>: | |||
</Typography> | |||
<Stack spacing={1} direction="column"> | |||
<Typography variant="pnspsFormHeader" id="preview-address1-signup"> | |||
@@ -1513,7 +1528,7 @@ const BusCustomFormWizard = (props) => { | |||
{selectedAddress5 === "香港" ? | |||
<Stack direction="row"> | |||
<Typography variant="pnspsFormHeader" color={theme.palette.grey[600]} id="preview-address4-signup"> | |||
區域 (只適用於香港): | |||
<FormattedMessage id="region"/>: | |||
</Typography> | |||
<Typography variant="pnspsFormHeader"> | |||
{selectedAddress4} | |||
@@ -563,7 +563,7 @@ const CustomFormWizard = (props) => { | |||
.matches(/^(?=.*[A-Z])/, { message: displayErrorMsg('請包括最少1個大寫字母') }) | |||
.matches(/^(?=.*[0-9])/, { message: displayErrorMsg('請包括最少1個數字') }) | |||
.matches(/^(?=.*[!@#%&])/, { message: displayErrorMsg('請包括最少1個特殊字符') }), | |||
confirmPassword: yup.string().min(8, displayErrorMsg('請最少輸入8位密碼')).required(displayErrorMsg('請確認密碼')).oneOf([yup.ref('password'), null], displayErrorMsg('請輸入相同密碼')), | |||
confirmPassword: yup.string().min(8, displayErrorMsg('請最少輸入8位密碼')).required(displayErrorMsg(intl.formatMessage({id: 'pleaseConfirmPassword'}))).oneOf([yup.ref('password'), null], displayErrorMsg('請輸入相同密碼')), | |||
enName: yup.string().max(255).required(displayErrorMsg('請輸入英文姓名')), | |||
chName: yup.string().max(6).required(displayErrorMsg('請輸入中文姓名')), | |||
address1: yup.string().max(255).required(displayErrorMsg('請輸入第一行地址')), | |||
@@ -662,14 +662,22 @@ const CustomFormWizard = (props) => { | |||
<Grid container spacing={3}> | |||
<Grid item xs={12} md={12}> | |||
<Stack direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}> | |||
<Button variant="outlined" type="reset" onClick={handleReset.bind(null, formik.resetForm)} sx={{ height: '40px' }}><Typography variant="pnspsFormHeader">重置</Typography></Button> | |||
<Button variant="outlined" type="reset" onClick={handleReset.bind(null, formik.resetForm)} sx={{ height: '40px' }}> | |||
<Typography variant="pnspsFormHeader"> | |||
<FormattedMessage id="reset"/> | |||
</Typography> | |||
</Button> | |||
<div style={{ borderBottom: "3px solid #1A4399", width: "100%", margin_right: "15px" }}> | |||
<Typography display="inline" variant="h3" sx={{ color: '#1A4399' }}> | |||
<FormattedMessage id="becomeNewPersonalUser"/> | |||
</Typography> | |||
</div> | |||
<Typography mt={0.25} variant="h6" sx={{ color: '#f10000' }}>註有*的項目必須輸入資料</Typography> | |||
<Typography mt={0.25} variant="h4" sx={{ color: 'primary.primary' }}>你的登入資料</Typography> | |||
<Typography mt={0.25} variant="h6" sx={{ color: '#f10000' }}> | |||
<FormattedMessage id="requireString"/> | |||
</Typography> | |||
<Typography mt={0.25} variant="h4" sx={{ color: 'primary.primary' }}> | |||
<FormattedMessage id="yourLoginInformation"/> | |||
</Typography> | |||
</Stack> | |||
</Grid> | |||
<Grid item xs={12} md={12}> | |||
@@ -791,7 +799,7 @@ const CustomFormWizard = (props) => { | |||
<Stack spacing={1}> | |||
<InputLabel htmlFor="confirmPassword-signup"> | |||
<Typography variant="pnspsFormHeader"> | |||
確認密碼 | |||
<FormattedMessage id="confirmPassword"/> | |||
<span style={{ color: '#f10000' }}>*</span> | |||
</Typography> | |||
</InputLabel> | |||
@@ -825,7 +833,7 @@ const CustomFormWizard = (props) => { | |||
</IconButton> | |||
</InputAdornment> | |||
} | |||
placeholder="確認密碼" | |||
placeholder={intl.formatMessage({id: 'confirmPassword'})} | |||
fullWidth | |||
error={Boolean(formik.touched.confirmPassword && formik.errors.confirmPassword)} | |||
/> | |||
@@ -850,7 +858,9 @@ const CustomFormWizard = (props) => { | |||
</Grid> | |||
<Grid item xs={12} mt={1} mb={1}> | |||
<Stack direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}> | |||
<Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}>你的個人資料</Typography> | |||
<Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}> | |||
<FormattedMessage id="yourPersonalInformation"/> | |||
</Typography> | |||
{/* <Typography component={Link} to="/login" variant="body1" sx={{ textDecoration: 'none' }} color="primary"> | |||
Already have an account? | |||
</Typography> */} | |||
@@ -1109,7 +1119,7 @@ const CustomFormWizard = (props) => { | |||
<Stack spacing={1}> | |||
<InputLabel htmlFor="address1-signup"> | |||
<Typography variant="pnspsFormHeader"> | |||
地址 | |||
<FormattedMessage id="formAddress"/> | |||
<span style={{ color: '#f10000' }}>*</span> | |||
</Typography> | |||
</InputLabel> | |||
@@ -1120,7 +1130,7 @@ const CustomFormWizard = (props) => { | |||
value={formik.values.address1} | |||
name="address1" | |||
onChange={formik.handleChange} | |||
placeholder="第一行" | |||
placeholder={intl.formatMessage({id: 'addressLine1'})} | |||
onBlur={formik.handleBlur} | |||
inputProps={{ | |||
onKeyDown: (e) => { | |||
@@ -1137,7 +1147,7 @@ const CustomFormWizard = (props) => { | |||
value={formik.values.address2} | |||
name="address2" | |||
onChange={formik.handleChange} | |||
placeholder="第二行" | |||
placeholder={intl.formatMessage({id: 'addressLine2'})} | |||
inputProps={{ | |||
onKeyDown: (e) => { | |||
if (e.key === 'Enter') { | |||
@@ -1153,7 +1163,7 @@ const CustomFormWizard = (props) => { | |||
value={formik.values.address3} | |||
name="address3" | |||
onChange={formik.handleChange} | |||
placeholder="第三行" | |||
placeholder={intl.formatMessage({id: 'addressLine3'})} | |||
inputProps={{ | |||
onKeyDown: (e) => { | |||
if (e.key === 'Enter') { | |||
@@ -1172,7 +1182,8 @@ const CustomFormWizard = (props) => { | |||
setSelectedAddress4(newValue); | |||
}} | |||
sx={{ "& .MuiInputBase-root": { height: "41px" }, "#address4-combo": { padding: "0px 0px 0px 3px" }, "& .MuiAutocomplete-endAdornment": { top: "auto" }, }} | |||
renderInput={(params) => <TextField {...params} placeholder="區域 (只適用於香港)" />} | |||
renderInput={(params) => <TextField {...params} placeholder={intl.formatMessage({id: 'region'})} | |||
/>} | |||
/> | |||
<Autocomplete | |||
disablePortal | |||
@@ -1584,7 +1595,9 @@ const CustomFormWizard = (props) => { | |||
</Typography> | |||
</div> | |||
{/* <Typography mt={0.25} variant="h6" sx={{ fontSize: 12,color: '#f10000'}}>註有*的項目必須輸入資料</Typography> */} | |||
<Typography mt={0.25} variant="h4" sx={{ color: 'primary.primary' }}>你的登入資料</Typography> | |||
<Typography mt={0.25} variant="h4" sx={{ color: 'primary.primary' }}> | |||
<FormattedMessage id="yourLoginInformation"/> | |||
</Typography> | |||
{/* <Typography component={Link} to="/login" variant="body1" sx={{ textDecoration: 'none' }} color="primary"> | |||
Already have an account? | |||
</Typography> */} | |||
@@ -1604,7 +1617,9 @@ const CustomFormWizard = (props) => { | |||
</Grid> | |||
<Grid item xs={12} mt={1} mb={1}> | |||
<Stack direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}> | |||
<Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}>你的個人資料</Typography> | |||
<Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}> | |||
<FormattedMessage id="yourPersonalInformation"/> | |||
</Typography> | |||
{/* <Typography component={Link} to="/login" variant="body1" sx={{ textDecoration: 'none' }} color="primary"> | |||
Already have an account? | |||
</Typography> */} | |||
@@ -1662,7 +1677,7 @@ const CustomFormWizard = (props) => { | |||
<Grid item xs={12}> | |||
<Stack spacing={1} direction="row"> | |||
<Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | |||
地址: | |||
<FormattedMessage id="formAddress"/>: | |||
</Typography> | |||
<Stack spacing={1} direction="column"> | |||
<Typography variant="pnspsFormHeader" id="preview-address1-signup"> | |||
@@ -1681,7 +1696,7 @@ const CustomFormWizard = (props) => { | |||
{selectedAddress5 == ("香港") ? | |||
<Stack direction="row"> | |||
<Typography variant="pnspsFormHeader" color={theme.palette.grey[600]} id="preview-address4-signup"> | |||
區域 (只適用於香港): | |||
<FormattedMessage id="region"/>: | |||
</Typography> | |||
<Typography variant="pnspsFormHeader">{selectedAddress4}</Typography> | |||
</Stack> | |||
@@ -397,7 +397,9 @@ const CustomFormWizard = (props) => { | |||
</Typography><img src={iAmSmartICon} alt="iAM Smart" width="50" /> | |||
</div> | |||
<Typography mt={0.25} variant="h6" sx={{ color: '#f10000' }}>註有*的項目必須輸入資料。</Typography> | |||
<Typography mt={0.25} variant="h6" sx={{ color: '#f10000' }}> | |||
<FormattedMessage id="requireString"/>。 | |||
</Typography> | |||
<Stack mt={1} direction="row" style={{ alignItems: "center" }}><img src={iAmSmartICon} alt="iAM Smart" width="25" /><Typography mt={0.25} variant="h6" >: 表示該項由「智方便」提供。</Typography></Stack> | |||
</Stack> | |||
@@ -406,7 +408,9 @@ const CustomFormWizard = (props) => { | |||
<Grid container spacing={1}> | |||
<Grid item xs={12} mt={1} mb={1}> | |||
<Stack direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}> | |||
<Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}>你的個人資料</Typography> | |||
<Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}> | |||
<FormattedMessage id="yourPersonalInformation"/> | |||
</Typography> | |||
</Stack> | |||
</Grid> | |||
<Grid item xs={12} md={12} > | |||
@@ -443,7 +447,7 @@ const CustomFormWizard = (props) => { | |||
<Stack spacing={1}> | |||
<InputLabel htmlFor="address1-signup"> | |||
<Typography variant="h5"> | |||
地址 | |||
<FormattedMessage id="formAddress"/> | |||
<span style={{ color: '#f10000' }}>*</span> | |||
{iAmSmartData.address1?<img src={iAmSmartICon} alt="iAM Smart" width="25" />:null} | |||
</Typography> | |||
@@ -455,7 +459,7 @@ const CustomFormWizard = (props) => { | |||
value={formik.values.address1} | |||
name="address1" | |||
onChange={formik.handleChange} | |||
placeholder="第一行" | |||
placeholder={intl.formatMessage({id: 'addressLine1'})} | |||
onBlur={formik.handleBlur} | |||
inputProps={{ | |||
onKeyDown: (e) => { | |||
@@ -472,7 +476,7 @@ const CustomFormWizard = (props) => { | |||
value={formik.values.address2} | |||
name="address2" | |||
onChange={formik.handleChange} | |||
placeholder="第二行" | |||
placeholder={intl.formatMessage({id: 'addressLine2'})} | |||
inputProps={{ | |||
onKeyDown: (e) => { | |||
if (e.key === 'Enter') { | |||
@@ -488,7 +492,7 @@ const CustomFormWizard = (props) => { | |||
value={formik.values.address3} | |||
name="address3" | |||
onChange={formik.handleChange} | |||
placeholder="第三行" | |||
placeholder={intl.formatMessage({id: 'addressLine3'})} | |||
inputProps={{ | |||
onKeyDown: (e) => { | |||
if (e.key === 'Enter') { | |||
@@ -507,7 +511,8 @@ const CustomFormWizard = (props) => { | |||
setSelectedAddress4(newValue); | |||
}} | |||
sx={{ "& .MuiInputBase-root": { height: "41px" }, "#address4-combo": { padding: "0px 0px 0px 0px" }, "& .MuiAutocomplete-endAdornment": { top: "auto" }, }} | |||
renderInput={(params) => <TextField {...params} placeholder="區域 (只適用於香港)" />} | |||
renderInput={(params) => <TextField {...params} placeholder={intl.formatMessage({id: 'region'})} | |||
/>} | |||
/> | |||
<Autocomplete | |||
disablePortal | |||
@@ -890,7 +895,9 @@ const CustomFormWizard = (props) => { | |||
<Grid container spacing={2}> | |||
<Grid item xs={12} mt={1} mb={1}> | |||
<Stack direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}> | |||
<Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}>你的個人資料</Typography> | |||
<Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}> | |||
<FormattedMessage id="yourPersonalInformation"/> | |||
</Typography> | |||
{/* <Typography component={Link} to="/login" variant="body1" sx={{ textDecoration: 'none' }} color="primary"> | |||
Already have an account? | |||
</Typography> */} | |||
@@ -930,7 +937,7 @@ const CustomFormWizard = (props) => { | |||
<Grid item xs={12}> | |||
<Stack spacing={1} direction="row"> | |||
<Typography variant="h5" color={theme.palette.grey[600]}> | |||
地址: | |||
<FormattedMessage id="formAddress"/>: | |||
</Typography> | |||
<Stack spacing={1} direction="column"> | |||
<Typography variant="h5" id="preview-address1-signup"> | |||
@@ -949,7 +956,7 @@ const CustomFormWizard = (props) => { | |||
{selectedAddress5 == ("香港") ? | |||
<Stack direction="row"> | |||
<Typography variant="h5" color={theme.palette.grey[600]} id="preview-address4-signup"> | |||
區域 (只適用於香港): | |||
<FormattedMessage id="region"/>: | |||
</Typography> | |||
<Typography variant="h5">{selectedAddress4}</Typography> | |||
</Stack> | |||
@@ -48,6 +48,31 @@ | |||
"userPhoneNumber": "Mobile Phone Number", | |||
"userAddress": "Residential Address", | |||
"personalInformation": "Personal Information", | |||
"yourPersonalInformation": "Your Personal Information", | |||
"yourLoginInformation": "Your Login Information", | |||
"yourBusinessInformation": "Your Organization/Company Information", | |||
"businessEngName": "English name of Organization/Company", | |||
"businessChName": "Chinese name of Organization/Company", | |||
"preview": "Preview", | |||
"finishSubmission": "Finish Submission", | |||
"reset": "reset", | |||
"requireString": "Items marked with * must be filled in", | |||
"confirmPassword": "Confirm password", | |||
"pleaseConfirmPassword": "Please confirm password", | |||
"pleaseEnterOrgOrCompName": "Please enter the English/Chinese name of the organisation/company", | |||
"sameAsBusinessRegistrationCert": "Same as Business Registration Certificate", | |||
"businessRegCertNumber": "Business Reg Cert Number", | |||
"pleaseFillInBusinessRegCertNumber": "Please fill in Business Registration Certificate Number", | |||
"pleaseFillInValidBusinessRegCertNumber": "Please fill in valid Business Registration Certificate Number", | |||
"businessRegCertValidityDate": "Business Reg Cert validity date", | |||
"pleaseFillInBusinessRegCertValidityDate": "Please fill in Business Reg Cert validity date", | |||
"formAddress": "Address", | |||
"addressLine1": "First line", | |||
"addressLine2": "Second line", | |||
"addressLine3": "Third line", | |||
"region": "Region (only applicable to Hong Kong)", | |||
"Dashboard": "Dashboard", | |||
"event": "Event" | |||
} |
@@ -48,6 +48,31 @@ | |||
"userPhoneNumber": "手机号码", | |||
"userAddress": "住宅地址", | |||
"personalInformation": "个人资料", | |||
"yourPersonalInformation": "你的个人资料", | |||
"yourLoginInformation": "你的登入资料", | |||
"yourBusinessInformation": "你的机构/公司资料", | |||
"businessEngName": "机构/公司英文名称", | |||
"businessChName": "机构/公司中文名称", | |||
"preview": "预览", | |||
"finishSubmission": "完成提交", | |||
"reset": "重置", | |||
"requireString": "注有*的项目必须输入资料", | |||
"confirmPassword": "确认密码", | |||
"pleaseConfirmPassword": "请确认密码", | |||
"pleaseEnterOrgOrCompName": "请输入机构/公司英文名称或中文名称", | |||
"sameAsBusinessRegistrationCert": "与商业登记证相同", | |||
"businessRegCertNumber": "商业登记证号码", | |||
"pleaseFillInBusinessRegCertNumber": "请输入商业登记证号码", | |||
"pleaseFillInValidBusinessRegCertNumber": "请输入有效商业登记证号码", | |||
"businessRegCertValidityDate": "商业登记证有效日期", | |||
"pleaseFillInBusinessRegCertValidityDate": "请输入商业登记证有效日期", | |||
"formAddress": "地址", | |||
"addressLine1": "第一行", | |||
"addressLine2": "第二行", | |||
"addressLine3": "第三行", | |||
"region": "区域 (只适用于香港)", | |||
"Dashboard": "仪表板", | |||
"event": "活动" | |||
} |
@@ -48,6 +48,31 @@ | |||
"userPhoneNumber": "手機號碼", | |||
"userAddress": "住宅地址", | |||
"personalInformation": "個人資料", | |||
"yourPersonalInformation": "你的個人資料", | |||
"yourLoginInformation": "你的登入資料", | |||
"yourBusinessInformation": "你的機構/公司資料", | |||
"businessEngName": "機構/公司英文名稱", | |||
"businessChName": "機構/公司中文名稱", | |||
"preview": "預覽", | |||
"finishSubmission": "完成提交", | |||
"reset": "重置", | |||
"requireString": "註有*的項目必須輸入資料", | |||
"confirmPassword": "確認密碼", | |||
"pleaseConfirmPassword": "請確認密碼", | |||
"pleaseEnterOrgOrCompName": "請輸入機構/公司英文名稱或中文名稱", | |||
"sameAsBusinessRegistrationCert": "與商業登記證相同", | |||
"businessRegCertNumber": "商業登記證號碼", | |||
"pleaseFillInBusinessRegCertNumber": "請輸入商業登記證號碼", | |||
"pleaseFillInValidBusinessRegCertNumber": "請輸入有效商業登記證號碼", | |||
"businessRegCertValidityDate": "商業登記證有效日期", | |||
"pleaseFillInBusinessRegCertValidityDate": "請輸入商業登記證有效日期", | |||
"formAddress": "地址", | |||
"addressLine1": "第一行", | |||
"addressLine2": "第二行", | |||
"addressLine3": "第三行", | |||
"region": "區域 (只適用於香港)", | |||
"Dashboard": "儀表板", | |||
"event": "活動" | |||
} |