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

---
 src/main/webapp/scripts/app/issue/issueModify.controller.js |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/main/webapp/scripts/app/issue/issueModify.controller.js b/src/main/webapp/scripts/app/issue/issueModify.controller.js
index d5395d2..49428eb 100644
--- a/src/main/webapp/scripts/app/issue/issueModify.controller.js
+++ b/src/main/webapp/scripts/app/issue/issueModify.controller.js
@@ -442,7 +442,7 @@
                     if ($rootScope.isDefined(result[0])) {
                         $scope.vm.form.parentSectorId = result[0].id;
                     }
-
+                    $scope.vm.form.childSectorId = "";
                     $scope.vm.form.childSector = "";
                     $scope.vm.form.childSectors = [];
                 });
@@ -561,7 +561,7 @@
 
                         companyTypeId : (function () {
                             var companyTypeId = -1;
-                            if ($scope.vm.form.companyTypes != null) {
+                            if ($scope.vm.form.companyTypes != null && $scope.vm.form.companyTypes.length > 0) {
                                 companyTypeId = $scope.vm.form.companyTypes[0].id;
                             } else {
                                 companyTypeId = $scope.vm.form.companyTypeId;
@@ -570,7 +570,7 @@
                         })(),
                         parentSectorId : (function () {
                             var parentSectorId = -1;
-                            if ($scope.vm.form.parentSectors != null) {
+                            if ($scope.vm.form.parentSectors != null && $scope.vm.form.parentSectors.length > 0) {
                                 parentSectorId = $scope.vm.form.parentSectors[0].id;
                             } else {
                                 parentSectorId = $scope.vm.form.parentSectorId;
@@ -579,7 +579,7 @@
                         })(),
                         childSectorId : (function () {
                             var childSectorId = -1;
-                            if ($scope.vm.form.childSectors != null) {
+                            if ($scope.vm.form.childSectors != null && $scope.vm.form.childSectors.length > 0) {
                                 childSectorId = $scope.vm.form.childSectors[0].id;
                             } else {
                                 childSectorId = $scope.vm.form.childSectorId;
@@ -588,7 +588,7 @@
                         })(),
                         regionId : (function () {
                             var regionId = -1;
-                            if ($scope.vm.form.regions != null) {
+                            if ($scope.vm.form.regions != null && $scope.vm.form.regions.length > 0) {
                                 regionId = $scope.vm.form.regions[0].id;
                             } else {
                                 regionId = $scope.vm.form.regionId;
@@ -597,7 +597,7 @@
                         })(),
                         statusId : (function () {
                             var statusId = -1;
-                            if ($scope.vm.form.statuses != null) {
+                            if ($scope.vm.form.statuses != null && $scope.vm.form.statuses.length > 0) {
                                 statusId = $scope.vm.form.statuses[0].id;
                             } else {
                                 statusId = $scope.vm.form.statusId;

--
Gitblit v1.8.0