diff --git a/src/pages/Proof/Create_FromApp/ApplicationDetails.js b/src/pages/Proof/Create_FromApp/ApplicationDetails.js index 7242b09..d93e63d 100644 --- a/src/pages/Proof/Create_FromApp/ApplicationDetails.js +++ b/src/pages/Proof/Create_FromApp/ApplicationDetails.js @@ -27,26 +27,50 @@ const SearchPublicNoticeForm = ({ formData }) => { initialValues: data, }); - const DisplayField = ({ name, width }) => { - return { + return <> + {dummyUser? + + : + } - />; + } @@ -97,9 +121,16 @@ const SearchPublicNoticeForm = ({ formData }) => { - + { + formik.values?.orgId? + : + + } diff --git a/src/pages/Proof/Reply_GLD/ApplicationDetails.js b/src/pages/Proof/Reply_GLD/ApplicationDetails.js index 0ccca76..239d5ff 100644 --- a/src/pages/Proof/Reply_GLD/ApplicationDetails.js +++ b/src/pages/Proof/Reply_GLD/ApplicationDetails.js @@ -37,6 +37,7 @@ const ApplicationDetailCard = ({ useEffect(() => { if (formData) { + console.log(formData) setData(formData); } }, [formData]); @@ -46,26 +47,50 @@ const ApplicationDetailCard = ({ initialValues: data, }); - const DisplayField = ({ name, width }) => { - return { + return <> + {dummyUser? + + : + } - />; + } const confirmCancel = () => { @@ -170,10 +195,12 @@ const ApplicationDetailCard = ({ - {data.orgId === null ? - + {data?.orgId? + : - + } diff --git a/src/pages/Proof/Search_GLD/DataGrid.js b/src/pages/Proof/Search_GLD/DataGrid.js index b955898..1196ac9 100644 --- a/src/pages/Proof/Search_GLD/DataGrid.js +++ b/src/pages/Proof/Search_GLD/DataGrid.js @@ -83,6 +83,9 @@ export default function SearchPublicNoticeTable({searchCriteria, applyGridOnRead renderCell: (params) => { let company = params.row.enCompanyName != null?params.row.enCompanyName: params.row.chCompanyName; company = company != null ? company : ""; + if (company == "GLD"){ + company = company + ": " + params.row.appCustName + } return (<> {params?.value}
{company} ); diff --git a/src/pages/Proof/Search_GLD/SearchForm.js b/src/pages/Proof/Search_GLD/SearchForm.js index 3217c15..1af7cae 100644 --- a/src/pages/Proof/Search_GLD/SearchForm.js +++ b/src/pages/Proof/Search_GLD/SearchForm.js @@ -68,7 +68,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss refNo: data.refNo, code: data.code, issueId: issueSelected?.id, - gazettGroup: groupSelected?.type, + gazettGroup: groupSelected?.code, dateFrom: sentDateFrom, dateTo: sentDateTo, contact: data.contact, diff --git a/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js b/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js index 506207b..11e6021 100644 --- a/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js +++ b/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js @@ -115,7 +115,7 @@ const PublicNoticeApplyForm = ({ loadedData, _selections, gazetteIssueList }) => return true } }), - careOfDum: yup.string().max(60, getMaxErrStr(60)).test('checkCareOfDumFormat', intl.formatMessage({ id: 'requireCareOf' }), function (value) { + custName: yup.string().max(150, getMaxErrStr(150)).test('checkCustNameFormat', intl.formatMessage({ id: 'requireCustName' }), function (value) { if (isDummyLoggedIn()) { if (value !== undefined) { return true @@ -175,8 +175,9 @@ const PublicNoticeApplyForm = ({ loadedData, _selections, gazetteIssueList }) => setSubmitting(true) let careOf = values.careOf ?? ""; let remarks = values.remarks ?? ""; + let custName = values.custName ?? ""; if (isDummyLoggedIn()) { - careOf = values.careOfDum + custName = values.custName } if (isDummyLoggedIn()) { remarks = values.emailAddress @@ -196,6 +197,7 @@ const PublicNoticeApplyForm = ({ loadedData, _selections, gazetteIssueList }) => }, issueId: issueId, careOf: careOf, + custName: custName, remarks: remarks, }, files: [attachment], @@ -270,15 +272,27 @@ const PublicNoticeApplyForm = ({ loadedData, _selections, gazetteIssueList }) =>
- - {FieldUtils.getTextField({ - label: intl.formatMessage({ id: 'applyPerson' }) + ":", - valueName: "applyPerson", - form: formik, - disabled: true, - autoFocus: false - })} - + { + isDummyLoggedIn()? + + {FieldUtils.getTextField({ + label: intl.formatMessage({ id: 'applyPerson' }) + ":", + valueName: "custName", + form: formik, + disabled: false, + autoFocus: true + })} + : + + {FieldUtils.getTextField({ + label: intl.formatMessage({ id: 'applyPerson' }) + ":", + valueName: "applyPerson", + form: formik, + disabled: true, + autoFocus: false + })} + + } {FieldUtils.getTextField({ label: intl.formatMessage({ id: 'contactPerson' }) + ":", @@ -490,26 +504,14 @@ const PublicNoticeApplyForm = ({ loadedData, _selections, gazetteIssueList }) => {isORGLoggedIn() ? <> - {isDummyLoggedIn() ? - - {FieldUtils.getCarOfField({ - label: intl.formatMessage({ id: 'careOf' }) + ":", - valueName: "careOfDum", - form: formik, - // disabled: true - })} - - : - - {FieldUtils.getCarOfField({ - label: intl.formatMessage({ id: 'careOf' }) + ":", - valueName: "careOf", - form: formik, - // disabled: true - })} - - - } + + {FieldUtils.getCarOfField({ + label: intl.formatMessage({ id: 'careOf' }) + ":", + valueName: "careOf", + form: formik, + // disabled: true + })} + diff --git a/src/pages/PublicNotice/Details_GLD/ApplicationDetailCard.js b/src/pages/PublicNotice/Details_GLD/ApplicationDetailCard.js index b1e8ccd..b3a2ab1 100644 --- a/src/pages/PublicNotice/Details_GLD/ApplicationDetailCard.js +++ b/src/pages/PublicNotice/Details_GLD/ApplicationDetailCard.js @@ -473,21 +473,38 @@ const ApplicationDetailCard = ( }, }} /> : - + companyName.enCompanyName=="GLD"? + : + + } diff --git a/src/pages/PublicNotice/Search_GLD/DataGrid.js b/src/pages/PublicNotice/Search_GLD/DataGrid.js index c73c4b1..6b8f3cc 100644 --- a/src/pages/PublicNotice/Search_GLD/DataGrid.js +++ b/src/pages/PublicNotice/Search_GLD/DataGrid.js @@ -19,7 +19,6 @@ import { notifyActionSuccess, clickableLink } from 'utils/CommonFunction'; import { FormattedMessage, useIntl } from "react-intl"; import * as utils from "auth/utils" import { isGrantedAny } from "auth/utils"; - // ==============================|| EVENT TABLE ||============================== // export default function SearchPublicNoticeTable({ searchCriteria, applyGridOnReady }) { @@ -106,6 +105,9 @@ export default function SearchPublicNoticeTable({ searchCriteria, applyGridOnRea renderCell: (params) => { let company = params.row.enCompanyName != null ? params.row.enCompanyName : params.row.chCompanyName; company = company != null ? company : ""; + if (company == "GLD"){ + company = company + ": " + params.row.custName + } let paymentMethod = params.row.paymentMethod!=null?intl.formatMessage({ id: utils.getPaymentMethod(params.row.paymentMethod)}):"" return (<> {params?.value}
{company}
{paymentMethod} diff --git a/src/pages/PublicNotice/Search_GLD/SearchForm.js b/src/pages/PublicNotice/Search_GLD/SearchForm.js index f1d0e3f..45fb680 100644 --- a/src/pages/PublicNotice/Search_GLD/SearchForm.js +++ b/src/pages/PublicNotice/Search_GLD/SearchForm.js @@ -75,7 +75,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss orgId: (orgSelected?.key && orgSelected?.key > 0) ? orgSelected?.key : "", issueId: issueSelected?.id, groupNo: data.groupNo, - gazettGroup: groupSelected?.type, + gazettGroup: groupSelected?.code, }; applySearch(temp); // setSearchReady(true) diff --git a/src/translations/en.json b/src/translations/en.json index c3b6af0..c397958 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -395,6 +395,7 @@ "contactPerson": "Contact Person", "requireContactPerson": "Please enter contact person", "requireCareOf": "Please enter client remarks", + "requireCustName": "Please enter the applicant", "search": "Search", "searchForm": "Search Form", "cancel": "Cancel", diff --git a/src/translations/zh-CN.json b/src/translations/zh-CN.json index 0ebcec2..0ce93d5 100644 --- a/src/translations/zh-CN.json +++ b/src/translations/zh-CN.json @@ -427,6 +427,7 @@ "contactPerson": "联络人", "requireContactPerson": "请输入联络人", "requireCareOf": "请输入客户备注", + "requireCustName": "请输入申请人名称", "search": "搜寻", "searchForm": "搜寻表格", "cancel": "取消", diff --git a/src/translations/zh-HK.json b/src/translations/zh-HK.json index 2d13032..92564c4 100644 --- a/src/translations/zh-HK.json +++ b/src/translations/zh-HK.json @@ -428,6 +428,7 @@ "contactPerson": "聯絡人", "requireContactPerson": "請輸入聯絡人", "requireCareOf": "請輸入客戶備註", + "requireCustName": "請輸入申請人名稱", "search": "搜尋", "searchForm": "搜尋表格", "cancel": "取消", diff --git a/src/utils/ComboData.js b/src/utils/ComboData.js index a0b0f50..f34d8b5 100644 --- a/src/utils/ComboData.js +++ b/src/utils/ComboData.js @@ -91,12 +91,12 @@ export const publicNoticeStatic_GLD = [ export const groupTitle = [ - { key: 1, labelCht: 'A1 - 私人帳單', label: 'A1 - Private Bill', title: 'Private Bill', type: 'A001'}, - { key: 2, labelCht: 'A2 - ???', label: 'A2 - Stock Shares', title: 'Stock Shares', type: 'A002'}, - { key: 3, labelCht: 'B - 公司條例', label: 'B - Companies Ordinance', title: 'Companies Ordinance', type: 'B' }, - { key: 4, labelCht: 'C - 高等法院', label: 'C - High Court', title: 'High Court', type: 'C' }, - { key: 5, labelCht: 'D - 通知', label: 'D - Notices', title: 'Notices', type: 'D' }, - { key: 6, labelCht: 'E - 其他', label: 'E - Miscellaneous (Companies)', title: 'Miscellaneous (Companies)', type: 'E' }, + { key: 1, labelCht: 'A1 - 私人帳單', label: 'A1 - Private Bill', title: 'Private Bill', type: 'A', code: 'A001'}, + { key: 2, labelCht: 'A2 - ???', label: 'A2 - Stock Shares', title: 'Stock Shares', type: 'A', code: 'A002'}, + { key: 3, labelCht: 'B - 公司條例', label: 'B - Companies Ordinance', title: 'Companies Ordinance', type: 'B', code: 'B' }, + { key: 4, labelCht: 'C - 高等法院', label: 'C - High Court', title: 'High Court', type: 'C', code: 'C'}, + { key: 5, labelCht: 'D - 通知', label: 'D - Notices', title: 'Notices', type: 'D', code: 'D' }, + { key: 6, labelCht: 'E - 其他', label: 'E - Miscellaneous (Companies)', title: 'Miscellaneous (Companies)', type: 'E', code: 'E' }, ]; export const proofPrice = [