From 12ee57fe168d76d8a71993a1473dba8b20d49ab9 Mon Sep 17 00:00:00 2001
From: 이민희 <mhlee@maprex.co.kr>
Date: 월, 29 11월 2021 09:43:53 +0900
Subject: [PATCH] 이슈(추가,수정)충돌 수정

---
 src/main/webapp/scripts/app/issue/issueAdd.controller.js |   63 +++++++++++--------------------
 1 files changed, 23 insertions(+), 40 deletions(-)

diff --git a/src/main/webapp/scripts/app/issue/issueAdd.controller.js b/src/main/webapp/scripts/app/issue/issueAdd.controller.js
index 73379b8..ca93bbb 100644
--- a/src/main/webapp/scripts/app/issue/issueAdd.controller.js
+++ b/src/main/webapp/scripts/app/issue/issueAdd.controller.js
@@ -9,9 +9,9 @@
     ],
     function (app, angular) {
         app.controller('issueAddController', ['$scope', '$rootScope', '$log', '$resourceProvider', '$uibModalInstance', '$uibModal', '$injector',
-            '$controller', '$tableProvider', 'SweetAlert', '$timeout', '$stateParams', '$q', 'Issue', 'User', 'AttachedFile', 'IssueType', 'HostingField', 'Priority', 'Severity', 'IssueTypeCustomField', '$filter', '$state',
+            '$controller', '$tableProvider', 'SweetAlert', '$timeout', '$stateParams', '$q', 'Issue', 'User', 'AttachedFile', 'IssueType', 'Priority', 'Severity', 'IssueTypeCustomField', '$filter', '$state',
             function ($scope, $rootScope, $log, $resourceProvider, $uibModalInstance, $uibModal,  $injector, $controller, $tableProvider, SweetAlert, $timeout,
-                      $stateParams, $q, Issue, User, AttachedFile, IssueType, HostingField, Priority, Severity, IssueTypeCustomField, $filter, $state) {
+                      $stateParams, $q, Issue, User, AttachedFile, IssueType, Priority, Severity, IssueTypeCustomField, $filter, $state) {
 
                 $scope.fn = {
                     cancel : cancel,    //  �뙘�뾽 李� �떕湲�
@@ -37,7 +37,7 @@
                     setIssueTypeTemplate : setIssueTypeTemplate,    //  �씠�뒋 �쑀�삎 �뀥�뵆由� �쟻�슜�븯湲�
                     startExecute : startExecute, //  而⑦듃濡� 濡쒕뵫�떆 泥섏쓬�쑝濡� �떆�옉�릺�뒗 �븿�닔
                     containsPartner : containsPartner,
-                    getPartners : getPartners,
+                    getPartners : getPartners
                 };
 
                 $scope.vm = {
@@ -320,8 +320,8 @@
                 function containsPartner(name) {
                     var result = false;
 
-                    if ($scope.vm.viewer.usePartnerVo != null) {
-                        $scope.vm.viewer.usePartnerVo.forEach(function (partnerVo) {
+                    if ($scope.vm.partnerVos != null) {
+                        $scope.vm.partnerVos.forEach(function (partnerVo) {
                             if (name === partnerVo.name) {
                                 result = true;
                             }
@@ -578,27 +578,27 @@
                         },
                         fileFormDataName : "file"
                     }).then(function (result) {
-                            if (result.data.message.status === "success") {
-                                //  �뿰�냽 �벑濡� 泥댄겕�떆 �씠�룞�븯吏� �븡�쓬.
-                                if ($scope.vm.infiniteAdd) {
-                                    $scope.fn.infiniteAddForm();
-                                }
-                                else {
-                                    $scope.fn.cancel();
-
-                                    if ($state.current.name !== "issues.list" || $state.current.name === "issues.list") {
-                                        $state.go("issues.list");
-                                    }
-                                }
-
-                                $rootScope.$broadcast("getIssueList", {});
+                        if (result.data.message.status === "success") {
+                            //  �뿰�냽 �벑濡� 泥댄겕�떆 �씠�룞�븯吏� �븡�쓬.
+                            if ($scope.vm.infiniteAdd) {
+                                $scope.fn.infiniteAddForm();
                             }
                             else {
-                                SweetAlert.error($filter("translate")("issue.failedIssueRegistration"), result.data.message.message); // �씠�뒋 �벑濡� �떎�뙣
+                                $scope.fn.cancel();
+
+                                if ($state.current.name !== "issues.list" || $state.current.name === "issues.list") {
+                                    $state.go("issues.list");
+                                }
                             }
 
-                            $rootScope.spinner = false;
-                        });
+                            $rootScope.$broadcast("getIssueList", {});
+                        }
+                        else {
+                            SweetAlert.error($filter("translate")("issue.failedIssueRegistration"), result.data.message.message); // �씠�뒋 �벑濡� �떎�뙣
+                        }
+
+                        $rootScope.spinner = false;
+                    });
                 }
 
                 //  �뙘�뾽 李� �떕湲�
@@ -648,22 +648,6 @@
 
                     return deferred.promise;
                 }
-
-                // �뾽泥�/ISP/�샇�뒪�똿 �씠由꾩씠 �룷�븿 �뿬遺� �솗�씤
-                function containsPartner(name) {
-                    var result = false;
-
-                    if ($scope.vm.partnerVos != null) {
-                        $scope.vm.partnerVos.forEach(function (partnerVo) {
-                            if (name === partnerVo.name) {
-                                result = true;
-                            }
-                        });
-                    }
-                    return result;
-
-                }
-
 
                 //  以묒슂�룄 紐⑸줉
                 function getSeverities() {
@@ -777,7 +761,6 @@
                     }
                 }
 
-
                 function getPartners() {
                     var content = {
                         issueTypeId : $scope.vm.form.issueTypeId
@@ -816,4 +799,4 @@
 
                 $scope.fn.startExecute();
             }]);
-    });
+    });
\ No newline at end of file

--
Gitblit v1.8.0