feat: 관리자 - 환경설정 - 위원회 코드관리 삭제 시, 삭제 여부 확인 후 삭제하도록 수정

thkim
thkim 2024-02-29 17:30:28 +09:00
parent c0504044ad
commit 0ea10e7313
3 changed files with 48 additions and 38 deletions

View File

@ -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}
/>
<AlertDialogSlide confirm={confirm} setConfirm={setConfirm} />
{/* <!--// 본문 --> */}
</div>
</div>

View File

@ -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);
}

View File

@ -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());