| @@ -45,8 +45,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria,issu | |||||
| dateFrom: data.dateFrom, | dateFrom: data.dateFrom, | ||||
| dateTo: data.dateTo, | dateTo: data.dateTo, | ||||
| contact: data.contact, | contact: data.contact, | ||||
| // status: (status?.type && status?.type != 'all') ? status?.type : "", | |||||
| status: data.status, | |||||
| status: (data.status === '' || data.status.includes("all")) ? "" : data.status, | |||||
| orgId: (orgSelected?.key && orgSelected?.key > 0) ? orgSelected?.key : "", | orgId: (orgSelected?.key && orgSelected?.key > 0) ? orgSelected?.key : "", | ||||
| issueId: issueSelected?.id, | issueId: issueSelected?.id, | ||||
| groupNo: data.groupNo, | groupNo: data.groupNo, | ||||
| @@ -197,12 +196,19 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria,issu | |||||
| value={selectedStatus} | value={selectedStatus} | ||||
| onChange={(event, newValue) => { | onChange={(event, newValue) => { | ||||
| console.log(newValue) | |||||
| const selectedLabels = newValue.map(option => option.type); | |||||
| const selectedLabelsString = `${selectedLabels.join(',')}`; | |||||
| console.log(selectedLabelsString) | |||||
| setSelectedStatus(newValue); | |||||
| setSelectedLabelsString(selectedLabelsString); | |||||
| const findAllIndex = newValue.findIndex((ele) => { | |||||
| return ele.type === "all" | |||||
| }) | |||||
| if (findAllIndex > -1) { | |||||
| setSelectedStatus([newValue[findAllIndex]]); | |||||
| setSelectedLabelsString('all') | |||||
| } else { | |||||
| const selectedLabels = newValue.map(option => option.type); | |||||
| const selectedLabelsString = `${selectedLabels.join(',')}`; | |||||
| setSelectedStatus(newValue); | |||||
| setSelectedLabelsString(selectedLabelsString); | |||||
| } | |||||
| }} | }} | ||||
| getOptionLabel={(option) => option.label} | getOptionLabel={(option) => option.label} | ||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||