From fed164fcc7b782f1d773cdfc10a3d9f44264c8cd Mon Sep 17 00:00:00 2001
From: wyu <kknd09321@nate.com>
Date: 화, 28 12월 2021 22:39:19 +0900
Subject: [PATCH] Merge branch 'master' of http://192.168.0.25:9001/r/owl-kisa

---
 src/main/webapp/scripts/components/utils/autoComplete.controller.js |    2 +-
 src/main/webapp/scripts/app/issue/issueAddRelation.controller.js    |   27 ++++++++++++++++++++++++++-
 src/main/webapp/i18n/ko/global.json                                 |    1 +
 src/main/webapp/scripts/app/issue/issueAddDown.controller.js        |   24 +++++++++++++++++++++++-
 src/main/webapp/scripts/app/issue/issueDetail.controller.js         |    2 +-
 5 files changed, 52 insertions(+), 4 deletions(-)

diff --git a/src/main/webapp/i18n/ko/global.json b/src/main/webapp/i18n/ko/global.json
index 39170e0..2f610a7 100644
--- a/src/main/webapp/i18n/ko/global.json
+++ b/src/main/webapp/i18n/ko/global.json
@@ -223,6 +223,7 @@
         "settingTableDisplay": "�뀒�씠釉� �몴�떆 �꽕�젙",
         "deleteIssue": "�씠�뒋 �궘�젣",
         "wantToDeleteSelectIssue": "�꽑�깮�븳 �씠�뒋瑜� �궘�젣�븯寃좎뒿�땲源�? \n �궗�슜�옄媛� 吏곸젒 �궘�젣�븳 �씠�뒋�뒗 �뼱�뼚�븳 寃쎌슦�뿉�룄 蹂듦뎄媛� 遺덇��뒫�빀�땲�떎.",
+        "wantToDeleteSelectDownIssueInList": "�꽑�깮�븳 �븯�쐞 �씠�뒋瑜� �븯�쐞 �씠�뒋 由ъ뒪�듃�뿉�꽌 �젣�쇅�떆�궎寃좎뒿�땲源�?",
         "wantToDeleteOnlySelectIssue": "�꽑�깮�븳 �씠�뒋留� �궘�젣�븯寃좎뒿�땲源�? \n �궗�슜�옄媛� 吏곸젒 �궘�젣�븳 �씠�뒋�뒗 �뼱�뼚�븳 寃쎌슦�뿉�룄 蹂듦뎄媛� 遺덇��뒫�빀�땲�떎.",
         "wantToDeleteSelectDownIssue": "�꽑�깮�븳 �씠�뒋�쓽 �븯�쐞 �씠�뒋媛� 議댁옱 �빀�땲�떎. \n �꽑�깮�븳 �씠�뒋�� �븯�쐞 �씠�뒋 紐⑤몢 �궘�젣�븯寃좎뒿�땲源�? \n �궗�슜�옄媛� 吏곸젒 �궘�젣�븳 �씠�뒋�뒗 �뼱�뼚�븳 寃쎌슦�뿉�룄 蹂듦뎄媛� 遺덇��뒫�빀�땲�떎.",
         "wantToDeleteSelectRelationIssue": "�꽑�깮�븳 �뿰愿� �씠�뒋瑜� �궘�젣�븯寃좎뒿�땲源�? \n �궗�슜�옄媛� 吏곸젒 �궘�젣�븳 �뿰愿� �씠�뒋�뒗 蹂듦뎄媛� 遺덇��뒫�빀�땲�떎.",
diff --git a/src/main/webapp/scripts/app/issue/issueAddDown.controller.js b/src/main/webapp/scripts/app/issue/issueAddDown.controller.js
index 5c4df4a..e455886 100644
--- a/src/main/webapp/scripts/app/issue/issueAddDown.controller.js
+++ b/src/main/webapp/scripts/app/issue/issueAddDown.controller.js
@@ -39,6 +39,7 @@
                     containsPartner : containsPartner,
                     getPartners : getPartners,
                     addDownIssue : addDownIssue,
+                    getDepartments : getDepartments,
                 };
 
                 $scope.vm = {
@@ -910,6 +911,26 @@
 
                 }
 
+                function getDepartments() {
+                    if($scope.vm.form.issueTypeId === ""){
+                        $scope.vm.form.issueTypeId = $rootScope.issueTypeMenu.id
+                    }
+                    var content = {
+                        issueTypeId : $scope.vm.form.issueTypeId,
+                    };
+                    Issue.findReadyDepartments($resourceProvider.getContent(
+                        content,
+                        $resourceProvider.getPageContent(0, 1))).then(function (result) {
+                        if (result.data.message.status === "success") {
+                            angular.forEach(result.data.data, function (department) {
+                                department.byName = department.departmentName;
+                                $scope.vm.form.departments.push(department);
+                            });
+                        }
+                    });
+
+                }
+
                 //  理쒖큹 �떎�뻾
                 function startExecute() {
 
@@ -917,7 +938,8 @@
                         getIssueTypes : $scope.fn.getIssueTypes(),
                         getPriorities : $scope.fn.getPriorities(),
                         getSeverities : $scope.fn.getSeverities(),
-                        getPartners : $scope.fn.getPartners()
+                        getPartners : $scope.fn.getPartners(),
+                        getDepartments : $scope.fn.getDepartments()
                     };
                     $q.all(promises).then(function (results) {
                         // �쁽�옱 �봽濡쒖젥�듃 �꽕�젙
diff --git a/src/main/webapp/scripts/app/issue/issueAddRelation.controller.js b/src/main/webapp/scripts/app/issue/issueAddRelation.controller.js
index b13739f..a99d138 100644
--- a/src/main/webapp/scripts/app/issue/issueAddRelation.controller.js
+++ b/src/main/webapp/scripts/app/issue/issueAddRelation.controller.js
@@ -39,6 +39,7 @@
                     containsPartner : containsPartner,
                     getPartners : getPartners,
                     addRelationIssue : addRelationIssue,
+                    getDepartments : getDepartments
                 };
 
                 $scope.vm = {
@@ -168,6 +169,8 @@
 
                 $scope.$watch("vm.form.issueTypeId", function (newValue, oldValue) {
                     $scope.vm.partnerVos = $scope.fn.getPartners();
+                    $scope.vm.form.departments = [];
+                    getDepartments(Number(newValue));
                 });
 
                 //  �꽟癒몃끂�듃 �씠誘몄� �뾽濡쒕뱶
@@ -923,6 +926,27 @@
 
                 }
 
+                function getDepartments(issueTypeId) {
+                    if($rootScope.isDefined(issueTypeId) && $scope.vm.form.issueTypeId === ""){
+                        $scope.vm.form.issueTypeId = $rootScope.issueTypeMenu.id
+                    }
+                    var content = {
+                        issueTypeId : $scope.vm.form.issueTypeId,
+                    };
+                    Issue.findReadyDepartments($resourceProvider.getContent(
+                        content,
+                        $resourceProvider.getPageContent(0, 1))).then(function (result) {
+                        if (result.data.message.status === "success") {
+                            $scope.vm.form.departments = [];
+                            angular.forEach(result.data.data, function (department) {
+                                department.byName = department.departmentName;
+                                $scope.vm.form.departments.push(department);
+                            });
+                        }
+                    });
+
+                }
+
                 //  理쒖큹 �떎�뻾
                 function startExecute() {
 
@@ -930,7 +954,8 @@
                         getIssueTypes : $scope.fn.getIssueTypes(),
                         getPriorities : $scope.fn.getPriorities(),
                         getSeverities : $scope.fn.getSeverities(),
-                        getPartners : $scope.fn.getPartners()
+                        getPartners : $scope.fn.getPartners(),
+                        //getDepartments : $scope.fn.getDepartments()
                     };
                     $q.all(promises).then(function (results) {
                         // �쁽�옱 �봽濡쒖젥�듃 �꽕�젙
diff --git a/src/main/webapp/scripts/app/issue/issueDetail.controller.js b/src/main/webapp/scripts/app/issue/issueDetail.controller.js
index d4906c2..84bfa4e 100644
--- a/src/main/webapp/scripts/app/issue/issueDetail.controller.js
+++ b/src/main/webapp/scripts/app/issue/issueDetail.controller.js
@@ -156,7 +156,7 @@
                     //  �궘�젣 �븣由�
                     SweetAlert.swal({
                             title : $filter("translate")("issue.downIssueRemove"), // �븯�쐞 �씠�뒋 �궘�젣
-                            text : $filter("translate")("issue.wantToDeleteSelectIssue"),
+                            text : $filter("translate")("issue.wantToDeleteSelectDownIssueInList"),
                             type : "warning",
                             showCancelButton : true,
                             confirmButtonColor : "#DD6B55",
diff --git a/src/main/webapp/scripts/components/utils/autoComplete.controller.js b/src/main/webapp/scripts/components/utils/autoComplete.controller.js
index 834a91d..7fd4e7e 100644
--- a/src/main/webapp/scripts/components/utils/autoComplete.controller.js
+++ b/src/main/webapp/scripts/components/utils/autoComplete.controller.js
@@ -354,7 +354,7 @@
                 function getIssueDepartmentList(issueTypeId, query, excludeList, page, callBack) {
                     var conditions = {
                         //issueTypeId : $scope.vm.form.issueTypeId,
-                        issueTypeId : issueTypeId,
+                        issueTypeId : Number(issueTypeId),
                         departmentName : query,
                         userId : $rootScope.user.id,
                         projectId : (function () {

--
Gitblit v1.8.0