<span class="input-group-text" id='barcode-label' i18n>Barcode</span>
</div>
<input type="text" class="form-control" id="item-barcode-input"
- (keydown)="noSuchItem=false; true;"
(keyup.enter)="getItemFromBarcodeInput()" [(ngModel)]="itemBarcode"
aria-describedby="barcode-label"/>
</div>
</div>
</div>
+<div class="row" *ngIf="noSuchItem">
+ <div class="col-lg-6 offset-lg-3 alert alert-danger" i18n>
+ Item not found: <b>{{noSuchItem}}</b>
+ </div>
+</div>
+
+
<ng-template #callNumberTemplate let-r="row">
{{r.call_number().prefix().label()}}
{{r.call_number().label()}}
currentItemId: number;
itemBarcode: string;
- noSuchItem = false;
+ noSuchItem: string = null;
item: IdlObject;
tab: string;
preloadCopyIds: number[];
if (bc) { barcodes.push(bc); }
});
- return this.getItemsFromBarcodes(barcodes);
+ return this.getItemsFromBarcodes(barcodes)
+ .then(_ => this.selectInput());
}
getItemsFromBarcodes(barcodes: string[]): Promise<any> {
let index = 0;
+ this.noSuchItem = null;
return from(barcodes).pipe(concatMap(bc => {
if (!res) {
// Dialog was canceled, nothing to do
} else if (!res.id) {
- this.noSuchItem = true;
+ this.noSuchItem = barcode;
} else {
this.itemBarcode = null;
if (this.tab === 'list') {