FINERACT-1724: Server-side pagination support for clients screen

This commit is contained in:
Arnold Galovics
2023-05-24 10:37:38 +02:00
committed by Arnold Gálovics
parent 517584280f
commit aa438ed4b2
7 changed files with 107 additions and 56 deletions
+22
View File
@@ -381,4 +381,26 @@ export class ClientsService {
getCollateralTemplate(clientId: any) {
return this.http.get(`/clients/${clientId}/collaterals/template`);
}
searchByText(text: string, page: number, pageSize: number, sortAttribute: string = '', sortDirection: string = '') {
let request: any = {
request: {
text
},
page,
size: pageSize
}
if (sortAttribute !== '' && sortDirection !== '') {
request = {
...request,
sorts: [
{
direction: sortDirection,
property: sortAttribute
}
]
}
}
return this.http.post(`/v2/clients/search`, request);
}
}