- 빗물, 중수도, 온배수 시설등록 페이지 세종특별자치시 "전체", "없음" 표시 에러 수정
- bdstReg 신규 등록 시 세종특별자치시 에러 수정
- rainSearch 주석 삭제
This commit is contained in:
swcho
2025-11-03 14:54:43 +09:00
parent f5018e8689
commit e111fab241
6 changed files with 16 additions and 7 deletions
@@ -66,6 +66,8 @@ export default function Home() {
return {
...item,
archArea: archArea,
cityText: item.ctpvCd === 0 ? "세종특별자치시" : (item as any).cityText,
sggText: (item as any).sggText === "없음" ? "-" : (item as any).sggText,
};
}
);
@@ -78,10 +78,11 @@ export default function Home() {
archArea: formatArchArea(item?.archArea, 1),
bdstChgYn: item.chgBuilding[0]?.bdstChgNm != null ? "Y" : "N",
frstArchPrmsnDt: item?.frstArchPrmsnDt || "확인불가",
cityText: item.ctpvCd === 0 ? "세종특별자치시" : (item as any).cityText,
sggText: (item as any).sggText === "없음" ? "-" : (item as any).sggText,
};
}
);
setbdstTable(rainData);
} else {
setbdstTable([]);
@@ -80,6 +80,8 @@ export default function Home() {
archArea: archArea,
bdstChgYn: item.chgBuilding[0]?.bdstChgNm != null ? "Y" : "N",
bdstUsgCd: item.reuseBuilding[0]?.bdstUsgCd,
cityText: item.ctpvCd === 0 ? "세종특별자치시" : (item as any).cityText,
sggText: (item as any).sggText === "없음" ? "-" : (item as any).sggText,
};
}
);
@@ -171,7 +171,6 @@ export const rainFacActionsExport: (set: any) => rainFacSActions = (
`/reuseFc/rainyInfoList/${pageNation}/${rainRegSize}/${code}` +
(txt ? `/${txt}` : "")
);
console.log("rainRes", rainRes);
set((state: rainFacState) => {
return {
rain: {
@@ -77,7 +77,7 @@ export default function BdstReg({ form, type }: { form: any; type?: string }) {
useEffect(() => {
const city = String(userCtpvCd);
if (city && city === "0") {
if (city && (city === "0" || city === "50")) {
setUserSggCd([{ text: "전체", val: "0" }]);
form.setValue("sggCd", 0, {
@@ -122,10 +122,15 @@ export function BdstReg<T extends MoType>({
setUserSggCd([{ text: "전체", val: "0" }]);
setObjSearch({ ...objSearch, sgg: "0" });
} else if (city.length === 2) {
const sgg = code.sggCd.filter((item) => item.val.slice(0, 2) === city);
//sgg.unshift({ text: "전체", val: "0" });
setUserSggCd(sgg);
setObjSearch({ ...objSearch, sgg: Number(sgg[0]?.val) });
if (city === "50") {
setUserSggCd([{ text: "전체", val: "0" }] as SelectDataType[]);
setObjSearch({ ...objSearch, sgg: "0" });
} else {
const sgg = code.sggCd.filter((item) => item.val.slice(0, 2) === city);
//sgg.unshift({ text: "전체", val: "0" });
setUserSggCd(sgg);
setObjSearch({ ...objSearch, sgg: Number(sgg[0]?.val) });
}
}
}, [objSearch.city]);