From 730f0f4f18238654221c17a289643c896cd7ffa9 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 Signed-off-by: Mary Llewellyn Signed-off-by: Galen Charlton --- .../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 09268bf761..af996c2383 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); } @@ -74,6 +79,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