fix: 하수도정비기본계획보고서 시도, 시군구 조회 조건 에러 수정
This commit is contained in:
@@ -90,9 +90,6 @@ const ReportTab: React.FC<ReportTabProps> = ({ open, isSearch = true, ctpvNm, sg
|
||||
const handleCtpvCdChange = (sidoId: number) => {
|
||||
setCtpvCd(sidoId);
|
||||
setSggCd(0);
|
||||
setReportGubun('0');
|
||||
setYearFilter({ start: "", end: "", });
|
||||
// setGubun("");
|
||||
}
|
||||
|
||||
// 조회 버튼 클릭 시 1페이지로 이동 및 데이터 초기화
|
||||
@@ -126,12 +123,12 @@ const ReportTab: React.FC<ReportTabProps> = ({ open, isSearch = true, ctpvNm, sg
|
||||
const reportData = flattenFolders(reportOriginData);
|
||||
let filterReportData = reportData;
|
||||
|
||||
if (ctpvCd !== 0) { // 시도검색
|
||||
const sidoOption = ctpv.find((n) => n.id === ctpvCd);
|
||||
if (ctpvCd) { // 시도검색
|
||||
const sidoOption = ctpv.find((n) => Number(n.id) === ctpvCd);
|
||||
filterReportData = filterReportData.filter(item => item.sido === sidoOption?.name);
|
||||
}
|
||||
if (sggCd !== 0) { // 시군구검색
|
||||
const sigunguOption = sgg.find((n) => n.id === sggCd);
|
||||
if (sggCd) { // 시군구검색
|
||||
const sigunguOption = sgg.find((n) => Number(n.id) === sggCd);
|
||||
filterReportData = filterReportData.filter(item => item.sigungu === sigunguOption?.name);
|
||||
}
|
||||
if (reportGubun !== "0") { // 보고서구분검색
|
||||
|
||||
Reference in New Issue
Block a user