build: 중간저장

thkim
thkim 2024-01-19 16:46:50 +09:00
parent 87c6a09aa4
commit 42df5ab159
3 changed files with 34 additions and 58 deletions

View File

@ -18,7 +18,8 @@ function Schedules(props) {
console.log("EgovAdminScheduleList [location] : ", location); console.log("EgovAdminScheduleList [location] : ", location);
const DATE = new Date(); const DATE = new Date();
const TODAY = new Date(DATE.getFullYear(), DATE.getMonth(), DATE.getDate()); //const TODAY = new Date(DATE.getFullYear(), DATE.getMonth(), DATE.getDate());
const TODAY = new Date(DATE.getFullYear(), 1, DATE.getDate());
const [searchCondition, setSearchCondition] = useState(location.state?.searchCondition || { schdulSe: '', year: TODAY.getFullYear(), month: TODAY.getMonth(), date: TODAY.getDate() }); const [searchCondition, setSearchCondition] = useState(location.state?.searchCondition || { schdulSe: '', year: TODAY.getFullYear(), month: TODAY.getMonth(), date: TODAY.getDate() });
const [calendarTag, setCalendarTag] = useState([]); const [calendarTag, setCalendarTag] = useState([]);

View File

@ -33,42 +33,23 @@ function SchedulesDetail(props) {
EgovNet.requestFetch(retrieveDetailURL, EgovNet.requestFetch(retrieveDetailURL,
requestOptions, requestOptions,
function (resp) { function (resp) {
let rawScheduleDetail = resp.result.scheduleDetail; /**
rawScheduleDetail.startDateTime = convertDate(rawScheduleDetail.schdulBgnde); * dto.put("evtSeq", tnCmtEvent.getEvtSeq()); // sequence
rawScheduleDetail.endDateTime = convertDate(rawScheduleDetail.schdulEndde); dto.put("divMeet", tnCmtEvent.getEvtType()); //
rawScheduleDetail.reptitSeCodeNm = getCodeName(resp.result.reptitSeCode, resp.result.scheduleDetail.reptitSeCode); dto.put("upCommittee", tnCmtEvent.getUpCmtSeq()); //
rawScheduleDetail.schdulIpcrCodeNm = getCodeName(resp.result.schdulIpcrCode, resp.result.scheduleDetail.schdulIpcrCode); dto.put("committee", tnCmtEvent.getCmtSeq()); //
rawScheduleDetail.schdulSeNm = getCodeName(resp.result.schdulSe, resp.result.scheduleDetail.schdulSe); dto.put("title", tnCmtEvent.getEvtTitle()); //
setScheduleDetail(rawScheduleDetail); dto.put("location", tnCmtEvent.getEvtLocation()); //
setUser(resp.result.user); dto.put("contents", tnCmtEvent.getEvtContents()); //
setBoardAttachFiles(resp.result.resultFiles); dto.put("startDate", tnCmtEvent.getEvtStartDt()); // /
dto.put("endDate", tnCmtEvent.getEvtEndDt()); // /
*/
setScheduleDetail(resp.result);
} }
); );
} }
const convertDate = (str) => {
let year = str.substring(0, 4);
let month = str.substring(4, 6);
let date = str.substring(6, 8);
let hour = str.substring(8, 10);
let minute = str.substring(10, 12);
return {
year: year,
month: month,
date: date,
hour: hour,
minute: minute,
dateForm: year + "년 " + month + "월 " + date + "일 " + hour + "시 " + minute + "분 "
}
}
const getCodeName = (codeArr, code) => {
return (
codeArr.map((codeObj) => {
if (codeObj.code === code.trim()) return codeObj.codeNm
else return "";
})
);
};
const onClickDeleteSchedule = (schdulId) => { const onClickDeleteSchedule = (schdulId) => {
const deleteBoardURL = `/schedule/${schdulId}`; const deleteBoardURL = `/schedule/${schdulId}`;
@ -132,40 +113,30 @@ function SchedulesDetail(props) {
{/* <!-- 게시판 상세보기 --> */} {/* <!-- 게시판 상세보기 --> */}
<div className="board_view2"> <div className="board_view2">
<dl> <dl>
<dt>일정구분</dt> <dt>구분</dt>
<dd>{scheduleDetail.schdulSeNm}</dd> <dd>{scheduleDetail.divMeetNm}</dd>
</dl> </dl>
<dl> <dl>
<dt>중요도</dt> <dt>심의위원회</dt>
<dd>{scheduleDetail.schdulIpcrCodeNm}</dd> <dd>{scheduleDetail.upCommitteeNm} - {scheduleDetail.committeeNm}</dd>
</dl> </dl>
<dl> <dl>
<dt>부서</dt> <dt>제목</dt>
<dd>{scheduleDetail.schdulDeptName}</dd> <dd>{scheduleDetail.title}</dd>
</dl> </dl>
<dl> <dl>
<dt>일정명</dt> <dt>장소</dt>
<dd>{scheduleDetail.schdulNm}</dd> <dd>{scheduleDetail.location}</dd>
</dl> </dl>
<dl>
<dt>일정내용</dt>
<dd>{scheduleDetail.schdulCn}</dd>
</dl>
<dl>
<dt>반복구분</dt>
<dd>{scheduleDetail.reptitSeCodeNm}</dd>
</dl>
<dl> <dl>
<dt>날짜/시간</dt> <dt>날짜/시간</dt>
<dd> {scheduleDetail.startDateTime?.dateForm} ~ {scheduleDetail.endDateTime?.dateForm}</dd> <dd> {scheduleDetail.startDate} ~ {scheduleDetail.endDate}</dd>
</dl> </dl>
<dl> <dl>
<dt>담당자</dt> <dt>내용</dt>
<dd>{scheduleDetail.schdulChargerName}</dd> <dd>{scheduleDetail.contents}</dd>
</dl> </dl>
<EgovAttachFile boardFiles={boardAttachFiles} />
{/* <!-- 버튼영역 --> */} {/* <!-- 버튼영역 --> */}
<div className="board_btn_area"> <div className="board_btn_area">
{user.id && {user.id &&
@ -178,12 +149,11 @@ function SchedulesDetail(props) {
<button className="btn btn_skyblue_h46 w_100" <button className="btn btn_skyblue_h46 w_100"
onClick={(e) => { onClick={(e) => {
onClickDeleteSchedule(location.state?.schdulId); onClickDeleteSchedule(location.state?.schdulId);
}}>삭제</button> }}>삭제</button>
</div> </div>
} }
<div className="right_col btn1"> <div className="right_col btn1">
<Link to={URL.ADMIN_SCHEDULE} className="btn btn_blue_h46 w_100">목록</Link> <Link to={URL.ADMIN__COMMITTEE__SCHEDULES} className="btn btn_blue_h46 w_100">목록</Link>
</div> </div>
</div> </div>
{/* <!--// 버튼영역 --> */} {/* <!--// 버튼영역 --> */}

View File

@ -8203,6 +8203,11 @@ react-bootstrap@^2.9.0:
uncontrollable "^7.2.1" uncontrollable "^7.2.1"
warning "^4.0.3" warning "^4.0.3"
react-csv@^2.2.2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/react-csv/-/react-csv-2.2.2.tgz#5bbf0d72a846412221a14880f294da9d6def9bfb"
integrity sha512-RG5hOcZKZFigIGE8LxIEV/OgS1vigFQT4EkaHeKgyuCbUAu9Nbd/1RYq++bJcJJ9VOqO/n9TZRADsXNDR4VEpw==
react-datepicker@^4.8.0: react-datepicker@^4.8.0:
version "4.10.0" version "4.10.0"
resolved "https://registry.npmjs.org/react-datepicker/-/react-datepicker-4.10.0.tgz" resolved "https://registry.npmjs.org/react-datepicker/-/react-datepicker-4.10.0.tgz"