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 ListCreateUpdateDelete from '../../../components/list/ListCreateUpdateDelete'
import ListLabelInputs from '../../../components/list/ListLabelInputs' import ListLabelInputs from '../../../components/list/ListLabelInputs'
import AlertDialogSlide from "../../../components/alert/AlertDialogSlide";
import URL from 'constants/url'; import URL from 'constants/url';
import { default as EgovLeftNav } from 'components/leftmenu/EgovLeftNavAdmin'; import { default as EgovLeftNav } from 'components/leftmenu/EgovLeftNavAdmin';
@ -26,6 +28,9 @@ function CommitteeCodeMgt(props) {
const [summaryArray, setSummaryArray] = useState({}); const [summaryArray, setSummaryArray] = useState({});
const [depthSelectedIndex, setDepthSelectedIndex] = useState([]); const [depthSelectedIndex, setDepthSelectedIndex] = useState([]);
const [confirm, setConfirm] = React.useState();
// . // .
const [isCommitteeCodeRegistrationPopupOpen, setIsCommitteeCodeRegistrationPopupOpen] = React.useState(false); const [isCommitteeCodeRegistrationPopupOpen, setIsCommitteeCodeRegistrationPopupOpen] = React.useState(false);
@ -162,20 +167,16 @@ function CommitteeCodeMgt(props) {
} }
}; };
const requestTask = () => {
EgovNet.requestFetch(`/admin/config/committee-code-management/${deleteItem.orgId}`, EgovNet.requestFetch(`/admin/config/committee-code-management/${deleteItem.orgId}`,
requestOptions, requestOptions,
function (resp) { function (resp) {
// .
let forChangeObject = {...searchCondition, paramCodeGroup, paramCodeLevel}; let forChangeObject = {...searchCondition, paramCodeGroup, paramCodeLevel};
setSearchCondition(forChangeObject); setSearchCondition(forChangeObject);
// . // .
//
// .
if( Number(depthSelectedIndex[depthSelectedArrayIndex]) === Number(deleteItem.orgId) ) { if( Number(depthSelectedIndex[depthSelectedArrayIndex]) === Number(deleteItem.orgId) ) {
//
// .
for( let i = depthSelectedArrayIndex + 1; i<4; i++ ) { for( let i = depthSelectedArrayIndex + 1; i<4; i++ ) {
//setSearchCondition({...searchCondition, paramCodeLevel : createCondition.paramCodeLevel}); //setSearchCondition({...searchCondition, paramCodeLevel : createCondition.paramCodeLevel});
@ -206,6 +207,8 @@ function CommitteeCodeMgt(props) {
alert('삭제 되었습니다.'); alert('삭제 되었습니다.');
} }
); );
};
setConfirm({...confirm, open: true, body: "삭제하시겠습니까?", yesCallback: requestTask});
} }
const Location = React.memo(function Location() { const Location = React.memo(function Location() {
@ -344,6 +347,8 @@ function CommitteeCodeMgt(props) {
searchCondition={searchCondition} searchCondition={searchCondition}
setSearchCondition={setSearchCondition} setSearchCondition={setSearchCondition}
/> />
<AlertDialogSlide confirm={confirm} setConfirm={setConfirm} />
{/* <!--// 본문 --> */} {/* <!--// 본문 --> */}
</div> </div>
</div> </div>

View File

@ -29,7 +29,11 @@ function CommitteeCodeRegistrationPopup(props) {
requestOptions, requestOptions,
function (resp) { 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); props.setOpen(false);
} }

View File

@ -92,6 +92,7 @@ public class AdminCommitteeCodeManagementServiceImpl extends EgovAbstractService
returnMap.put("orgNm", item.getCmtNm()); returnMap.put("orgNm", item.getCmtNm());
returnMap.put("orgDesc", item.getCmtDesc()); returnMap.put("orgDesc", item.getCmtDesc());
returnMap.put("omtOrder", item.getCmtOrder()); returnMap.put("omtOrder", item.getCmtOrder());
returnMap.put("upCmtSeq", item.getUpCmtSeq());
return returnMap; return returnMap;
}) })
.collect(Collectors.toList()); .collect(Collectors.toList());