From 8d1928e733f71e00c6d8685d4f5b15031f4afa38 Mon Sep 17 00:00:00 2001 From: 이민희 <mhlee@maprex.co.kr> Date: 금, 18 2월 2022 12:54:27 +0900 Subject: [PATCH] 파트너정보 상속여부 확인 알림 코드 수정 --- src/main/webapp/scripts/app/issue/issueAddDown.controller.js | 73 ++++++++++++++++++++++++------------ 1 files changed, 49 insertions(+), 24 deletions(-) diff --git a/src/main/webapp/scripts/app/issue/issueAddDown.controller.js b/src/main/webapp/scripts/app/issue/issueAddDown.controller.js index 3e1c6d0..8d58bbe 100644 --- a/src/main/webapp/scripts/app/issue/issueAddDown.controller.js +++ b/src/main/webapp/scripts/app/issue/issueAddDown.controller.js @@ -843,9 +843,7 @@ }).then(function (result) { if (result.data.message.status === "success") { - $scope.fn.addDownIssue(result.data.data); - - $scope.fn.cancel(); + $scope.fn.addDownIssue(result.data.data, result.data.content); // �씠�뒋 �긽�꽭 �솕硫� �슂泥� $rootScope.$broadcast("getIssueDetail", { @@ -862,29 +860,56 @@ } // �븯�쐞 �씠�뒋 異붽� - function addDownIssue(downId) { + function addDownIssue(downId, inheritYn) { + $rootScope.spinner = true; + var ids = []; - let inheritYn = false; + if (downId != null) { + ids.push(downId); + } - SweetAlert.swal({ - title : $filter("translate")("issue.addDownIssue"), // �븯�쐞 �씠�뒋 異붽� - text : $filter("translate")("issue.wantToInheritPartnersOfParentIssue"), // �긽�쐞�씠�뒋�쓽 �뙆�듃�꼫 �젙蹂�(�뾽泥�/ISP/�샇�뒪�똿)瑜� �쟻�슜�떆�궎寃좎뒿�땲源�? - type : "warning", - showCancelButton : true, - confirmButtonColor : "#DD6B55", - confirmButtonText : $filter("translate")("common.ok"), // �꽕 - cancelButtonText : $filter("translate")("common.no"), // �븘�땲�삤 - closeOnConfirm : false, - closeOnCancel : false - }, - function (isConfirm) { - if (isConfirm) { - inheritYn = true; - } + if ($rootScope.isDefined(inheritYn) && inheritYn) { + SweetAlert.swal({ + title : $filter("translate")("issue.addDownIssue"), // �븯�쐞 �씠�뒋 異붽� + text : $filter("translate")("issue.wantToInheritPartnersOfParentIssue"), // �긽�쐞�씠�뒋�쓽 �뙆�듃�꼫 �젙蹂�(�뾽泥�/ISP/�샇�뒪�똿)瑜� �쟻�슜�떆�궎寃좎뒿�땲源�? + type : "warning", + showCancelButton : true, + confirmButtonColor : "#DD6B55", + confirmButtonText : $filter("translate")("common.ok"), // �꽕 + cancelButtonText : $filter("translate")("common.no"), // �븘�땲�삤 + closeOnConfirm : false, + closeOnCancel : false + }, + function (isConfirm) { + if (!isConfirm) { + inheritYn = false; + } - if (downId != null) { - ids.push(downId); - } + var contents = { + issueId : parameter.id, + ids : ids, + parentIssueId : parameter.id, + inheritYn : inheritYn + }; + + Issue.modifyParentIssue($resourceProvider.getContent( + contents, + $resourceProvider.getPageContent(0, 10))).then(function (result) { + + if (result.data.message.status === "success") { + $scope.fn.cancel(); + // �씠�뒋 �긽�꽭 �솕硫� �슂泥� + $rootScope.$broadcast("getIssueDetail", { + id : parameter.id + }); + } + else { + SweetAlert.error($filter("translate")("issue.failedToIssueAddIssueDown"), result.data.message.message); // "�븯�쐞�씠�뒋 �깮�꽦 �떎�뙣" + } + $rootScope.spinner = false; + }); + }); + } else { var contents = { issueId : parameter.id, @@ -908,7 +933,7 @@ SweetAlert.error($filter("translate")("issue.failedToIssueAddIssueDown"), result.data.message.message); // "�븯�쐞�씠�뒋 �깮�꽦 �떎�뙣" } }); - }); + } } // �뙘�뾽 李� �떕湲� -- Gitblit v1.8.0