하수재이용 등록 수정
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user