From 6a72a3edec87cca9996c7ab3be3fd48479881945 Mon Sep 17 00:00:00 2001 From: 이민희 <mhlee@maprex.co.kr> Date: 목, 02 12월 2021 21:55:28 +0900 Subject: [PATCH] 충돌 수정 --- src/main/webapp/scripts/config.js | 52 ++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 36 insertions(+), 16 deletions(-) diff --git a/src/main/webapp/scripts/config.js b/src/main/webapp/scripts/config.js index 47b5db7..22a9427 100644 --- a/src/main/webapp/scripts/config.js +++ b/src/main/webapp/scripts/config.js @@ -130,6 +130,7 @@ return true; }; + // �씠�뒋 �깮�꽦, �닔�젙�뿉�꽌 �떎以� �꽑�깮, �떒�씪 �꽑�깮 �샃�뀡�뿉 泥댄겕�릺寃� �빐二쇰뒗 湲곕뒫 $rootScope.selectOption = function (useValues, value) { var result = false; @@ -250,6 +251,18 @@ "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)) { @@ -304,24 +317,31 @@ 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}); + } + }); + } } }; -- Gitblit v1.8.0