From 35c3a7d2ff0567b13a97da8f0d9c4d7ff81b737a Mon Sep 17 00:00:00 2001
From: wyu <kknd09321@nate.com>
Date: 수, 15 12월 2021 13:31:09 +0900
Subject: [PATCH] 워크플로우 전이선 클릭 오류 수정

---
 src/main/webapp/custom_components/js-autocomplete-multi/js-autocomplete-multi.js |    4 ++++
 src/main/webapp/custom_components/js-workflow/js-workflow.directive.js           |   35 +++++++++++++++++++----------------
 src/main/webapp/custom_components/js-workflow/js-workflow.html                   |    2 +-
 3 files changed, 24 insertions(+), 17 deletions(-)

diff --git a/src/main/webapp/custom_components/js-autocomplete-multi/js-autocomplete-multi.js b/src/main/webapp/custom_components/js-autocomplete-multi/js-autocomplete-multi.js
index 8182c40..8680c81 100644
--- a/src/main/webapp/custom_components/js-autocomplete-multi/js-autocomplete-multi.js
+++ b/src/main/webapp/custom_components/js-autocomplete-multi/js-autocomplete-multi.js
@@ -101,6 +101,10 @@
                             var parentFound = false;
 
                             while (angular.isDefined(target) && target !== null && !parentFound && target.className !== null) {
+                                if (typeof target.className.split != 'function') {
+                                    break;
+                                }
+
                                 if (_.contains(target.className.split(' '), 'multiselect-parent') && !parentFound) {
                                     if (target === $dropdownTrigger) {
                                         parentFound = true;
diff --git a/src/main/webapp/custom_components/js-workflow/js-workflow.directive.js b/src/main/webapp/custom_components/js-workflow/js-workflow.directive.js
index a227475..6c99bba 100644
--- a/src/main/webapp/custom_components/js-workflow/js-workflow.directive.js
+++ b/src/main/webapp/custom_components/js-workflow/js-workflow.directive.js
@@ -669,24 +669,27 @@
                             if ($scope.vm.activeTarget != null) {
                                 var targetIssueStatus = $scope.vm.activeTarget.issueStatus;
 
-                                var myIssueStatus = null;
-                                angular.forEach($scope.vm.issueStatusVos, function (issueStatusVo) {
-                                    if (issueStatusVo.id === targetIssueStatus.id) {
-                                        myIssueStatus = issueStatusVo;
-                                    }
-                                });
+                                // null 泥댄겕
+                                if (targetIssueStatus != null) {
+                                    var myIssueStatus = null;
+                                    angular.forEach($scope.vm.issueStatusVos, function (issueStatusVo) {
+                                        if (issueStatusVo.id === targetIssueStatus.id) {
+                                            myIssueStatus = issueStatusVo;
+                                        }
+                                    });
 
-                                if (myIssueStatus != null) {
-                                    if ($scope.vm.departments != null) {
-                                        var workflowDepartments = [];
+                                    if (myIssueStatus != null) {
+                                        if ($scope.vm.departments != null) {
+                                            var workflowDepartments = [];
 
-                                        angular.forEach($scope.vm.departments, function (department) {
-                                            var workflowDepartment = {
-                                                departmentVo : department
-                                            }
-                                            workflowDepartments.push(workflowDepartment);
-                                        });
-                                        myIssueStatus.workflowDepartmentVos = workflowDepartments;
+                                            angular.forEach($scope.vm.departments, function (department) {
+                                                var workflowDepartment = {
+                                                    departmentVo : department
+                                                }
+                                                workflowDepartments.push(workflowDepartment);
+                                            });
+                                            myIssueStatus.workflowDepartmentVos = workflowDepartments;
+                                        }
                                     }
                                 }
                             }
diff --git a/src/main/webapp/custom_components/js-workflow/js-workflow.html b/src/main/webapp/custom_components/js-workflow/js-workflow.html
index 1b7aa7b..e855de5 100644
--- a/src/main/webapp/custom_components/js-workflow/js-workflow.html
+++ b/src/main/webapp/custom_components/js-workflow/js-workflow.html
@@ -60,7 +60,7 @@
                 </div>
             </div>
 
-            <div class="form-group" ng-if="vm.activeTarget != null">
+            <div class="form-group" ng-if="vm.activeTarget != null" ng-hide="vm.activeTarget.colorClass != null">
                 <label><span translate="project.projectDepartment">遺��꽌紐�</span><span>[{{vm.activeTarget.name}}]</span></label>
                 <js-autocomplete-multi data-input-name="departments"
                                        selected-model="vm.departments"

--
Gitblit v1.8.0