From f2fcf329cea64d71c671f1ab17f17d1634d1464d Mon Sep 17 00:00:00 2001 From: 이민희 <mhlee@maprex.co.kr> Date: 월, 07 3월 2022 17:08:23 +0900 Subject: [PATCH] - API로 이슈 추가 시 하위이슈처리기준 항목으로 동일한 업체 정보로 이슈 생성하여 하위이슈로 넣기 - 업체 테이블에 ip_start, ip_end 컬럼 추가 --- src/main/webapp/scripts/app/companyField/companyFieldAdd.controller.js | 44 +++++++++++++++++++++++++++++++++++--------- 1 files changed, 35 insertions(+), 9 deletions(-) diff --git a/src/main/webapp/scripts/app/companyField/companyFieldAdd.controller.js b/src/main/webapp/scripts/app/companyField/companyFieldAdd.controller.js index 6b9b468..e2a2c5c 100644 --- a/src/main/webapp/scripts/app/companyField/companyFieldAdd.controller.js +++ b/src/main/webapp/scripts/app/companyField/companyFieldAdd.controller.js @@ -38,6 +38,8 @@ tel : "", //�쟾�솕踰덊샇 email : "", //�씠硫붿씪 url : "", // url + ipStart : "", //ip�떆�옉二쇱냼 + ipEnd : "", //ip醫낅즺二쇱냼 memo : "", //鍮꾧퀬 companyTypeId : "", companyType : "", //湲곗뾽援щ텇 @@ -112,7 +114,16 @@ } // �뾽醫�(��遺꾨쪟) autocomplete page �뾽�뜲�씠�듃 - function getParentSectorListCallBack(result) { + function getParentSectorListCallBack(result, value) { + if (value === "") { + $scope.vm.form.parentSectorId = ""; + if ($rootScope.isDefined($scope.vm.form.parentSectors) && $rootScope.isDefined($scope.vm.form.parentSectors[0])) { + $scope.vm.form.parentSectors[0].id = ""; + } + $scope.vm.form.childSectorId = ""; + $scope.vm.form.childSector = ""; + $scope.vm.form.childSectors = []; + } $scope.vm.autoCompletePage.parentSector.totalPage = result.data.page.totalPage; } @@ -140,42 +151,47 @@ } $scope.$on("ispFieldEvent", function (event, result) { - if ($rootScope.isDefined(result[0])) { + if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) { $scope.vm.form.ispId = result[0].id; } }); $scope.$on("hostingFieldEvent", function (event, result) { - if ($rootScope.isDefined(result[0])) { + if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) { $scope.vm.form.hostingId = result[0].id; } }); $scope.$on("companyTypeEvent", function (event, result) { - if ($rootScope.isDefined(result[0])) { + if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) { $scope.vm.form.companyTypeId = result[0].id; } }); $scope.$on("parentSectorEvent", function (event, result) { - if ($rootScope.isDefined(result[0])) { + if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) { $scope.vm.form.parentSectorId = result[0].id; + } else { + $scope.vm.form.parentSectorId = ""; + if ($rootScope.isDefined($scope.vm.form.parentSectors) && $rootScope.isDefined($scope.vm.form.parentSectors[0])) { + $scope.vm.form.parentSectors[0].id = ""; + } } $scope.vm.form.childSectorId = ""; $scope.vm.form.childSector = ""; $scope.vm.form.childSectors = []; }); $scope.$on("childSectorEvent", function (event, result) { - if ($rootScope.isDefined(result[0])) { + if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) { $scope.vm.form.childSectorId = result[0].id; } }); $scope.$on("regionEvent", function (event, result) { - if ($rootScope.isDefined(result[0])) { + if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) { $scope.vm.form.regionId = result[0].id; } }); $scope.$on("statusEvent", function (event, result) { - if ($rootScope.isDefined(result[0])) { + if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) { $scope.vm.form.statusId = result[0].id; } }); @@ -235,7 +251,17 @@ } return emailList; })(), - url : $scope.vm.form.url, // url + url : (function () { + // 紐⑤뱺 怨듬갚 �젣嫄� + var regex = / /gi; + let url = $scope.vm.form.url; + if ($rootScope.isDefined(url) && url.indexOf(" ") !== -1) { + url = url.replace(regex, ""); + } + return url; + })(), + ipStart : $scope.vm.form.ipStart, // ip�떆�옉二쇱냼 + ipEnd : $scope.vm.form.ipEnd, // ip醫낅즺二쇱냼 memo : $scope.vm.form.memo, //鍮꾧퀬 companyTypeId : (function () { var companyTypeId = null; -- Gitblit v1.8.0