| | |
| | | $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; |
| | |
| | | $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(); |
| | | } |
| | | |
| | | // 페이지 변경 |
| | |
| | | |
| | | // 활동 이력 만들기 |
| | | function makeActiveHistory() { |
| | | $scope.vm.viewer.activeParentHistory = ""; |
| | | $scope.vm.viewer.activeHistory = ""; |
| | | $scope.vm.viewer.activeParentMailHistory = ""; |
| | | $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); |
| | | //$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.activeDownMailHistory = ""; //하위이슈 메일만 |
| | | $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 = []; |
| | |
| | | // 하위이슈 히스토리 |
| | | 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++) { |
| | |
| | | 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.activeDownMailHistory = angular.copy(oriDownMailHistory); |
| | | $scope.vm.viewer.activeDownMailHistory.sort(function (a, b) { //내림차순 |
| | | // 하위이슈 메일+댓글 저장 |
| | | $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]; |
| | |
| | | }); |
| | | |
| | | // 하위이슈 댓글 히스토리 |
| | | 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; |
| | | }); |
| | | } |