From f486ab15c64375a2c97df979a718929420124cd6 Mon Sep 17 00:00:00 2001 From: ShaabanEltanany Date: Tue, 5 May 2020 11:01:44 +0200 Subject: fix sort at package list Issue-ID: CCSDK-2320 Signed-off-by: ShaabanEltanany Change-Id: Ia91d519c315b6ef0c01089422253599b137eceec --- .../app/modules/feature-modules/packages/packages-api.service.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'cds-ui/designer-client/src/app/modules/feature-modules') diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-api.service.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-api.service.ts index 2332d8e53..8275f8c6c 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-api.service.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-api.service.ts @@ -37,10 +37,12 @@ export class PackagesApiService { } getPagedPackages(pageNumber: number, pageSize: number, sortBy: string): Observable { + const sortType = sortBy.includes('DATE') ? 'DESC' : 'ASC'; return this.api.get(BlueprintURLs.getPagedBlueprints, { offset: pageNumber, limit: pageSize, - sort: sortBy + sort: sortBy, + sortType }); } @@ -56,11 +58,12 @@ export class PackagesApiService { } getPagedPackagesByKeyWord(keyWord: string, pageNumber: number, pageSize: number, sortBy: string) { - + const sortType = sortBy.includes('DATE') ? 'DESC' : 'ASC'; return this.api.get(BlueprintURLs.getMetaDatePageable + '/' + keyWord, { offset: pageNumber, limit: pageSize, - sort: sortBy + sort: sortBy, + sortType }); } } -- cgit 1.2.3-korg