From 879d31207ddb082357334877876879a8a2fb2551 Mon Sep 17 00:00:00 2001
From: jhjang <jhjang@maprex.co.kr>
Date: 목, 13 1월 2022 17:14:19 +0900
Subject: [PATCH] - api 스펙 변경 - 이슈 수정시 워크플로우에 있는 상태 이외에는 에러 처리 되도록 수정

---
 src/main/webapp/scripts/app/common/common.controller.js |   44 ++++++++++++++++++++++++++++++++++----------
 1 files changed, 34 insertions(+), 10 deletions(-)

diff --git a/src/main/webapp/scripts/app/common/common.controller.js b/src/main/webapp/scripts/app/common/common.controller.js
index e1c0035..d34e718 100644
--- a/src/main/webapp/scripts/app/common/common.controller.js
+++ b/src/main/webapp/scripts/app/common/common.controller.js
@@ -58,16 +58,22 @@
                     //}
                 });
 
+                $rootScope.$on("$stateChangeStart", function (event, toState, toStateParams) {
+                    var keyWord = $rootScope.getCookie("searchKeyword");
+
+                    if (keyWord == null || keyWord === '') {
+                        $scope.vm.searchAll.keyWord = "";
+                    }
+                });
+
                 // 硫붿씤 �긽�떒 寃��깋
                 function searchAll() {
-                    if ($state.current.name !== "issues.list") {
-                        // $state.go("issues.list");
-                        var myUrl = window.location.href.split('#/');
-                        location.href = myUrl[0] + "#/issues/issueList?keyWord=" + $scope.vm.searchAll.keyWord;
+                    if ($rootScope.isDefined($scope.vm.searchAll.keyWord)) {
+                        $rootScope.setCookie("searchKeyword", $scope.vm.searchAll.keyWord, 60000);
+                        moveMenu("issues.list");
                     } else {
-                        $rootScope.$broadcast("searchIssueList", {keyWord: $scope.vm.searchAll.keyWord});
+                        SweetAlert.warning($filter("translate")("common.alertSystem"), $filter("translate")("issue.pleaseEnterIssueKeyWord"));
                     }
-
                 }
 
                 function setLastIssueType() {
@@ -85,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;
+                            }
                         }
                     }
 
@@ -391,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

--
Gitblit v1.8.0