From: Galen Charlton Date: Wed, 9 Sep 2020 18:23:55 +0000 (-0400) Subject: LP#1879335: (follow-up) tweak sorting of bib list X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=991cbac848ca9c716c3b475fae513c3a2b07df86;p=evergreen%2Fmasslnc.git 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 Signed-off-by: Bill Erickson Signed-off-by: Galen Charlton --- 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 @@ - - +