1var boss_product_module = angular.module('bossApp'); 2 3boss_product_module.factory('SearchService', ['$http','CacheFactory','$rootScope','$q',function($http,CacheFactory,$rootScope,$q) { 4 var _user = angular.copy($rootScope.currentUser); 5 return { 6 searchTransactions: function(_accountNumber, _description, _type, _dateFrom, _dateTo, _amountFrom, _amountTo, _amount,accountId) { 7 req = { 8 method: 'GET', 9 url: $rootScope.api_Path+'search/searchTransaction', 10 params: { 11 accountNumber : _accountNumber, 12 description : _description, 13 type : _type, 14 dateFrom : _dateFrom, 15 dateTo : _dateTo, 16 amountFrom : _amountFrom, 17 amountTo : _amountTo, 18 amount : _amount, 19 accountId:accountId 20 } 21 } 22 return $http(req).then(function(response) { 23 return response.data; 24 }); 25 }, 26 searchUsers : function(_search) { 27 var deferred = $q.defer(); 28 req = { 29 method: 'GET', 30 url: $rootScope.api_Path + 'search/searchUser', 31 params: { 32 entityId : _user.entityId, 33 userId : _search.userid, 34 fullName : _search.name, 35 emailAddress : _search.email, 36 phoneNumber : _search.phonenumber 37 } 38 } 39 $http(req).then(function(response) { 40 deferred.resolve(response.data); 41 }); 42 43 return deferred.promise; 44 45 }, 46 searchPayments : function(_search) { 47 var deferred = $q.defer(); 48 req = { 49 method: 'GET', 50 url: $rootScope.api_Path + 'search/searchPayments', 51 params: { 52 entityId : _user.entityId, 53 transactionNo : _search.transactionNo, 54 keyword : _search.keyword, 55 fromAccountId : (_search.fromAccount)?_search.fromAccount.id:null, 56 toAccountId : (_search.toAccount)?_search.toAccount:null, 57 dateFrom : _search.dateFrom, 58 dateTo : _search.dateTo, 59 amount : _search.amount, 60 amountFrom : _search.amountFrom, 61 amountTo : _search.amountTo, 62 source : _search.source, 63 page : _search.page, 64 records : _search.records 65 } 66 } 67 $http(req).then(function(response) { 68 deferred.resolve(response.data); 69 }); 70 71 return deferred.promise; 72 }, 73 searchRecurringPayments : function(_search) { 74 var deferred = $q.defer(); 75 req = { 76 method: 'GET', 77 url: $rootScope.api_Path + 'search/searchRecurring', 78 params: { 79 entityId: _user.entityId, 80 frequency : _search.frequency, 81 firstDateFrom : _search.firstDateFrom, 82 nextDateTo : _search.nextDateTo, 83 status :_search.status 84 } 85 } 86 $http(req).then(function(response) { 87 deferred.resolve(response.data); 88 }); 89 90 return deferred.promise; 91 }, 92 searchPayee : function(_search) { 93 var deferred = $q.defer(); 94 req = { 95 method: 'GET', 96 url: $rootScope.api_Path + 'search/searchPayee', 97 params: { 98 entityId : _user.entityId, 99 aliasName : _search.aliasName, 100 legalName : _search.legalName, 101 accountNumber : _search.accountNumber, 102 institutionName : _search.institutionName, 103 accountCcy : _search.accountCcy 104 } 105 } 106 $http(req).then(function(response) { 107 deferred.resolve(response.data); 108 }); 109 110 return deferred.promise; 111 }, 112 filterPayments : function(_source) { 113 var deferred = $q.defer(); 114 req = { 115 method: 'GET', 116 url: $rootScope.api_Path + 'payment/filter-payments', 117 params: { 118 entityId : _user.entityId, 119 source : _source 120 } 121 } 122 $http(req).then(function(response) { 123 deferred.resolve(response.data); 124 }); 125 126 return deferred.promise; 127 }, 128 }; 129 }]); 130
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.