수요신청현황에서 수요정보 수정 기능 추가

This commit is contained in:
jsyang
2026-04-02 15:44:40 +09:00
parent f5f2a8f675
commit f528c0e893
2 changed files with 123 additions and 10 deletions
+18
View File
@@ -466,6 +466,19 @@ const postSdmInfoData = async (data: SdmInfoFormData): Promise<boolean> => {
}
}
// 수요정보 수정
const fetchUpdateSdmInfoData = async (data: SdmInfoFormData): Promise<boolean> => {
try {
await postFetch("/reuseFc/request/updateDemandInfo", data);
alert('수요 정보 수정에 성공하였습니다.');
return true;
} catch (error) {
console.log(error);
alert('수요 정보 수정에 실패하였습니다.');
return false;
}
}
const postSdmLoginData = async (data: DemandCompType) => {
try {
const res = await postFetch("/reuseFc/request/login", data);
@@ -539,6 +552,7 @@ export type SdmActions = {
initializeSdmData: () => void;
insertSdmData: (data: DemandCompType) => Promise<void>;
insertSdmInfoData: (data: SdmInfoFormData) => Promise<boolean>;
updateSdmInfoData: (data: SdmInfoFormData) => Promise<boolean>;
getDemandCompList: (searchText: string, pageCnt: number) => Promise<void>;
actionLogin: (data: DemandCompType) => Promise<void>;
getSdmInfoStatusList: (dmdInfoId: string) => Promise<void>;
@@ -617,6 +631,10 @@ export const SdmReducer = (set: any): SdmActions => {
return await postSdmInfoData(data);
},
updateSdmInfoData: async (data: SdmInfoFormData): Promise<boolean> => {
return await fetchUpdateSdmInfoData(data);
},
// 수요처 정보
getDemandCompList: async (searchText: string, pageCnt: number) => {
const res = await getDemandCompList(searchText, pageCnt);