diff --git a/egovframe-template-simple-react-contribution/src/pages/admin/committee/Schedules/Edit.jsx b/egovframe-template-simple-react-contribution/src/pages/admin/committee/Schedules/Edit.jsx index 1f012de..06bdc5b 100644 --- a/egovframe-template-simple-react-contribution/src/pages/admin/committee/Schedules/Edit.jsx +++ b/egovframe-template-simple-react-contribution/src/pages/admin/committee/Schedules/Edit.jsx @@ -21,6 +21,18 @@ const StyledDiv = styled.div` margin-top: 20px; } } + + .f_select.w_250 { + @media only screen and (max-width: 768px) { + width: 100%; + } + } + + .f_input { + @media only screen and (max-width: 768px) { + width: 100%; + } + } `; function SchedulesEdit(props) { @@ -79,14 +91,15 @@ function SchedulesEdit(props) { return new Date(year, month - 1, date, hour, minute) } - const retrieveDetail = () => { - - const requestOptions = { - method: "GET", - headers: { - 'Content-type': 'application/json' - } + const requestOptions = { + method: "GET", + headers: { + 'Content-type': 'application/json' } + } + + const retrieveDetail = () => { + EgovNet.requestFetch("/schedule/init", requestOptions, @@ -97,15 +110,6 @@ function SchedulesEdit(props) { } ); - EgovNet.requestFetch("/schedule/api/org-api/depth/list?paramCodeGroup=5", - requestOptions, - function (resp) { - setScheduleApiOrgApiDepthList( - resp - ); - } - ); - if (modeInfo.mode === CODE.MODE_CREATE) {// 조회/등록이면 조회 안함 setScheduleDetail({ ...scheduleDetail @@ -208,6 +212,22 @@ function SchedulesEdit(props) { // eslint-disable-next-line react-hooks/exhaustive-deps }, []); + useEffect(function () { + + EgovNet.requestFetch(`/schedule/api/org-api/depth/list?paramCodeGroup=${scheduleDetail.orgGroupId}`, + requestOptions, + function (resp) { + setScheduleApiOrgApiDepthList( + resp + ); + } + ); + + console.log( `kimtheho %o`, scheduleDetail); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [scheduleDetail && scheduleDetail.orgGroupId]); + + console.log("------------------------------EgovAdminScheduleEdit [End]"); console.groupEnd("EgovAdminScheduleEdit"); return ( @@ -243,18 +263,17 @@ function SchedulesEdit(props) {