하수재이용 등록 수정

This commit is contained in:
leedj312
2025-06-15 21:31:26 +09:00
parent 285fa7c819
commit 11af1841f1
16 changed files with 1027 additions and 636 deletions
+7 -6
View File
@@ -5,7 +5,7 @@ import {
putFectch,
} from "@/components/lib/api";
import type { pubHasuType } from "../../ruseFcltMng/fcltReg/pbnstReg/type";
import type { DemandCompType } from "@common/business_components/ui";
import type { DemandCompType } from "@common/business_components/ui/sdmInsertForm/form";
export type comFcltState = {
searchFclts: pubHasuType;
demandCompList: DemandCompType[];
@@ -24,9 +24,9 @@ export const searchActions: (set: any) => comFcltActions = (set: any) => {
getSwtrmtFcltNm: async (searchNm: string) => {
const fcltNm = await getFetch(
"common",
`/prcsFclt/info/1/20/${searchNm}`
`/prcsFclt/info/1/11/${searchNm}`
);
const fcltNmCd: pubHasuType[] = fcltNm.map((item: any) => ({
const searchFclts: pubHasuType[] = fcltNm.map((item: any) => ({
bscFctCd: item.bscFctCd,
sido: item.sido,
gugun: item.gugun,
@@ -36,7 +36,7 @@ export const searchActions: (set: any) => comFcltActions = (set: any) => {
}));
set((state: comFcltState) => ({
...state,
searchFclts: fcltNmCd,
searchFclts: searchFclts,
}));
},
getDemandCompList: async (searchNm: string, cnt: number) => {
@@ -44,9 +44,10 @@ export const searchActions: (set: any) => comFcltActions = (set: any) => {
fetchType.WR,
`/reuseFc/request/${searchNm}/${cnt}`
);
console.log(coList);
set((state: comFcltState) => {
state.demandCompList = coList;
return state;
return state.demandCompList = [...coList];
});
},
regDemandCompany: async (data: DemandCompType) => {