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 | 63 +++++++++++++++++++++++-------- 1 files changed, 46 insertions(+), 17 deletions(-) diff --git a/src/main/webapp/scripts/config.js b/src/main/webapp/scripts/config.js index 8a810db..22a9427 100644 --- a/src/main/webapp/scripts/config.js +++ b/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,9 +236,10 @@ // 沅뚰븳 由ъ뒪�듃 $rootScope.mngPermission = { + "USER_PERMISSION_MNG_PARTNER" : 8192, "USER_PERMISSION_MNG_WORKSPACE" : 4096, "USER_PERMISSION_MNG_PROJECT" : 2048, - "USER_PERMISSION_MNG_USER" : 1024, + "USER_PERMISSION_MNG_API" : 1024, "USER_PERMISSION_MNG_ISSUE_STATUS" : 512, "USER_PERMISSION_MNG_WORKFLOW" : 256, "USER_PERMISSION_MNG_CUSTOME_FIELD" : 128, @@ -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) { @@ -284,7 +302,7 @@ return false; } - var permissionVal = $rootScope.mngPermission['USER_PERMISSION_MNG_USER']; + var permissionVal = $rootScope.mngPermission['USER_PERMISSION_MNG_API']; permissionVal += $rootScope.mngPermission['USER_PERMISSION_MNG_NOTICE']; permissionVal += $rootScope.mngPermission['USER_PERMISSION_MNG_FAQ']; permissionVal += $rootScope.mngPermission['USER_PERMISSION_MNG_QNA']; @@ -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)) { -- Gitblit v1.8.0