diff --git a/apps/wr/app/store/map/splyPop/index.tsx b/apps/wr/app/store/map/splyPop/index.tsx index 7ea586e63..b92df81df 100644 --- a/apps/wr/app/store/map/splyPop/index.tsx +++ b/apps/wr/app/store/map/splyPop/index.tsx @@ -1,3 +1,6 @@ +/** + * 표준공사비 산정 섹션에서 후보지 조회 + */ import { getFetch } from "@/components/lib/api"; import type { FacilityInfo, SubsInfo } from "./type"; import { DEV_URL_FO } from "@/components/lib/config"; diff --git a/apps/wr/app/store/ruseFcltMng/fcltReg/pbnstReg/index.tsx b/apps/wr/app/store/ruseFcltMng/fcltReg/pbnstReg/index.tsx index 5660adbff..fe6b606f6 100644 --- a/apps/wr/app/store/ruseFcltMng/fcltReg/pbnstReg/index.tsx +++ b/apps/wr/app/store/ruseFcltMng/fcltReg/pbnstReg/index.tsx @@ -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,