수요신청현황에서 수요정보 수정 기능 추가
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user