OWL ITS + 탐지시스템(인터넷 진흥원)
이민희
2021-12-02 6a72a3edec87cca9996c7ab3be3fd48479881945
src/main/webapp/scripts/config.js
@@ -52,6 +52,10 @@
                $rootScope.projects = [];
                //  현재 사용중인 프로젝트
                $rootScope.workProject = null;
                //  현재 프로젝트에 사용중인 이슈 목록(유형)
                $rootScope.workIssueTypes = [];
                //  현재 선택중인 이슈 목록
                $rootScope.issueTypeMenu = null;
                //  이슈 목록->상세화면에서 마지막으로 접근한 이슈 아이디 - 라우트 탈때마다 초기화
                $rootScope.currentDetailIssueId = null;
                //  문의하기
@@ -125,6 +129,7 @@
                    return true;
                };
                //  이슈 생성, 수정에서 다중 선택, 단일 선택 옵션에 체크되게 해주는 기능
                $rootScope.selectOption = function (useValues, value) {
@@ -231,6 +236,7 @@
                //  권한 리스트
                $rootScope.mngPermission = {
                    "USER_PERMISSION_MNG_PARTNER" : 8192,
                    "USER_PERMISSION_MNG_WORKSPACE" : 4096,
                    "USER_PERMISSION_MNG_PROJECT" : 2048,
                    "USER_PERMISSION_MNG_API" : 1024,
@@ -244,6 +250,18 @@
                    "USER_PERMISSION_MNG_EVENT" : 4,
                    "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) {
@@ -299,25 +317,36 @@
                    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;
                                    }
                                });
                                $state.go($state.current, {}, {reload: reload});
                            }
                        });
                                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});
                                            }
                                            if (reload) {
                                                $state.go('dashboards.dashboard');
                                            }
                                        }
                                    });
                                    // $state.go($state.current, {}, {reload: reload});
                                }
                            });
                        }
                    }
                };
                //  프로젝트 관리 권한이 있는지 확인한다
                $rootScope.checkMngPermissionProject = function () {
                    if (!$rootScope.isDefined($rootScope.user)) {