|
|
@@ -26,8 +26,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss |
|
|
|
const [orgCombo, setOrgCombo] = React.useState(); |
|
|
|
const [issueSelected, setIssueSelected] = React.useState({}); |
|
|
|
const [issueCombo, setIssueCombo] = React.useState([]); |
|
|
|
const [selectedStatus, setSelectedStatus] = React.useState([]); |
|
|
|
const [selectedLabelsString, setSelectedLabelsString] = React.useState(''); |
|
|
|
const [selectedStatus, setSelectedStatus] = React.useState({key: 0, label: 'All', type: 'all'}); |
|
|
|
|
|
|
|
const [minDate, setMinDate] = React.useState(searchCriteria.dateFrom); |
|
|
|
const [maxDate, setMaxDate] = React.useState(searchCriteria.dateTo); |
|
|
@@ -38,7 +37,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss |
|
|
|
const marginBottom = 2.5; |
|
|
|
const { reset, register, handleSubmit } = useForm() |
|
|
|
const onSubmit = (data) => { |
|
|
|
data.status = selectedLabelsString |
|
|
|
data.status = selectedStatus.type |
|
|
|
let typeArray = []; |
|
|
|
|
|
|
|
for (let i = 0; i < type.length; i++) { |
|
|
@@ -75,7 +74,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss |
|
|
|
// setStatus({ key: 0, label: 'All', type: 'all' }); |
|
|
|
setOrgSelected({}); |
|
|
|
setIssueSelected({}); |
|
|
|
setSelectedStatus([]); |
|
|
|
setSelectedStatus({key: 0, label: 'All', type: 'all'}); |
|
|
|
reset(); |
|
|
|
} |
|
|
|
|
|
|
@@ -188,29 +187,28 @@ 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("status")} |
|
|
|
id="status" |
|
|
|
size="small" |
|
|
|
options={ComboData.publicNoticeStatic_GLD} |
|
|
|
value={selectedStatus} |
|
|
|
onChange={(event, newValue) => { |
|
|
|
setSelectedStatus(newValue); |
|
|
|
|
|
|
|
}} |
|
|
|
getOptionLabel={(option) => option.label} |
|
|
|
renderInput={(params) => ( |
|
|
|
<TextField |
|
|
|
{...params} |
|
|
|
label="Status" |
|
|
|
InputLabelProps={{ |
|
|
|
shrink: true |
|
|
|
}} |
|
|
|
/> |
|
|
|
)} |
|
|
|
/> |
|
|
|
{/* <Autocomplete |
|
|
|
{...register("status")} |
|
|
|
disablePortal |
|
|
|
id="status" |
|
|
|
filterOptions={(options) => options} |
|
|
|
options={ComboData.publicNoticeStatic_GLD} |
|
|
|
value={status} |
|
|
|
inputValue={status?.label} |
|
|
|
onChange={(event, newValue) => { |
|
|
|
if (newValue !== null) { |
|
|
|
setStatus(newValue); |
|
|
|
} |
|
|
|
}} |
|
|
|
renderInput={(params) => ( |
|
|
|
<TextField {...params} |
|
|
|
label="Status" |
|
|
|
/> |
|
|
|
)} |
|
|
|
InputLabelProps={{ |
|
|
|
shrink: true |
|
|
|
}} |
|
|
|
/> */} |
|
|
|
<Autocomplete |
|
|
|
multiple |
|
|
|
{...register("status")} |
|
|
|
id="status" |
|
|
@@ -242,7 +240,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss |
|
|
|
}} |
|
|
|
/> |
|
|
|
)} |
|
|
|
/> |
|
|
|
/> */} |
|
|
|
</Grid> |
|
|
|
|
|
|
|
{ |
|
|
|