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 <berickxx@gmail.com>
Signed-off-by: Mary Llewellyn <mllewell@biblio.org>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
} else if (ctx.identSearch.isSearchable() &&
ctx.identSearch.queryType === 'item_barcode') {
return this.barcodeSearch(ctx);
} 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);
}
} else {
return this.termSearch(ctx);
}
+ tcnStaffSearch(ctx: CatalogSearchContext): Promise<void> {
+ 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<void> {
// "Search" the basket by loading the IDs and treating
// them like a standard query search results set.
basketSearch(ctx: CatalogSearchContext): Promise<void> {