aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/rest/rest.service.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/rest/rest.service.ts')
-rw-r--r--client/src/app/shared/rest/rest.service.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/client/src/app/shared/rest/rest.service.ts b/client/src/app/shared/rest/rest.service.ts
index a1c301050..5d5410de9 100644
--- a/client/src/app/shared/rest/rest.service.ts
+++ b/client/src/app/shared/rest/rest.service.ts
@@ -1,6 +1,7 @@
1import { Injectable } from '@angular/core' 1import { Injectable } from '@angular/core'
2import { HttpParams } from '@angular/common/http' 2import { HttpParams } from '@angular/common/http'
3import { SortMeta } from 'primeng/components/common/sortmeta' 3import { SortMeta } from 'primeng/components/common/sortmeta'
4import { ComponentPagination } from './component-pagination.model'
4 5
5import { RestPagination } from './rest-pagination' 6import { RestPagination } from './rest-pagination'
6 7
@@ -31,4 +32,10 @@ export class RestService {
31 return newParams 32 return newParams
32 } 33 }
33 34
35 componentPaginationToRestPagination (componentPagination: ComponentPagination): RestPagination {
36 const start: number = (componentPagination.currentPage - 1) * componentPagination.itemsPerPage
37 const count: number = componentPagination.itemsPerPage
38
39 return { start, count }
40 }
34} 41}