diff --git a/src/app/admin/admin-notifications/admin-quality-assurance-source-page-component/admin-quality-assurance-source-data.resolver.ts b/src/app/admin/admin-notifications/admin-quality-assurance-source-page-component/admin-quality-assurance-source-data.resolver.ts index 261ef95b88d..a6bfd6e7fe4 100644 --- a/src/app/admin/admin-notifications/admin-quality-assurance-source-page-component/admin-quality-assurance-source-data.resolver.ts +++ b/src/app/admin/admin-notifications/admin-quality-assurance-source-page-component/admin-quality-assurance-source-data.resolver.ts @@ -11,8 +11,7 @@ import {environment} from '../../../../environments/environment'; */ @Injectable() export class SourceDataResolver implements Resolve> { - private paginationStart = environment.qualityAssuranceConfig.defaultPaginationStart; - private paginationItemsCount = environment.qualityAssuranceConfig.defaultPaginationItemsCount; + private pageSize = environment.qualityAssuranceConfig.pageSize; /** * Initialize the effect class variables. * @param {QualityAssuranceSourceService} qualityAssuranceSourceService @@ -28,7 +27,7 @@ export class SourceDataResolver implements Resolve */ resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable { - return this.qualityAssuranceSourceService.getSources(this.paginationItemsCount,this.paginationStart).pipe( + return this.qualityAssuranceSourceService.getSources(this.pageSize, 0).pipe( map((sources: PaginatedList) => { if (sources.page.length === 1) { this.router.navigate([this.getResolvedUrl(route) + '/' + sources.page[0].id]); diff --git a/src/config/default-app-config.ts b/src/config/default-app-config.ts index 094bd9080a3..e379b365e0e 100644 --- a/src/config/default-app-config.ts +++ b/src/config/default-app-config.ts @@ -436,7 +436,6 @@ export class DefaultAppConfig implements AppConfig { qualityAssuranceConfig: QualityAssuranceConfig = { openAireUrl: 'https://explore.openaire.eu/search/project?projectId=', - defaultPaginationItemsCount: 5, - defaultPaginationStart: 0 + pageSize: 5, }; } diff --git a/src/config/quality-assurance.config.ts b/src/config/quality-assurance.config.ts index 46e11fbdd51..14161b41133 100644 --- a/src/config/quality-assurance.config.ts +++ b/src/config/quality-assurance.config.ts @@ -13,9 +13,5 @@ export class QualityAssuranceConfig implements Config { /** * default count of QA sources to load */ - public defaultPaginationItemsCount: number; - /** - * default starting point of pagination - */ - public defaultPaginationStart: number; + public pageSize: number; } diff --git a/src/environments/environment.test.ts b/src/environments/environment.test.ts index dd1dbf58c13..89a8e2bc0fe 100644 --- a/src/environments/environment.test.ts +++ b/src/environments/environment.test.ts @@ -308,8 +308,7 @@ export const environment: BuildConfig = { }, qualityAssuranceConfig: { openAireUrl: 'https://explore.openaire.eu/search/project?projectId=', - defaultPaginationItemsCount: 5, - defaultPaginationStart: 0 + pageSize: 5, }, vocabularies: [