| | |
| | | $scope.vm.form = { |
| | | issues : [], //연관 일감 |
| | | issuesDown : [], // 하위 일감 |
| | | issuesDownStatus : [], //하위 이슈 상태 |
| | | issueCompanyVos : [], |
| | | issueIspVos : [], |
| | | issueHostingVos : [] |
| | |
| | | .setHWidth("width-60-p bold") |
| | | .setHSort(false) |
| | | .setDRenderer("ISSUE_DOWN_MOVE")) |
| | | $scope.vm.downTableConfigs.push($tableProvider.config() |
| | | .setHName("issue.relationIssueDelete") |
| | | .setDType("renderer") |
| | | .setDAlign("text-center") |
| | | .setHWidth("width-20-p bold") |
| | | .setDRenderer("ISSUE_DOWN_DELETE") |
| | | .setHSort(false) |
| | | .setDAlign("text-center")) |
| | | if($scope.vm.viewer.modifyPermissionCheck){ |
| | | $scope.vm.downTableConfigs.push($tableProvider.config() |
| | | .setHName("issue.relationIssueDelete") |
| | | .setDType("renderer") |
| | | .setDAlign("text-center") |
| | | .setHWidth("width-20-p bold") |
| | | .setDRenderer("ISSUE_DOWN_DELETE") |
| | | .setHSort(false) |
| | | .setDAlign("text-center")) |
| | | } |
| | | |
| | | angular.forEach($scope.vm.downTableConfigs, function (Down_issueTableConfig) { |
| | | // 표시 대상인 컬럼만 화면에 그려준다. |
| | |
| | | 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 = ""; |
| | | // 하위이슈 히스토리 |
| | | 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({ |