From 092cba95b42d200799c2d88140fb0f9026176f6d Mon Sep 17 00:00:00 2001
From: 이민희 <mhlee@maprex.co.kr>
Date: 수, 26 1월 2022 16:58:16 +0900
Subject: [PATCH] - 이슈 수정 시 대분류만 선택하고 수정 시 오류 해결 - 전체댓글+메일보기/하위이슈 댓글+메일보기 - 이슈 엑셀 임포트시 오류 해결

---
 src/main/webapp/scripts/app/companyField/companyFieldAdd.controller.js |   24 ++++++++++++++++++------
 1 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/src/main/webapp/scripts/app/companyField/companyFieldAdd.controller.js b/src/main/webapp/scripts/app/companyField/companyFieldAdd.controller.js
index aaae690..238c910 100644
--- a/src/main/webapp/scripts/app/companyField/companyFieldAdd.controller.js
+++ b/src/main/webapp/scripts/app/companyField/companyFieldAdd.controller.js
@@ -140,15 +140,21 @@
                 }
 
                 $scope.$on("ispFieldEvent", function (event, result) {
-                    $scope.vm.form.ispId = result[0].id;
+                    if ($rootScope.isDefined(result[0])) {
+                        $scope.vm.form.ispId = result[0].id;
+                    }
                 });
 
                 $scope.$on("hostingFieldEvent", function (event, result) {
-                    $scope.vm.form.hostingId = result[0].id;
+                    if ($rootScope.isDefined(result[0])) {
+                        $scope.vm.form.hostingId = result[0].id;
+                    }
                 });
 
                 $scope.$on("companyTypeEvent", function (event, result) {
-                    $scope.vm.form.companyTypeId = result[0].id;
+                    if ($rootScope.isDefined(result[0])) {
+                        $scope.vm.form.companyTypeId = result[0].id;
+                    }
                 });
                 $scope.$on("parentSectorEvent", function (event, result) {
                     if ($rootScope.isDefined(result[0])) {
@@ -159,13 +165,19 @@
                     $scope.vm.form.childSectors = [];
                 });
                 $scope.$on("childSectorEvent", function (event, result) {
-                    $scope.vm.form.childSectorId = result[0].id;
+                    if ($rootScope.isDefined(result[0])) {
+                        $scope.vm.form.childSectorId = result[0].id;
+                    }
                 });
                 $scope.$on("regionEvent", function (event, result) {
-                    $scope.vm.form.regionId = result[0].id;
+                    if ($rootScope.isDefined(result[0])) {
+                        $scope.vm.form.regionId = result[0].id;
+                    }
                 });
                 $scope.$on("statusEvent", function (event, result) {
-                    $scope.vm.form.statusId = result[0].id;
+                    if ($rootScope.isDefined(result[0])) {
+                        $scope.vm.form.statusId = result[0].id;
+                    }
                 });
 
                 //  �뤌 �쟾�넚

--
Gitblit v1.8.0