OWL ITS + 탐지시스템(인터넷 진흥원)
이민희
2022-01-10 75d46e1c4bd19c7fc63053b28792246bf68f3e28
src/main/webapp/scripts/app/common/common.controller.js
@@ -36,13 +36,6 @@
                    }
                };
                //  session check after route
                $rootScope.$on("$stateChangeStart", function (event, toState, toStateParams) {
                    if (!$rootScope.isMainSearch) {
                        $scope.vm.searchAll.keyWord = "";
                    }
                });
                //  시스템에서 특정 이슈로 바로 이동할 수 있도록 해준다.
                $scope.$on("makeIssueSearch", function (event, args) {
                    //  이슈 번호를 저장한 후 이슈 목록으로 이동한다.
@@ -65,15 +58,22 @@
                    //}
                });
                $rootScope.$on("$stateChangeStart", function (event, toState, toStateParams) {
                    var keyWord = $rootScope.getCookie("searchKeyword");
                    if (keyWord == null || keyWord === '') {
                        $scope.vm.searchAll.keyWord = "";
                    }
                });
                // 메인 상단 검색
                function searchAll() {
                    $rootScope.isMainSearch = true;
                    if ($state.current.name !== "issues.list" || $state.current.name === "issues.list") {
                        $state.go("issues.list");
                    if ($rootScope.isDefined($scope.vm.searchAll.keyWord)) {
                        $rootScope.setCookie("searchKeyword", $scope.vm.searchAll.keyWord, 60000);
                        moveMenu("issues.list");
                    } else {
                        SweetAlert.warning($filter("translate")("common.alertSystem"), $filter("translate")("issue.pleaseEnterIssueKeyWord"));
                    }
                    $rootScope.$broadcast("searchIssueList", {keyWord: $scope.vm.searchAll.keyWord});
                }
                function setLastIssueType() {
@@ -91,10 +91,16 @@
                function changeIssueListMenu(issueTypeId, changeProject = true) {
                    $rootScope.issueTypeMenu = null;
                    for (var issueType of $rootScope.workIssueTypes) {
                        if (issueType.id === issueTypeId) {
                            $rootScope.issueTypeMenu = issueType;
                            break;
                    $rootScope.allIssueList = false;
                    if (issueTypeId == null) {
                        $rootScope.allIssueList = true;
                        moveMenu("issues.list");
                    }else {
                        for (var issueType of $rootScope.workIssueTypes) {
                            if (issueType.id === issueTypeId) {
                                $rootScope.issueTypeMenu = issueType;
                                break;
                            }
                        }
                    }
@@ -397,6 +403,18 @@
                            });
                        });
                        //  사용자 관리 - 사용자 등급 변경 했을 때
                        $rootScope.webSocket.client.subscribe('/user/notification/changeUserLevel', function (notification) {
                            SweetAlert.warning($filter("translate")("common.changeUserLevel"), $filter("translate")("common.logoutForLevelChange"));
                            $rootScope.$broadcast("logout");
                        });
                        //  사용자 관리 - 사용자 부서 변경 했을 때
                        $rootScope.webSocket.client.subscribe('/user/notification/changeUserDepartment', function (notification) {
                            SweetAlert.warning($filter("translate")("common.changeUserDepartment"), $filter("translate")("common.logoutForDepartmentChange"));
                            $rootScope.$broadcast("logout");
                        });
                        //  참여 업무 공간 비활성화 알림 - 해당 업무 공간를 보고 있을 때
                        $rootScope.webSocket.client.subscribe('/user/notification/workspace-disabled', function (notification) {
                            // edit by zenith at 20200801