From ad486a401ad59d44bd4187f6406fe8c11b046a1f Mon Sep 17 00:00:00 2001 From: minhee <alsdldlfrl@gmail.com> Date: 월, 21 2월 2022 16:05:09 +0900 Subject: [PATCH] - 파트너 정보 엑셀 임포트 시 연락처, 코드, 이메일 유효성 검사 - 특정 프로젝트로 설정된 상태에서 타 프로젝트의 이슈 클릭 시 대시보드로 이동되는 문제 해결 --- src/main/webapp/scripts/app/issue/issueDetail.controller.js | 177 ++++++++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 139 insertions(+), 38 deletions(-) diff --git a/src/main/webapp/scripts/app/issue/issueDetail.controller.js b/src/main/webapp/scripts/app/issue/issueDetail.controller.js index 3d12685..6cbd9ca 100644 --- a/src/main/webapp/scripts/app/issue/issueDetail.controller.js +++ b/src/main/webapp/scripts/app/issue/issueDetail.controller.js @@ -50,6 +50,7 @@ $scope.fn.setDownTableConfigs = setDownTableConfigs; $scope.fn.containsPartner = containsPartner; $scope.fn.onActivate = onActivate; + $scope.fn.issueBack = issueBack; $scope.fn.goParentIssue = goParentIssue; $scope.fn.removeRelationIssue = removeRelationIssue; $scope.fn.removeDownIssue = removeDownIssue; @@ -122,6 +123,9 @@ }, }; + $scope.vm.inheritPartners = ""; + $scope.vm.downTotalCount = ""; + $scope.vm.relResponseData = []; $scope.vm.relTableConfigs = []; // �뀒�씠釉� �씠踰ㅽ듃 @@ -146,10 +150,22 @@ $scope.fn.onActivate(); } + // �뮘濡쒓�湲� 踰꾪듉 + function issueBack() { + var index = $scope.$parent.vm.issueIds.length -2; + if (index > -1) { + var preIssueId = $scope.$parent.vm.issueIds[index]; + $scope.$parent.vm.issueIds.splice(index + 1, 1); + $scope.$parent.tableEvent.changeDetailView(preIssueId, true); + } + } + // �긽�쐞 �씠�뒋 �겢由��떆 �긽�쐞 �씠�뒋濡� �씠�룞 function goParentIssue() { var parentIssueId = $scope.vm.parentIssueId; $scope.$parent.tableEvent.changeDetailView(parentIssueId, true); + //�븯�쐞�씠�뒋-> �긽�쐞�씠�뒋 -> �뿰愿��씠�뒋�뿉�꽌 �뮘濡쒓�湲� 踰꾪듉 �겢由� �떆 �븯�쐞�씠�뒋濡� �씠�룞�릺�뒗 臾몄젣濡� 留덉�留� 諛곗뿴媛� �젣嫄� + $scope.$parent.vm.issueIds.pop(); } // �럹�씠吏� 蹂�寃� @@ -797,28 +813,50 @@ return; } - var ids = []; - if ($scope.vm.form.issuesDown[0].id != null) { - ids.push($scope.vm.form.issuesDown[0].id); + let inheritYn = false; + if ($scope.vm.inheritPartners) { + 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; + } + + var ids = []; + if ($scope.vm.form.issuesDown[0].id != null) { + ids.push($scope.vm.form.issuesDown[0].id); + } + + var contents = { + issueId : $rootScope.currentDetailIssueId, + ids : ids, + parentIssueId : $rootScope.currentDetailIssueId, + inheritYn : inheritYn + }; + + Issue.modifyParentIssue($resourceProvider.getContent( + contents, + $resourceProvider.getPageContent(0, 10))).then(function (result) { + + if (result.data.message.status === "success") { + SweetAlert.close(); + $scope.fn.getIssueDetail(0,0); + } + else { + SweetAlert.error($filter("translate")("issue.failedToIssueAddIssueDown"), result.data.message.message); // "�븯�쐞�씠�뒋 �깮�꽦 �떎�뙣" + } + }); + }); } - - var contents = { - issueId : $rootScope.currentDetailIssueId, - ids : ids, - parentIssueId : $rootScope.currentDetailIssueId - }; - - Issue.modifyParentIssue($resourceProvider.getContent( - contents, - $resourceProvider.getPageContent(0, 10))).then(function (result) { - - if (result.data.message.status === "success") { - $scope.fn.getIssueDetail(0,0); - } - else { - SweetAlert.error($filter("translate")("issue.failedToIssueAddIssueDown"), result.data.message.message); // "�뿰愿��씪媛� �깮�꽦 �떎�뙣" - } - }); } // �씠�뒋紐낆쓣 �겢由��븯硫� �씠�뒋 �긽�꽭 �젙蹂대�� 議고쉶�븳�떎. @@ -1161,8 +1199,11 @@ $scope.vm.viewer.issueDownVos = result.data.data.issueDownVos; if ($rootScope.workProject.id > -1 && result.data.data.projectVo !== null) { - $rootScope.changeLastProject(result.data.data.projectVo.id); + $rootScope.changeLastProject(result.data.data.projectVo.id, false, false); } + + $scope.vm.inheritPartners = result.data.data.issueTypeVo.inheritPartners; + $scope.vm.downTotalCount = result.data.data.downTotalCount; } } else { @@ -1246,21 +1287,69 @@ // �솢�룞 �씠�젰 留뚮뱾湲� function makeActiveHistory() { - $scope.vm.viewer.activeParentHistory = ""; - $scope.vm.viewer.activeHistory = ""; + $scope.vm.viewer.activeParentHistory = []; + $scope.vm.viewer.activeHistory = []; + $scope.vm.viewer.activeParentMailHistory = []; + $scope.vm.viewer.activeAllMailAndReplyHistory = []; //�긽�쐞+�븯�쐞 硫붿씪,�뙎湲� �엳�뒪�넗由� + var oriMailHistory = []; + var oriCommentHistory = []; + + if ($scope.vm.viewer.issueHistoryVos != null && $scope.vm.viewer.issueHistoryVos.length > 0) { + // �긽�쐞�씠�뒋 硫붿씪 �엳�뒪�넗由� + for (var i=0; i<$scope.vm.viewer.issueHistoryVos.length; i++) { + if ($scope.vm.viewer.issueHistoryVos[i].issueHistoryType === "SEND") { + oriMailHistory.push($scope.vm.viewer.issueHistoryVos[i]); + } + } + //$scope.vm.viewer.activeParentMailHistory = angular.copy(oriMailHistory); + } + + // �긽�쐞�씠�뒋 �뙎湲� �엳�뒪�넗由� + if ($scope.vm.viewer.issueCommentVos != null && $scope.vm.viewer.issueCommentVos.length > 0) { + for (var i=0; i<$scope.vm.viewer.issueCommentVos.length; i++) { + oriCommentHistory.push($scope.vm.viewer.issueCommentVos[i]); + } + } + + $scope.vm.viewer.activeAllMailAndReplyHistory = oriMailHistory.concat(oriCommentHistory); + + // �븯�쐞�씠�뒋 �엳�뒪�넗由� if ($scope.vm.viewer.issueDownVos != null && $scope.vm.viewer.issueDownVos.length > 0) { - $scope.vm.viewer.activeDownHistory = ""; //�븯�쐞�씠�뒋 �엳�뒪�넗由щ쭔 - $scope.vm.viewer.downComment = ""; //�븯�쐞�씠�뒋 �뙎湲�留� - $scope.vm.viewer.activeDownAllHistory = ""; //�븯�쐞�씠�뒋 �엳�뒪�넗由�+�뙎湲� + $scope.vm.viewer.activeDownHistory = []; //�븯�쐞�씠�뒋 �엳�뒪�넗由щ쭔 + $scope.vm.viewer.downComment = []; //�븯�쐞�씠�뒋 �뙎湲�留� + $scope.vm.viewer.activeDownAllHistory = []; //�븯�쐞�씠�뒋 �엳�뒪�넗由�+�뙎湲� + $scope.vm.viewer.activeDownMailAndReplyHistory = []; //�븯�쐞 硫붿씪+�뙎湲� �엳�뒪�넗由� var downTitle = ""; var oriDownHistory = []; var oriDownCommentHistory = []; + var oriDownMailHistory = []; // �븯�쐞�씠�뒋 �엳�뒪�넗由� for (var i=0; i<$scope.vm.viewer.issueDownVos.length; i++){ oriDownHistory.push($scope.vm.viewer.issueDownVos[i].issueHistoryVos); - oriDownCommentHistory.push($scope.vm.viewer.issueDownVos[i].issueCommentVos); + + // �븯�쐞�씠�뒋 硫붿씪 湲곕줉 + for (var j=0; j<$scope.vm.viewer.issueDownVos[i].issueHistoryVos.length; j++) { + if($scope.vm.viewer.issueDownVos[i].issueHistoryVos[j].issueHistoryType === "SEND") { + oriDownMailHistory.push($scope.vm.viewer.issueDownVos[i].issueHistoryVos[j]); + } + } + // �븯�쐞�씠�뒋 �뙎湲� 湲곕줉 + for (var k=0; k<$scope.vm.viewer.issueDownVos[i].issueCommentVos.length; k++) { + oriDownCommentHistory.push($scope.vm.viewer.issueDownVos[i].issueCommentVos[k]); + } } + // �븯�쐞�씠�뒋 硫붿씪+�뙎湲� ���옣 + $scope.vm.viewer.activeDownMailAndReplyHistory = oriDownCommentHistory.concat(oriDownMailHistory); + for (var i=0; i<$scope.vm.viewer.activeDownMailAndReplyHistory.length; i++){ + downTitle = "<div class='dot' style='margin-bottom: -8px'>*�븯�쐞�씠�뒋 : "+$scope.vm.viewer.activeDownMailAndReplyHistory[i].title+"</div>"; + $scope.vm.viewer.activeDownMailAndReplyHistory[i].desc = downTitle + $scope.vm.viewer.activeDownMailAndReplyHistory[i].description; + } + + $scope.vm.viewer.activeDownMailAndReplyHistory.sort(function (a, b) { //"MAIL_AND_REPLY_DOWN" �궡由쇱감�닚 + return a.registerDate > b.registerDate ? -1 : a.registerDate < b.registerDate ? 1 : 0; + }); + for (var i=0; i<oriDownHistory.length; i++){ if ($scope.vm.viewer.activeDownHistory === "") { $scope.vm.viewer.activeDownHistory = oriDownHistory[i]; @@ -1278,29 +1367,41 @@ }); // �븯�쐞�씠�뒋 �뙎湲� �엳�뒪�넗由� - for (var i=0; i<oriDownCommentHistory.length; i++) { + for (var i=0; i<oriDownCommentHistory.length; i++) { if ($scope.vm.viewer.downComment === "") { $scope.vm.viewer.downComment = oriDownCommentHistory[i]; } else { $scope.vm.viewer.downComment = $scope.vm.viewer.downComment.concat(oriDownCommentHistory[i]); } - } - $scope.vm.viewer.issueDownVos.sort(function (a, b) { //�궡由쇱감�닚 - return a.registerDate > b.registerDate ? -1 : a.registerDate < b.registerDate ? 1 : 0; - }); + } + $scope.vm.viewer.issueDownVos.sort(function (a, b) { //�궡由쇱감�닚 + return a.registerDate > b.registerDate ? -1 : a.registerDate < b.registerDate ? 1 : 0; + }); - $scope.vm.viewer.activeDownAllHistory = $scope.vm.viewer.downComment.concat($scope.vm.viewer.activeDownHistory); - $scope.vm.viewer.activeParentHistory = $scope.vm.viewer.issueCommentVos.concat($scope.vm.viewer.issueHistoryVos); - $scope.vm.viewer.activeHistory = $scope.vm.viewer.activeParentHistory.concat($scope.vm.viewer.activeDownAllHistory); + $scope.vm.viewer.activeDownAllHistory = $scope.vm.viewer.downComment.concat($scope.vm.viewer.activeDownHistory); + + $scope.vm.viewer.activeDownAllHistory.sort(function (a, b) { //"RECODE_DOWN" �궡由쇱감�닚 + return a.registerDate > b.registerDate ? -1 : a.registerDate < b.registerDate ? 1 : 0; + }); + + $scope.vm.viewer.activeParentHistory = $scope.vm.viewer.issueCommentVos.concat($scope.vm.viewer.issueHistoryVos); + $scope.vm.viewer.activeHistory = $scope.vm.viewer.activeParentHistory.concat($scope.vm.viewer.activeDownAllHistory); + $scope.vm.viewer.activeAllMailAndReplyHistory = $scope.vm.viewer.activeAllMailAndReplyHistory.concat($scope.vm.viewer.activeDownMailAndReplyHistory); }else { $scope.vm.viewer.activeParentHistory = $scope.vm.viewer.issueCommentVos.concat($scope.vm.viewer.issueHistoryVos); $scope.vm.viewer.activeHistory = $scope.vm.viewer.issueCommentVos.concat($scope.vm.viewer.issueHistoryVos); } - $scope.vm.viewer.activeParentHistory.sort(function (a, b) { //�궡由쇱감�닚 + + $scope.vm.viewer.activeHistory.sort(function (a, b) { //"ALL" �궡由쇱감�닚 return a.registerDate > b.registerDate ? -1 : a.registerDate < b.registerDate ? 1 : 0; }); - $scope.vm.viewer.activeHistory.sort(function (a, b) { //�궡由쇱감�닚 + + $scope.vm.viewer.activeParentHistory.sort(function (a, b) { //"RECODE" �궡由쇱감�닚 + return a.registerDate > b.registerDate ? -1 : a.registerDate < b.registerDate ? 1 : 0; + }); + + $scope.vm.viewer.activeAllMailAndReplyHistory.sort(function (a, b) { //"MAIL_AND_REPLY" �궡由쇱감�닚 return a.registerDate > b.registerDate ? -1 : a.registerDate < b.registerDate ? 1 : 0; }); } -- Gitblit v1.8.0