From 29477fbb03a20d191dca5b7b2115ba3fc238b5df Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 22 Oct 2019 11:31:14 -0400 Subject: [PATCH] LP1849523 Ang cat holds batch retrieval Angular catalog leverages the new batch versions of the bib / metabib hold counts API to reduce the number of API calls needed per results page. Signed-off-by: Bill Erickson --- Open-ILS/src/eg2/src/app/share/catalog/bib-record.service.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Open-ILS/src/eg2/src/app/share/catalog/bib-record.service.ts b/Open-ILS/src/eg2/src/app/share/catalog/bib-record.service.ts index a4dd0b0f2e..b7f7364eed 100644 --- a/Open-ILS/src/eg2/src/app/share/catalog/bib-record.service.ts +++ b/Open-ILS/src/eg2/src/app/share/catalog/bib-record.service.ts @@ -175,6 +175,17 @@ export class BibRecordService { return summary; })); } + + // Batch hold counts lookup. + getHoldCounts(targetIds: number[], isMetarecord?: boolean): + Observable<{[id: string]: number}> { + + const method = isMetarecord ? + 'open-ils.circ.mmr.holds.count.batch' : + 'open-ils.circ.bre.holds.count.batch'; + + return this.net.request('open-ils.circ', method, targetIds); + } } -- 2.11.0