LP1952931 Handle barcode not found
authorBill Erickson <berickxx@gmail.com>
Thu, 3 Feb 2022 15:51:52 +0000 (10:51 -0500)
committerBill Erickson <berickxx@gmail.com>
Thu, 12 May 2022 14:31:48 +0000 (10:31 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/src/app/staff/acq/asn/receive.component.html
Open-ILS/src/eg2/src/app/staff/acq/asn/receive.component.ts

index 03b9053..c59d16b 100644 (file)
@@ -34,6 +34,14 @@ across different vendors to match a container code.
 </div>
 -->
 
+<div *ngIf="notFound" class="row m-2 mt-5">
+  <div class="col-lg-6 offset-lg-3">
+    <div class="alert alert-warning" i18n>
+      No container found with barcode {{barcode}}.
+    </div>
+  </div>
+</div>
+
 <div *ngIf="container" class="mt-3 mb-3 p-1 shadow-sm common-form striped-odd">
   <div class="row">
     <div class="col-lg-2">
index 4108a05..7ddfd44 100644 (file)
@@ -29,6 +29,7 @@ export class AsnReceiveComponent implements OnInit {
     receiving = false;
     dryRun = true;
     receiveOnScan = false;
+    notFound = false;
 
     // Technically possible for one container code to match across providers.
     container: IdlObject;
@@ -80,6 +81,7 @@ export class AsnReceiveComponent implements OnInit {
     }
 
     findContainer() {
+        this.notFound = false;
         this.receiving = false;
         this.container = null;
         this.containers = [];
@@ -100,6 +102,8 @@ export class AsnReceiveComponent implements OnInit {
                     if (this.receiveOnScan) {
                         this.receiveAllItems();
                     }
+                } else if (this.containers.length === 0) {
+                    this.notFound = true;
                 }
 
                 const node = document.getElementById('barcode-search-input');