From b070c969c3aef01166d59d7f8aa0159f5facb0f9 Mon Sep 17 00:00:00 2001 From: wyu <kknd09321@nate.com> Date: 화, 30 11월 2021 16:12:56 +0900 Subject: [PATCH] 사용자 정의 필드 관련 수정 --- src/main/webapp/scripts/app/issue/issueDetail.controller.js | 97 ++++++++++++++++++++++++++++++++++-------------- 1 files changed, 69 insertions(+), 28 deletions(-) diff --git a/src/main/webapp/scripts/app/issue/issueDetail.controller.js b/src/main/webapp/scripts/app/issue/issueDetail.controller.js index 3e01d52..fe209d8 100644 --- a/src/main/webapp/scripts/app/issue/issueDetail.controller.js +++ b/src/main/webapp/scripts/app/issue/issueDetail.controller.js @@ -41,6 +41,8 @@ $scope.fn.addDownIssueTableConfig = addDownIssueTableConfig; // �븯�쐞 �씠�뒋 紐⑸줉 �뀒�씠釉� �꽕�젙 $scope.fn.getRelTableConfigs = getRelTableConfigs; $scope.fn.getDownTableConfigs = getDownTableConfigs; + $scope.fn.containsPartner = containsPartner; + $scope.fn.onActivate = onActivate; // �씠�뒋 紐⑸줉 而⑦듃濡ㅻ윭 vm, fn �긽�냽 以� $scope.vm.viewer = {}; @@ -84,6 +86,7 @@ $scope.vm.issueName = ""; // �꽑�깮�맂 �뿰愿� �씪媛� �씠由� $scope.vm.issueId = ""; // + $scope.vm.issueTypeId = ""; $scope.vm.autoCompletePage = { issue : { page : 0, @@ -109,8 +112,13 @@ function changeDetailView(issue) { // �씠�뒋 踰덊샇瑜� ���옣�븳 �썑 �씠�뒋 紐⑸줉�쑝濡� �씠�룞�븳�떎. - // $rootScope.$broadcast("makeIssueSearch", issue); + //$rootScope.$broadcast("makeIssueSearch",issue); $scope.$parent.tableEvent.changeDetailView(issue.id); + $scope.fn.onActivate(); + } + + function onActivate() { + window.scroll(0,240); } angular.extend(this, $controller('autoCompleteController', {$scope : $scope, $injector : $injector})); @@ -278,14 +286,6 @@ .setDAlign("text-center") .setDName("modifyDate")); break; - // default :"ISSUE_RELATION_DELETE" // �뿰愿� �궘�젣 - // $scope.vm.relTableConfigs.push($tableProvider.config() - // .setHName("issue.downIssueTitle") - // .setDType("renderer") - // .setHWidth("bold" + issueTableConfig.width) - // .setHSort(false) - // .setDRenderer("ISSUE_RELATION_DELETE")); - // break; } // �궗�슜�옄 �젙�쓽 �븘�뱶 而щ읆 @@ -462,7 +462,8 @@ // �뿰愿� �씠�뒋 �긽�꽭 議고쉶 function getRelTableConfigs() { var content = { - issueId : $scope.vm.viewer.id + issueId : $scope.vm.viewer.id, + issueTypeId : $rootScope.getCurrentIssueTypeId() }; IssueTableConfig.relationDetail($resourceProvider.getContent( @@ -526,7 +527,8 @@ // �븯�쐞 �씠�뒋 �긽�꽭 議고쉶 function getDownTableConfigs() { var content = { - issueId : $scope.vm.viewer.id + issueId : $scope.vm.viewer.id, + issueTypeId : $rootScope.getCurrentIssueTypeId() }; IssueTableConfig.downDetail($resourceProvider.getContent( @@ -577,9 +579,6 @@ } }); } - - - // �뿰愿� �씠�뒋 異붽� function addRelationIssue() { @@ -653,9 +652,10 @@ $scope.vm.editor.issueStatus = false; $scope.vm.issueForm.issueStatusList = []; $scope.vm.issueForm.issueStatusId = ""; - if ($scope.$root.$$phase !== '$apply' && $scope.$root.$$phase !== '$digest') { + $scope.vm.issueTypeId = $rootScope.getCurrentIssueTypeId(); + /*if ($scope.$root.$$phase !== '$apply' && $scope.$root.$$phase !== '$digest') { $scope.$apply(); - } + }*/ } // �씠�뒋 �긽�깭 蹂�寃� @@ -723,7 +723,14 @@ size : "lg", controller : 'issueAddRelationTableConfigController', backdrop : 'static', - resolve : {} + resolve : { + parameter : function () { + return { + issueTypeId : $scope.vm.viewer.issueTypeVo.id + + }; + } + } }); } @@ -734,7 +741,14 @@ size : "lg", controller : 'issueAddDownTableConfigController', backdrop : 'static', - resolve : {} + resolve : { + parameter : function () { + return { + issueTypeId : $scope.vm.viewer.issueTypeVo.id + }; + + } + } }); } @@ -766,6 +780,21 @@ }); } + // �뾽泥�/ISP/�샇�뒪�똿 �씠由꾩씠 �룷�븿 �뿬遺� �솗�씤 + function containsPartner(name) { + var result = false; + + if ($scope.vm.viewer.usePartnerVos != null) { + $scope.vm.viewer.usePartnerVos.forEach(function (partnerVo) { + if (name === partnerVo.name) { + result = true; + } + }); + } + return result; + + } + // �씠�뒋 �긽�꽭 �젙蹂� 議고쉶 function getIssueDetail() { // 珥덇린�솕 �빐�빞�븷 �븷紐⑹쓣 吏��젙�븯�뿬 �떎瑜� �씠�뒋瑜� �겢由��븷 �븣 珥덇린�솕�빐以��떎. @@ -775,7 +804,7 @@ $scope.fn.getDownTableConfigs(); Issue.detail($resourceProvider.getContent( - {id : $scope.vm.viewer.id, deep : "02"}, + {id : $scope.vm.viewer.id, deep : "02", customFields : $scope.vm.customFields}, $resourceProvider.getPageContent(0, 1))).then(function (result) { if (result.data.message.status === "success") { @@ -802,16 +831,19 @@ $scope.vm.form.issuesDown.push(result.data.data); // �뿰愿� �씠�뒋 諛섎났臾� - angular.forEach(result.data.data.issueRelationVos, function (issueRelationVo){ - issueRelationVo.relationIssueTypeName = $scope.vm.relationIssueTypes[issueRelationVo.relationIssueType].name; - $scope.vm.form.issues.push(issueRelationVo.issueRelation); - }); + 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); + }); + } // �븯�쐞 �씠�뒋 諛섎ぉ臾� - angular.forEach(result.data.data.issueDownVos, function (issueDownVo){ - $scope.vm.form.issuesDown.push(issueDownVo.issue); - }); - + if (result.data.data.issueDownVos !== null){ + angular.forEach(result.data.data.issueDownVos, function (issueDownVo){ + $scope.vm.form.issuesDown.push(issueDownVo.issue); + }); + } $scope.vm.viewer.issueRelationVos = result.data.data.issueRelationVos; $scope.vm.viewer.issueDownVos = result.data.data.issueDownVos; } @@ -850,6 +882,12 @@ switch (issueTypeCustomField.customFieldVo.customFieldType) { case "INPUT" : case "SINGLE_SELECT" : + case "NUMBER" : + case "DATETIME" : + case "IP_ADDRESS" : + case "EMAIL" : + case "SITE" : + case "TEL" : issueTypeCustomField.useValues = ""; break; @@ -1010,6 +1048,10 @@ resolve : { parameter : function () { return { + departmentVos : [$scope.vm.form.issues[0].departmentVos], + issueCompanyFields : [$scope.vm.form.issues[0].issueCompanyVos], + issueIspFields : [$scope.vm.form.issues[0].issueIspVos], + issueHostingFields : [$scope.vm.form.issues[0].issueHostingVos], issueId : issueId, projectId : projectId }; @@ -1051,7 +1093,6 @@ } }); } - } ]); } -- Gitblit v1.8.0