feat: 관리자 - 위원회관리 - 위원회 일정관리에서 일정 수정 시에는 '삭제'버튼 동작 되지 않는 버그 수정
parent
a7bd005ca3
commit
4605f802b8
|
|
@ -285,6 +285,31 @@ function SchedulesEdit(props) {
|
||||||
}, [scheduleDetail && scheduleDetail.upCommittee]);
|
}, [scheduleDetail && scheduleDetail.upCommittee]);
|
||||||
|
|
||||||
|
|
||||||
|
const onClickDeleteSchedule = (schdulId) => {
|
||||||
|
const deleteBoardURL = `/schedule/${schdulId}`;
|
||||||
|
|
||||||
|
const requestOptions = {
|
||||||
|
method: "DELETE",
|
||||||
|
headers: {
|
||||||
|
'Content-type': 'application/json',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
EgovNet.requestFetch(deleteBoardURL,
|
||||||
|
requestOptions,
|
||||||
|
(resp) => {
|
||||||
|
console.log("====>>> Schdule delete= ", resp);
|
||||||
|
if (Number(resp.resultCode) === Number(CODE.RCV_SUCCESS)) {
|
||||||
|
alert("게시글이 삭제되었습니다.")
|
||||||
|
navigate(URL.ADMIN__COMMITTEE__SCHEDULES ,{ replace: true });
|
||||||
|
} else {
|
||||||
|
navigate({pathname: URL.ERROR}, {state: {msg : resp.resultMessage}});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
console.log("------------------------------EgovAdminScheduleEdit [End]");
|
console.log("------------------------------EgovAdminScheduleEdit [End]");
|
||||||
console.groupEnd("EgovAdminScheduleEdit");
|
console.groupEnd("EgovAdminScheduleEdit");
|
||||||
return (
|
return (
|
||||||
|
|
@ -434,7 +459,10 @@ function SchedulesEdit(props) {
|
||||||
onClick={() => updateSchedule()}
|
onClick={() => updateSchedule()}
|
||||||
> 저장</button>
|
> 저장</button>
|
||||||
{modeInfo.mode === CODE.MODE_MODIFY &&
|
{modeInfo.mode === CODE.MODE_MODIFY &&
|
||||||
<a href="#!" className="btn btn_skyblue_h46 w_100">삭제</a>
|
<button className="btn btn_skyblue_h46 w_100"
|
||||||
|
onClick={(e) => {
|
||||||
|
onClickDeleteSchedule(location.state?.schdulId);
|
||||||
|
}}>삭제</button>
|
||||||
}
|
}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue