| | |
| | | } |
| | | } |
| | | |
| | | function changeIssueListMenu(issueTypeId) { |
| | | function changeIssueListMenu(issueTypeId, changeProject = true) { |
| | | $rootScope.issueTypeMenu = null; |
| | | for (var issueType of $rootScope.workIssueTypes) { |
| | | if (issueType.id === issueTypeId) { |
| | |
| | | } |
| | | |
| | | // sidebar 클릭시 프로젝트 아이디 설정 |
| | | $rootScope.changeLastProject($rootScope.issueTypeMenu.projectVo.id, false, false); |
| | | if (changeProject) { |
| | | $rootScope.changeLastProject($rootScope.issueTypeMenu.projectVo.id, false, false); |
| | | |
| | | if ($rootScope.issueTypeMenu != null) { |
| | | moveMenu("issues.list"); |
| | | if ($rootScope.issueTypeMenu != null) { |
| | | moveMenu("issues.list"); |
| | | } |
| | | } |
| | | |
| | | $rootScope.$broadcast("changeIssueListMenu", $rootScope.issueTypeMenu); |
| | | moveMenu("issues.list"); |
| | | //$rootScope.$broadcast("changeIssueListMenu", $rootScope.issueTypeMenu); |
| | | |
| | | if ($rootScope.user.lastIssueTypeId !== issueTypeId) { |
| | | $scope.fn.setLastIssueType(issueTypeId); |
| | |
| | | |
| | | if ($rootScope.workIssueTypes != null && $rootScope.workIssueTypes.length > 0) { |
| | | $rootScope.workIssueTypes.forEach(function (issueType) { |
| | | |
| | | var selectIssueTypeId = null; |
| | | if (issueType.id === $rootScope.user.lastIssueTypeId) { |
| | | selectIssueTypeId = issueType.id; |
| | | $scope.fn.changeIssueListMenu(issueType.id, false); |
| | | } |
| | | |
| | | if (selectIssueTypeId == null) { |
| | | $scope.fn.changeIssueListMenu($rootScope.workIssueTypes[0].id, false); |
| | | } |
| | | }); |
| | | } else { |
| | | $state.go('dashboards.dashboard'); |