|
@@ -31,7 +31,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss |
|
|
const [minDate, setMinDate] = React.useState(searchCriteria.dateFrom); |
|
|
const [minDate, setMinDate] = React.useState(searchCriteria.dateFrom); |
|
|
const [maxDate, setMaxDate] = React.useState(searchCriteria.dateTo); |
|
|
const [maxDate, setMaxDate] = React.useState(searchCriteria.dateTo); |
|
|
|
|
|
|
|
|
const marginBottom = 2; |
|
|
|
|
|
|
|
|
const marginBottom = 2.5; |
|
|
const { reset, register, handleSubmit } = useForm() |
|
|
const { reset, register, handleSubmit } = useForm() |
|
|
const onSubmit = (data) => { |
|
|
const onSubmit = (data) => { |
|
|
data.status = selectedLabelsString |
|
|
data.status = selectedLabelsString |
|
@@ -71,6 +71,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss |
|
|
// setStatus({ key: 0, label: 'All', type: 'all' }); |
|
|
// setStatus({ key: 0, label: 'All', type: 'all' }); |
|
|
setOrgSelected({}); |
|
|
setOrgSelected({}); |
|
|
setIssueSelected({}); |
|
|
setIssueSelected({}); |
|
|
|
|
|
setSelectedStatus([]); |
|
|
reset(); |
|
|
reset(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@@ -112,40 +113,48 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss |
|
|
/> |
|
|
/> |
|
|
</Grid> |
|
|
</Grid> |
|
|
|
|
|
|
|
|
<Grid item xs={9} s={6} md={5} lg={3} sx={{ ml: 3, mr: 3, mb: marginBottom }}> |
|
|
|
|
|
<TextField |
|
|
|
|
|
fullWidth |
|
|
|
|
|
{...register("dateFrom")} |
|
|
|
|
|
id="dateFrom" |
|
|
|
|
|
type="date" |
|
|
|
|
|
label={"Submit Date(From)"} |
|
|
|
|
|
defaultValue={searchCriteria.dateFrom} |
|
|
|
|
|
InputProps={{ inputProps: { max: maxDate } }} |
|
|
|
|
|
onChange={(newValue) => { |
|
|
|
|
|
setMinDate(DateUtils.dateStr(newValue)); |
|
|
|
|
|
}} |
|
|
|
|
|
InputLabelProps={{ |
|
|
|
|
|
shrink: true |
|
|
|
|
|
}} |
|
|
|
|
|
/> |
|
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
|
<Grid item xs={9} s={6} md={5} lg={3} sx={{ml:3, mr:3, mb:marginBottom}}> |
|
|
|
|
|
<Grid container> |
|
|
|
|
|
<Grid item xs={5.25} s={5.25} md={5.25} lg={5.5}> |
|
|
|
|
|
<TextField |
|
|
|
|
|
fullWidth |
|
|
|
|
|
{...register("dateFrom")} |
|
|
|
|
|
id="dateFrom" |
|
|
|
|
|
type="date" |
|
|
|
|
|
label={"Submit Date(From)"} |
|
|
|
|
|
defaultValue={searchCriteria.dateFrom} |
|
|
|
|
|
InputProps={{ inputProps: { max: maxDate } }} |
|
|
|
|
|
onChange={(newValue) => { |
|
|
|
|
|
setMinDate(DateUtils.dateStr(newValue)); |
|
|
|
|
|
}} |
|
|
|
|
|
InputLabelProps={{ |
|
|
|
|
|
shrink: true |
|
|
|
|
|
}} |
|
|
|
|
|
/> |
|
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
|
<Grid item xs={9} s={6} md={5} lg={3} sx={{ ml: 3, mr: 3, mb: marginBottom }}> |
|
|
|
|
|
<TextField |
|
|
|
|
|
fullWidth |
|
|
|
|
|
InputLabelProps={{ |
|
|
|
|
|
shrink: true |
|
|
|
|
|
}} |
|
|
|
|
|
{...register("dateTo")} |
|
|
|
|
|
InputProps={{ inputProps: { min: minDate } }} |
|
|
|
|
|
onChange={(newValue) => { |
|
|
|
|
|
setMaxDate(DateUtils.dateStr(newValue)); |
|
|
|
|
|
}} |
|
|
|
|
|
id="dateTo" |
|
|
|
|
|
type="date" |
|
|
|
|
|
label={"Submit Date(To)"} |
|
|
|
|
|
defaultValue={searchCriteria.dateTo} |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
<Grid item xs={1.5} s={1.5} md={1.5} lg={1} sx={{mt:0.8, display: 'flex', justifyContent:"center", alignItems: 'flex-start'}}> |
|
|
|
|
|
To |
|
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
|
|
|
|
<Grid item xs={5.25} s={5.25} md={5.25} lg={5.5}> |
|
|
|
|
|
<TextField |
|
|
|
|
|
fullWidth |
|
|
|
|
|
InputLabelProps={{ |
|
|
|
|
|
shrink: true |
|
|
|
|
|
}} |
|
|
|
|
|
{...register("dateTo")} |
|
|
|
|
|
InputProps={{ inputProps: { min: minDate } }} |
|
|
|
|
|
onChange={(newValue) => { |
|
|
|
|
|
setMaxDate(DateUtils.dateStr(newValue)); |
|
|
|
|
|
}} |
|
|
|
|
|
id="dateTo" |
|
|
|
|
|
type="date" |
|
|
|
|
|
//label={"Submit Date(To)"} |
|
|
|
|
|
defaultValue={searchCriteria.dateTo} |
|
|
|
|
|
/> |
|
|
|
|
|
</Grid> |
|
|
|
|
|
</Grid> |
|
|
</Grid> |
|
|
</Grid> |
|
|
|
|
|
|
|
|
<Grid item xs={9} s={6} md={5} lg={3} sx={{ ml: 3, mr: 3, mb: marginBottom }}> |
|
|
<Grid item xs={9} s={6} md={5} lg={3} sx={{ ml: 3, mr: 3, mb: marginBottom }}> |
|
|