| | |
| | | $scope.vm.form = { |
| | | issues : [], //연관 일감 |
| | | issuesDown : [], // 하위 일감 |
| | | issuesDownStatus : [], //하위 이슈 상태 |
| | | issueCompanyVos : [], |
| | | issueIspVos : [], |
| | | issueHostingVos : [] |
| | |
| | | parameter : function () { |
| | | return { |
| | | issueIds : [$scope.vm.viewer.id], |
| | | projectId : $scope.vm.viewer.projectVo.id |
| | | projectId : $scope.vm.viewer.projectVo.id, |
| | | downIssuesStatus : $scope.vm.form.issuesDownStatus |
| | | }; |
| | | } |
| | | } |
| | |
| | | $scope.vm.form.issues = []; |
| | | $scope.vm.form.issues.push(result.data.data); |
| | | $scope.vm.form.issuesDown = []; |
| | | $scope.vm.form.issuesDownStatus = [];// 하위이슈 상태 |
| | | $scope.vm.form.issuesDown.push(result.data.data); |
| | | |
| | | var issueTableConfigVos = result.data.data.issueTableConfigVos; |
| | |
| | | angular.forEach(result.data.data.issueDownVos, function (issueDownVo){ |
| | | //$scope.vm.form.issuesDown.push(issueDownVo.issueDown); |
| | | $scope.vm.form.issuesDown.push(issueDownVo); |
| | | |
| | | $scope.vm.form.issuesDownStatus.push(issueDownVo.issueStatusVo.issueStatusType); |
| | | }); |
| | | } |
| | | $scope.vm.viewer.issueRelationVos = result.data.data.issueRelationVos; |
| | |
| | | if ($rootScope.workProject.id > -1 && result.data.data.projectVo !== null) { |
| | | $rootScope.changeLastProject(result.data.data.projectVo.id); |
| | | } |
| | | |
| | | } |
| | | } |
| | | else { |
| | |
| | | |
| | | // 활동 이력 만들기 |
| | | 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 = ""; |
| | | var downTitle = ""; |
| | | // 하위이슈 히스토리 |
| | | for (var i=0; i<$scope.vm.viewer.issueDownVos.length; i++){ |
| | | if($scope.vm.viewer.issueDownVos.length > 1){ |
| | | $scope.vm.viewer.activeDownHistory = $scope.vm.viewer.issueDownVos[i].issueHistoryVos.concat($scope.vm.viewer.issueDownVos[i+1].issueHistoryVos); |
| | | i++; |
| | | }else { |
| | | $scope.vm.viewer.activeDownHistory = $scope.vm.viewer.issueDownVos[i].issueHistoryVos; |
| | | } |
| | | } |
| | | for (var i=0; i<$scope.vm.viewer.activeDownHistory.length; i++){ |
| | | downTitle = "<div class='dot' style='margin-bottom: -8px'>*하위이슈 : "+$scope.vm.viewer.activeDownHistory[i].title+"</div>"; |
| | | $scope.vm.viewer.activeDownHistory[i].desc = downTitle + $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++) { |
| | | if($scope.vm.viewer.issueDownVos.length > 1){ |
| | | $scope.vm.viewer.downComment = $scope.vm.viewer.issueDownVos[i].issueCommentVos.concat($scope.vm.viewer.issueDownVos[i+1].issueCommentVos); |
| | | i++; |
| | | } else { |
| | | $scope.vm.viewer.downComment = $scope.vm.viewer.issueDownVos[i].issueCommentVos; |
| | | } |
| | | } |
| | | $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.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) { //내림차순 |
| | | return a.registerDate > b.registerDate ? -1 : a.registerDate < b.registerDate ? 1 : 0; |
| | | }); |
| | | $scope.vm.viewer.activeHistory.sort(function (a, b) { //내림차순 |
| | | return a.registerDate > b.registerDate ? -1 : a.registerDate < b.registerDate ? 1 : 0; |
| | | }); |
| | | } |
| | |
| | | $timeout(function () { |
| | | SweetAlert.success($filter("translate")("common.deleteSucceeded"), result.data.message.message); // 삭제 성공 |
| | | }, 100); |
| | | |
| | | $scope.fn.getCommentList(); |
| | | } |
| | | else { |
| | |
| | | |
| | | if (result.data.message.status === "success") { |
| | | $scope.vm.viewer.issueCommentVos = result.data.data; |
| | | $scope.fn.updateActiveHistory(); |
| | | } |
| | | else { |
| | | SweetAlert.swal({ |