| | |
| | | // 이슈 목록 컨트롤러 vm, fn 상속 중 |
| | | $scope.vm.viewer = {}; // 현재 이슈 |
| | | $scope.vm.images = []; // 첨부된 파일 중 이미지 파일 |
| | | $scope.vm.activeTab = "ALL"; // 활동 내역 탭 |
| | | $scope.vm.activeTab = "RECODE"; // 활동 내역 탭 |
| | | // 이슈 상태 변경 표시 여부 |
| | | $scope.vm.editor = { |
| | | issueStatus : false |
| | |
| | | } |
| | | |
| | | function getDownIssueListCallBack(result) { |
| | | $scope.vm.autoCompletePage.issue.totalPage = result.data.page.totalPage; |
| | | $scope.vm.autoCompletePageDown.issue.totalPage = result.data.page.totalPage; |
| | | } |
| | | |
| | | // 테이블의 연관 이슈 컬럼을 만들어준다. |
| | |
| | | |
| | | // 연관 이슈 컬럼 |
| | | switch(Rel_issueTableConfig.key) { |
| | | |
| | | // 연관 이슈 구분 |
| | | case "RELATION_ISSUE_TYPE" : |
| | | $scope.vm.relTableConfigs.push($tableProvider.config() |
| | |
| | | issueRelationVo.relationIssueTypeName = $scope.vm.relationIssueTypes[issueRelationVo.relationIssueType].name; |
| | | $scope.vm.form.issues.push(issueRelationVo.issueRelation); |
| | | }); |
| | | result.data.data.issueRelationVos.sort(function (a, b) { //최근변경일 내림차순 |
| | | return a.modifyDate > b.modifyDate ? -1 : a.modifyDate < b.modifyDate ? 1 : 0; |
| | | }); |
| | | } |
| | | |
| | | // 하위 이슈 반목문 |
| | |
| | | //$scope.vm.form.issuesDown.push(issueDownVo.issueDown); |
| | | $scope.vm.form.issuesDown.push(issueDownVo); |
| | | $scope.vm.form.issuesDownStatus.push(issueDownVo.issueStatusVo.issueStatusType); |
| | | }); |
| | | result.data.data.issueDownVos.sort(function (a, b) { //최근변경일 내림차순 |
| | | return a.modifyDate > b.modifyDate ? -1 : a.modifyDate < b.modifyDate ? 1 : 0; |
| | | }); |
| | | } |
| | | $scope.vm.viewer.issueRelationVos = result.data.data.issueRelationVos; |
| | |
| | | `` |
| | | function updateActiveHistory() { |
| | | $scope.vm.activeTab = 'ALL'; |
| | | //$scope.fn.makeActiveHistory(); |
| | | $scope.fn.makeActiveHistory(); |
| | | } |
| | | |
| | | // 활동 이력 만들기 |
| | | function makeActiveHistory() { |
| | | $scope.vm.viewer.activeParentHistory = ""; |
| | | $scope.vm.viewer.activeHistory = ""; |
| | | 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 = ""; |
| | | $scope.vm.viewer.activeDownHistory = ""; //하위이슈 히스토리만 |
| | | $scope.vm.viewer.downComment = ""; //하위이슈 댓글만 |
| | | $scope.vm.viewer.activeDownAllHistory = ""; //하위이슈 히스토리+댓글 |
| | | var downTitle = ""; |
| | | var oriDownHistory = []; |
| | | var oriDownCommentHistory = []; |
| | | |
| | | // 하위이슈 히스토리 |
| | | 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++; |
| | | oriDownHistory.push($scope.vm.viewer.issueDownVos[i].issueHistoryVos); |
| | | oriDownCommentHistory.push($scope.vm.viewer.issueDownVos[i].issueCommentVos); |
| | | } |
| | | for (var i=0; i<oriDownHistory.length; i++){ |
| | | if ($scope.vm.viewer.activeDownHistory === "") { |
| | | $scope.vm.viewer.activeDownHistory = oriDownHistory[i]; |
| | | } else { |
| | | $scope.vm.viewer.activeDownHistory = $scope.vm.viewer.activeDownHistory.concat(oriDownHistory[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; |
| | | 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++) { |
| | | $scope.vm.viewer.downComment = $scope.vm.viewer.issueDownVos[i].issueCommentVos.concat($scope.vm.viewer.issueDownVos[i+1].issueCommentVos); |
| | | 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]); |
| | | } |
| | | } |
| | | /*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.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 { |