From bfc94c6032a8b570946ec4c535c550f2d38e00ec Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 31 Jul 2020 13:23:32 -0400 Subject: [PATCH] LP1889694 catalog record summary condensed WIP Signed-off-by: Bill Erickson --- Open-ILS/src/eg2/src/app/share/catalog/catalog.service.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/share/catalog/catalog.service.ts b/Open-ILS/src/eg2/src/app/share/catalog/catalog.service.ts index 4fe389e625..805a0bb589 100644 --- a/Open-ILS/src/eg2/src/app/share/catalog/catalog.service.ts +++ b/Open-ILS/src/eg2/src/app/share/catalog/catalog.service.ts @@ -142,6 +142,7 @@ export class CatalogService { }, fullQuery, true ).toPromise() .then(result => this.applyResultData(ctx, result)) + .then(_ => this.fetchFieldHighlights(ctx)) .then(_ => { ctx.searchState = CatalogSearchState.COMPLETE; this.onSearchComplete.emit(ctx); @@ -238,13 +239,9 @@ export class CatalogService { // them to bib IDs for highlighting. ids = ctx.currentResultIds(); if (ctx.termSearch.groupByMetarecord) { - // TODO: at this point in loading we don't yet - // have result records to comb through - /* - ids = ids.map(mrId => - ctx.result.records.filter(r => mrId === r.metabibId)[0].id - ); - */ + // The 4th slot in the result ID reports the master record + // for the metarecord in question. Sometimes it's null? + ids = ctx.result.ids.map(id => id[4]).filter(id => id !== null); } } -- 2.11.0