wr: 하수재이용등록 화면 속도개선-오류수정
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user