| | |
| | | |
| | | // 활동 이력 만들기 |
| | | function makeActiveHistory() { |
| | | $scope.vm.viewer.activeHistory = $scope.vm.viewer.issueCommentVos.concat($scope.vm.viewer.issueHistoryVos); |
| | | $scope.vm.viewer.activeHistory.sort(function (a, b) { |
| | | if ($scope.vm.viewer.issueDownVos != null && $scope.vm.viewer.issueDownVos.length > 0) { |
| | | $scope.vm.viewer.activeHistory = ""; |
| | | $scope.vm.viewer.activeParentHistory = ""; |
| | | $scope.vm.viewer.activeDownHistory = ""; |
| | | $scope.vm.viewer.activeDownAllHistory = ""; |
| | | // 하위이슈 히스토리 |
| | | for (var i=0; i<$scope.vm.viewer.issueDownVos.length; i++){ |
| | | $scope.vm.viewer.activeDownHistory = $scope.vm.viewer.issueDownVos[i].issueHistoryVos.concat($scope.vm.viewer.issueDownVos[i+1].issueHistoryVos); |
| | | i++; |
| | | } |
| | | for (var i=0; i<$scope.vm.viewer.activeDownHistory.length; i++){ |
| | | $scope.vm.viewer.activeDownHistory[i].description |
| | | = "<div class='dot'>하위이슈 : "+$scope.vm.viewer.activeDownHistory[i].title+"</div>" + $scope.vm.viewer.activeDownHistory[i].description; |
| | | } |
| | | $scope.vm.viewer.activeDownHistory.sort(function (a, b) { //내림차순 |
| | | return a.registerDate > b.registerDate ? -1 : a.registerDate < b.registerDate ? 1 : 0; |
| | | }); |
| | | |
| | | // 하위이슈 댓글 히스토리 |
| | | for (var i=0; i<$scope.vm.viewer.issueDownVos.length; i++) { |
| | | $scope.vm.viewer.downComment = $scope.vm.viewer.issueDownVos[i].issueCommentVos.concat($scope.vm.viewer.issueDownVos[i+1].issueCommentVos); |
| | | i++; |
| | | } |
| | | /*for (var i=0; i<$scope.vm.viewer.downComment.length; i++){ |
| | | $scope.vm.viewer.downComment[i].description |
| | | = $scope.vm.viewer.downComment[i].title +"의 댓글 : "+ $scope.vm.viewer.downComment[i].description; |
| | | }*/ |
| | | $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); |
| | | |
| | | }else { |
| | | $scope.vm.viewer.activeHistory = $scope.vm.viewer.issueCommentVos.concat($scope.vm.viewer.issueHistoryVos); |
| | | } |
| | | $scope.vm.viewer.activeHistory.sort(function (a, b) { //내림차순 |
| | | return a.registerDate > b.registerDate ? -1 : a.registerDate < b.registerDate ? 1 : 0; |
| | | }); |
| | | } |
| | |
| | | |
| | | if (result.data.message.status === "success") { |
| | | $scope.vm.viewer.issueCommentVos = result.data.data; |
| | | $scope.fn.updateActiveHistory(); |
| | | } |
| | | else { |
| | | SweetAlert.swal({ |