| | |
| | | } |
| | | |
| | | // 업종(대분류) 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; |
| | | } |
| | | |
| | |
| | | |
| | | if (result.data.message.status === "success") { |
| | | $scope.vm.issueTypes = result.data.data; |
| | | |
| | | // option 빈값 방지 |
| | | if ($rootScope.isDefined($scope.vm.issueTypes) && $scope.vm.issueTypes.length > 0) { |
| | | let chk = 0; |
| | | angular.forEach($scope.vm.issueTypes, function (issueType) { |
| | | if (issueType.id.toString() === $scope.vm.form.issueTypeId.toString()) { |
| | | chk ++; |
| | | } |
| | | }); |
| | | if (chk === 0) { |
| | | $scope.vm.form.issueTypeId = null; |
| | | } |
| | | } |
| | | } |
| | | else { |
| | | SweetAlert.swal($filter("translate")("issue.failedToIssueTypeListLookup"), result.data.message.message, "error"); // 이슈 타입 목록 조회 실패 |