From e16045a88c0aa3018bb31a08fd44dec8e81e5e6f Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 9 Sep 2020 14:23:55 -0400 Subject: [PATCH] LP#1879335: (follow-up) tweak sorting of bib list Make sorting the list by bib ID work, but also disable sorting by title and author since that's not supported without surgery on the grid data source. Signed-off-by: Galen Charlton --- Open-ILS/src/eg2/src/app/staff/cat/authority/manage.component.ts | 6 +++++- .../src/eg2/src/app/staff/share/bib-list/bib-list.component.html | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/cat/authority/manage.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/authority/manage.component.ts index d4bd0ebcc8..2f626ed1bc 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/authority/manage.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/authority/manage.component.ts @@ -52,9 +52,13 @@ export class ManageAuthorityComponent implements OnInit { } getLinkedBibIds(pager: Pager, sort: any): Promise { + const orderBy: any = {}; + if (sort.length && sort[0].name === 'id') { + orderBy.abl = 'bib ' + sort[0].dir; + } return this.pcrud.search('abl', {authority: this.authId}, - {limit: pager.limit, offset: pager.offset}, + {limit: pager.limit, offset: pager.offset, order_by: orderBy}, {atomic: true} ).pipe(map(links => links.map(l => l.bib())) ).toPromise(); diff --git a/Open-ILS/src/eg2/src/app/staff/share/bib-list/bib-list.component.html b/Open-ILS/src/eg2/src/app/staff/share/bib-list/bib-list.component.html index 6c0ffca6ae..2ff90f98ee 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/bib-list/bib-list.component.html +++ b/Open-ILS/src/eg2/src/app/staff/share/bib-list/bib-list.component.html @@ -5,11 +5,11 @@ - - + -- 2.11.0