From 3571222dcf5f25b458b822fe888d695622144016 Mon Sep 17 00:00:00 2001 From: 이민희 <mhlee@maprex.co.kr> Date: 화, 28 12월 2021 21:44:36 +0900 Subject: [PATCH] - 연관이슈, 하위이슈 추가 시 이슈타입 별 담당부서 불러오기 - 이슈 상세페이지에서 하위이슈 리스트에서 제거 시 팝업 문구 수정 --- src/main/webapp/scripts/app/issue/issueDetail.controller.js | 442 ++++++++++++++++++++++++++++++------------------------ 1 files changed, 244 insertions(+), 198 deletions(-) diff --git a/src/main/webapp/scripts/app/issue/issueDetail.controller.js b/src/main/webapp/scripts/app/issue/issueDetail.controller.js index aa5a3b3..86bf9c1 100644 --- a/src/main/webapp/scripts/app/issue/issueDetail.controller.js +++ b/src/main/webapp/scripts/app/issue/issueDetail.controller.js @@ -46,15 +46,16 @@ $scope.fn.addDownIssue = addDownIssue; // �븯�쐞 �씠�뒋 異붽� $scope.fn.addRelationIssueTableConfig = addRelationIssueTableConfig; // �뿰愿� �씠�뒋 紐⑸줉 �뀒�씠釉� �꽕�젙 $scope.fn.addDownIssueTableConfig = addDownIssueTableConfig; // �븯�쐞 �씠�뒋 紐⑸줉 �뀒�씠釉� �꽕�젙 - $scope.fn.getRelTableConfigs = getRelTableConfigs; - $scope.fn.getDownTableConfigs = getDownTableConfigs; + $scope.fn.setRelTableConfigs = setRelTableConfigs; + $scope.fn.setDownTableConfigs = setDownTableConfigs; $scope.fn.containsPartner = containsPartner; $scope.fn.onActivate = onActivate; + $scope.fn.issueBack = issueBack; // �씠�뒋 紐⑸줉 而⑦듃濡ㅻ윭 vm, fn �긽�냽 以� - $scope.vm.viewer = {}; + $scope.vm.viewer = {}; // �쁽�옱 �씠�뒋 $scope.vm.images = []; // 泥⑤��맂 �뙆�씪 以� �씠誘몄� �뙆�씪 - $scope.vm.activeTab = "ALL"; // �솢�룞 �궡�뿭 �꺆 + $scope.vm.activeTab = "RECODE"; // �솢�룞 �궡�뿭 �꺆 // �씠�뒋 �긽�깭 蹂�寃� �몴�떆 �뿬遺� $scope.vm.editor = { issueStatus : false @@ -80,6 +81,7 @@ $scope.vm.form = { issues : [], //�뿰愿� �씪媛� issuesDown : [], // �븯�쐞 �씪媛� + issuesDownStatus : [], //�븯�쐞 �씠�뒋 �긽�깭 issueCompanyVos : [], issueIspVos : [], issueHostingVos : [] @@ -127,25 +129,29 @@ $scope.fn.onActivate(); } + // �긽�쐞 �씠�뒋 �겢由��떆 �긽�쐞 �씠�뒋濡� �씠�룞 + function issueBack() { + $rootScope.currentDetailIssueId = $scope.vm.viewer.parentIssueVo.id + $rootScope.$broadcast("getIssueDetail", {id: $rootScope.currentDetailIssueId}); + } + function onActivate() { window.scroll(0,240); } angular.extend(this, $controller('autoCompleteController', {$scope : $scope, $injector : $injector})); - // �씠�뒋 紐⑸줉 �뜲�씠�꽣 媛깆떊 - // $scope.$on("getIssueList", function () { - // $scope.fn.getIssueDetail(); - // }); - - + // �씠�뒋 紐⑸줉 �뜲�씠�꽣 媛깆떊 + $scope.$on("getIssueList", function () { + $scope.fn.getIssueDetail(); + }); // �븯�쐞 �씠�뒋 �궘�젣 function removeDownIssue(id) { // �궘�젣 �븣由� SweetAlert.swal({ title : $filter("translate")("issue.downIssueRemove"), // �븯�쐞 �씠�뒋 �궘�젣 - text : $filter("translate")("issue.wantToDeleteSelectIssue"), + text : $filter("translate")("issue.wantToDeleteSelectDownIssueInList"), type : "warning", showCancelButton : true, confirmButtonColor : "#DD6B55", @@ -230,7 +236,7 @@ } function getDownIssueListCallBack(result) { - $scope.vm.autoCompletePage.issue.totalPage = result.data.page.totalPage; + $scope.vm.autoCompletePageDown.issue.totalPage = result.data.page.totalPage; } // �뀒�씠釉붿쓽 �뿰愿� �씠�뒋 而щ읆�쓣 留뚮뱾�뼱以��떎. @@ -238,44 +244,43 @@ // �뿰愿� �씠�뒋 而щ읆 switch(Rel_issueTableConfig.key) { - - // �뿰愿� �씠�뒋 援щ텇 - case "RELATION_ISSUE_TYPE" : + case "RELATION_ISSUE_TYPE" : // �뿰愿� �씠�뒋 援щ텇 $scope.vm.relTableConfigs.push($tableProvider.config() .setHName("issue.relationIssueType") .setDType("renderer") - .setHWidth("width-30 bold") - .setHSort(false) + .setDAlign("text-center") + .setHWidth("bold " + Rel_issueTableConfig.width) .setDRenderer("ISSUE_RELATION_TYPE")) + /*.setHWidth("width-30 bold")*/ + /*.setHSort(false)*/ break; - // �뿰愿� �씠�뒋 �젣紐� - case "RELATION_ISSUE_TITLE" : + case "RELATION_ISSUE_TITLE" : // �뿰愿� �씠�뒋 �젣紐� $scope.vm.relTableConfigs.push($tableProvider.config() .setHName("issue.relationIssueTitle") .setDType("renderer") - .setHWidth("width-60 bold") - .setHSort(false) + .setDAlign("text-center") + .setHWidth("bold " + Rel_issueTableConfig.width) .setDRenderer("ISSUE_RELATION_MOVE")) + /*.setHWidth("width-60 bold")*/ + /*.setHSort(true)*/ break; - case "PRIORITY" : // �뿰愿� �씠�뒋 �슦�꽑�닚�쐞 + case "RELATION_PRIORITY" : // �뿰愿� �씠�뒋 �슦�꽑�닚�쐞 $scope.vm.relTableConfigs.push($tableProvider.config() .setHName("common.priority") - .setDName("priorityName") .setDType("renderer") .setHWidth("bold " + Rel_issueTableConfig.width) .setDAlign("text-center") .setDRenderer("REL_COMMON_PRIORITY")); break; - case "SEVERITY" : // �뿰愿� �씠�뒋 以묒슂�룄 + case "RELATION_SEVERITY" : // �뿰愿� �씠�뒋 以묒슂�룄 $scope.vm.relTableConfigs.push($tableProvider.config() .setHName("common.importance") - .setDName("severityName") .setDType("renderer") .setHWidth("bold " + Rel_issueTableConfig.width) .setDAlign("text-center") .setDRenderer("REL_COMMON_SEVERITY")); break; - case "ASSIGNEE_TEAM" : // �뿰愿� �씠�뒋 �떞�떦遺��꽌 + case "RELATION_ASSIGNEE_TEAM" : // �뿰愿� �씠�뒋 �떞�떦遺��꽌 $scope.vm.relTableConfigs.push($tableProvider.config() .setHName("common.assigneeTeam") .setDType("renderer") @@ -284,7 +289,7 @@ .setDRenderer("REL_ISSUE_DEPARTMENT")); break; - case "REGISTER" : // �뿰愿� �씠�뒋 �벑濡앹옄 + case "RELATION_REGISTER" : // �뿰愿� �씠�뒋 �벑濡앹옄 $scope.vm.relTableConfigs.push($tableProvider.config() .setHName("common.register") .setDType("renderer") @@ -292,7 +297,7 @@ .setDAlign("text-center") .setDRenderer("REL_REGISTER")); break; - case "PERIOD" : // �뿰愿� �씠�뒋 湲곌컙 + case "RELATION_PERIOD" : // �뿰愿� �씠�뒋 湲곌컙 $scope.vm.relTableConfigs.push($tableProvider.config() .setHName("common.period") .setDType("renderer") @@ -300,12 +305,11 @@ .setDAlign("text-center") .setDRenderer("REL_ISSUE_DUE_DATE")); break; - case "MODIFY_DATE" : // �뿰愿� �씠�뒋 理쒓렐 蹂�寃쎌씪 + case "RELATION_MODIFY_DATE" : // �뿰愿� �씠�뒋 理쒓렐 蹂�寃쎌씪 $scope.vm.relTableConfigs.push($tableProvider.config() .setHName("common.lastChangeDate") .setHWidth("bold " + Rel_issueTableConfig.width) - .setDAlign("text-center") - .setDName("modifyDate")); + .setDAlign("text-center")); break; } @@ -336,8 +340,7 @@ // �븯�쐞 �씠�뒋 而щ읆 switch(Down_issueTableConfig.key) { - // �븯�쐞 �씠�뒋 �젣紐� - case "DOWN_ISSUE_TITLE" : + case "DOWN_ISSUE_TITLE" : // �븯�쐞 �씠�뒋 �젣紐� $scope.vm.downTableConfigs.push($tableProvider.config() .setHName("issue.downIssueTitle") .setDType("renderer") @@ -355,25 +358,23 @@ .setDRenderer("ISSUE_DOWN_STATUS_TYPE")); break; - case "PRIORITY" : // �븯�쐞 �씠�뒋 �슦�꽑�닚�쐞 + case "DOWN_PRIORITY" : // �븯�쐞 �씠�뒋 �슦�꽑�닚�쐞 $scope.vm.downTableConfigs.push($tableProvider.config() .setHName("common.priority") - .setDName("priorityName") .setDType("renderer") .setHWidth("bold " + Down_issueTableConfig.width) .setDAlign("text-center") .setDRenderer("DOWN_COMMON_PRIORITY")); break; - case "SEVERITY" : // 以묒슂�룄 + case "DOWN_SEVERITY" : // 以묒슂�룄 $scope.vm.downTableConfigs.push($tableProvider.config() .setHName("common.importance") - .setDName("severityName") .setDType("renderer") .setHWidth("bold " + Down_issueTableConfig.width) .setDAlign("text-center") .setDRenderer("DOWN_COMMON_SEVERITY")); break; - case "ASSIGNEE_TEAM" : // �떞�떦遺��꽌 + case "DOWN_ASSIGNEE_TEAM" : // �떞�떦遺��꽌 $scope.vm.downTableConfigs.push($tableProvider.config() .setHName("common.assigneeTeam") .setDType("renderer") @@ -381,7 +382,7 @@ .setDAlign("text-center") .setDRenderer("DOWN_ISSUE_DEPARTMENT")); break; - case "REGISTER" : // �벑濡앹옄 + case "DOWN_REGISTER" : // �벑濡앹옄 $scope.vm.downTableConfigs.push($tableProvider.config() .setHName("common.register") .setDType("renderer") @@ -389,7 +390,7 @@ .setDAlign("text-center") .setDRenderer("DOWN_REGISTER")); break; - case "PERIOD" : // 湲곌컙 + case "DOWN_PERIOD" : // 湲곌컙 $scope.vm.downTableConfigs.push($tableProvider.config() .setHName("common.period") .setDType("renderer") @@ -397,12 +398,11 @@ .setDAlign("text-center") .setDRenderer("DOWN_ISSUE_DUE_DATE")); break; - case "MODIFY_DATE" : // 理쒓렐 蹂�寃쎌씪 + case "DOWN_MODIFY_DATE" : // 理쒓렐 蹂�寃쎌씪 $scope.vm.downTableConfigs.push($tableProvider.config() .setHName("common.lastChangeDate") .setHWidth("bold " + Down_issueTableConfig.width) - .setDAlign("text-center") - .setDName("modifyDate")); + .setDAlign("text-center")); break; } @@ -434,7 +434,7 @@ .setHName("issue.relationIssueType") .setDType("renderer") .setDAlign("text-center") - .setHWidth("width-30-p bold") + .setHWidth("width-60-p bold") .setHSort(false) .setDRenderer("ISSUE_RELATION_TYPE")) $scope.vm.relTableConfigs.push($tableProvider.config() @@ -444,15 +444,16 @@ .setHWidth("width-60-p bold") .setHSort(false) .setDRenderer("ISSUE_RELATION_MOVE")) - $scope.vm.relTableConfigs.push($tableProvider.config() - .setHName("issue.relationIssueDelete") - .setDType("renderer") - .setDAlign("text-center") - .setHWidth("width-20-p bold") - .setDRenderer("ISSUE_RELATION_DELETE") - .setHSort(false) - .setDAlign("text-center")) - + if($scope.vm.viewer.modifyPermissionCheck) { + $scope.vm.relTableConfigs.push($tableProvider.config() + .setHName("issue.relationIssueDelete") + .setDType("renderer") + .setDAlign("text-center") + .setHWidth("width-40-p bold") + .setDRenderer("ISSUE_RELATION_DELETE") + .setHSort(false) + .setDAlign("text-center")) + } angular.forEach($scope.vm.relTableConfigs, function (Rel_issueTableConfig) { // �몴�떆 ���긽�씤 而щ읆留� �솕硫댁뿉 洹몃젮以��떎. if (Rel_issueTableConfig.display) { @@ -472,14 +473,16 @@ .setHWidth("width-60-p bold") .setHSort(false) .setDRenderer("ISSUE_DOWN_MOVE")) - $scope.vm.downTableConfigs.push($tableProvider.config() - .setHName("issue.relationIssueDelete") - .setDType("renderer") - .setDAlign("text-center") - .setHWidth("width-20-p bold") - .setDRenderer("ISSUE_DOWN_DELETE") - .setHSort(false) - .setDAlign("text-center")) + if($scope.vm.viewer.modifyPermissionCheck){ + $scope.vm.downTableConfigs.push($tableProvider.config() + .setHName("issue.relationIssueDelete") + .setDType("renderer") + .setDAlign("text-center") + .setHWidth("width-40-p bold") + .setDRenderer("ISSUE_DOWN_DELETE") + .setHSort(false) + .setDAlign("text-center")) + } angular.forEach($scope.vm.downTableConfigs, function (Down_issueTableConfig) { // �몴�떆 ���긽�씤 而щ읆留� �솕硫댁뿉 洹몃젮以��떎. @@ -490,125 +493,102 @@ }); } - // �뿰愿� �씠�뒋 �긽�꽭 議고쉶 - function getRelTableConfigs() { - var content = { - issueId : $scope.vm.viewer.id, - issueTypeId : $rootScope.getCurrentIssueTypeId() - }; + // �뿰愿� �씠�뒋 �뀒�씠釉� �꽕�젙 + function setRelTableConfigs(issueTableConfigVo) { + if (issueTableConfigVo == null) { + makeRelTableConfigs(); + return; + } + var issueTableConfigs = issueTableConfigVo.issueTableConfigs; - IssueTableConfig.relationDetail($resourceProvider.getContent( - content, - $resourceProvider.getPageContent(0, 0))).then(function (result) { + // �뿰愿� �뒋 紐⑸줉 �뀒�씠釉� �꽕�젙 媛믪쓣 媛��졇���꽌 �쟻�슜�븳�떎. + if ($rootScope.isDefined(issueTableConfigs)) { + // �씠�뒋 �뀒�씠釉� �꽕�젙 �젙蹂대�� ���옣 �븳�떎. - if (result.data.message.status === "success") { - var issueTableConfigs = result.data.data; + $scope.vm.issueRelTableConfigs = []; + $scope.vm.issueRelTableConfigs = JSON.parse(issueTableConfigs); + $scope.vm.issueRelTableConfigs.sort(function (a, b) { + return a.position < b.position ? -1 : a.position > b.position ? 1 : 0; + }); - // �뿰愿� �뒋 紐⑸줉 �뀒�씠釉� �꽕�젙 媛믪쓣 媛��졇���꽌 �쟻�슜�븳�떎. - if ($rootScope.isDefined(issueTableConfigs)) { - // �씠�뒋 �뀒�씠釉� �꽕�젙 �젙蹂대�� ���옣 �븳�떎. + $scope.vm.relTableConfigs = []; + /* $scope.vm.relTableConfigs.push($tableProvider.config() + .setHName("issue.relationIssueType") + .setDType("renderer") + .setDAlign("text-center") + .setHWidth("width-30-p bold") + .setHSort(false) + .setDRenderer("ISSUE_RELATION_TYPE")) + $scope.vm.relTableConfigs.push($tableProvider.config() + .setHName("issue.relationIssueTitle") + .setDType("renderer") + .setDAlign("text-center") + .setHWidth("width-60-p bold") + .setHSort(false) + .setDRenderer("ISSUE_RELATION_MOVE"))*/ + angular.forEach($scope.vm.issueRelTableConfigs, function (Rel_issueTableConfig) { + // �몴�떆 ���긽�씤 而щ읆留� �솕硫댁뿉 洹몃젮以��떎. + if (Rel_issueTableConfig.display) { + // �뀒�씠釉붿쓽 而щ읆�쓣 留뚮뱾�뼱以��떎. + $scope.fn.setRelTableColumn(Rel_issueTableConfig); - $scope.vm.issueRelTableConfigs = []; - $scope.vm.issueRelTableConfigs = JSON.parse(issueTableConfigs); - $scope.vm.issueRelTableConfigs.sort(function (a, b) { - return a.position < b.position ? -1 : a.position > b.position ? 1 : 0; - }); - - $scope.vm.relTableConfigs = []; - $scope.vm.relTableConfigs.push($tableProvider.config() - .setHName("issue.relationIssueType") - .setDType("renderer") - .setDAlign("text-center") - .setHWidth("width-30-p bold") - .setHSort(false) - .setDRenderer("ISSUE_RELATION_TYPE")) - $scope.vm.relTableConfigs.push($tableProvider.config() - .setHName("issue.relationIssueTitle") - .setDType("renderer") - .setDAlign("text-center") - .setHWidth("width-60-p bold") - .setHSort(false) - .setDRenderer("ISSUE_RELATION_MOVE")) - angular.forEach($scope.vm.issueRelTableConfigs, function (Rel_issueTableConfig) { - // �몴�떆 ���긽�씤 而щ읆留� �솕硫댁뿉 洹몃젮以��떎. - if (Rel_issueTableConfig.display) { - // �뀒�씠釉붿쓽 而щ읆�쓣 留뚮뱾�뼱以��떎. - $scope.fn.setRelTableColumn(Rel_issueTableConfig); - - } - }); - $scope.vm.relTableConfigs.push($tableProvider.config() - .setHName("issue.relationIssueDelete") - .setDType("renderer") - .setHWidth("width-20-p bold") - .setDRenderer("ISSUE_RELATION_DELETE") - .setHSort(false) - .setDAlign("text-center")) - - } else { - makeRelTableConfigs(); } - - } else { - SweetAlert.swal($filter("translate")("issue.errorRemovableIssueStatusList"), result.data.message.message, "error"); // "�씠�룞 媛��뒫�븳 �씠�뒋 �긽�깭 紐⑸줉 議고쉶 �삤瑜�" + }); + if($scope.vm.viewer.modifyPermissionCheck) { + $scope.vm.relTableConfigs.push($tableProvider.config() + .setHName("issue.relationIssueDelete") + .setDType("renderer") + .setHWidth("width-40-p bold") + .setDRenderer("ISSUE_RELATION_DELETE") + .setHSort(false) + .setDAlign("text-center")) } - }); + } else { + makeRelTableConfigs(); + } + } - // �븯�쐞 �씠�뒋 �긽�꽭 議고쉶 - function getDownTableConfigs() { - var content = { - issueId : $scope.vm.viewer.id, - issueTypeId : $rootScope.getCurrentIssueTypeId() - }; + // �븯�쐞 �씠�뒋 �긽�꽭 議고쉶 寃곌낵 �꽕�젙 + function setDownTableConfigs(issueTableConfigVo) { + if (issueTableConfigVo == null) return; + var issueTableConfigs = issueTableConfigVo.issueTableConfigs; - IssueTableConfig.downDetail($resourceProvider.getContent( - content, - $resourceProvider.getPageContent(0, 0))).then(function (result) { - - if (result.data.message.status === "success") { - var issueTableConfigs = result.data.data; - - // �뿰愿� �뒋 紐⑸줉 �뀒�씠釉� �꽕�젙 媛믪쓣 媛��졇���꽌 �쟻�슜�븳�떎. - if ($rootScope.isDefined(issueTableConfigs)) { - // �씠�뒋 �뀒�씠釉� �꽕�젙 �젙蹂대�� ���옣 �븳�떎. - $scope.vm.issueDownTableConfigs = []; - $scope.vm.issueDownTableConfigs = JSON.parse(issueTableConfigs); - $scope.vm.issueDownTableConfigs.sort(function (a, b) { - return a.position < b.position ? -1 : a.position > b.position ? 1 : 0; - }); - $scope.vm.downTableConfigs = []; - $scope.vm.downTableConfigs.push($tableProvider.config() - .setHName("issue.downIssueTitle") - .setDType("renderer") - .setDAlign("text-center") - .setHWidth("width-60-p bold") - .setHSort(false) - .setDRenderer("ISSUE_DOWN_MOVE")) - angular.forEach($scope.vm.issueDownTableConfigs, function (Down_issueTableConfig) { - // �몴�떆 ���긽�씤 而щ읆留� �솕硫댁뿉 洹몃젮以��떎. - if (Down_issueTableConfig.display) { - // �뀒�씠釉붿쓽 而щ읆�쓣 留뚮뱾�뼱以��떎. - $scope.fn.setDownTableColumn(Down_issueTableConfig); - } - }); - $scope.vm.downTableConfigs.push($tableProvider.config() - .setHName("issue.relationIssueDelete") - .setDType("renderer") - .setHWidth("width-20-p bold") - .setDRenderer("ISSUE_DOWN_DELETE") - .setHSort(false) - .setDAlign("text-center")) - - } else { - makeDownTableConfigs(); + // �뿰愿� �뒋 紐⑸줉 �뀒�씠釉� �꽕�젙 媛믪쓣 媛��졇���꽌 �쟻�슜�븳�떎. + if ($rootScope.isDefined(issueTableConfigs)) { + // �씠�뒋 �뀒�씠釉� �꽕�젙 �젙蹂대�� ���옣 �븳�떎. + $scope.vm.issueDownTableConfigs = []; + $scope.vm.issueDownTableConfigs = JSON.parse(issueTableConfigs); + $scope.vm.issueDownTableConfigs.sort(function (a, b) { + return a.position < b.position ? -1 : a.position > b.position ? 1 : 0; + }); + $scope.vm.downTableConfigs = []; +/* $scope.vm.downTableConfigs.push($tableProvider.config() + .setHName("issue.downIssueTitle") + .setDType("renderer") + .setDAlign("text-center") + .setHWidth("width-60-p bold") + .setHSort(false) + .setDRenderer("ISSUE_DOWN_MOVE"))*/ + angular.forEach($scope.vm.issueDownTableConfigs, function (Down_issueTableConfig) { + // �몴�떆 ���긽�씤 而щ읆留� �솕硫댁뿉 洹몃젮以��떎. + if (Down_issueTableConfig.display) { + // �뀒�씠釉붿쓽 而щ읆�쓣 留뚮뱾�뼱以��떎. + $scope.fn.setDownTableColumn(Down_issueTableConfig); } - + }); + if($scope.vm.viewer.modifyPermissionCheck) { + $scope.vm.downTableConfigs.push($tableProvider.config() + .setHName("issue.relationIssueDelete") + .setDType("renderer") + .setHWidth("width-40-p bold") + .setDRenderer("ISSUE_DOWN_DELETE") + .setHSort(false) + .setDAlign("text-center")) } - else { - SweetAlert.swal($filter("translate")("issue.errorRemovableIssueStatusList"), result.data.message.message, "error"); // "�씠�룞 媛��뒫�븳 �씠�뒋 �긽�깭 紐⑸줉 議고쉶 �삤瑜�" - } - }); + } else { + makeDownTableConfigs(); + } } // �뿰愿� �씠�뒋 異붽� @@ -666,22 +646,26 @@ }); } - // �씠�뒋紐낆쓣 �겢由��븯硫� �씠�뒋 �긽�꽭 �젙蹂대�� 議고쉶�븳�떎. - // $rootScope.$on("getIssueDetail", function (event, args) { - // $scope.vm.viewer.id = args["id"]; - // $scope.fn.getIssueDetail(); - // }); - - // �씠硫붿씪 蹂대궦�썑 �긽�꽭�솕硫� 媛깆떊 - $rootScope.$on("getIssueDetail", function (event, args) { - $scope.fn.getIssueDetail(); - }); + // �씠�뒋紐낆쓣 �겢由��븯硫� �씠�뒋 �긽�꽭 �젙蹂대�� 議고쉶�븳�떎. + // $rootScope.$on("getIssueDetail", function (event, args) { + // $scope.vm.viewer.id = args["id"]; + // $scope.fn.getIssueDetail(); + // }); // �씠�뒋紐낆쓣 �겢由��븯硫� �씠�뒋 �긽�꽭 �젙蹂대�� 議고쉶�븳�떎. // $scope.$on("getIssueDetail", function (event, args) { // $scope.vm.viewer.id = args["id"]; // $scope.fn.getIssueDetail(); // }); + + // �씠硫붿씪 蹂대궦�썑 �긽�꽭�솕硫� 媛깆떊 + // $rootScope.$on("getIssueDetail", function (event, args) { + // $scope.fn.getIssueDetail(); + // }); + + $scope.$on("getIssueDetail", function (event, args) { + $scope.fn.getIssueDetail(); + }); $scope.$watch(function() { return $rootScope.currentDetailIssueId; @@ -714,7 +698,8 @@ parameter : function () { return { issueIds : [$scope.vm.viewer.id], - projectId : $scope.vm.viewer.projectVo.id + projectId : $scope.vm.viewer.projectVo.id, + downIssuesStatus : $scope.vm.form.issuesDownStatus }; } } @@ -770,10 +755,11 @@ resolve : { parameter : function () { return { - departmentVos : [$scope.vm.form.issues[0].departmentVos], - id : [$scope.vm.form.issues[0].id], - projectId : [$scope.vm.form.issues[0].projectVo.id], - project : [$scope.vm.form.issues[0].projectVo] + departmentVos : $scope.vm.form.issues[0].departmentVos, + id : $scope.vm.form.issues[0].id, + projectId : $scope.vm.form.issues[0].projectVo.id, + project : $scope.vm.form.issues[0].projectVo, + issueTypeId : $scope.vm.form.issues[0].issueTypeVo.id }; } } @@ -862,18 +848,18 @@ // �씠�뒋 �긽�꽭 �젙蹂� 議고쉶 function getIssueDetail() { + $rootScope.spinner = true; // 珥덇린�솕 �빐�빞�븷 �븷紐⑹쓣 吏��젙�븯�뿬 �떎瑜� �씠�뒋瑜� �겢由��븷 �븣 珥덇린�솕�빐以��떎. $scope.fn.initReload(); - - $scope.fn.getRelTableConfigs(); - $scope.fn.getDownTableConfigs(); - - Issue.detail($resourceProvider.getContent( + // $scope.fn.getRelTableConfigs(); + // $scope.fn.getDownTableConfigs(); + Issue.detail($resourceProvider.getContent( {id : $scope.vm.viewer.id, deep : "02"}, $resourceProvider.getPageContent(0, 1))).then(function (result) { if (result.data.message.status === "success") { if (angular.isDefined(result.data.data)) { + $scope.vm.viewer = angular.copy(result.data.data); // �씠�뒋 �씠誘몄� 誘몃━ 蹂닿린 留뚮뱾湲� $scope.fn.makePreviewImages(result.data.data.attachedFileVos); @@ -893,13 +879,21 @@ $scope.vm.form.issues = []; $scope.vm.form.issues.push(result.data.data); $scope.vm.form.issuesDown = []; + $scope.vm.form.issuesDownStatus = [];// �븯�쐞�씠�뒋 �긽�깭 $scope.vm.form.issuesDown.push(result.data.data); + + var issueTableConfigVos = result.data.data.issueTableConfigVos; + $scope.fn.setRelTableConfigs(issueTableConfigVos[0]); + $scope.fn.setDownTableConfigs(issueTableConfigVos[1]); // �뿰愿� �씠�뒋 諛섎났臾� if (result.data.data.issueRelationVos !== null) { angular.forEach(result.data.data.issueRelationVos, function (issueRelationVo){ issueRelationVo.relationIssueTypeName = $scope.vm.relationIssueTypes[issueRelationVo.relationIssueType].name; $scope.vm.form.issues.push(issueRelationVo.issueRelation); + }); + result.data.data.issueRelationVos.sort(function (a, b) { //理쒓렐蹂�寃쎌씪 �궡由쇱감�닚 + return a.modifyDate > b.modifyDate ? -1 : a.modifyDate < b.modifyDate ? 1 : 0; }); } @@ -908,16 +902,14 @@ angular.forEach(result.data.data.issueDownVos, function (issueDownVo){ //$scope.vm.form.issuesDown.push(issueDownVo.issueDown); $scope.vm.form.issuesDown.push(issueDownVo); - // 媛꾪뿉�쟻�씤 �븯�쐞 �씠�뒋 媛깆떊 �삤瑜� 諛⑹� - // $rootScope.$on("getIssueDetail", function (event, args) { - // $scope.fn.getIssueDetail(); - // }); - + $scope.vm.form.issuesDownStatus.push(issueDownVo.issueStatusVo.issueStatusType); + }); + result.data.data.issueDownVos.sort(function (a, b) { //理쒓렐蹂�寃쎌씪 �궡由쇱감�닚 + return a.modifyDate > b.modifyDate ? -1 : a.modifyDate < b.modifyDate ? 1 : 0; }); } $scope.vm.viewer.issueRelationVos = result.data.data.issueRelationVos; $scope.vm.viewer.issueDownVos = result.data.data.issueDownVos; - if ($rootScope.workProject.id > -1 && result.data.data.projectVo !== null) { $rootScope.changeLastProject(result.data.data.projectVo.id); @@ -927,6 +919,7 @@ else { SweetAlert.swal($filter("translate")("issue.errorIssueDetails"), result.data.message.message, "error"); // �씠�뒋 �긽�꽭 �젙蹂� 議고쉶 �삤瑜� } + $rootScope.spinner = false; }); } @@ -1004,8 +997,61 @@ // �솢�룞 �씠�젰 留뚮뱾湲� function makeActiveHistory() { - $scope.vm.viewer.activeHistory = $scope.vm.viewer.issueCommentVos.concat($scope.vm.viewer.issueHistoryVos); - $scope.vm.viewer.activeHistory.sort(function (a, b) { + $scope.vm.viewer.activeParentHistory = ""; + $scope.vm.viewer.activeHistory = ""; + if ($scope.vm.viewer.issueDownVos != null && $scope.vm.viewer.issueDownVos.length > 0) { + $scope.vm.viewer.activeDownHistory = ""; //�븯�쐞�씠�뒋 �엳�뒪�넗由щ쭔 + $scope.vm.viewer.downComment = ""; //�븯�쐞�씠�뒋 �뙎湲�留� + $scope.vm.viewer.activeDownAllHistory = ""; //�븯�쐞�씠�뒋 �엳�뒪�넗由�+�뙎湲� + var downTitle = ""; + var oriDownHistory = []; + var oriDownCommentHistory = []; + + // �븯�쐞�씠�뒋 �엳�뒪�넗由� + for (var i=0; i<$scope.vm.viewer.issueDownVos.length; i++){ + oriDownHistory.push($scope.vm.viewer.issueDownVos[i].issueHistoryVos); + oriDownCommentHistory.push($scope.vm.viewer.issueDownVos[i].issueCommentVos); + } + for (var i=0; i<oriDownHistory.length; i++){ + if ($scope.vm.viewer.activeDownHistory === "") { + $scope.vm.viewer.activeDownHistory = oriDownHistory[i]; + } else { + $scope.vm.viewer.activeDownHistory = $scope.vm.viewer.activeDownHistory.concat(oriDownHistory[i]); + } + } + + for (var i=0; i<$scope.vm.viewer.activeDownHistory.length; i++){ + downTitle = "<div class='dot' style='margin-bottom: -8px'>*�븯�쐞�씠�뒋 : "+$scope.vm.viewer.activeDownHistory[i].title+"</div>"; + $scope.vm.viewer.activeDownHistory[i].desc = downTitle + $scope.vm.viewer.activeDownHistory[i].description; + } + $scope.vm.viewer.activeDownHistory.sort(function (a, b) { //�궡由쇱감�닚 + return a.registerDate > b.registerDate ? -1 : a.registerDate < b.registerDate ? 1 : 0; + }); + + // �븯�쐞�씠�뒋 �뙎湲� �엳�뒪�넗由� + for (var i=0; i<oriDownCommentHistory.length; i++) { + if ($scope.vm.viewer.downComment === "") { + $scope.vm.viewer.downComment = oriDownCommentHistory[i]; + } else { + $scope.vm.viewer.downComment = $scope.vm.viewer.downComment.concat(oriDownCommentHistory[i]); + } + } + $scope.vm.viewer.issueDownVos.sort(function (a, b) { //�궡由쇱감�닚 + return a.registerDate > b.registerDate ? -1 : a.registerDate < b.registerDate ? 1 : 0; + }); + + $scope.vm.viewer.activeDownAllHistory = $scope.vm.viewer.downComment.concat($scope.vm.viewer.activeDownHistory); + $scope.vm.viewer.activeParentHistory = $scope.vm.viewer.issueCommentVos.concat($scope.vm.viewer.issueHistoryVos); + $scope.vm.viewer.activeHistory = $scope.vm.viewer.activeParentHistory.concat($scope.vm.viewer.activeDownAllHistory); + + }else { + $scope.vm.viewer.activeParentHistory = $scope.vm.viewer.issueCommentVos.concat($scope.vm.viewer.issueHistoryVos); + $scope.vm.viewer.activeHistory = $scope.vm.viewer.issueCommentVos.concat($scope.vm.viewer.issueHistoryVos); + } + $scope.vm.viewer.activeParentHistory.sort(function (a, b) { //�궡由쇱감�닚 + return a.registerDate > b.registerDate ? -1 : a.registerDate < b.registerDate ? 1 : 0; + }); + $scope.vm.viewer.activeHistory.sort(function (a, b) { //�궡由쇱감�닚 return a.registerDate > b.registerDate ? -1 : a.registerDate < b.registerDate ? 1 : 0; }); } @@ -1059,7 +1105,6 @@ $timeout(function () { SweetAlert.success($filter("translate")("common.deleteSucceeded"), result.data.message.message); // �궘�젣 �꽦怨� }, 100); - $scope.fn.getCommentList(); } else { @@ -1082,6 +1127,7 @@ if (result.data.message.status === "success") { $scope.vm.viewer.issueCommentVos = result.data.data; + $scope.fn.updateActiveHistory(); } else { SweetAlert.swal({ -- Gitblit v1.8.0