| | |
| | | setTableColumn : setTableColumn, // 테이블의 컬럼을 만들어준다. |
| | | add : add, // 이슈 생성 |
| | | modify : modify, // 이슈 수정 |
| | | AddRelation : AddRelation, // 연관 이슈 추가 |
| | | addRelationIssueForm : addRelationIssueForm, // 연관 이슈 추가 |
| | | modifyMultiIssueStatus : modifyMultiIssueStatus, // 이슈 다중 상태 변경 |
| | | removes : removes, // 이슈 삭제 |
| | | addIssueTableConfig : addIssueTableConfig, // 이슈 목록 테이블 설정 |
| | |
| | | }); |
| | | } |
| | | |
| | | function AddRelation(id) { |
| | | function addRelationIssueForm(id) { |
| | | $uibModal.open({ |
| | | templateUrl : 'views/issue/issueAddRelation.html', |
| | | size : "lg", |
| | |
| | | function removes() { |
| | | var removeIds = []; |
| | | var removePermission = true; |
| | | var downIssueIds = false; |
| | | |
| | | angular.forEach($scope.vm.responseData.data, function (data) { |
| | | if (data.checked && data.modifyPermissionCheck) { |
| | |
| | | |
| | | if (data.checked && !data.modifyPermissionCheck) { |
| | | removePermission = false; |
| | | } |
| | | |
| | | if (data.downIssueAllCount > 0){ |
| | | downIssueIds = true; |
| | | } |
| | | }); |
| | | |
| | |
| | | return; |
| | | } |
| | | |
| | | // 삭제 알림 |
| | | SweetAlert.swal({ |
| | | title : $filter("translate")("issue.deleteIssue"), // 이슈 삭제 |
| | | text : $filter("translate")("issue.wantToDeleteSelectIssue"), // 선택한 이슈을 삭제하겠습니까? 삭제된 이슈은 복구할 수 없습니다. |
| | | if (downIssueIds) { |
| | | SweetAlert.swal({ |
| | | title : $filter("translate")("common.deleteIssue"), // 이슈 삭제 |
| | | text : $filter("translate")("issue.wantToDeleteSelectDownIssue"), // 하위 이슈가 존재 합니다. 선택한 이슈와 하위 이슈 모두 삭제하겠습니까? 삭제된 이슈는 복구할 수 없습니다. |
| | | type : "warning", |
| | | showCancelButton : true, |
| | | confirmButtonColor : "#DD6B55", |
| | | confirmButtonText : $filter("translate")("common.delete"), // 삭제 |
| | | cancelButtonText : $filter("translate")("common.cancel"), // 취소 |
| | | closeOnConfirm : false, |
| | | closeOnCancel : true |
| | | closeOnCancel : false |
| | | }, |
| | | function (isConfirm) { |
| | | SweetAlert.close(); |
| | | |
| | | if (isConfirm) { |
| | | if (isConfirm) { //이슈 + 하위 삭제 |
| | | $rootScope.spinner = true; |
| | | |
| | | Issue.remove($resourceProvider.getContent( |
| | | Issue.removeAllIssues($resourceProvider.getContent( |
| | | { removeIds : removeIds }, |
| | | $resourceProvider.getPageContent(0, 0))).then(function (result) { |
| | | |
| | |
| | | $timeout(function () { |
| | | SweetAlert.success($filter("translate")("common.deleteSucceeded"), result.data.message.message); // 삭제 성공 |
| | | }, 100); |
| | | |
| | | $scope.fn.listView(); |
| | | |
| | | $scope.fn.getPageList(0); |
| | | } |
| | | else { |
| | |
| | | SweetAlert.error($filter("translate")("common.deleteFailed"), result.data.message.message); // 삭제 실패 |
| | | }, 100); |
| | | } |
| | | |
| | | $rootScope.spinner = false; |
| | | }); |
| | | |
| | | } else {// 선택 한 이슈만 삭제 |
| | | // 삭제 알림 |
| | | SweetAlert.swal({ |
| | | title : $filter("translate")("issue.deleteIssue"), // 이슈 삭제 |
| | | text : $filter("translate")("issue.wantToDeleteOnlySelectIssue"), // 선택한 이슈만 삭제하겠습니까? 삭제된 이슈은 복구할 수 없습니다. |
| | | type : "warning", |
| | | showCancelButton : true, |
| | | confirmButtonColor : "#DD6B55", |
| | | confirmButtonText : $filter("translate")("common.delete"), // 삭제 |
| | | cancelButtonText : $filter("translate")("common.cancel"), // 취소 |
| | | closeOnConfirm : false, |
| | | closeOnCancel : true |
| | | }, |
| | | function (isConfirm) { |
| | | SweetAlert.close(); |
| | | |
| | | if (isConfirm) { |
| | | $rootScope.spinner = true; |
| | | |
| | | Issue.remove($resourceProvider.getContent( |
| | | { removeIds : removeIds }, |
| | | $resourceProvider.getPageContent(0, 0))).then(function (result) { |
| | | |
| | | if (result.data.message.status === "success") { |
| | | $timeout(function () { |
| | | SweetAlert.success($filter("translate")("common.deleteSucceeded"), result.data.message.message); // 삭제 성공 |
| | | }, 100); |
| | | |
| | | $scope.fn.listView(); |
| | | |
| | | $scope.fn.getPageList(0); |
| | | } |
| | | else { |
| | | $timeout(function () { |
| | | SweetAlert.error($filter("translate")("common.deleteFailed"), result.data.message.message); // 삭제 실패 |
| | | }, 100); |
| | | } |
| | | |
| | | $rootScope.spinner = false; |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } else { |
| | | // 삭제 알림 |
| | | SweetAlert.swal({ |
| | | title : $filter("translate")("issue.deleteIssue"), // 이슈 삭제 |
| | | text : $filter("translate")("issue.wantToDeleteSelectIssue"), // 선택한 이슈을 삭제하겠습니까? 삭제된 이슈은 복구할 수 없습니다. |
| | | type : "warning", |
| | | showCancelButton : true, |
| | | confirmButtonColor : "#DD6B55", |
| | | confirmButtonText : $filter("translate")("common.delete"), // 삭제 |
| | | cancelButtonText : $filter("translate")("common.cancel"), // 취소 |
| | | closeOnConfirm : false, |
| | | closeOnCancel : true |
| | | }, |
| | | function (isConfirm) { |
| | | SweetAlert.close(); |
| | | |
| | | if (isConfirm) { |
| | | $rootScope.spinner = true; |
| | | |
| | | Issue.remove($resourceProvider.getContent( |
| | | { removeIds : removeIds }, |
| | | $resourceProvider.getPageContent(0, 0))).then(function (result) { |
| | | |
| | | if (result.data.message.status === "success") { |
| | | $timeout(function () { |
| | | SweetAlert.success($filter("translate")("common.deleteSucceeded"), result.data.message.message); // 삭제 성공 |
| | | }, 100); |
| | | |
| | | $scope.fn.listView(); |
| | | |
| | | $scope.fn.getPageList(0); |
| | | } |
| | | else { |
| | | $timeout(function () { |
| | | SweetAlert.error($filter("translate")("common.deleteFailed"), result.data.message.message); // 삭제 실패 |
| | | }, 100); |
| | | } |
| | | |
| | | $rootScope.spinner = false; |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | // 이슈 목록 테이블 설정 |
| | |
| | | else { |
| | | // 최초 업무 공간에 들어왔을 경우 |
| | | $scope.vm.issueTableConfigs = [{ |
| | | name : $filter("translate")("issue.issueTitle"), // 이슈 제목 |
| | | key : "ISSUE_TITLE", |
| | | width : "width-140-p", |
| | | position : 1, |
| | | display : true |
| | | }, { |
| | | name : $filter("translate")("common.priority"), // 우선순위 |
| | | key : "PRIORITY", |
| | | width : "width-80-p", |
| | | position : 1, |
| | | position : 2, |
| | | display : true |
| | | }, { |
| | | name : $filter("translate")("common.importance"), // 중요도 |
| | | key : "SEVERITY", |
| | | width : "width-80-p", |
| | | position : 2, |
| | | position : 3, |
| | | display : true |
| | | }, { |
| | | name : $filter("translate")("issue.issueType"), // 이슈 타입 |
| | | key : "ISSUE_TYPE", |
| | | width : "width-140-p", |
| | | position : 3, |
| | | position : 4, |
| | | display : true |
| | | }, { |
| | | name : $filter("translate")("common.assigneeTeam"), // 담당부서 |
| | | key : "ASSIGNEE_TEAM", |
| | | width : "width-140-p", |
| | | position : 4, |
| | | position : 5, |
| | | display : true |
| | | }]; |
| | | } |