diff options
author | ShaabanEltanany <shaaban.eltanany.ext@orange.com> | 2020-05-05 11:01:44 +0200 |
---|---|---|
committer | ShaabanEltanany <shaaban.eltanany.ext@orange.com> | 2020-05-05 11:01:44 +0200 |
commit | f486ab15c64375a2c97df979a718929420124cd6 (patch) | |
tree | b5fcfbbe4c48e438e2c50129ca60dd0fc1ecfb91 /cds-ui/designer-client/src/app/modules | |
parent | 6b6ac70007ba2b52c6beb8c0d22453a628c891f3 (diff) |
fix sort at package list
Issue-ID: CCSDK-2320
Signed-off-by: ShaabanEltanany <shaaban.eltanany.ext@orange.com>
Change-Id: Ia91d519c315b6ef0c01089422253599b137eceec
Diffstat (limited to 'cds-ui/designer-client/src/app/modules')
-rw-r--r-- | cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-api.service.ts | 9 |
1 files changed, 6 insertions, 3 deletions
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<BluePrintPage[]> { + 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 }); } } |