diff --git a/src/pages/DemandNote/Search/SearchForm.js b/src/pages/DemandNote/Search/SearchForm.js index 62f793d..1b4bbf7 100644 --- a/src/pages/DemandNote/Search/SearchForm.js +++ b/src/pages/DemandNote/Search/SearchForm.js @@ -209,10 +209,11 @@ const SearchDemandNoteForm = ({ applySearch, orgComboData, searchCriteria, issue disablePortal id="orgId" options={orgCombo} + groupBy={(option) => option.groupType} size="small" value={orgSelected} getOptionLabel={(option) => option.name? option.name : ""} - inputValue={orgSelected ? orgSelected.name : ""} + inputValue={orgSelected ? orgSelected.name : ""} onChange={(event, newValue) => { if (newValue !== null) { setOrgSelected(newValue); @@ -228,12 +229,19 @@ const SearchDemandNoteForm = ({ applySearch, orgComboData, searchCriteria, issue }} /> )} + renderGroup={(params) => ( + + + {params.group} + + {params.children} + + )} /> : <> } - 0) ? orgSelected?.key : "", issueId: issueSelected?.id, groupNo: data.groupNo, + gazettGroup: groupSelected?.type, }; applySearch(temp); // setSearchReady(true) @@ -353,6 +355,30 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss /> + + option.label} + onChange={(event, newValue) => { + setGroupSelected(newValue); + }} + renderInput={(params) => ( + + )} + /> + + + {/*last row*/} diff --git a/src/pages/PublicNotice/Search_Mark_As_Paid_GLD/SearchForm.js b/src/pages/PublicNotice/Search_Mark_As_Paid_GLD/SearchForm.js index 18288d2..43feb3a 100644 --- a/src/pages/PublicNotice/Search_Mark_As_Paid_GLD/SearchForm.js +++ b/src/pages/PublicNotice/Search_Mark_As_Paid_GLD/SearchForm.js @@ -295,6 +295,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss disablePortal id="orgId" options={orgCombo} + groupBy={(option) => option.groupType} size="small" value={orgSelected} getOptionLabel={(option) => option.name? option.name : ""} @@ -314,6 +315,14 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss }} /> )} + renderGroup={(params) => ( + + + {params.group} + + {params.children} + + )} /> : <> diff --git a/src/utils/ComboData.js b/src/utils/ComboData.js index 792e3b9..a0b0f50 100644 --- a/src/utils/ComboData.js +++ b/src/utils/ComboData.js @@ -91,8 +91,8 @@ export const publicNoticeStatic_GLD = [ export const groupTitle = [ - { key: 1, labelCht: 'A1 - 私人帳單', label: 'A1 - Private Bill', title: 'Private Bill', type: 'A'}, - { key: 2, labelCht: 'A2 - ???', label: 'A2 - Stock Shares', title: 'Stock Shares', type: 'A'}, + { 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' },