| | |
| | | getIssueTypes : getIssueTypes, // 이슈 타입 목록 가져오기 |
| | | makeSearchConditions : makeSearchConditions, // 선택한 조건을 json 으로 만든다. |
| | | onFileSelect : onFileSelect, // 파일 업로드 |
| | | getIssueListCallBack : getIssueListCallBack // 이슈 autocomplete page 업데이트 |
| | | getIssueListCallBack : getIssueListCallBack, // 이슈 autocomplete page 업데이트 |
| | | startExecute : startExecute, // 컨트롤 로딩시 처음으로 시작되는 함수 |
| | | }; |
| | | |
| | | $scope.vm = { |
| | |
| | | |
| | | if (result.data.message.status === "success") { |
| | | $scope.vm.issueTypes = result.data.data; |
| | | |
| | | // 현재 이슈타입 유형 설정 |
| | | let currentIssueTypeId = $rootScope.getCurrentIssueTypeId(); |
| | | if (currentIssueTypeId != null) { |
| | | $scope.vm.form.issueTypeId = currentIssueTypeId.toString(); |
| | | } |
| | | |
| | | // 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.error($filter("translate")("issue.failedToIssueTypeListLookup"), result.data.message.message); // "이슈 타입 목록 조회 실패" |
| | |
| | | $uibModalInstance.dismiss('cancel'); |
| | | } |
| | | |
| | | // 이슈 유형 조회 |
| | | $scope.fn.getIssueTypes(); |
| | | // 최초 실행 |
| | | function startExecute() { |
| | | // 현재 프로젝트 설정 |
| | | if ($rootScope.workProject != null && $rootScope.workProject.id > -1) { |
| | | $scope.vm.projectName = $rootScope.workProject.name; |
| | | $scope.vm.form.projects = []; |
| | | $scope.vm.form.projects.push($rootScope.workProject); |
| | | } |
| | | $scope.fn.getIssueTypes(); |
| | | } |
| | | |
| | | $scope.fn.startExecute(); |
| | | }]); |
| | | }); |