GW 클라이언트 해지 처리 로직 추가 - BLOCK/DELETE 처리방식 지원
- APP 승인 시 GW 처리방식 설정 기능 추가 및 상세 표시 - DELETE 요청 처리 중 클라이언트 상태 동기화 로직 개선 - JSP에 GW 처리방식 선택 UI 및 승인 결과 표시 추가
This commit is contained in:
@@ -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 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="gwActionSection" style="display:none; margin: 12px 0 0 4px; color: #c0392b;">
|
||||
<label style="cursor:pointer;">
|
||||
<input type="checkbox" id="chkGwDelete"/>
|
||||
GW 인증정보 완전 삭제 (미체크 시 차단 처리 — 인증정보 보존, 복구 가능)
|
||||
</label>
|
||||
</div>
|
||||
<div id="gwActionResult" style="display:none; margin: 12px 0 0 4px; font-weight: bold;"></div>
|
||||
<div class="popup_button">
|
||||
<button type="button" class="cssbtn" id="btn_modify" level="W"><i
|
||||
class="material-icons">save</i>수정
|
||||
|
||||
Reference in New Issue
Block a user