diff --git a/egovframe-template-simple-react-contribution/src/pages/admin/config/CommitteeCodeMgt.jsx b/egovframe-template-simple-react-contribution/src/pages/admin/config/CommitteeCodeMgt.jsx index 3273219..6761a63 100644 --- a/egovframe-template-simple-react-contribution/src/pages/admin/config/CommitteeCodeMgt.jsx +++ b/egovframe-template-simple-react-contribution/src/pages/admin/config/CommitteeCodeMgt.jsx @@ -8,6 +8,8 @@ import CommitteeCodeRegistrationPopup from './CommitteeCodeMgt/CommitteeCodeRegi import ListCreateUpdateDelete from '../../../components/list/ListCreateUpdateDelete' import ListLabelInputs from '../../../components/list/ListLabelInputs' +import AlertDialogSlide from "../../../components/alert/AlertDialogSlide"; + import URL from 'constants/url'; import { default as EgovLeftNav } from 'components/leftmenu/EgovLeftNavAdmin'; @@ -25,6 +27,9 @@ function CommitteeCodeMgt(props) { const [summaryArray, setSummaryArray] = useState({}); const [depthSelectedIndex, setDepthSelectedIndex] = useState([]); + + const [confirm, setConfirm] = React.useState(); + // 위원회 코드 등록 팝업을 보이거나 닫는다. const [isCommitteeCodeRegistrationPopupOpen, setIsCommitteeCodeRegistrationPopupOpen] = React.useState(false); @@ -161,51 +166,49 @@ function CommitteeCodeMgt(props) { 'Content-type': 'application/json', } }; + - EgovNet.requestFetch(`/admin/config/committee-code-management/${deleteItem.orgId}`, - requestOptions, - function (resp) { - //방금 삭제한 것만 새로 읽어 드린다. - let forChangeObject = {...searchCondition, paramCodeGroup, paramCodeLevel}; - setSearchCondition(forChangeObject); + const requestTask = () => { + EgovNet.requestFetch(`/admin/config/committee-code-management/${deleteItem.orgId}`, + requestOptions, + function (resp) { + let forChangeObject = {...searchCondition, paramCodeGroup, paramCodeLevel}; + setSearchCondition(forChangeObject); - //현재 선택된 아이템을 삭제한 경우 그 하위 목록을 모두 비운다. + //현재 선택된 아이템을 삭제한 경우 그 하위 목록을 모두 비운다. + if( Number(depthSelectedIndex[depthSelectedArrayIndex]) === Number(deleteItem.orgId) ) { + + for( let i = depthSelectedArrayIndex + 1; i<4; i++ ) { + //setSearchCondition({...searchCondition, paramCodeLevel : createCondition.paramCodeLevel}); + depthSelectedIndex[i] = undefined; + } + let forChangeObject = [...depthSelectedIndex]; + setDepthSelectedIndex(forChangeObject); + + // eslint-disable-next-line default-case + switch(depthSelectedArrayIndex) { + case 0: + setDepth02List({}); + // eslint-disable-next-line no-fallthrough + case 1: + setDepth03List({}); + // eslint-disable-next-line no-fallthrough + case 2: + setDepth04List({}); + } + + + - //현재 선택된 아이템을 삭제 했는지 체크한다 - // 여기에 현재 선택된 아이템을 삭제 했는지 체크하는 로직을 추가해주세요. - if( Number(depthSelectedIndex[depthSelectedArrayIndex]) === Number(deleteItem.orgId) ) { - // 맞다면 - //그 하위 목록을 비운다. - for( let i = depthSelectedArrayIndex + 1; i<4; i++ ) { - //setSearchCondition({...searchCondition, paramCodeLevel : createCondition.paramCodeLevel}); - depthSelectedIndex[i] = undefined; - } - let forChangeObject = [...depthSelectedIndex]; - setDepthSelectedIndex(forChangeObject); - - // eslint-disable-next-line default-case - switch(depthSelectedArrayIndex) { - case 0: - setDepth02List({}); - // eslint-disable-next-line no-fallthrough - case 1: - setDepth03List({}); - // eslint-disable-next-line no-fallthrough - case 2: - setDepth04List({}); } - - - + alert('삭제 되었습니다.'); } - - - alert('삭제 되었습니다.'); - } - ); + ); + }; + setConfirm({...confirm, open: true, body: "삭제하시겠습니까?", yesCallback: requestTask}); } const Location = React.memo(function Location() { @@ -344,6 +347,8 @@ function CommitteeCodeMgt(props) { searchCondition={searchCondition} setSearchCondition={setSearchCondition} /> + + {/* */} diff --git a/egovframe-template-simple-react-contribution/src/pages/admin/config/CommitteeCodeMgt/CommitteeCodeRegistrationPopup.jsx b/egovframe-template-simple-react-contribution/src/pages/admin/config/CommitteeCodeMgt/CommitteeCodeRegistrationPopup.jsx index 2037054..61ad200 100644 --- a/egovframe-template-simple-react-contribution/src/pages/admin/config/CommitteeCodeMgt/CommitteeCodeRegistrationPopup.jsx +++ b/egovframe-template-simple-react-contribution/src/pages/admin/config/CommitteeCodeMgt/CommitteeCodeRegistrationPopup.jsx @@ -29,7 +29,11 @@ function CommitteeCodeRegistrationPopup(props) { requestOptions, function (resp) { //방금 추가한 것만 새로 읽어 드린다. - props.setSearchCondition({...props.searchCondition, paramCodeLevel : props.createCondition.paramCodeLevel}); + let paramCodeGroup = props.createCondition.paramOrgId; + if( paramCodeGroup === "00" ) { + paramCodeGroup = null; + } + props.setSearchCondition({...props.searchCondition, paramCodeGroup, paramCodeLevel : props.createCondition.paramCodeLevel}); props.setOpen(false); } diff --git a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/config/service/impl/AdminCommitteeCodeManagementServiceImpl.java b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/config/service/impl/AdminCommitteeCodeManagementServiceImpl.java index b09d5c3..244a8c8 100644 --- a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/config/service/impl/AdminCommitteeCodeManagementServiceImpl.java +++ b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/config/service/impl/AdminCommitteeCodeManagementServiceImpl.java @@ -92,6 +92,7 @@ public class AdminCommitteeCodeManagementServiceImpl extends EgovAbstractService returnMap.put("orgNm", item.getCmtNm()); returnMap.put("orgDesc", item.getCmtDesc()); returnMap.put("omtOrder", item.getCmtOrder()); + returnMap.put("upCmtSeq", item.getUpCmtSeq()); return returnMap; }) .collect(Collectors.toList());