Browse Source

Merge branch 'New_Enhancement' of https://git.2fi-solutions.com/alex/PNSPS-frontend-MaterialUI into New_Enhancement

CR003
Jason Chuang 1 year ago
parent
commit
bcf88deadd
13 changed files with 158 additions and 147 deletions
  1. +13
    -11
      src/pages/Organization/DetailPage/OrganizationCard.js
  2. +96
    -93
      src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js
  3. +2
    -2
      src/pages/User/ChangePasswordPage/index.js
  4. +1
    -1
      src/pages/authentication/ForgotPassword/AuthCallback/index.js
  5. +1
    -1
      src/pages/authentication/ForgotUsername/AuthCallback/index.js
  6. +2
    -1
      src/pages/authentication/RegisterCustom.js
  7. +2
    -2
      src/pages/authentication/auth-forms/AuthLoginCustom.js
  8. +10
    -7
      src/pages/authentication/auth-forms/BusCustomFormWizard.js
  9. +10
    -7
      src/pages/authentication/auth-forms/CustomFormWizard.js
  10. +3
    -4
      src/pages/authentication/auth-forms/IAmSmartFormWizard.js
  11. +6
    -6
      src/translations/en.json
  12. +8
    -8
      src/translations/zh-CN.json
  13. +4
    -4
      src/translations/zh-HK.json

+ 13
- 11
src/pages/Organization/DetailPage/OrganizationCard.js View File

@@ -336,17 +336,19 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => {
</Button> </Button>
</ThemeProvider> </ThemeProvider>
</Grid> </Grid>
<Grid item sx={{ ml: 3, mr: 3 }}>
<ThemeProvider theme={PNSPS_BUTTON_THEME}>
<Button
variant="contained"
color="primary"
onClick={() => sendDn_Overdue(true)}
>
Generate O&#47;S DN List
</Button>
</ThemeProvider>
</Grid>
{ isGrantedAny("MAINTAIN_DEMANDNOTE")?
<Grid item sx={{ ml: 3, mr: 3 }}>
<ThemeProvider theme={PNSPS_BUTTON_THEME}>
<Button
variant="contained"
color="primary"
onClick={() => sendDn_Overdue(true)}
>
Generate O&#47;S DN List
</Button>
</ThemeProvider>
</Grid> : null
}
</> </>
} }
</> </>


+ 96
- 93
src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js View File

@@ -18,7 +18,8 @@ import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png'
import ForwardIcon from '@mui/icons-material/Forward'; import ForwardIcon from '@mui/icons-material/Forward';
import { import {
isORGLoggedIn, isORGLoggedIn,
isDummyLoggedIn
isDummyLoggedIn,
isCreditorLoggedIn
} from "utils/Utils"; } from "utils/Utils";


import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
@@ -326,98 +327,100 @@ const PublicNoticeApplyForm = ({ loadedData, _selections, gazetteIssueList }) =>
</Grid> </Grid>
</Grid> </Grid>


<Grid item xs={12} alignItems={"center"} sx={{ p: 2 }}>
<table style={tabelStyle}>
<tbody>
<tr style={tabelStyle}>
<th style={tabelStyle} width="400" align="left"><FormattedMessage id="paymentMeans" /></th>
<th style={tabelStyle} width="300" align="left"><FormattedMessage id="confirmingDealine" /></th>
<th style={tabelStyle} width="300" align="left"><FormattedMessage id="PaymentCoonpletDealine" /></th>
</tr>
<tr>
<td style={tabelStyle}>
<FormattedMessage id="payOnline" />
<br /><a href="#payOnlineDetails" color='#fff' onClick={() => {
setWarningTitle(intl.formatMessage({ id: "paymentMeans" }) + ": " + intl.formatMessage({ id: "payOnline" }))
setWarningText(
<><FormattedMessage id="paymentMethodMeans" />
<ul>
<li><FormattedMessage id="fps" /></li>
<li><FormattedMessage id="card" /></li>
<li><FormattedMessage id="pps" /></li>
</ul>
</>
);
setIsWarningPopUp(true);
}}><FormattedMessage id="viewDetail" /></a>
</td>
<td style={tabelStyle}>{DateUtils.dateFormat(closeDate, dft)} 2:00 p.m.</td>
<td style={tabelStyle}>
<FormattedMessage id="payOnlineRemark" values={{
date: DateUtils.dateFormat(closeDate, dft) + ' 2:30 p.m.'
}} />
</td>
</tr>
<tr>
<td style={tabelStyle}><FormattedMessage id="payDn" />
<br /><a href="#payDnDetails" onClick={() => {
setWarningTitle(intl.formatMessage({ id: "paymentMeans" }) + ": " + intl.formatMessage({ id: "payDn" }))
setWarningText(
<><FormattedMessage id="paymentMethodMeans" />
<ul>
<li><FormattedMessage id="atm" /></li>
<li><FormattedMessage id="pps" /></li>
<li><FormattedMessage id="eBank" /></li>
<li><FormattedMessage id="phoneBank" /></li>
<li><FormattedMessage id="eCheque" /></li>
<li><FormattedMessage id="fps" /></li>
<li><FormattedMessage id="hkpo" /></li>
<li><FormattedMessage id="store" /></li>
<li><FormattedMessage id="post" /></li>
</ul>
<Typography variant="h6">
<div style={{ padding: 12 }} dangerouslySetInnerHTML={{ __html: intl.formatMessage({ id: "proofNote" }) }} />
</Typography>
</>
);
setIsWarningPopUp(true);
}}><FormattedMessage id="viewDetail" /></a>
</td>
<td style={tabelStyle}>{DateUtils.dateFormat(closingDateOff, dft)} 5:00 p.m.</td>
<td style={tabelStyle}>
<FormattedMessage id="payDnRemark" values={{
date: DateUtils.dateFormat(closeDate, dft) + " 12:30 p.m."
}} />
</td>
</tr>
<tr>
<td style={tabelStyle}><FormattedMessage id="payNPGO" />
<br /><a href="#payNPGODetails" onClick={() => {
setWarningTitle(intl.formatMessage({ id: "paymentMeans" }) + ": " + intl.formatMessage({ id: "payNPGOPopUpTitle" }))
setWarningText(
<><FormattedMessage id="paymentMethodMeans" />
<ul>
<li><FormattedMessage id="cheque" /></li>
<li><FormattedMessage id="drafts" /></li>
<li><FormattedMessage id="cashierOrders" /></li>
<li><FormattedMessage id="cash" /></li>
</ul>
</>
);
setIsWarningPopUp(true);
}}><FormattedMessage id="viewDetail" /></a>
</td>
<td style={tabelStyle}>{DateUtils.dateFormat(closeDate, dft)} 12:00 p.m.</td>
<td style={tabelStyle}>
<FormattedMessage id="payNPGORemark" values={{
date: DateUtils.dateFormat(closeDate, dft) + " 12:30 p.m."
}} />
</td>
</tr>
</tbody>
</table>

</Grid>
{!isCreditorLoggedIn()?
<Grid item xs={12} alignItems={"center"} sx={{ p: 2 }}>
<table style={tabelStyle}>
<tbody>
<tr style={tabelStyle}>
<th style={tabelStyle} width="400" align="left"><FormattedMessage id="paymentMeans" /></th>
<th style={tabelStyle} width="300" align="left"><FormattedMessage id="confirmingDealine" /></th>
<th style={tabelStyle} width="300" align="left"><FormattedMessage id="PaymentCoonpletDealine" /></th>
</tr>
<tr>
<td style={tabelStyle}>
<FormattedMessage id="payOnline" />
<br /><a href="#payOnlineDetails" color='#fff' onClick={() => {
setWarningTitle(intl.formatMessage({ id: "paymentMeans" }) + ": " + intl.formatMessage({ id: "payOnline" }))
setWarningText(
<><FormattedMessage id="paymentMethodMeans" />
<ul>
<li><FormattedMessage id="fps" /></li>
<li><FormattedMessage id="card" /></li>
<li><FormattedMessage id="pps" /></li>
</ul>
</>
);
setIsWarningPopUp(true);
}}><FormattedMessage id="viewDetail" /></a>
</td>
<td style={tabelStyle}>{DateUtils.dateFormat(closeDate, dft)} 2:00 p.m.</td>
<td style={tabelStyle}>
<FormattedMessage id="payOnlineRemark" values={{
date: DateUtils.dateFormat(closeDate, dft) + ' 2:30 p.m.'
}} />
</td>
</tr>
<tr>
<td style={tabelStyle}><FormattedMessage id="payDn" />
<br /><a href="#payDnDetails" onClick={() => {
setWarningTitle(intl.formatMessage({ id: "paymentMeans" }) + ": " + intl.formatMessage({ id: "payDn" }))
setWarningText(
<><FormattedMessage id="paymentMethodMeans" />
<ul>
<li><FormattedMessage id="atm" /></li>
<li><FormattedMessage id="pps" /></li>
<li><FormattedMessage id="eBank" /></li>
<li><FormattedMessage id="phoneBank" /></li>
<li><FormattedMessage id="eCheque" /></li>
<li><FormattedMessage id="fps" /></li>
<li><FormattedMessage id="hkpo" /></li>
<li><FormattedMessage id="store" /></li>
<li><FormattedMessage id="post" /></li>
</ul>
<Typography variant="h6">
<div style={{ padding: 12 }} dangerouslySetInnerHTML={{ __html: intl.formatMessage({ id: "proofNote" }) }} />
</Typography>
</>
);
setIsWarningPopUp(true);
}}><FormattedMessage id="viewDetail" /></a>
</td>
<td style={tabelStyle}>{DateUtils.dateFormat(closingDateOff, dft)} 5:00 p.m.</td>
<td style={tabelStyle}>
<FormattedMessage id="payDnRemark" values={{
date: DateUtils.dateFormat(closeDate, dft) + " 12:30 p.m."
}} />
</td>
</tr>
<tr>
<td style={tabelStyle}><FormattedMessage id="payNPGO" />
<br /><a href="#payNPGODetails" onClick={() => {
setWarningTitle(intl.formatMessage({ id: "paymentMeans" }) + ": " + intl.formatMessage({ id: "payNPGOPopUpTitle" }))
setWarningText(
<><FormattedMessage id="paymentMethodMeans" />
<ul>
<li><FormattedMessage id="cheque" /></li>
<li><FormattedMessage id="drafts" /></li>
<li><FormattedMessage id="cashierOrders" /></li>
<li><FormattedMessage id="cash" /></li>
</ul>
</>
);
setIsWarningPopUp(true);
}}><FormattedMessage id="viewDetail" /></a>
</td>
<td style={tabelStyle}>{DateUtils.dateFormat(closeDate, dft)} 12:00 p.m.</td>
<td style={tabelStyle}>
<FormattedMessage id="payNPGORemark" values={{
date: DateUtils.dateFormat(closeDate, dft) + " 12:30 p.m."
}} />
</td>
</tr>
</tbody>
</table>

</Grid> : null
}


<Grid item xs={12} md={12} lg={12}> <Grid item xs={12} md={12} lg={12}>
<Grid container direction="row" justifyContent="flex-start" alignItems="center"> <Grid container direction="row" justifyContent="flex-start" alignItems="center">


+ 2
- 2
src/pages/User/ChangePasswordPage/index.js View File

@@ -136,14 +136,14 @@ const Index = () => {
.matches(/^(?=.*[a-z])/, { message: intl.formatMessage({id: 'atLeastOneSmallLetter'})}) .matches(/^(?=.*[a-z])/, { message: intl.formatMessage({id: 'atLeastOneSmallLetter'})})
.matches(/^(?=.*[A-Z])/, { message: intl.formatMessage({id: 'atLeastOneCapLetter'})}) .matches(/^(?=.*[A-Z])/, { message: intl.formatMessage({id: 'atLeastOneCapLetter'})})
.matches(/^(?=.*[0-9])/, { message: intl.formatMessage({id: 'atLeast1Number'})}) .matches(/^(?=.*[0-9])/, { message: intl.formatMessage({id: 'atLeast1Number'})})
.matches(/^(?=.*[!@#%&])/, { message: intl.formatMessage({id: 'atLeast1SpecialChar'})}),
.matches(/^(?=.*\W)/, { message: intl.formatMessage({id: 'atLeast1SpecialChar'})}),
newPassword: yup.string().min(8, intl.formatMessage({id: 'atLeast8CharPassword'})) newPassword: yup.string().min(8, intl.formatMessage({id: 'atLeast8CharPassword'}))
.required(intl.formatMessage({id: 'requirePassword'})) .required(intl.formatMessage({id: 'requirePassword'}))
.matches(/^\S*$/, { message: (intl.formatMessage({id: 'noSpacePassword'}))}) .matches(/^\S*$/, { message: (intl.formatMessage({id: 'noSpacePassword'}))})
.matches(/^(?=.*[a-z])/, { message: intl.formatMessage({id: 'atLeastOneSmallLetter'})}) .matches(/^(?=.*[a-z])/, { message: intl.formatMessage({id: 'atLeastOneSmallLetter'})})
.matches(/^(?=.*[A-Z])/, { message: intl.formatMessage({id: 'atLeastOneCapLetter'})}) .matches(/^(?=.*[A-Z])/, { message: intl.formatMessage({id: 'atLeastOneCapLetter'})})
.matches(/^(?=.*[0-9])/, { message: intl.formatMessage({id: 'atLeast1Number'})}) .matches(/^(?=.*[0-9])/, { message: intl.formatMessage({id: 'atLeast1Number'})})
.matches(/^(?=.*[!@#%&])/, { message: intl.formatMessage({id: 'atLeast1SpecialChar'})}),
.matches(/^(?=.*\W)/, { message: intl.formatMessage({id: 'atLeast1SpecialChar'})}),
confirmPassword: yup.string().min(8, intl.formatMessage({id: 'atLeast8CharPassword'})) confirmPassword: yup.string().min(8, intl.formatMessage({id: 'atLeast8CharPassword'}))
.required(intl.formatMessage({id: 'pleaseConfirmPassword'})) .required(intl.formatMessage({id: 'pleaseConfirmPassword'}))
.oneOf([yup.ref('newPassword'), null], intl.formatMessage({id: 'samePassword'})), .oneOf([yup.ref('newPassword'), null], intl.formatMessage({id: 'samePassword'})),


+ 1
- 1
src/pages/authentication/ForgotPassword/AuthCallback/index.js View File

@@ -175,7 +175,7 @@ const Index = () => {
.matches(/^(?=.*[a-z])/, { message: intl.formatMessage({id: 'atLeastOneSmallLetter'})}) .matches(/^(?=.*[a-z])/, { message: intl.formatMessage({id: 'atLeastOneSmallLetter'})})
.matches(/^(?=.*[A-Z])/, { message: intl.formatMessage({id: 'atLeastOneCapLetter'})}) .matches(/^(?=.*[A-Z])/, { message: intl.formatMessage({id: 'atLeastOneCapLetter'})})
.matches(/^(?=.*[0-9])/, { message: intl.formatMessage({id: 'atLeast1Number'})}) .matches(/^(?=.*[0-9])/, { message: intl.formatMessage({id: 'atLeast1Number'})})
.matches(/^(?=.*[!@#%&])/, { message: intl.formatMessage({id: 'atLeast1SpecialChar'})}),
.matches(/^(?=.*\W)/, { message: intl.formatMessage({id: 'atLeast1SpecialChar'})}),
confirmPassword: yup.string().min(8, intl.formatMessage({id: 'atLeast8CharPassword'})) confirmPassword: yup.string().min(8, intl.formatMessage({id: 'atLeast8CharPassword'}))
.required(intl.formatMessage({id: 'pleaseConfirmPassword'})) .required(intl.formatMessage({id: 'pleaseConfirmPassword'}))
.oneOf([yup.ref('password'), null], intl.formatMessage({id: 'samePassword'})), .oneOf([yup.ref('password'), null], intl.formatMessage({id: 'samePassword'})),


+ 1
- 1
src/pages/authentication/ForgotUsername/AuthCallback/index.js View File

@@ -181,7 +181,7 @@ const Index = () => {
.matches(/^(?=.*[a-z])/, { message: intl.formatMessage({id: 'atLeastOneSmallLetter'})}) .matches(/^(?=.*[a-z])/, { message: intl.formatMessage({id: 'atLeastOneSmallLetter'})})
.matches(/^(?=.*[A-Z])/, { message: intl.formatMessage({id: 'atLeastOneCapLetter'})}) .matches(/^(?=.*[A-Z])/, { message: intl.formatMessage({id: 'atLeastOneCapLetter'})})
.matches(/^(?=.*[0-9])/, { message: intl.formatMessage({id: 'atLeast1Number'})}) .matches(/^(?=.*[0-9])/, { message: intl.formatMessage({id: 'atLeast1Number'})})
.matches(/^(?=.*[!@#%&])/, { message: intl.formatMessage({id: 'atLeast1SpecialChar'})}),
.matches(/^(?=.*\W)/, { message: intl.formatMessage({id: 'atLeast1SpecialChar'})}),
confirmPassword: yup.string().min(8, intl.formatMessage({id: 'atLeast8CharPassword'})) confirmPassword: yup.string().min(8, intl.formatMessage({id: 'atLeast8CharPassword'}))
.max(60, getMaxErrStr(60)) .max(60, getMaxErrStr(60))
.required(intl.formatMessage({id: 'pleaseConfirmPassword'})) .required(intl.formatMessage({id: 'pleaseConfirmPassword'}))


+ 2
- 1
src/pages/authentication/RegisterCustom.js View File

@@ -22,7 +22,8 @@ const RegisterCustom = () => {
const { locale } = intl; const { locale } = intl;


const registerWithIAmSmart = () => { const registerWithIAmSmart = () => {
setIsPopUp(true);
getQRWithIAmSmart();
setIsPopUp(false);
} }


const getQRWithIAmSmart = () => { const getQRWithIAmSmart = () => {


+ 2
- 2
src/pages/authentication/auth-forms/AuthLoginCustom.js View File

@@ -151,7 +151,7 @@ const AuthLoginCustom = () => {
.matches(/^(?=.*[a-z])/, intl.formatMessage({ id: 'atLeastOneSmallLetter' })) .matches(/^(?=.*[a-z])/, intl.formatMessage({ id: 'atLeastOneSmallLetter' }))
.matches(/^(?=.*[A-Z])/, intl.formatMessage({ id: 'atLeastOneCapLetter' })) .matches(/^(?=.*[A-Z])/, intl.formatMessage({ id: 'atLeastOneCapLetter' }))
.matches(/^(?=.*[0-9])/, intl.formatMessage({ id: 'atLeast1Number' })) .matches(/^(?=.*[0-9])/, intl.formatMessage({ id: 'atLeast1Number' }))
.matches(/^(?=.*[!@#%&])/, intl.formatMessage({ id: 'atLeast1SpecialChar' })),
.matches(/^(?=.*\W)/, intl.formatMessage({ id: 'atLeast1SpecialChar' })),
}), }),
}); });


@@ -177,7 +177,7 @@ const AuthLoginCustom = () => {
var lowerCase = /[a-z]/g; var lowerCase = /[a-z]/g;
var upperCase = /[A-Z]/g; var upperCase = /[A-Z]/g;
var numbers = /[0-9]/g; var numbers = /[0-9]/g;
var symbol = /^(?=.*[!@#%&])/;
var symbol = /^(?=.*\W)/;
if (!new_pass.match(lowerCase)) { if (!new_pass.match(lowerCase)) {
return false; return false;
} else if (!new_pass.match(upperCase)) { } else if (!new_pass.match(upperCase)) {


+ 10
- 7
src/pages/authentication/auth-forms/BusCustomFormWizard.js View File

@@ -434,7 +434,7 @@ const BusCustomFormWizard = (props) => {
} }


function handleUserName(username) { function handleUserName(username) {
var symbol = /^(?=.*[!@#%&])/;
var symbol = /^(?=.*\W)/;
var space = /\s/; var space = /\s/;
if (username.length < 6) { if (username.length < 6) {
return false; return false;
@@ -461,7 +461,7 @@ const BusCustomFormWizard = (props) => {
var lowerCase = /[a-z]/g; var lowerCase = /[a-z]/g;
var upperCase = /[A-Z]/g; var upperCase = /[A-Z]/g;
var numbers = /[0-9]/g; var numbers = /[0-9]/g;
var symbol = /^(?=.*[!@#%&])/;
var symbol = /^(?=.*\W)/;
var space = /\s/; var space = /\s/;
if (!new_pass.match(lowerCase)) { if (!new_pass.match(lowerCase)) {
return false; return false;
@@ -527,7 +527,7 @@ const BusCustomFormWizard = (props) => {
.matches(/^(?=.*[a-z])/, { message: displayErrorMsg(intl.formatMessage({id: 'atLeastOneSmallLetter'})) }) .matches(/^(?=.*[a-z])/, { message: displayErrorMsg(intl.formatMessage({id: 'atLeastOneSmallLetter'})) })
.matches(/^(?=.*[A-Z])/, { message: displayErrorMsg(intl.formatMessage({id: 'atLeastOneCapLetter'})) }) .matches(/^(?=.*[A-Z])/, { message: displayErrorMsg(intl.formatMessage({id: 'atLeastOneCapLetter'})) })
.matches(/^(?=.*[0-9])/, { message: displayErrorMsg(intl.formatMessage({id: 'atLeast1Number'})) }) .matches(/^(?=.*[0-9])/, { message: displayErrorMsg(intl.formatMessage({id: 'atLeast1Number'})) })
.matches(/^(?=.*[!@#%&])/, { message: displayErrorMsg(intl.formatMessage({id: 'atLeast1SpecialChar'})) }),
.matches(/^(?=.*\W)/, { message: displayErrorMsg(intl.formatMessage({id: 'atLeast1SpecialChar'})) }),
confirmPassword: yup.string().min(8, displayErrorMsg(intl.formatMessage({id: 'atLeast8CharPassword'}))).required(displayErrorMsg(intl.formatMessage({id: 'pleaseConfirmPassword'}))).oneOf([yup.ref('password'), null], displayErrorMsg(intl.formatMessage({id: 'samePassword'}))), confirmPassword: yup.string().min(8, displayErrorMsg(intl.formatMessage({id: 'atLeast8CharPassword'}))).required(displayErrorMsg(intl.formatMessage({id: 'pleaseConfirmPassword'}))).oneOf([yup.ref('password'), null], displayErrorMsg(intl.formatMessage({id: 'samePassword'}))),
enName: yup.string().max(40,getMaxErrStr(40)).required(displayErrorMsg(intl.formatMessage({id: 'userRequireEnglishName'}))), enName: yup.string().max(40,getMaxErrStr(40)).required(displayErrorMsg(intl.formatMessage({id: 'userRequireEnglishName'}))),
enCompanyName: yup.string().matches(/^[^$^*()]+$/, { message: displayErrorMsg('No special characters $/^/*/(/)') }).when('chCompanyName', { enCompanyName: yup.string().matches(/^[^$^*()]+$/, { message: displayErrorMsg('No special characters $/^/*/(/)') }).when('chCompanyName', {
@@ -743,6 +743,9 @@ const BusCustomFormWizard = (props) => {
value={formik.values.confirmPassword.trim()} value={formik.values.confirmPassword.trim()}
name="confirmPassword" name="confirmPassword"
onBlur={formik.handleBlur} onBlur={formik.handleBlur}
onCut={handleCCPChange}
onCopy={handleCCPChange}
onPaste={handleCCPChange}
onChange={(e) => { onChange={(e) => {
formik.handleChange(e); formik.handleChange(e);
// changePassword(e.target.value); // changePassword(e.target.value);
@@ -1004,7 +1007,7 @@ const BusCustomFormWizard = (props) => {
value={selectedAddress4} value={selectedAddress4}
options={address4ComboList} options={address4ComboList}
disabled={checkCountry} disabled={checkCountry}
error={Boolean(districtErrStr!="")}
// error={Boolean(districtErrStr!="")}
onBlur={formik.handleBlur} onBlur={formik.handleBlur}
getOptionLabel={(option) => option.type? intl.formatMessage({ id: option.type }) : ""} getOptionLabel={(option) => option.type? intl.formatMessage({ id: option.type }) : ""}
onChange={(event, newValue) => { onChange={(event, newValue) => {
@@ -1013,7 +1016,7 @@ const BusCustomFormWizard = (props) => {
sx={{ "& .MuiInputBase-root": { height: "41px" }, sx={{ "& .MuiInputBase-root": { height: "41px" },
"#address4-combo": { padding: "0px 0px 0px 3px" }, "#address4-combo": { padding: "0px 0px 0px 3px" },
"& .MuiAutocomplete-endAdornment": { top: "auto" }, }} "& .MuiAutocomplete-endAdornment": { top: "auto" }, }}
renderInput={(params) => <TextField {...params} placeholder={intl.formatMessage({id: 'region'})}
renderInput={(params) => <TextField error={Boolean(districtErrStr != "")} {...params} placeholder={intl.formatMessage({id: 'region'})}
/>} />}
/> />
<Autocomplete <Autocomplete
@@ -1055,11 +1058,11 @@ const BusCustomFormWizard = (props) => {
{formik.errors.address3} {formik.errors.address3}
</FormHelperText> </FormHelperText>
)} )}
{/* {districtErrStr!= "" && (
{districtErrStr!= "" && (
<FormHelperText error > <FormHelperText error >
{districtErrStr} {districtErrStr}
</FormHelperText> </FormHelperText>
)} */}
)}
</Stack> </Stack>
</Grid> </Grid>
<Grid item xs={12} mt={1} mb={1}> <Grid item xs={12} mt={1} mb={1}>


+ 10
- 7
src/pages/authentication/auth-forms/CustomFormWizard.js View File

@@ -434,7 +434,7 @@ const CustomFormWizard = (props) => {
} }


function handleUsername(username) { function handleUsername(username) {
var symbol = /^(?=.*[!@#%&])/;
var symbol = /^(?=.*\W)/;
var space = /\s/; var space = /\s/;
if (username.length < 6) { if (username.length < 6) {
return false; return false;
@@ -538,7 +538,7 @@ const CustomFormWizard = (props) => {
var lowerCase = /[a-z]/g; var lowerCase = /[a-z]/g;
var upperCase = /[A-Z]/g; var upperCase = /[A-Z]/g;
var numbers = /[0-9]/g; var numbers = /[0-9]/g;
var symbol = /^(?=.*[!@#%&])/;
var symbol = /^(?=.*\W)/;
var space = /\s/; var space = /\s/;
if (!new_pass.match(lowerCase)) { if (!new_pass.match(lowerCase)) {
return false; return false;
@@ -610,7 +610,7 @@ const CustomFormWizard = (props) => {
.matches(/^(?=.*[a-z])/, { message: displayErrorMsg(intl.formatMessage({ id: 'atLeastOneSmallLetter' })) }) .matches(/^(?=.*[a-z])/, { message: displayErrorMsg(intl.formatMessage({ id: 'atLeastOneSmallLetter' })) })
.matches(/^(?=.*[A-Z])/, { message: displayErrorMsg(intl.formatMessage({ id: 'atLeastOneCapLetter' })) }) .matches(/^(?=.*[A-Z])/, { message: displayErrorMsg(intl.formatMessage({ id: 'atLeastOneCapLetter' })) })
.matches(/^(?=.*[0-9])/, { message: displayErrorMsg(intl.formatMessage({ id: 'atLeast1Number' })) }) .matches(/^(?=.*[0-9])/, { message: displayErrorMsg(intl.formatMessage({ id: 'atLeast1Number' })) })
.matches(/^(?=.*[!@#%&])/, { message: displayErrorMsg(intl.formatMessage({ id: 'atLeast1SpecialChar' })) }),
.matches(/^(?=.*\W)/, { message: displayErrorMsg(intl.formatMessage({ id: 'atLeast1SpecialChar' })) }),
confirmPassword: yup.string().min(8, displayErrorMsg(intl.formatMessage({ id: 'atLeast8CharPassword' }))).required(displayErrorMsg(intl.formatMessage({ id: 'pleaseConfirmPassword' }))).oneOf([yup.ref('password'), null], displayErrorMsg(intl.formatMessage({ id: 'samePassword' }))), confirmPassword: yup.string().min(8, displayErrorMsg(intl.formatMessage({ id: 'atLeast8CharPassword' }))).required(displayErrorMsg(intl.formatMessage({ id: 'pleaseConfirmPassword' }))).oneOf([yup.ref('password'), null], displayErrorMsg(intl.formatMessage({ id: 'samePassword' }))),
chName: yup.string().max(6, getMaxErrStr(6)), chName: yup.string().max(6, getMaxErrStr(6)),
enName: yup.string().max(40, getMaxErrStr(40)).when('chName', { enName: yup.string().max(40, getMaxErrStr(40)).when('chName', {
@@ -866,6 +866,9 @@ const CustomFormWizard = (props) => {
value={formik.values.confirmPassword.trim()} value={formik.values.confirmPassword.trim()}
name="confirmPassword" name="confirmPassword"
onBlur={formik.handleBlur} onBlur={formik.handleBlur}
onCut={handleCCPChange}
onCopy={handleCCPChange}
onPaste={handleCCPChange}
onChange={(e) => { onChange={(e) => {
formik.handleChange(e); formik.handleChange(e);
// changePassword(e.target.value); // changePassword(e.target.value);
@@ -1245,7 +1248,7 @@ const CustomFormWizard = (props) => {
value={selectedAddress4} value={selectedAddress4}
options={ComboData.district} options={ComboData.district}
disabled={checkCountry} disabled={checkCountry}
error={Boolean(districtErrStr != "")}
// error={Boolean(districtErrStr != "")}
onBlur={formik.handleBlur} onBlur={formik.handleBlur}
getOptionLabel={(option) => option.type ? intl.formatMessage({ id: option.type }) : ""} getOptionLabel={(option) => option.type ? intl.formatMessage({ id: option.type }) : ""}
onChange={(event, newValue) => { onChange={(event, newValue) => {
@@ -1256,7 +1259,7 @@ const CustomFormWizard = (props) => {
"#address4-combo": { padding: "0px 0px 0px 3px" }, "#address4-combo": { padding: "0px 0px 0px 3px" },
"& .MuiAutocomplete-endAdornment": { top: "auto" }, "& .MuiAutocomplete-endAdornment": { top: "auto" },
}} }}
renderInput={(params) => <TextField {...params} placeholder={intl.formatMessage({ id: 'region' })}
renderInput={(params) => <TextField error={Boolean(districtErrStr != "")} {...params} placeholder={intl.formatMessage({ id: 'region' })}
/>} />}
/> />
<Autocomplete <Autocomplete
@@ -1298,11 +1301,11 @@ const CustomFormWizard = (props) => {
{formik.errors.address3} {formik.errors.address3}
</FormHelperText> </FormHelperText>
)} )}
{/* {districtErrStr != "" && (
{districtErrStr != "" && (
<FormHelperText error > <FormHelperText error >
{districtErrStr} {districtErrStr}
</FormHelperText> </FormHelperText>
)} */}
)}
</Stack> </Stack>
</Grid> </Grid>
<Grid item xs={12} mt={1} mb={1}> <Grid item xs={12} mt={1} mb={1}>


+ 3
- 4
src/pages/authentication/auth-forms/IAmSmartFormWizard.js View File

@@ -583,14 +583,14 @@ const CustomFormWizard = (props) => {
value={selectedAddress4} value={selectedAddress4}
options={address4ComboList} options={address4ComboList}
disabled={checkCountry} disabled={checkCountry}
error={Boolean(districtErrStr != "")}
// error={Boolean(districtErrStr != "")}
onBlur={formik.handleBlur} onBlur={formik.handleBlur}
getOptionLabel={(option) => option.type ? intl.formatMessage({ id: option.type }) : ""} getOptionLabel={(option) => option.type ? intl.formatMessage({ id: option.type }) : ""}
onChange={(event, newValue) => { onChange={(event, newValue) => {
setSelectedAddress4(newValue); setSelectedAddress4(newValue);
}} }}
sx={{ "& .MuiInputBase-root": { height: "41px" }, "#address4-combo": { padding: "0px 0px 0px 0px" }, "& .MuiAutocomplete-endAdornment": { top: "auto" }, }} sx={{ "& .MuiInputBase-root": { height: "41px" }, "#address4-combo": { padding: "0px 0px 0px 0px" }, "& .MuiAutocomplete-endAdornment": { top: "auto" }, }}
renderInput={(params) => <TextField {...params} placeholder={intl.formatMessage({ id: 'region' })}
renderInput={(params) => <TextField error={Boolean(districtErrStr != "")} {...params} placeholder={intl.formatMessage({ id: 'region' })}
/>} />}
/> />
<Autocomplete <Autocomplete
@@ -632,12 +632,11 @@ const CustomFormWizard = (props) => {
{formik.errors.address3} {formik.errors.address3}
</FormHelperText> </FormHelperText>
)} )}
{/*
{districtErrStr != "" && ( {districtErrStr != "" && (
<FormHelperText error > <FormHelperText error >
{districtErrStr} {districtErrStr}
</FormHelperText> </FormHelperText>
)} */}
)}
</Stack> </Stack>
</Grid> </Grid>
<Grid item xs={12} mt={1} mb={1}> <Grid item xs={12} mt={1} mb={1}>


+ 6
- 6
src/translations/en.json View File

@@ -48,7 +48,7 @@
"MSG.paymentMsg": "Your application and payment have been received", "MSG.paymentMsg": "Your application and payment have been received",
"MSG.expiredApp": "Public Notice application has expired", "MSG.expiredApp": "Public Notice application has expired",


"MSG.providedByIAmSmart": "Indicates that the item is provided by \"iAM Smart\".",
"MSG.providedByIAmSmart": "Data is provided by \"iAM Smart\".",


"MSG.paymentCancelMsg1": "Payment cancellation message:", "MSG.paymentCancelMsg1": "Payment cancellation message:",
"MSG.paymentCancelMsg2": "Your payment has been cancelled. We have received your payment request, but due to certain reasons, the payment could not be processed. Please take note of the following:", "MSG.paymentCancelMsg2": "Your payment has been cancelled. We have received your payment request, but due to certain reasons, the payment could not be processed. Please take note of the following:",
@@ -145,11 +145,11 @@


"login": "Login", "login": "Login",
"logout": "Logout", "logout": "Logout",
"iAmSmartLogin": "Login with \"iAM Smart\"",
"continueWithIAmSmart": "Continue with \"iAM Smart\"",
"iAmSmartLogin": "Continue with iAM Smart",
"continueWithIAmSmart": "Continue with iAM Smart",
"authorizeIAmSmartForInfo": "Authorize \"iAM Smart\" to provide personal information", "authorizeIAmSmartForInfo": "Authorize \"iAM Smart\" to provide personal information",
"iAmSmartSubTitle": "In order to complete the account opening and establish a connection with \"iAM Smart\", please authorize \"iAM Smart\" to provide the following personal information:", "iAmSmartSubTitle": "In order to complete the account opening and establish a connection with \"iAM Smart\", please authorize \"iAM Smart\" to provide the following personal information:",
"iAmSmartAutoFillIn": "Continue with \"iAM Smart\"",
"iAmSmartAutoFillIn": "Continue with iAM Smart",
"register": "Register", "register": "Register",
"userLoginName": "Username", "userLoginName": "Username",
"userPassword": "Password", "userPassword": "Password",
@@ -191,7 +191,7 @@
"userRegistered": "This user has already registered. Please return to the login page and proceed with the login process.", "userRegistered": "This user has already registered. Please return to the login page and proceed with the login process.",


"user": "User", "user": "User",
"personalUser": "Personal user",
"personalUser": "Personal User",
"becomeNewPersonalUser": "Become New Personal User", "becomeNewPersonalUser": "Become New Personal User",
"registerNewPersonalUser": "Apply as personal user", "registerNewPersonalUser": "Apply as personal user",
"businessUser": "Organisation/Company User", "businessUser": "Organisation/Company User",
@@ -351,7 +351,7 @@
"cancelled": "Cancelled", "cancelled": "Cancelled",
"withdrawn": "Withdrawn", "withdrawn": "Withdrawn",
"searchApplyRecord": "Search application records", "searchApplyRecord": "Search application records",
"applicationId": "Application ID",
"applicationId": "Application No",
"submitDate": "Submit Date", "submitDate": "Submit Date",
"submitDateFrom": "Submit Date (From)", "submitDateFrom": "Submit Date (From)",
"submitDateTo": "Submit Date (To)", "submitDateTo": "Submit Date (To)",


+ 8
- 8
src/translations/zh-CN.json View File

@@ -85,7 +85,7 @@
"MSG.paymentMsg": "你的申请和付款已收到", "MSG.paymentMsg": "你的申请和付款已收到",
"MSG.expiredApp": "公共启事申请已过期", "MSG.expiredApp": "公共启事申请已过期",


"MSG.providedByIAmSmart": "表示该项由「智方便」提供。",
"MSG.providedByIAmSmart": "该项资料由「智方便」提供。",
"MSG.paymentCancelMsg1": "付款取消讯息:", "MSG.paymentCancelMsg1": "付款取消讯息:",
"MSG.paymentCancelMsg2": "你的付款已被取消。我们收到了你的付款请求,但由于某些原因,付款无法完成。请注意以下事项:", "MSG.paymentCancelMsg2": "你的付款已被取消。我们收到了你的付款请求,但由于某些原因,付款无法完成。请注意以下事项:",
@@ -179,11 +179,11 @@


"login": "登录", "login": "登录",
"logout": "登出", "logout": "登出",
"iAmSmartLogin": "「智方便」登录",
"continueWithIAmSmart": "以智方便继续",
"iAmSmartLogin": "以智方便继续",
"continueWithIAmSmart": "以智方便继续",
"authorizeIAmSmartForInfo": "授权「智方便」提供个人资料", "authorizeIAmSmartForInfo": "授权「智方便」提供个人资料",
"iAmSmartSubTitle": "为完成开户并建立与「智方便」的连接,请授权「智方便」提供以下个人资料:", "iAmSmartSubTitle": "为完成开户并建立与「智方便」的连接,请授权「智方便」提供以下个人资料:",
"iAmSmartAutoFillIn": "开启「智方便」",
"iAmSmartAutoFillIn": "以智方便继续",
"register": "申请", "register": "申请",
"userLoginName": "用户登入名称", "userLoginName": "用户登入名称",
"userPassword": "密码", "userPassword": "密码",
@@ -408,7 +408,7 @@
"payReceipt": "付款收据", "payReceipt": "付款收据",
"contactPerson": "联络人", "contactPerson": "联络人",
"requireContactPerson": "请输入联络人", "requireContactPerson": "请输入联络人",
"requireCareOf": "请输入客戶備註",
"requireCareOf": "请输入客户备注",
"search": "搜寻", "search": "搜寻",
"searchForm": "搜寻表格", "searchForm": "搜寻表格",
"cancel": "取消", "cancel": "取消",
@@ -436,9 +436,9 @@
"applyStatus": "申请状态", "applyStatus": "申请状态",
"gazetteCount": "宪报期数", "gazetteCount": "宪报期数",
"gazetteCount2" :"宪报期数/ 其他备注", "gazetteCount2" :"宪报期数/ 其他备注",
"gazetteCount2_1" :"客戶備註/ 其他备注",
"gazetteCount3" :"宪报期数/ 客戶備註/ 其他备注",
"careOf":"客戶備註",
"gazetteCount2_1" :"客户备注/ 其他备注",
"gazetteCount3" :"宪报期数/ 客户备注/ 其他备注",
"careOf":"客户备注",
"careOfWarning":"您已选择了不同的客户备注申请。您要付款吗?", "careOfWarning":"您已选择了不同的客户备注申请。您要付款吗?",
"warning":"警告", "warning":"警告",
"publishDate": "发布日期", "publishDate": "发布日期",


+ 4
- 4
src/translations/zh-HK.json View File

@@ -85,7 +85,7 @@
"MSG.paymentMsg": "你的申請和付款已收到", "MSG.paymentMsg": "你的申請和付款已收到",
"MSG.expiredApp": "公共啟事申請已過期", "MSG.expiredApp": "公共啟事申請已過期",


"MSG.providedByIAmSmart": "表示該項由「智方便」提供。",
"MSG.providedByIAmSmart": "該項資料由「智方便」提供。",


"MSG.paymentCancelMsg1": "付款取消訊息:", "MSG.paymentCancelMsg1": "付款取消訊息:",
"MSG.paymentCancelMsg2": "你的付款已被取消。我們收到了你的付款請求,但由於某些原因,付款無法完成。請注意以下事項:", "MSG.paymentCancelMsg2": "你的付款已被取消。我們收到了你的付款請求,但由於某些原因,付款無法完成。請注意以下事項:",
@@ -181,11 +181,11 @@


"login": "登入", "login": "登入",
"logout": "登出", "logout": "登出",
"iAmSmartLogin": "「智方便」登入",
"continueWithIAmSmart": "以智方便繼續",
"iAmSmartLogin": "以智方便繼續",
"continueWithIAmSmart": "以智方便繼續",
"authorizeIAmSmartForInfo": "授權「智方便」提供個人資料", "authorizeIAmSmartForInfo": "授權「智方便」提供個人資料",
"iAmSmartSubTitle": "為完成開戶並建立與「智方便」的連接,請授權「智方便」提供以下個人資料:", "iAmSmartSubTitle": "為完成開戶並建立與「智方便」的連接,請授權「智方便」提供以下個人資料:",
"iAmSmartAutoFillIn": "開啟「智方便」",
"iAmSmartAutoFillIn": "以智方便繼續",
"register": "申請", "register": "申請",
"userLoginName": "用戶登入名稱", "userLoginName": "用戶登入名稱",
"userPassword": "密碼", "userPassword": "密碼",


Loading…
Cancel
Save