diff --git a/src/pages/DemandNote/Search_Public/SearchForm.js b/src/pages/DemandNote/Search_Public/SearchForm.js index 7b92d4f..820dece 100644 --- a/src/pages/DemandNote/Search_Public/SearchForm.js +++ b/src/pages/DemandNote/Search_Public/SearchForm.js @@ -246,6 +246,7 @@ const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData {...register("status")} id="status" size="small" + disableClearable options={ComboData.denmandNoteStatus_Public} getOptionLabel={(option) => option?.i18nLabel ? intl.formatMessage({ id: option.i18nLabel }) : ""} inputValue={selectedStatus?.i18nLabel ? intl.formatMessage({ id: selectedStatus.i18nLabel }) : ""} diff --git a/src/pages/Payment/Search_Public/SearchForm.js b/src/pages/Payment/Search_Public/SearchForm.js index ca1f181..357a454 100644 --- a/src/pages/Payment/Search_Public/SearchForm.js +++ b/src/pages/Payment/Search_Public/SearchForm.js @@ -181,6 +181,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { disablePortal={false} id="status" size="small" + disableClearable filterOptions={(options) => options} options={ComboData.paymentStatus} value={status} diff --git a/src/pages/Proof/Search_Public/SearchForm.js b/src/pages/Proof/Search_Public/SearchForm.js index ef90513..58b0267 100644 --- a/src/pages/Proof/Search_Public/SearchForm.js +++ b/src/pages/Proof/Search_Public/SearchForm.js @@ -314,6 +314,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, issueComboData disablePortal={false} size="small" id="status" + disableClearable filterOptions={(options) => options} options={ComboData.proofStatusFull} value={status} diff --git a/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js b/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js index db90902..afffd18 100644 --- a/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js +++ b/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js @@ -196,6 +196,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { {...register("status")} id="status" size="small" + disableClearable // filterOptions={(options)=>options} options={ localStorage.getItem('userData').creditor ? diff --git a/src/pages/User/ManagePage_OrgPublic/index.js b/src/pages/User/ManagePage_OrgPublic/index.js index 859b50e..56294bc 100644 --- a/src/pages/User/ManagePage_OrgPublic/index.js +++ b/src/pages/User/ManagePage_OrgPublic/index.js @@ -191,7 +191,7 @@ const ManageOrgUserPage = () => { width: isMdOrLg ? 'auto' : 160, flex: isMdOrLg ? 1 : undefined, renderCell: (params) => { - console.log(params); + // console.log(params); return ( <> {params.row.id == userId ? diff --git a/src/pages/authentication/ForgotPassword/AuthCallback/index.js b/src/pages/authentication/ForgotPassword/AuthCallback/index.js index 07cf5b1..47c1c33 100644 --- a/src/pages/authentication/ForgotPassword/AuthCallback/index.js +++ b/src/pages/authentication/ForgotPassword/AuthCallback/index.js @@ -52,7 +52,7 @@ const Index = () => { const intl = useIntl(); React.useEffect(() => { - console.log(params); + // console.log(params); setEnterUseEffect(true) }, []); @@ -63,7 +63,7 @@ const Index = () => { }, [enterUseEffect]) const handleVerify = async () => { - console.log(params); + // console.log(params); await axios.get(UrlUtils.GET_FORGOT_PASSWORD_VERIFY_USER_ACCOUNT, { params: { email: decodeURIComponent(params.email), diff --git a/src/pages/authentication/ForgotUsername/AuthCallback/index.js b/src/pages/authentication/ForgotUsername/AuthCallback/index.js index dbe9b55..e400089 100644 --- a/src/pages/authentication/ForgotUsername/AuthCallback/index.js +++ b/src/pages/authentication/ForgotUsername/AuthCallback/index.js @@ -55,7 +55,7 @@ const Index = () => { const intl = useIntl(); React.useEffect(() => { - console.log(params); + // console.log(params); setEnterUseEffect(true) }, []); @@ -67,7 +67,7 @@ const Index = () => { }, [enterUseEffect]) const handleVerify = async () => { - console.log(params); + // console.log(params); await axios.get(UrlUtils.GET_FORGOT_PASSWORD_VERIFY_USER_ACCOUNT, { params: { email: decodeURIComponent(params.email), diff --git a/src/pages/authentication/auth-forms/CustomFormWizard.js b/src/pages/authentication/auth-forms/CustomFormWizard.js index 15578c3..7196e18 100644 --- a/src/pages/authentication/auth-forms/CustomFormWizard.js +++ b/src/pages/authentication/auth-forms/CustomFormWizard.js @@ -113,6 +113,7 @@ const CustomFormWizard = (props) => { const [checkIdDocHKIDNumberBlur, setCheckIdDocHKIDNumberBlur] = useState(false) const [checkDigit, setCheckDigit] = useState(document.getElementById("checkDigit-login")) const [checkCheckDigitBlur, setCheckCheckDigitBlur] = useState(false) + const [checkHKIdDocWithCheckDigit, setCheckHKIdDocWithCheckDigit] = useState(false) const email = document.getElementById("email-login") const [checkEmail, setCheckEmail] = useState(false) const [checkEmailBlur, setCheckEmailBlur] = useState(false) @@ -553,7 +554,12 @@ const CustomFormWizard = (props) => { // } switch (selectedIdDocType) { case "HKID": - if (checkDigit === "") return false + if (checkDigit === ""){ + setCheckHKIdDocWithCheckDigit(true) + return false + } else{ + setCheckHKIdDocWithCheckDigit(false) + } if (idNo.match(pattern_HKIDv1)) { return true } else if (idNo.match(pattern_HKIDv2)) { @@ -701,7 +707,7 @@ const CustomFormWizard = (props) => { idNo: yup.string().required(getRequiredErrStr('number')) .matches(/^[aA-zZ0-9\s]+$/, { message: displayErrorMsg(`${selectedIdDocInputType}${intl.formatMessage({ id: 'noSpecialCharacter' })}`) }) .matches(/^\S*$/, { message: displayErrorMsg(`${selectedIdDocInputType}${intl.formatMessage({ id: 'noSpace' })}`) }) - .test('checkIDCardFormat', displayErrorMsg(`${intl.formatMessage({ id: 'requiredValid' })}${selectedIdDocInputType}${intl.formatMessage({ id: 'number' })}`), function (value) { + .test('checkIDCardFormat', displayErrorMsg(`${intl.formatMessage({ id: 'requiredValid' })}${selectedIdDocInputType==undefined?"":selectedIdDocInputType}${intl.formatMessage({ id: 'number' })}`), function (value) { const idDocType = selectedIdDocType.type; var pattern_HKIDv1 = /^[A-Z]{1}[0-9]{6}$/; var pattern_HKIDv2 = /^[A-Z]{2}[0-9]{6}$/; @@ -1085,7 +1091,7 @@ const CustomFormWizard = (props) => { placeholder={intl.formatMessage({ id: 'idDocNumber' })} fullWidth sx={{ mr: 1 }} - error={Boolean(formik.touched.idNo && formik.errors.idNo && checkIdDocNumber)} + error={Boolean(formik.touched.idNo && formik.errors.idNo && checkIdDocNumber && checkHKIdDocWithCheckDigit)} onBlur={formik.handleBlur} inputProps={{ maxLength: selectedIdDocType.type === 'HKID' ? 8 : 18, @@ -1109,7 +1115,12 @@ const CustomFormWizard = (props) => { )} {checkIdDocNumber && ( - + + + )} + {checkHKIdDocWithCheckDigit && ( + + )} @@ -1188,7 +1199,7 @@ const CustomFormWizard = (props) => { )} {checkIdDocNumber && ( - + )} diff --git a/src/pages/dashboard/Public/Notice.js b/src/pages/dashboard/Public/Notice.js index e723a07..28b8161 100644 --- a/src/pages/dashboard/Public/Notice.js +++ b/src/pages/dashboard/Public/Notice.js @@ -31,10 +31,10 @@ const SearchDemandNoteForm = (props) => { if(listData == []) return; listData.map((item) => { list.push( - + {locale === 'en' ?item.subjectEng:locale === 'zh-HK' ?item.subjectCht:item.subjectChs} {DateUtils.dateValue(item.announceDate)} - {locale === 'en' ?item.contentEng:locale === 'zh-HK' ?item.contentCht:item.contentChs} + {locale === 'en' ?item.contentEng:locale === 'zh-HK' ?item.contentCht:item.contentChs} ) @@ -51,10 +51,10 @@ const SearchDemandNoteForm = (props) => { return ( - {itemList} diff --git a/src/translations/en.json b/src/translations/en.json index 2fc0d23..923f4aa 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -198,7 +198,7 @@ "createOrReActivate": "Create account", "usernameTaken": "This user login name has been registered, please use another user login name", "userRegistered": "This user has already registered. Please return to the login page and log in.", - "idNoTaken": "This user login name has been registered, please use another user login name", + "idNoTaken": "This identification number has been registered", "user": "User", "personalUser": "Personal User", diff --git a/src/translations/zh-CN.json b/src/translations/zh-CN.json index e6281a8..202e189 100644 --- a/src/translations/zh-CN.json +++ b/src/translations/zh-CN.json @@ -233,6 +233,7 @@ "createOrReActivate": "建立帐户", "usernameTaken": "此用户登入名称已被注册,请使用其他用户登入名称。", "userRegistered": "此用户已注册,请返回登入页面登入。", + "idNoTaken": "此证件已被注册。", "user": "用戶", "personalUser": "個人用戶", diff --git a/src/translations/zh-HK.json b/src/translations/zh-HK.json index 743abf2..b7ce3cd 100644 --- a/src/translations/zh-HK.json +++ b/src/translations/zh-HK.json @@ -234,6 +234,7 @@ "createOrReActivate": "建立帳戶", "usernameTaken": "此用戶登入名稱已被註冊,請使用其他用戶登入名稱", "userRegistered": "此用戶已註冊,請返回登入頁面登入。", + "idNoTaken": "此證件已被註冊。", "user": "用戶", "personalUser": "個人用戶", diff --git a/src/utils/Combo.js b/src/utils/Combo.js index 6c06b83..e426802 100644 --- a/src/utils/Combo.js +++ b/src/utils/Combo.js @@ -15,6 +15,7 @@ export default function Combo ({valueName, disabled, form, dataList, filterOptio id={valueName} name={valueName} disabled={disabled} + disableClearable value={value} inputValue={inputValue} filterOptions={filterOptions}