From 8c657ef511d79f60f839c66a520a00a60993ba41 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 1 Jun 2020 15:20:13 -0400 Subject: [PATCH] LP1881650 Staff catalog TCN includes delete records For consistency with the menu action Cataloging => Retrieve Record by TCN Value, the staff catalog Numeric Search => TCN search now includes deleted bib records. Signed-off-by: Bill Erickson --- .../src/eg2/src/app/share/catalog/catalog.service.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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 c80d0b2683..edeaff032b 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 @@ -50,6 +50,11 @@ export class CatalogService { } else if (ctx.identSearch.isSearchable() && ctx.identSearch.queryType === 'item_barcode') { return this.barcodeSearch(ctx); + } else if ( + ctx.isStaff && + ctx.identSearch.isSearchable() && + ctx.identSearch.queryType === 'identifier|tcn') { + return this.tcnStaffSearch(ctx); } else { return this.termSearch(ctx); } @@ -72,6 +77,20 @@ export class CatalogService { }); } + tcnStaffSearch(ctx: CatalogSearchContext): Promise { + return this.net.request( + 'open-ils.search', + 'open-ils.search.biblio.tcn', + ctx.identSearch.value, 1 + ).toPromise().then(result => { + result.ids = result.ids.map(id => [id]); + this.applyResultData(ctx, result); + ctx.searchState = CatalogSearchState.COMPLETE; + this.onSearchComplete.emit(ctx); + }); + } + + // "Search" the basket by loading the IDs and treating // them like a standard query search results set. basketSearch(ctx: CatalogSearchContext): Promise { -- 2.11.0