| | |
| | | $scope.fn.getPartnerList = getPartnerList; // 업체/isp/호스팅 목록 조회 |
| | | $scope.fn.getIssueTypeList = getIssueTypeList; // 이슈 유형 목록 조회 |
| | | $scope.fn.getCustomFieldList = getCustomFieldList; // 사용자 정의 필드 목록 조회 |
| | | $scope.fn.getMailTargetAll = getMailTargetAll; // 사용자 정의 필드 목록 조회 |
| | | |
| | | function getUserList(query, excludeList, page, callBack) { |
| | | var conditions = { |
| | |
| | | |
| | | return deferred.promise; |
| | | } |
| | | |
| | | function getMailTargetAll(query, excludeList, page, callBack) { |
| | | var conditions = { |
| | | id : query, |
| | | excludeIds : (function () { |
| | | var excludeIds = []; |
| | | |
| | | angular.forEach(excludeList, function (exclude) { |
| | | excludeIds.push(exclude.id); |
| | | }); |
| | | |
| | | return excludeIds; |
| | | })(), |
| | | partnersEmailIds : (function () { |
| | | var partnersEmailIds = []; |
| | | |
| | | angular.forEach($scope.vm.form.partners, function (partner) { |
| | | partnersEmailIds.push(partner.email); |
| | | }); |
| | | |
| | | return partnersEmailIds; |
| | | })(), |
| | | }; |
| | | var deferred = $q.defer(); |
| | | |
| | | Issue.findMailTargetAll($resourceProvider.getContent( // 페이징 업데이트가 필요한 컴포넌트 일경우, page 업데이트가 있을 경우 기본 10개씩 가져오고 아닐경우 25개씩 가져온다. |
| | | conditions, $resourceProvider.getPageContent($rootScope.isDefined(page) ? page : 0, $rootScope.isDefined(page) ? 10 : 25))).then(function (result) { |
| | | if (result.data.message.status === "success") { |
| | | |
| | | if ($rootScope.isDefined(callBack)) { |
| | | callBack(result); |
| | | } |
| | | |
| | | deferred.resolve(result.data.data); |
| | | } |
| | | else { |
| | | SweetAlert.swal($filter("translate")("issue.failedToIssueTypeListLookup"), result.data.message.message, "error"); // "이슈 유형 목록 조회 실패" |
| | | } |
| | | }); |
| | | |
| | | return deferred.promise; |
| | | } |
| | | } |
| | | ]); |
| | | } |