From 296de4d2353e52f8f9a08045f09ab4d5e2bbf775 Mon Sep 17 00:00:00 2001
From: wyu <kknd09321@nate.com>
Date: 수, 08 12월 2021 13:27:40 +0900
Subject: [PATCH] 이슈 제목 on/off 버튼이 on 상태로 변경 안되게 수정

---
 src/main/webapp/scripts/app/issue/issueAddTableConfig.controller.js |   63 ++++++++++++++++++++++++-------
 1 files changed, 49 insertions(+), 14 deletions(-)

diff --git a/src/main/webapp/scripts/app/issue/issueAddTableConfig.controller.js b/src/main/webapp/scripts/app/issue/issueAddTableConfig.controller.js
index b5c23db..912fcc2 100644
--- a/src/main/webapp/scripts/app/issue/issueAddTableConfig.controller.js
+++ b/src/main/webapp/scripts/app/issue/issueAddTableConfig.controller.js
@@ -8,8 +8,8 @@
         'angular'
     ],
     function (app, angular) {
-        app.controller('issueAddTableConfigController', ['$scope', '$rootScope', '$log', '$resourceProvider', '$uibModalInstance', 'SweetAlert', '$timeout', 'IssueTableConfig', 'CustomField', '$q', '$filter',
-            function ($scope, $rootScope, $log, $resourceProvider, $uibModalInstance, SweetAlert, $timeout, IssueTableConfig, CustomField, $q, $filter) {
+        app.controller('issueAddTableConfigController', ['$scope', '$rootScope', '$log', '$resourceProvider', '$uibModalInstance', 'SweetAlert', '$timeout', 'IssueTableConfig', 'CustomField', '$q', '$filter', 'parameter',
+            function ($scope, $rootScope, $log, $resourceProvider, $uibModalInstance, SweetAlert, $timeout, IssueTableConfig, CustomField, $q, $filter, parameter) {
 
                 //  �븿�닔 紐⑥쓬
                 $scope.fn = {
@@ -23,47 +23,68 @@
                 //  蹂��닔 紐⑥쓬
                 $scope.vm = {
                     issueTableConfigs : [{
+                        name : $filter("translate")("issue.issueTitle"), // �씠�뒋 �젣紐�
+                        key : "ISSUE_TITLE",
+                        width : "width-140-p",
+                        position : 0,
+                        display : true,
+                        checkboxShow : false
+                    }, {
                         name : $filter("translate")("common.priority"), // �슦�꽑�닚�쐞
                         key : "PRIORITY",
                         width : "width-80-p",
                         position : 1,
-                        display : true
+                        display : true,
+                        checkboxShow : true
                     }, {
                         name : $filter("translate")("common.importance"), // 以묒슂�룄
                         key : "SEVERITY",
                         width : "width-80-p",
                         position : 2,
-                        display : true
+                        display : true,
+                        checkboxShow : true
                     }, {
                         name : $filter("translate")("issue.issueType"), // �씠�뒋 ���엯
                         key : "ISSUE_TYPE",
                         width : "width-140-p",
                         position : 3,
-                        display : true
+                        display : true,
+                        checkboxShow : true
                     }, {
                         name : $filter("translate")("common.assigneeTeam"), // �떞�떦遺��꽌
                         key : "ASSIGNEE_TEAM",
                         width : "width-100-p",
                         position : 4,
-                        display : true
+                        display : true,
+                        checkboxShow : true
+                    }, {
+                        name : $filter("translate")("common.countDownIssue"), // �븯�쐞�씠�뒋 移댁슫�듃
+                        key : "COUNT_DOWN_ISSUE",
+                        width : "width-100-p",
+                        position : 5,
+                        display : false,
+                        checkboxShow : true
                     }, {
                         name : $filter("translate")("common.register"), // �벑濡앹옄
                         key : "REGISTER",
                         width : "width-100-p",
-                        position : 5,
-                        display : true
+                        position : 6,
+                        display : false,
+                        checkboxShow : true
                     }, {
                         name : $filter("translate")("common.period"), // 湲곌컙
                         key : "PERIOD",
                         width : "width-140-p",
-                        position : 6,
-                        display : true
+                        position : 7,
+                        display : false,
+                        checkboxShow : true
                     }, {
                         name : $filter("translate")("common.lastChangeDate"), // 理쒓렐 蹂�寃쎌씪
                         key : "MODIFY_DATE",
                         width : "width-100-p",
-                        position : 7,
-                        display : true
+                        position : 8,
+                        display : false,
+                        checkboxShow : true
                     }, {
                     }]
                 };
@@ -83,6 +104,7 @@
                     $rootScope.spinner = true;
 
                     var content = {
+                        issueTypeId : $rootScope.getCurrentIssueTypeId(),
                         issueTableConfigs : JSON.stringify($scope.vm.issueTableConfigs)
                     };
 
@@ -129,15 +151,27 @@
                     return deferred.promise;
                 }
 
+                var content = {
+                    delValue : $scope.vm.issueTableConfigs.splice(9,1),
+                    issueTableConfigs : JSON.stringify($scope.vm.issueTableConfigs),
+                    issueTypeId : $rootScope.getCurrentIssueTypeId()
+                };
                 //  �씠�뒋 紐⑸줉 �뀒�씠釉� �꽕�젙 �젙蹂대�� 媛��졇�삩�떎.
                 function getIssueAddTableConfigs() {
                     var deferred = $q.defer();
 
-                    IssueTableConfig.detail($resourceProvider.getContent({},
+                    IssueTableConfig.detail($resourceProvider.getContent(content,
                         $resourceProvider.getPageContent(0, 1000))).then(function (result) {
                         if (result.data.message.status !== "success") {
                             SweetAlert.error($filter("translate")("issue.failedToIssueTableColumnLookup"), result.data.message.message); // �씠�뒋 �뀒�씠釉� 而щ읆 議고쉶 �떎�뙣
                         }
+
+                        // for (var i = 0; i < result.data.name; i++) {
+                        //     if (result.data.name === '') {
+                        //         result.splice(i,1);
+                        //         i--;
+                        //     }
+                        // }
 
                         deferred.resolve(result.data.data);
                     });
@@ -147,13 +181,14 @@
 
                 //  �궗�슜�옄 �젙�쓽 �븘�뱶瑜� 議고쉶�븳 �썑 �몴�떆�븷 �씠�뒋 �뀒�씠釉� 而щ읆�쓣 以�鍮꾪븳�떎.
                 $scope.fn.getCustomFields().then(function (result) {
-                    var count = 7;
+                    var count = 10;
                     angular.forEach(result, function (customField) {
                         $scope.vm.issueTableConfigs.push({
                             name : customField.name,
                             key : "CUSTOM_FIELD_" + customField.id,
                             width : "width-100-p",
                             display : false,
+                            checkboxShow : true,
                             position : count
                         });
 

--
Gitblit v1.8.0