import React, { useState, useEffect } from 'react'; import { Link, useLocation, useNavigate } from 'react-router-dom'; import * as EgovNet from 'api/egovFetch'; import URL from 'constants/url'; import CODE from 'constants/code'; import { default as EgovLeftNav } from 'components/leftmenu/EgovLeftNavAdmin'; import EgovAttachFile from 'components/EgovAttachFile'; function SchedulesDetail(props) { console.group("EgovAdminScheduleDetail"); console.log("[Start] EgovAdminScheduleDetail ------------------------------"); console.log("EgovAdminScheduleDetail [props] : ", props); const navigate = useNavigate(); const location = useLocation(); console.log("EgovAdminScheduleDetail [location] : ", location); const [scheduleDetail, setScheduleDetail] = useState({}); const [boardAttachFiles, setBoardAttachFiles] = useState(); const [user, setUser] = useState({}); const retrieveDetail = () => { const retrieveDetailURL = `/schedule/${location.state?.schdulId}`; const requestOptions = { method: "GET", headers: { 'Content-type': 'application/json', } } EgovNet.requestFetch(retrieveDetailURL, requestOptions, function (resp) { /** * dto.put("evtSeq", tnCmtEvent.getEvtSeq()); // sequence dto.put("divMeet", tnCmtEvent.getEvtType()); // 구분 dto.put("upCommittee", tnCmtEvent.getUpCmtSeq()); // 심의위원회 상위 코드 번호 dto.put("committee", tnCmtEvent.getCmtSeq()); // 심의위원회 하위 코드 번호 dto.put("title", tnCmtEvent.getEvtTitle()); // 제목 dto.put("location", tnCmtEvent.getEvtLocation()); // 장소 dto.put("contents", tnCmtEvent.getEvtContents()); // 내용 dto.put("startDate", tnCmtEvent.getEvtStartDt()); // 날짜/시간의 시작 일시 dto.put("endDate", tnCmtEvent.getEvtEndDt()); // 날짜/시간의 종료 일시 */ setScheduleDetail(resp.result); } ); } 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_SCHEDULE ,{ replace: true }); } else { // alert("ERR : " + resp.message); navigate({pathname: URL.ERROR}, {state: {msg : resp.resultMessage}}); } } ); } useEffect(function () { retrieveDetail(); // eslint-disable-next-line react-hooks/exhaustive-deps }, []); console.log("------------------------------EgovAdminScheduleDetail [End]"); console.groupEnd("EgovAdminScheduleDetail"); return (
{/* */}
  • Home
  • 사이트관리
  • 위원회관리
  • 일정관리 상세보기
{/* */}
{/* */} {/* */}
{/* */}

일정관리 상세보기

{/* */}
구분
{scheduleDetail.divMeetNm}
심의위원회
{scheduleDetail.upCommitteeNm} - {scheduleDetail.committeeNm}
제목
{scheduleDetail.title}
장소
{scheduleDetail.location}
날짜/시간
{scheduleDetail.startDate} ~ {scheduleDetail.endDate}
내용
{scheduleDetail.contents}
{/* */}
{user.id &&
수정
}
목록
{/* */}
{/* */} {/* */}
); } export default SchedulesDetail;