| | |
| | | setTableColumn : setTableColumn, // 테이블의 컬럼을 만들어준다. |
| | | add : add, // 이슈 생성 |
| | | modify : modify, // 이슈 수정 |
| | | addRelationIssueForm : addRelationIssueForm, // 연관 이슈 추가 |
| | | modifyMultiIssueStatus : modifyMultiIssueStatus, // 이슈 다중 상태 변경 |
| | | removes : removes, // 이슈 삭제 |
| | | addIssueTableConfig : addIssueTableConfig, // 이슈 목록 테이블 설정 |
| | |
| | | getVmSearchObject : getVmSearchObject, // 저장한 검색 조건을 가져와서 vm 에 셋팅한다. |
| | | makeSearchConditions : makeSearchConditions, // 검색 조건을 만든다. |
| | | getIssueTableConfigs : getIssueTableConfigs, // 사용자 이슈 목록 테이블 설정 값을 가져와서 적용한다. |
| | | startExecute : startExecute // 컨트롤 로딩시 처음으로 시작되는 함수 |
| | | startExecute : startExecute, // 컨트롤 로딩시 처음으로 시작되는 함수 |
| | | getResponseData : getResponseData // 컨트롤 로딩시 처음으로 시작되는 함수 |
| | | }; |
| | | |
| | | // 변수 |
| | |
| | | issueTypeId : "", |
| | | partnerVos : "", |
| | | search : { |
| | | keyWord : "", // 전체 검색 |
| | | title : "", // 제목 |
| | | description : "", // 내용 |
| | | combinationIssueNumber : "", // 이슈 번호 |
| | |
| | | $scope.fn.startExecute(); |
| | | }); |
| | | |
| | | $scope.$on("changedIssueListMenu", function (event, args) { |
| | | $scope.fn.getPageList($scope.vm.page.selectedPage - 1); |
| | | }); |
| | | |
| | | // 검색 조건을 기억한다. - 적용 보류 |
| | | // 검색 조건을 기억해서 이슈 상세 페이지로 이동 |
| | | function makeVmSearchObject() { |
| | | var content = { |
| | | conditions : JSON.stringify({ |
| | |
| | | var issueListSearchObject = JSON.parse(result.data.data); |
| | | // 이슈 번호만 적용한다. - 삭제시 처리방법때문에 다른 속성은 적용 보류 |
| | | $scope.vm.search = issueListSearchObject.search; |
| | | $scope.vm.users = issueListSearchObject.users; |
| | | $scope.vm.departments = issueListSearchObject.departments; |
| | | $scope.vm.projects = issueListSearchObject.projects; |
| | | $scope.vm.registers = issueListSearchObject.registers; |
| | | // $scope.vm.users = issueListSearchObject.users; |
| | | // $scope.vm.departments = issueListSearchObject.departments; |
| | | // $scope.vm.projects = issueListSearchObject.projects; |
| | | // $scope.vm.registers = issueListSearchObject.registers; |
| | | |
| | | $scope.fn.getPageList(0, true); |
| | | } else { |
| | |
| | | // 현재 상세화면으로 보려고하는 이슈 id를 기억한다. |
| | | $rootScope.currentDetailIssueId = id; |
| | | // 이슈 상세 화면 요청 |
| | | $rootScope.$broadcast("getIssueDetail", { |
| | | id : id |
| | | }); |
| | | // $scope.$broadcast("getIssueDetail", { |
| | | // id : id |
| | | // }); |
| | | } |
| | | |
| | | |
| | | // 목록 화면으로 변경한다. |
| | | function listView() { |
| | |
| | | $scope.vm.responseData.data = angular.copy(temp); |
| | | // 마지막으로 보고있던 이슈 id를 초기화한다. |
| | | $rootScope.currentDetailIssueId = null; |
| | | $scope.$broadcast("getIssueList", {id: $rootScope.currentDetailIssueId}); |
| | | } |
| | | |
| | | // 이슈 테이블 설정 |
| | |
| | | .setDAlign("text-center")); |
| | | |
| | | // 상세형 일때때 |
| | | if ($scope.vm.detailView) { |
| | | $scope.vm.tableConfigs.push($tableProvider.config() |
| | | .setHName("issue.issueTitle") |
| | | .setDName("title") |
| | | .setDType("renderer") |
| | | .setHWidth("width-100 bold") |
| | | .setDRenderer("ISSUE_DETAIL_FLOATING")); |
| | | } |
| | | else { |
| | | $scope.vm.tableConfigs.push($tableProvider.config() |
| | | .setHName("issue.issueTitle") |
| | | .setDName("title") |
| | | .setDType("renderer") |
| | | .setHWidth("bold") |
| | | .setDRenderer("ISSUE_DETAIL_FLOATING")); |
| | | |
| | | angular.forEach($scope.vm.issueTableConfigs, function (issueTableConfig) { |
| | | // 표시 대상인 컬럼만 화면에 그려준다. |
| | | if (issueTableConfig.display) { |
| | | // 테이블의 컬럼을 만들어준다. |
| | | $scope.fn.setTableColumn(issueTableConfig); |
| | | } |
| | | }); |
| | | } |
| | | // if ($scope.vm.detailView) { |
| | | // $scope.vm.tableConfigs.push($tableProvider.config() |
| | | // .setHName("issue.issueTitle") |
| | | // .setDName("title") |
| | | // .setDType("renderer") |
| | | // .setHWidth("bold") |
| | | // .setDRenderer("ISSUE_DETAIL_FLOATING")); |
| | | // } |
| | | // else { |
| | | // $scope.vm.tableConfigs.push($tableProvider.config() |
| | | // .setHName("issue.issueTitle") |
| | | // .setDName("title") |
| | | // .setDType("renderer") |
| | | // .setHWidth("bold") |
| | | // .setDRenderer("ISSUE_DETAIL_FLOATING")); |
| | | // |
| | | // angular.forEach($scope.vm.issueTableConfigs, function (issueTableConfig) { |
| | | // // 표시 대상인 컬럼만 화면에 그려준다. |
| | | // if (issueTableConfig.display) { |
| | | // // 테이블의 컬럼을 만들어준다. |
| | | // $scope.fn.setTableColumn(issueTableConfig); |
| | | // } |
| | | // }); |
| | | // } |
| | | angular.forEach($scope.vm.issueTableConfigs, function (issueTableConfig) { |
| | | // 표시 대상인 컬럼만 화면에 그려준다. |
| | | if (issueTableConfig.display) { |
| | | // 테이블의 컬럼을 만들어준다. |
| | | $scope.fn.setTableColumn(issueTableConfig); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // 테이블의 컬럼을 만들어준다. |
| | |
| | | |
| | | // 일반 컬럼 |
| | | switch(issueTableConfig.key) { |
| | | case "ISSUE_TITLE" : // 이슈 제목 |
| | | $scope.vm.tableConfigs.push($tableProvider.config() |
| | | .setHName("issue.issueTitle") |
| | | .setDType("renderer") |
| | | .setHWidth("bold " + issueTableConfig.width) |
| | | .setDAlign("text-center") |
| | | .setDRenderer("ISSUE_TITLE")); |
| | | break; |
| | | |
| | | case "PRIORITY" : // 우선순위 |
| | | $scope.vm.tableConfigs.push($tableProvider.config() |
| | | .setHName("common.priority") |
| | |
| | | .setDAlign("text-center") |
| | | .setDName("modifyDate")); |
| | | break; |
| | | case "COUNT_DOWN_ISSUE" : // 하위 이슈 개수 |
| | | $scope.vm.tableConfigs.push($tableProvider.config() |
| | | .setHName("common.countDownIssue") |
| | | .setDType("renderer") |
| | | .setHWidth("bold " + issueTableConfig.width) |
| | | .setDAlign("text-center") |
| | | .setDRenderer("DOWN_ISSUE_COUNT")); |
| | | break; |
| | | } |
| | | |
| | | // 사용자 정의 필드 컬럼 |
| | |
| | | // 이슈 검색 조건을 만든다. |
| | | function makeSearchConditions() { |
| | | var conditions = { |
| | | keyWord : $scope.vm.search.keyWord, |
| | | title : $scope.vm.search.title, |
| | | description : $scope.vm.search.description, |
| | | projectType : $scope.vm.search.projectType, |
| | |
| | | if ($rootScope.workProject != null && $rootScope.workProject.id > -1) { |
| | | var find = findProjectSearch($rootScope.workProject.id); |
| | | if (!find) { |
| | | $scope.vm.projects = []; |
| | | $scope.vm.projects.push($rootScope.workProject); |
| | | } |
| | | } |
| | |
| | | if (result.data.message.status === "success") { |
| | | if (result.data.data != null && result.data.data.length > 0) { |
| | | $scope.vm.issueTypeId = result.data.data[0].issueTypeId; |
| | | $scope.vm.projectKey = result.data.data[0].projectKey; |
| | | $scope.vm.issueNumber = result.data.data[0].issueNumber; |
| | | $scope.vm.projectName = result.data.data[0].projectName; |
| | | $scope.vm.page.selectedPage = currentPage + 1; |
| | | $scope.vm.responseData = result.data; |
| | | |
| | | if (detail) { |
| | | changeDetailView(result.data.data[0].id); |
| | | } |
| | | } else { |
| | | $scope.vm.responseData = result.data; |
| | | } |
| | | |
| | | } |
| | | else { |
| | | SweetAlert.error($filter("translate")("issue.failedIssueLookup"), result.data.message.message); // 이슈 조회 실패 |
| | | } |
| | | |
| | | }); |
| | | } |
| | | |
| | | function getResponseData() { |
| | | return $scope.data; |
| | | } |
| | | |
| | | // 이메일 프로젝트 경로로 이동 후 상세 진입시 조회 |
| | | function getDetailList(projectKey, number) { |
| | | var conditions = { |
| | | projectKey : projectKey, |
| | | combinationIssueNumber : number |
| | | }; |
| | | |
| | | Issue.find($resourceProvider.getContent(conditions, |
| | | $resourceProvider.getPageContent(0, 1))).then(function (result) { |
| | | |
| | | if (result.data.message.status === "success") { |
| | | if (result.data.data != null && result.data.data.length > 0) { |
| | | $scope.vm.projectKey = result.data.data[0].projectKey; |
| | | $scope.vm.issueNumber = result.data.data[0].issueNumber; |
| | | $scope.vm.responseData = result.data; |
| | | |
| | | changeDetailView(result.data.data[0].id); |
| | | } |
| | | } |
| | | else { |
| | |
| | | resolve : { |
| | | parameter : function () { |
| | | return { |
| | | id : id |
| | | id : id, |
| | | }; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function addRelationIssueForm(id) { |
| | | $uibModal.open({ |
| | | templateUrl : 'views/issue/issueAddRelation.html', |
| | | size : "lg", |
| | | controller : 'issueAddRelationController', |
| | | backdrop : 'static', |
| | | resolve : { |
| | | parameter : function () { |
| | | return { |
| | | id : id, |
| | | }; |
| | | } |
| | | } |
| | |
| | | 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; |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | // 이슈 목록 테이블 설정 |
| | |
| | | angular.forEach(result.data.data, function (customField) { |
| | | switch (customField.customFieldType) { |
| | | case "INPUT" : |
| | | case "NUMBER" : |
| | | case "DATETIME" : |
| | | case "IP_ADDRESS" : |
| | | case "EMAIL" : |
| | | case "SITE" : |
| | | case "TEL" : |
| | | customField.useValues = ""; |
| | | break; |
| | | |
| | |
| | | case "SINGLE_SELECT" : |
| | | customField.useValues = []; |
| | | break; |
| | | |
| | | } |
| | | |
| | | $scope.vm.customFields.push(customField); |
| | |
| | | |
| | | return deferred.promise; |
| | | } |
| | | |
| | | // 최초 실행 |
| | | function startExecute() { |
| | | // 파라미터 읽기 |
| | | var params = $rootScope.previousGetParams; |
| | | if ($rootScope.isDefined(params)) { |
| | | $rootScope.$broadcast("makeIssueSearch", { projectKey : params.projectKey, issueNumber : params.issueNumber }); |
| | | // $rootScope.$broadcast("makeIssueSearch", { projectKey : params.projectKey, issueNumber : params.issueNumber }); |
| | | getDetailList(params.projectKey, params.issueNumber); |
| | | $rootScope.previousGetParams = null; |
| | | $rootScope.issueTypeId = $rootScope.issueTypeMenu.id; |
| | | // $rootScope.issueTypeId = $rootScope.issueTypeMenu.id; |
| | | return; |
| | | } |
| | | |
| | |
| | | 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 |
| | | }]; |
| | | } |