build: 중간저장
parent
22a185a3ab
commit
6d02a20ac1
|
|
@ -154,7 +154,7 @@ function Schedules(props) {
|
|||
if (scheduleList.length > 0) {//일정 있는 경우
|
||||
return (
|
||||
<td key={keyIdx++}>
|
||||
<Link to={{pathname: URL.ADMIN__COMMITTEE__SCHEDULES__CREATE}} sss="test" state={{test: "ddfdf", iUseDate: mutsUseYearMonth + sDate + "000000"}} className="day"
|
||||
<Link to={{pathname: URL.ADMIN__COMMITTEE__SCHEDULES__CREATE}} sss="test" state={{ iUseDate: mutsUseYearMonth + sDate + "000000"}} className="day"
|
||||
key={keyIdx++}>{day}</Link><br/>
|
||||
{
|
||||
scheduleList.map((schedule, scheduleIdx) => {
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@ function SchedulesDetail(props) {
|
|||
console.log("EgovAdminScheduleDetail [location] : ", location);
|
||||
|
||||
const [scheduleDetail, setScheduleDetail] = useState({});
|
||||
const [boardAttachFiles, setBoardAttachFiles] = useState();
|
||||
const [user, setUser] = useState({});
|
||||
|
||||
const retrieveDetail = () => {
|
||||
|
||||
|
|
@ -32,17 +30,6 @@ function SchedulesDetail(props) {
|
|||
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);
|
||||
}
|
||||
);
|
||||
|
|
@ -137,20 +124,18 @@ function SchedulesDetail(props) {
|
|||
</dl>
|
||||
|
||||
{/* <!-- 버튼영역 --> */}
|
||||
<div className="board_btn_area">
|
||||
{user.id || true &&
|
||||
<div className="left_col btn1">
|
||||
<Link to={{pathname: URL.ADMIN__COMMITTEE__SCHEDULES__MODIFY}}
|
||||
state={{
|
||||
schdulId: location.state?.schdulId
|
||||
}}
|
||||
className="btn btn_skyblue_h46 w_100">수정</Link>
|
||||
<button className="btn btn_skyblue_h46 w_100"
|
||||
onClick={(e) => {
|
||||
onClickDeleteSchedule(location.state?.schdulId);
|
||||
}}>삭제</button>
|
||||
</div>
|
||||
}
|
||||
<div className="board_btn_area">
|
||||
<div className="left_col btn1">
|
||||
<Link to={{pathname: URL.ADMIN__COMMITTEE__SCHEDULES__MODIFY}}
|
||||
state={{
|
||||
schdulId: location.state?.schdulId
|
||||
}}
|
||||
className="btn btn_skyblue_h46 w_100">수정</Link>
|
||||
<button className="btn btn_skyblue_h46 w_100"
|
||||
onClick={(e) => {
|
||||
onClickDeleteSchedule(location.state?.schdulId);
|
||||
}}>삭제</button>
|
||||
</div>
|
||||
<div className="right_col btn1">
|
||||
<Link to={URL.ADMIN__COMMITTEE__SCHEDULES} className="btn btn_blue_h46 w_100">목록</Link>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ function PopUp(props) {
|
|||
{listPopup.map((it)=>(
|
||||
<div className='list_item'>
|
||||
<div>{it.seq}</div>
|
||||
<div className="al"><Link to={URL.SUPPORT_QNA_DETAIL}>{it.popupTitle}</Link></div>
|
||||
<div className="al"><Link to={URL.ADMIN__CONTENTS__POP_UP__MODIFY} state={{popupId: it.seq} } key={it.seq}>{it.popupTitle}</Link></div>
|
||||
<div>{it.startDate} ~ {it.endDate}</div>
|
||||
<div>{it.useYn === 'Y' ? <Switch {...label} defaultChecked /> : <Switch {...label} />}</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -87,10 +87,39 @@ function PopupWriter(props) {
|
|||
default:
|
||||
navigate({pathname: URL.ERROR}, {state: {msg : ""}});
|
||||
}
|
||||
//retrieveDetail();
|
||||
retrieveDetail();
|
||||
}
|
||||
|
||||
|
||||
const retrieveDetail = () => {
|
||||
|
||||
if (modeInfo.mode === CODE.MODE_CREATE) {// 조회/등록이면 조회 안함
|
||||
return;
|
||||
}
|
||||
|
||||
const retrieveDetailURL = `/contents/api/popup-manage/${location.state?.popupId}`;
|
||||
const requestOptions = {
|
||||
method: "GET",
|
||||
headers: {
|
||||
'Content-type': 'application/json'
|
||||
}
|
||||
}
|
||||
EgovNet.requestFetch(retrieveDetailURL,
|
||||
requestOptions,
|
||||
function (resp) {
|
||||
let rawDetail = resp.result;
|
||||
//기본값 설정
|
||||
setScheduleDetail({
|
||||
...popupDetail,
|
||||
...rawDetail,
|
||||
startDate: convertDate(rawDetail.schdulBgnde),
|
||||
endDate: convertDate(rawDetail.schdulEndde),
|
||||
});
|
||||
setText(rawDetail.contents);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
const createPopup = () => {
|
||||
const formData = new FormData();
|
||||
|
|
@ -115,13 +144,13 @@ function PopupWriter(props) {
|
|||
}
|
||||
|
||||
if (modeInfo.mode === CODE.MODE_MODIFY) {
|
||||
modeInfo.editURL = `${modeInfo.editURL}/${location.state?.schdulId}`;
|
||||
modeInfo.editURL = `${modeInfo.editURL}/${location.state?.popupId}`;
|
||||
}
|
||||
EgovNet.requestFetch(modeInfo.editURL,
|
||||
requestOptions,
|
||||
(resp) => {
|
||||
if (Number(resp.resultCode) === Number(CODE.RCV_SUCCESS)) {
|
||||
navigate({ pathname: URL.ADMIN_SCHEDULE });
|
||||
navigate({ pathname: URL.ADMIN__CONTENTS__POP_UP });
|
||||
} else {
|
||||
navigate({pathname: URL.ERROR}, {state: {msg : resp.resultMessage}});
|
||||
}
|
||||
|
|
@ -131,8 +160,8 @@ function PopupWriter(props) {
|
|||
|
||||
}
|
||||
|
||||
const onClickDeleteSchedule = (schdulId) => {
|
||||
const deleteBoardURL = `/schedule/${schdulId}`;
|
||||
const onClickDelete = (popupId) => {
|
||||
const deleteBoardURL = `/schedule/${popupId}`;
|
||||
|
||||
const requestOptions = {
|
||||
method: "DELETE",
|
||||
|
|
@ -157,6 +186,14 @@ function PopupWriter(props) {
|
|||
);
|
||||
}
|
||||
|
||||
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 new Date(year, month - 1, date, hour, minute)
|
||||
}
|
||||
const getDateFourteenDigit = (date) => {
|
||||
return `${getYYYYMMDD(date).toString()}${makeTwoDigit(date.getHours())}${makeTwoDigit(date.getMinutes())}${makeTwoDigit(date.getSeconds())}`;
|
||||
}
|
||||
|
|
@ -281,7 +318,7 @@ function PopupWriter(props) {
|
|||
{modeInfo.mode === CODE.MODE_MODIFY &&
|
||||
<button className="btn btn_skyblue_h46 w_100"
|
||||
onClick={(e) => {
|
||||
onClickDeleteSchedule(location.state?.schdulId);
|
||||
onClickDelete(location.state?.popupId);
|
||||
}}>삭제</button>
|
||||
}
|
||||
</div>
|
||||
|
|
@ -91,8 +91,8 @@ import AdminStandardsInfoDisclosure from 'pages/admin/standards/InfoDisclosure';
|
|||
// 관리자 - 컨텐츠 관리
|
||||
import AdminContentsSurvey from 'pages/admin/contents/Survey'; // 관리자 - 컨텐츠 관리/설문 관리
|
||||
import AdminContentsPopUp from 'pages/admin/contents/PopUp'; // 관리자 - 컨텐츠 관리/팝업 관리
|
||||
import AdminContentsPopUpWriter from 'pages/admin/contents/PopUp/Writer'; // 관리자 - 컨텐츠 관리/팝업 관리/팝업 추가 또는 수정
|
||||
import AdminContentsStandardResearch from 'pages/admin/contents/StandardResearch'; // 관리자 - 컨텐츠 관리/건설기준연구 관리
|
||||
import AdminContentsPopUpWriter from 'pages/admin/contents/PopUp/PopupWriter'; // 관리자 - 컨텐츠 관리/팝업 관리/팝업 추가 또는 수정
|
||||
import AdminContentsStandardResearch from 'pages/admin/contents/StandardResearch'; // 관리자 - 컨텐츠 관리/건설기준연구 관리
|
||||
import AdminContentsTextMessages from 'pages/admin/contents/TextMessages'; // 관리자 - 컨텐츠 관리/문자 발송
|
||||
|
||||
// 관리자 - 위원회 관리
|
||||
|
|
|
|||
Loading…
Reference in New Issue