mirror of
https://github.com/openMF/community-app.git
synced 2026-02-06 14:11:54 +00:00
[MIFOSX-2712] Added sqlSearch filter by status for get clients and loans API
This commit is contained in:
parent
62477eef62
commit
4f11935fb5
@ -289,7 +289,7 @@
|
||||
idToNodeMap[data[i].id] = data[i];
|
||||
}
|
||||
scope.loanResource = function () {
|
||||
resourceFactory.loanResource.getAllLoans(function (loanData) {
|
||||
resourceFactory.loanResource.getAllLoans({limit: '1000', sqlSearch: 'l.loan_status_id in (100,200)'}, function (loanData) {
|
||||
scope.loans = loanData.pageItems;
|
||||
for (var i in scope.loans) {
|
||||
if (scope.loans[i].status.pendingApproval) {
|
||||
@ -319,7 +319,7 @@
|
||||
});
|
||||
|
||||
|
||||
resourceFactory.clientResource.getAllClients(function (data) {
|
||||
resourceFactory.clientResource.getAllClients({sqlSearch: 'c.status_enum=100'}, function (data) {
|
||||
scope.groupedClients = _.groupBy(data.pageItems, "officeName");
|
||||
});
|
||||
|
||||
|
||||
@ -41,8 +41,8 @@
|
||||
getAllOfficesInAlphabeticalOrder: {method: 'GET', params: {orderBy: 'name', sortOrder: 'ASC'}, isArray: true},
|
||||
update: { method: 'PUT'}
|
||||
}),
|
||||
clientResource: defineResource(apiVer + "/clients/:clientId/:anotherresource", {clientId: '@clientId', anotherresource: '@anotherresource'}, {
|
||||
getAllClients: {method: 'GET', params: {limit: 1000}},
|
||||
clientResource: defineResource(apiVer + "/clients/:clientId/:anotherresource", {clientId: '@clientId', anotherresource: '@anotherresource', sqlSearch: '@sqlSearch'}, {
|
||||
getAllClients: {method: 'GET', params: {limit: 1000, sqlSearch: '@sqlSearch'}},
|
||||
getAllClientsWithoutLimit: {method: 'GET', params: {}},
|
||||
getClientClosureReasons: {method: 'GET', params: {}},
|
||||
getAllClientDocuments: {method: 'GET', params: {}, isArray: true},
|
||||
@ -166,8 +166,8 @@
|
||||
batchResource: defineResource(apiVer + "/batches", {}, {
|
||||
post: {method: 'POST', params: {}, isArray: true}
|
||||
}),
|
||||
loanResource: defineResource(apiVer + "/loans/:loanId/:resourceType/:resourceId", {resourceType: '@resourceType', loanId: '@loanId', resourceId: '@resourceId'}, {
|
||||
getAllLoans: {method: 'GET', params: {}},
|
||||
loanResource: defineResource(apiVer + "/loans/:loanId/:resourceType/:resourceId", {resourceType: '@resourceType', loanId: '@loanId', resourceId: '@resourceId', limit: '@limit', sqlSearch: '@sqlSearch'}, {
|
||||
getAllLoans: {method: 'GET', params: {limit:'@limit', sqlSearch: '@sqlSearch'}},
|
||||
getAllNotes: {method: 'GET', params: {}, isArray: true},
|
||||
put: {method: 'PUT', params: {}}
|
||||
}),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user