From 8fab2c64de2185fb905a9f63ff92c205cc8c75ca Mon Sep 17 00:00:00 2001
From: minhee <alsdldlfrl@gmail.com>
Date: 수, 16 3월 2022 18:26:35 +0900
Subject: [PATCH] - 이슈목록 - 테이블표시설정에 등록일 추가

---
 src/main/webapp/scripts/app/issue/issueList.controller.js |   85 ++++++++++++++++++++++++++++++------------
 1 files changed, 61 insertions(+), 24 deletions(-)

diff --git a/src/main/webapp/scripts/app/issue/issueList.controller.js b/src/main/webapp/scripts/app/issue/issueList.controller.js
index 15c8ac4..556fef7 100644
--- a/src/main/webapp/scripts/app/issue/issueList.controller.js
+++ b/src/main/webapp/scripts/app/issue/issueList.controller.js
@@ -61,6 +61,7 @@
                         registerDateRange : "", //  �벑濡앹씪 湲곌컙 寃��깋
                         startDateRange : "",    //  �떆�옉�씪 湲곌컙 寃��깋
                         completeDateRange : "", //  �셿猷뚯씪 湲곌컙 寃��깋
+                        dateRange : "", //  湲곌컙 寃��깋
                         severityIds : [],   //  以묒슂�룄 寃��깋
                         priorityIds : [],   //  �슦�꽑�닚�쐞 寃��깋
                         issueStatusIds : [],    //  �씠�뒋 �긽�깭 寃��깋
@@ -95,7 +96,7 @@
                     issueTreeConfigs : [],  //  �씠�뒋 �뀒�씠釉� �꽕�젙
                     parentIssueId : "",
                     hideCompleteIssue : false,
-                    hideDownIssue : true,
+                    hideDownIssue : "1", //�씠�뒋紐⑸줉�뿉�꽌 �쟾泥댁씠�뒋蹂닿린 :0 �긽�쐞�씠�뒋留뚮낫湲�: 1 �븯�쐞�씠�뒋留뚮낫湲�:1
                     listMode : 0, // 紐⑸줉 紐⑤뱶 0:湲곕낯 由ъ뒪�듃 1:�듃由ш뎄議� 由ъ뒪�듃
                     allIssue : false
                 };
@@ -298,6 +299,10 @@
                             $scope.vm.treeConfigs.push($treeProvider.config()
                                 .setDName("register"));
                             break;
+                        case "REGISTER_DATE" : //  �벑濡앹씪
+                            $scope.vm.treeConfigs.push($treeProvider.config()
+                                .setDName("registerDate"));
+                            break;
                         case "PERIOD" : //  湲곌컙
                             $scope.vm.treeConfigs.push($treeProvider.config()
                                 .setDName("period"));
@@ -337,7 +342,7 @@
                         case "ISSUE_TITLE" :   //  �씠�뒋 �젣紐�
                             $scope.vm.tableConfigs.push($tableProvider.config()
                                 .setHName("issue.issueTitle")
-                                .setDName("issueTitle")
+                                .setDName("title")
                                 .setDType("renderer")
                                 .setHWidth("bold " + issueTableConfig.width)
                                 .setDAlign("text-center")
@@ -384,10 +389,15 @@
                             $scope.vm.tableConfigs.push($tableProvider.config()
                                 .setHName("common.register")
                                 .setDName("registerId")
-                                .setDType("renderer")
                                 .setHWidth("bold " + issueTableConfig.width)
-                                .setDAlign("text-center")
-                                .setDRenderer("REGISTER"));
+                                .setDAlign("text-center"));
+                            break;
+                        case "REGISTER_DATE" :   //  �벑濡앹씪
+                            $scope.vm.tableConfigs.push($tableProvider.config()
+                                .setHName("common.registerDate")
+                                .setDName("registerDate")
+                                .setHWidth("bold " + issueTableConfig.width)
+                                .setDAlign("text-center"));
                             break;
                         case "PERIOD" : //  湲곌컙
                             $scope.vm.tableConfigs.push($tableProvider.config()
@@ -453,7 +463,7 @@
                                 $scope.vm.tableConfigs.push($tableProvider.config()
                                     .setHName(customField.name)
                                     .setDType("renderer")
-                                    .setDName("useValue" + [count]) /* todo 泥댄겕*/
+                                    .setDName("useValue"+count)
                                     .setHWidth("bold " + issueTableConfig.width)
                                     .setDAlign("text-center")
                                     .setColumnHint(customField)
@@ -495,15 +505,18 @@
                         endStartDate : "",
                         beginCompleteDate : "",
                         endCompleteDate : "",
+                        dateRange: "",
                         hideCompleteIssue: $scope.vm.hideCompleteIssue,
                         hideDownIssue : $scope.vm.hideDownIssue,
                         isTree : $scope.vm.listMode === 1,
                         projectIds : (function () {
                             var projectIds = [];
 
-                            angular.forEach($scope.vm.projects, function (project) {
-                                projectIds.push(project.id);
-                            });
+                            if (!$scope.vm.allIssue) { //�쟾泥� �궎�썙�뱶 寃��깋�씠 �븘�땺 寃쎌슦�뿉留� �봽濡쒖젥�듃ID push
+                                angular.forEach($scope.vm.projects, function (project) {
+                                    projectIds.push(project.id);
+                                });
+                            }
 
                             return projectIds;
                         })(),
@@ -519,9 +532,11 @@
                         issueTypeIds : (function () {
                             var issueTypeIds = [];
 
-                            angular.forEach($scope.vm.search.issueTypeIds, function (issueTypeId) {
-                                issueTypeIds.push(issueTypeId.fieldKey);
-                            });
+                            if (!$scope.vm.allIssue) { //�쟾泥� �궎�썙�뱶 寃��깋�씠 �븘�땺 寃쎌슦�뿉留� �씠�뒋�쑀�삎ID push
+                                angular.forEach($scope.vm.search.issueTypeIds, function (issueTypeId) {
+                                    issueTypeIds.push(issueTypeId.fieldKey);
+                                });
+                            }
 
                             return issueTypeIds;
                         })(),
@@ -614,6 +629,10 @@
                         conditions.beginCompleteDate = completeDateRange[0].trim();
                         conditions.endCompleteDate = completeDateRange[1].trim();
                     }
+                    //  湲곌컙
+                    if ($rootScope.isDefined($scope.vm.search.dateRange)) {
+                        conditions.dateRange = $scope.vm.search.dateRange.trim();
+                    }
 
                     return conditions;
 
@@ -637,7 +656,7 @@
                     if (keyWord != null) {
                         $scope.vm.search.keyWord = keyWord;
                         $rootScope.isMainSearch = true;
-
+                        $scope.vm.allIssue = true;
                         $rootScope.$broadcast("getPageListKeyWord", {keyWord: $scope.vm.search.keyWord});
                     }
 
@@ -645,9 +664,10 @@
                         $scope.vm.hideCompleteIssue = true;
                     }
 
-                    if ($scope.vm.hideDownIssue) {
-                        $scope.vm.hideDownIssue = true;
-                    }
+                    // if ($scope.vm.hideDownIssue) {
+                    //     $scope.vm.hideDownIssue = true;
+                    // }
+
                     //  �쁽�옱 �럹�씠吏� �젙蹂�
                     var currentPage = 0;
 
@@ -662,10 +682,10 @@
                     // 寃��깋 湲곕낯媛� �꽭�똿
                     $scope.vm.search.issueTypeIds = [];
                     $scope.vm.projects = [];
-                    if (keyWord == null || keyWord === '') {
+                    if (!$scope.vm.allIssue && keyWord == null || keyWord === '') {
                         // 硫붾돱�뿉�꽌 �꽑�깮�맂 �씠�뒋 �쑀�삎�쓣 湲곕낯�쑝濡� 異붽�
                         if ($rootScope.issueTypeMenu != null) {
-                            //$scope.vm.pageTitle = $rootScope.issueTypeMenu.name;
+                            $scope.vm.pageTitle = $rootScope.issueTypeMenu.name;
 
                             $scope.vm.search.issueTypeIds.push({
                                 fieldKey: $rootScope.issueTypeMenu.id,
@@ -838,7 +858,7 @@
                 }
 
                 //  �씠�뒋 �닔�젙 �뙘�뾽 �샇異�
-                function modify(id) {
+                function modify(id, downTotalCount) {
                     $uibModal.open({
                         templateUrl : 'views/issue/issueModify.html',
                         size : "lg",
@@ -848,13 +868,17 @@
                             parameter : function () {
                                 return {
                                     id : id,
+                                    issueTypeId : $scope.vm.viewer.issueTypeVo.id,
+                                    inheritPartners : $scope.vm.viewer.issueTypeVo.inheritPartners,
+                                    usePartner : $scope.vm.viewer.usePartnerVos,
+                                    downTotalCount : downTotalCount
                                 };
                             }
                         }
                     });
                 }
 
-                function addRelationIssueForm(id) {
+                function addRelationIssueForm(id, project, issueTypeId) {
                     $uibModal.open({
                         templateUrl : 'views/issue/issueAddRelation.html',
                         size : "lg",
@@ -864,13 +888,15 @@
                             parameter : function () {
                                 return {
                                     id : id,
+                                    project : project,
+                                    issueTypeId : issueTypeId
                                 };
                             }
                         }
                     });
                 }
 
-                function addDownIssueForm(id) {
+                function addDownIssueForm(id, project, issueTypeId) {
                     $uibModal.open({
                         templateUrl : 'views/issue/issueAddDown.html',
                         size : "lg",
@@ -880,6 +906,8 @@
                             parameter : function () {
                                 return {
                                     id : id,
+                                    project : project,
+                                    issueTypeId : issueTypeId
                                 };
                             }
                         }
@@ -1059,7 +1087,8 @@
                         resolve : {
                             parameter : function () {
                                 return {
-                                    issueTypeId : $scope.vm.issueTypeId
+                                    issueTypeId : $scope.vm.issueTypeId,
+                                    allIssue : $scope.vm.allIssue
                                 };
                             }
                         }
@@ -1235,7 +1264,15 @@
                     var deferred = $q.defer();
 
                     var content = {
-                        issueTypeId : $rootScope.getCurrentIssueTypeId()
+                        issueTypeId : (function () {
+                            var id = "";
+                            if ($rootScope.allIssueList) {
+                                id = -1;
+                            } else {
+                                id = $rootScope.getCurrentIssueTypeId();
+                            }
+                            return id;
+                        })()
                     }
 
                     IssueTableConfig.detail($resourceProvider.getContent(content,
@@ -1346,7 +1383,7 @@
                                 //  �씠�뒋 �뀒�씠釉� �꽕�젙 �젙蹂대�� ���옣 �븳�떎.
                                 $scope.vm.issueTableConfigs = JSON.parse(issueTableConfigs);
                                 $scope.vm.issueTableConfigs.sort(function (a, b) {
-                                    return a.position < b.position ? -1 : a.position > b.position ? 1: 0;
+                                    return parseInt(a.position) < parseInt(b.position) ? -1 : parseInt(a.position) > parseInt(b.position) ? 1 : 0;
                                 });
                             }
                             else {

--
Gitblit v1.8.0