Explorar el Código

add search combo for gld views

CR003
Alex Cheung hace 9 meses
padre
commit
48a88815c1
Se han modificado 4 ficheros con 48 adiciones y 4 borrados
  1. +10
    -2
      src/pages/DemandNote/Search/SearchForm.js
  2. +27
    -0
      src/pages/PublicNotice/Search_GLD/SearchForm.js
  3. +9
    -0
      src/pages/PublicNotice/Search_Mark_As_Paid_GLD/SearchForm.js
  4. +2
    -2
      src/utils/ComboData.js

+ 10
- 2
src/pages/DemandNote/Search/SearchForm.js Ver fichero

@@ -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) => (
<Grid item key={params.key}>
<Typography fontSize={20} fontStyle="italic" p={1}>
{params.group}
</Typography>
{params.children}
</Grid>
)}
/>
</Grid>
: <></>
}


<Grid item xs={9} s={6} md={5} lg={3} sx={{ ml: 3, mr: 3, mb: 3 }}>
<TextField
fullWidth


+ 27
- 0
src/pages/PublicNotice/Search_GLD/SearchForm.js Ver fichero

@@ -31,6 +31,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss
const [issueSelected, setIssueSelected] = React.useState({});
const [issueCombo, setIssueCombo] = React.useState([]);
const [selectedStatus, setSelectedStatus] = React.useState({key: 0, label: 'All', type: 'all'});
const [groupSelected, setGroupSelected] = React.useState({});

const [minDate, setMinDate] = React.useState(searchCriteria.dateFrom);
const [maxDate, setMaxDate] = React.useState(searchCriteria.dateTo);
@@ -74,6 +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,
};
applySearch(temp);
// setSearchReady(true)
@@ -353,6 +355,30 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss
/>
</Grid>

<Grid item xs={9} s={6} md={5} lg={3} sx={{ ml: 3, mr: 3, mb: marginBottom }}>
<Autocomplete
{...register("gazettGroup")}
disablePortal
size="small"
id="gazettGroup"
options={ComboData.groupTitle}
value={groupSelected}
inputValue={(groupSelected?.label) ? groupSelected?.label : ""}
getOptionLabel={(option) => option.label}
onChange={(event, newValue) => {
setGroupSelected(newValue);
}}
renderInput={(params) => (
<TextField {...params}
label="Gazette Group"
InputLabelProps={{
shrink: true
}}
/>
)}
/>
</Grid>

<Grid item xs={9} s={6} md={5} lg={3} sx={{ ml: 3, mr: 3, mb: marginBottom }}>
<TextField
fullWidth
@@ -365,6 +391,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss
}}
/>
</Grid>

</Grid>

{/*last row*/}


+ 9
- 0
src/pages/PublicNotice/Search_Mark_As_Paid_GLD/SearchForm.js Ver fichero

@@ -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) => (
<Grid item key={params.key}>
<Typography fontSize={20} fontStyle="italic" p={1}>
{params.group}
</Typography>
{params.children}
</Grid>
)}
/>
</Grid>
: <></>


+ 2
- 2
src/utils/ComboData.js Ver fichero

@@ -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' },


Cargando…
Cancelar
Guardar