| | |
| | | return true; |
| | | }; |
| | | |
| | | |
| | | // 이슈 생성, 수정에서 다중 선택, 단일 선택 옵션에 체크되게 해주는 기능 |
| | | $rootScope.selectOption = function (useValues, value) { |
| | | var result = false; |
| | |
| | | "USER_PERMISSION_MNG_GUIDE" : 2, |
| | | }; |
| | | |
| | | // 현재 선택된 이슈 타입 아이디 가져오기 |
| | | $rootScope.getCurrentIssueTypeId = function () { |
| | | return $rootScope.issueTypeMenu != null ? $rootScope.issueTypeMenu.id : null; |
| | | } |
| | | |
| | | // 현재 선택된 이슈 타입 변경하기 |
| | | $rootScope.setCurrentIssueTypeId = function (issueTypeVo) { |
| | | if($rootScope.issueTypeMenu !== issueTypeVo) { |
| | | $rootScope.issueTypeMenu = issueTypeVo; |
| | | } |
| | | } |
| | | |
| | | // 권한을 확인한다 |
| | | $rootScope.checkMngPermission = function (userPermission) { |
| | | if (!$rootScope.isDefined($rootScope.user)) { |
| | |
| | | return false; |
| | | }; |
| | | |
| | | $rootScope.changeLastProject = function (projectId, reload = true) { |
| | | if (User != null) { |
| | | User.updateLastProject($resourceProvider.getContent( |
| | | {lastProjectId: projectId}, |
| | | $resourceProvider.getPageContent(0, 0))).then(function (result) { |
| | | $rootScope.changeLastProject = function (projectId, reload = true, onEvent = true) { |
| | | if ($rootScope.workProject == null || $rootScope.workProject.id !== projectId ) { |
| | | if (User != null) { |
| | | User.updateLastProject($resourceProvider.getContent( |
| | | {lastProjectId: projectId}, |
| | | $resourceProvider.getPageContent(0, 0))).then(function (result) { |
| | | |
| | | if (result.data.message.status === "success") { |
| | | $rootScope.user = result.data.data; |
| | | $rootScope.projects.forEach(function (el) { |
| | | if (el.id == projectId) { |
| | | $rootScope.workProject = el; |
| | | if (result.data.message.status === "success") { |
| | | $rootScope.user = result.data.data; |
| | | $rootScope.projects.forEach(function (el) { |
| | | if (el.id == projectId) { |
| | | $rootScope.workProject = el; |
| | | if (onEvent) { |
| | | $rootScope.$broadcast("changedLastProject", {id: el.id}); |
| | | } |
| | | |
| | | $rootScope.$broadcast("changeLastProject", { id : el.id }); |
| | | } |
| | | }); |
| | | $state.go($state.current, {}, {reload: reload}); |
| | | } |
| | | }); |
| | | if (reload) { |
| | | $state.go('dashboards.dashboard'); |
| | | } |
| | | } |
| | | }); |
| | | // $state.go($state.current, {}, {reload: reload}); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | |