wr: 하수재이용등록 화면 속도개선-오류수정

This commit is contained in:
2026-06-29 11:48:37 +09:00
parent 1862477641
commit 5505791b6e
2 changed files with 25 additions and 0 deletions
+3
View File
@@ -1,3 +1,6 @@
/**
* 표준공사비 산정 섹션에서 후보지 조회
*/
import { getFetch } from "@/components/lib/api";
import type { FacilityInfo, SubsInfo } from "./type";
import { DEV_URL_FO } from "@/components/lib/config";
@@ -103,6 +103,28 @@ export const pubFacStateExport: pubFacState = {
fclts: null,
},
};
// 재사용시설에 대한 정보 조회
export const checkWrRegList = async (get: any, set: any) => {
const { pbnst } = get();
if (Array.isArray(pbnst.fclts)) {
return pbnst.fclts;
}
const wrRegList = await getFetch("wr", `/reuseFc/pubFc`);
const fclts = Array.isArray(wrRegList) ? wrRegList : [];
set((state: pubFacState) => ({
...state,
pbnst: {
...state.pbnst,
fclts,
},
}));
return fclts;
};
// 하수처리시설 정보 조회
const hasuListFetch = async (
_get: any,