diff --git a/WebContent/jsp/onl/apim/approval/portalAppApprovalManPopup.jsp b/WebContent/jsp/onl/apim/approval/portalAppApprovalManPopup.jsp index 7d3e5bd..1803542 100644 --- a/WebContent/jsp/onl/apim/approval/portalAppApprovalManPopup.jsp +++ b/WebContent/jsp/onl/apim/approval/portalAppApprovalManPopup.jsp @@ -56,11 +56,16 @@ $("#expectEndDate").datepicker().inputmask("yyyy-mm-dd", {'autoUnmask': true}); $("#btn_app_approve").click(function () { - if (confirm("승인하시겠습니까?")) { + var isDeleteReq = (currentRequestType === 'DELETE'); + var gwAction = (isDeleteReq && $('#chkGwDelete').is(':checked')) ? 'DELETE' : 'BLOCK'; + var confirmMsg = isDeleteReq + ? "해지 승인 시 포털 인증키(Credential)는 삭제되며,\n게이트웨이 클라이언트는 [" + (gwAction === 'DELETE' ? "완전 삭제" : "차단(비활성화)") + "] 처리됩니다.\n승인하시겠습니까?" + : "승인하시겠습니까?"; + if (confirm(confirmMsg)) { $.ajax({ type: "POST", url: url, - data: {cmd: "APPROVE", id: key}, + data: {cmd: "APPROVE", id: key, gwAction: gwAction}, success: function (args) { <%--alert("<%= localeMessage.getString("approval.approveSuccess") %>");--%> alert("승인되었습니다."); @@ -176,6 +181,8 @@ }); }); + var currentRequestType = null; // 현재 신청 유형 (DELETE 승인 시 GW 처리방식 선택 노출용) + function detail(key) { $.ajax({ type: "POST", @@ -216,6 +223,21 @@ document.getElementById("btn_app_reject").style.display = "none"; } + // API 이용해지(DELETE) 건: 승인 가능 상태의 현재 승인자에게만 GW 처리방식 선택 노출 + currentRequestType = data.requestType; + var inProgress = data.approvalStatus.code === 'REQUESTED' || data.approvalStatus.code === 'PROCESSING'; + if (data.requestType === 'DELETE' && isCurrentApprover && inProgress) { + $("#gwActionSection").show(); + } else { + $("#gwActionSection").hide(); + } + // 처리 완료된 해지 건은 어떤 방식으로 실행됐는지 표시 + if (data.requestType === 'DELETE' && data.gwAction) { + $("#gwActionResult").text("GW 처리방식: " + (data.gwAction === 'DELETE' ? "완전 삭제" : "차단(비활성화)")).show(); + } else { + $("#gwActionResult").hide(); + } + // 삭제된 승인자(USERID 없음)로 진행 불가한 건: 요청됨/진행중 상태면 승인자가 아니어도 강제 반려 허용 var hasDeletedApprover = data.approvers.some(approver => !approver.user || !approver.user.USERID @@ -370,6 +392,13 @@ + +