| | |
| | | this.issueService.addIssueVersion(issue.getId()); |
| | | |
| | | resJsonData.put(Constants.RES_KEY_CONTENTS, issue.getId()); //하위이슈 ID |
| | | resJsonData.put(Constants.REQ_KEY_CONTENT, issue.getIssueType().getInheritPartners()); //상속 여부 |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | |
| | | }).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", { |
| | |
| | | } |
| | | |
| | | // 하위 이슈 추가 |
| | | function addDownIssue(downId) { |
| | | var ids = []; |
| | | let inheritYn = false; |
| | | function addDownIssue(downId, inheritYn) { |
| | | $rootScope.spinner = true; |
| | | |
| | | var ids = []; |
| | | if (downId != null) { |
| | | ids.push(downId); |
| | | } |
| | | |
| | | if ($rootScope.isDefined(inheritYn) && inheritYn) { |
| | | SweetAlert.swal({ |
| | | title : $filter("translate")("issue.addDownIssue"), // 하위 이슈 추가 |
| | | text : $filter("translate")("issue.wantToInheritPartnersOfParentIssue"), // 상위이슈의 파트너 정보(업체/ISP/호스팅)를 적용시키겠습니까? |
| | |
| | | closeOnCancel : false |
| | | }, |
| | | function (isConfirm) { |
| | | if (isConfirm) { |
| | | inheritYn = true; |
| | | 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, |
| | |
| | | SweetAlert.error($filter("translate")("issue.failedToIssueAddIssueDown"), result.data.message.message); // "하위이슈 생성 실패" |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | // 팝업 창 닫기 |
| | |
| | | if (isConfirm) { |
| | | inheritYn = true; |
| | | } |
| | | SweetAlert.close(); |
| | | |
| | | Issue.importExcel({ |
| | | method : "POST", |
| | | file : $scope.vm.form.file, |
| | |
| | | } |
| | | }); |
| | | }); |
| | | } else { |
| | | Issue.importExcel({ |
| | | method : "POST", |
| | | file : $scope.vm.form.file, |
| | | // data 속성으로 별도의 데이터 전송 |
| | | fields : { |
| | | content : { |
| | | projectId : $scope.vm.form.projects[0].id, |
| | | issueTypeId : $scope.vm.form.issueTypeId, |
| | | parentIssueId : (function () { |
| | | let id = -1; |
| | | if ($rootScope.isDefined($scope.vm.form.issues)) { |
| | | if ($rootScope.isDefined($scope.vm.form.issues[0])) { |
| | | id = $scope.vm.form.issues[0].id; |
| | | } |
| | | } |
| | | return id; |
| | | })(), |
| | | inheritYn : inheritYn |
| | | } |
| | | }, |
| | | fileFormDataName : "file", |
| | | }).then(function (result) { |
| | | if (result.data.message.status === "success") { |
| | | $timeout(function () { |
| | | SweetAlert.success($filter("translate")("issue.succeededIssueRegistration"), result.data.message.message); // 이슈 등록 성공 |
| | | $scope.fn.cancel(); |
| | | $rootScope.$broadcast("getIssueList"); |
| | | $rootScope.spinner = false; |
| | | }, 1000); |
| | | } |
| | | else { |
| | | SweetAlert.error($filter("translate")("issue.failedIssueRegistration"), result.data.message.message); // 이슈 등록 실패 |
| | | $rootScope.spinner = false; |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | |
| | | $rootScope.spinner = true; |
| | | |
| | | let inheritYn = false; |
| | | if ($scope.vm.inheritPartners && $scope.vm.downTotalCount > 0) { |
| | | SweetAlert.swal({ |
| | | title : $filter("translate")("issue.modifyDownIssue"), // 하위 이슈 변경 |
| | | 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; |
| | | } |
| | | |
| | | var content = { |
| | | id : parameter.id, |
| | |
| | | })() |
| | | }; |
| | | |
| | | if ($scope.vm.inheritPartners && $scope.vm.downTotalCount > 0) { |
| | | SweetAlert.swal({ |
| | | title : $filter("translate")("issue.modifyDownIssue"), // 하위 이슈 변경 |
| | | 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; |
| | | } |
| | | |
| | | Issue.modify({ |
| | | method : "POST", |
| | | file : (function () { |
| | |
| | | $rootScope.spinner = false; |
| | | }); |
| | | }); |
| | | } else { |
| | | Issue.modify({ |
| | | method : "POST", |
| | | file : (function () { |
| | | var files = []; |
| | | |
| | | angular.forEach($scope.vm.form.files, function (file) { |
| | | if (angular.isUndefined(file.id)) { |
| | | files.push(file); |
| | | } |
| | | }); |
| | | |
| | | return files; |
| | | })(), |
| | | // data 속성으로 별도의 데이터 전송 |
| | | fields : { |
| | | content : content |
| | | }, |
| | | fileFormDataName : "file" |
| | | }).then(function (result) { |
| | | |
| | | if (result.data.message.status === "success") { |
| | | $scope.fn.cancel(); |
| | | |
| | | // 이슈 상세 화면 요청 |
| | | $rootScope.$broadcast("getIssueDetail", { |
| | | id : parameter.id |
| | | }); |
| | | |
| | | $rootScope.$broadcast("getIssueList"); |
| | | } |
| | | else { |
| | | SweetAlert.error($filter("translate")("issue.failedIssueModify"), result.data.message.message); // 이슈 수정 실패 |
| | | } |
| | | |
| | | $rootScope.spinner = false; |
| | | }); |
| | | } |
| | | } |
| | | |