From a90f191fed9d75235947711d452e2fc174e26a92 Mon Sep 17 00:00:00 2001
From: 이민희 <mhlee@maprex.co.kr>
Date: 금, 18 2월 2022 13:05:35 +0900
Subject: [PATCH] 이슈 엑셀 임포트 시 코드 수정

---
 src/main/webapp/scripts/app/issue/issueImportExcel.controller.js |  111 +++++++++++++++++++++++++++----------------------------
 1 files changed, 55 insertions(+), 56 deletions(-)

diff --git a/src/main/webapp/scripts/app/issue/issueImportExcel.controller.js b/src/main/webapp/scripts/app/issue/issueImportExcel.controller.js
index c8b8c52..7d15419 100644
--- a/src/main/webapp/scripts/app/issue/issueImportExcel.controller.js
+++ b/src/main/webapp/scripts/app/issue/issueImportExcel.controller.js
@@ -124,63 +124,26 @@
 
                     let inheritYn = false;
                     //  �븯�쐞�씠�뒋 �벑濡� & �뙆�듃�꼫 �젙蹂� �긽�냽 �씪 寃쎌슦 �븣由� 李�
-                    if ($rootScope.isDefined($scope.vm.form.issues) && $rootScope.isDefined($scope.vm.form.issues[0])) {
-                        if ($scope.vm.form.issues[0].inheritPartners != null && $scope.vm.form.issues[0].inheritPartners === true) {
+                    if ($rootScope.isDefined($scope.vm.form.issues) && $rootScope.isDefined($scope.vm.form.issues[0])
+                            && $scope.vm.form.issues[0].inheritPartners != null && $scope.vm.form.issues[0].inheritPartners === true) {
 
-                            SweetAlert.swal({
-                                title : $filter("translate")("issue.addDownIssue"), // �븯�쐞 �씠�뒋 異붽�
-                                text : $filter("translate")("issue.wantToInheritPartnersOfParentIssue"), // �긽�쐞�씠�뒋�쓽 �뙆�듃�꼫 �젙蹂�(�뾽泥�/ISP/�샇�뒪�똿)瑜� �쟻�슜�떆�궎寃좎뒿�땲源�?
-                                type : "warning",
-                                showCancelButton : true,
-                                confirmButtonColor : "#DD6B55",
-                                confirmButtonText : $filter("translate")("common.ok"), // �꽕
-                                cancelButtonText : $filter("translate")("common.no"), // �븘�땲�삤
-                                closeOnConfirm : false,
-                                closeOnCancel : false
-                            },
-                            function (isConfirm) {
-                                if (isConfirm) {
-                                    inheritYn = true;
-                                }
-                                SweetAlert.close();
+                        SweetAlert.swal({
+                            title : $filter("translate")("issue.addDownIssue"), // �븯�쐞 �씠�뒋 異붽�
+                            text : $filter("translate")("issue.wantToInheritPartnersOfParentIssue"), // �긽�쐞�씠�뒋�쓽 �뙆�듃�꼫 �젙蹂�(�뾽泥�/ISP/�샇�뒪�똿)瑜� �쟻�슜�떆�궎寃좎뒿�땲源�?
+                            type : "warning",
+                            showCancelButton : true,
+                            confirmButtonColor : "#DD6B55",
+                            confirmButtonText : $filter("translate")("common.ok"), // �꽕
+                            cancelButtonText : $filter("translate")("common.no"), // �븘�땲�삤
+                            closeOnConfirm : false,
+                            closeOnCancel : false
+                        },
+                        function (isConfirm) {
+                            if (isConfirm) {
+                                inheritYn = true;
+                            }
+                            SweetAlert.close();
 
-                                Issue.importExcel({
-                                    method : "POST",
-                                    file : $scope.vm.form.file,
-                                    //      data �냽�꽦�쑝濡� 蹂꾨룄�쓽 �뜲�씠�꽣 �쟾�넚
-                                    fields : {
-                                        content : {
-                                            projectId : $scope.vm.form.projects[0].id,
-                                            issueTypeId : $scope.vm.form.issueTypeId,
-                                            parentIssueId : (function () {
-                                                let id = -1;
-                                                if ($rootScope.isDefined($scope.vm.form.issues)) {
-                                                    if ($rootScope.isDefined($scope.vm.form.issues[0])) {
-                                                        id = $scope.vm.form.issues[0].id;
-                                                    }
-                                                }
-                                                return id;
-                                            })(),
-                                            inheritYn : inheritYn
-                                        }
-                                    },
-                                    fileFormDataName : "file",
-                                }).then(function (result) {
-                                    if (result.data.message.status === "success") {
-                                        $timeout(function () {
-                                            SweetAlert.success($filter("translate")("issue.succeededIssueRegistration"), result.data.message.message); // �씠�뒋 �벑濡� �꽦怨�
-                                            $scope.fn.cancel();
-                                            $rootScope.$broadcast("getIssueList");
-                                            $rootScope.spinner = false;
-                                        }, 1000);
-                                    }
-                                    else {
-                                        SweetAlert.error($filter("translate")("issue.failedIssueRegistration"), result.data.message.message); // �씠�뒋 �벑濡� �떎�뙣
-                                        $rootScope.spinner = false;
-                                    }
-                                });
-                            });
-                        } else {
                             Issue.importExcel({
                                 method : "POST",
                                 file : $scope.vm.form.file,
@@ -216,7 +179,43 @@
                                     $rootScope.spinner = false;
                                 }
                             });
-                        }
+                        });
+                    } else {
+                        Issue.importExcel({
+                            method : "POST",
+                            file : $scope.vm.form.file,
+                            //      data �냽�꽦�쑝濡� 蹂꾨룄�쓽 �뜲�씠�꽣 �쟾�넚
+                            fields : {
+                                content : {
+                                    projectId : $scope.vm.form.projects[0].id,
+                                    issueTypeId : $scope.vm.form.issueTypeId,
+                                    parentIssueId : (function () {
+                                        let id = -1;
+                                        if ($rootScope.isDefined($scope.vm.form.issues)) {
+                                            if ($rootScope.isDefined($scope.vm.form.issues[0])) {
+                                                id = $scope.vm.form.issues[0].id;
+                                            }
+                                        }
+                                        return id;
+                                    })(),
+                                    inheritYn : inheritYn
+                                }
+                            },
+                            fileFormDataName : "file",
+                        }).then(function (result) {
+                            if (result.data.message.status === "success") {
+                                $timeout(function () {
+                                    SweetAlert.success($filter("translate")("issue.succeededIssueRegistration"), result.data.message.message); // �씠�뒋 �벑濡� �꽦怨�
+                                    $scope.fn.cancel();
+                                    $rootScope.$broadcast("getIssueList");
+                                    $rootScope.spinner = false;
+                                }, 1000);
+                            }
+                            else {
+                                SweetAlert.error($filter("translate")("issue.failedIssueRegistration"), result.data.message.message); // �씠�뒋 �벑濡� �떎�뙣
+                                $rootScope.spinner = false;
+                            }
+                        });
                     }
 
                 }

--
Gitblit v1.8.0