LP1952931 More data loading indictor support
authorBill Erickson <berickxx@gmail.com>
Wed, 30 Mar 2022 14:08:38 +0000 (10:08 -0400)
committerJane Sandberg <sandbergja@gmail.com>
Thu, 20 Oct 2022 13:56:20 +0000 (06:56 -0700)
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 ccff5c5..92f5362 100644 (file)
@@ -170,7 +170,7 @@ across different vendors to match a container code.
   </div>
 </div>
 
-<div *ngIf="findingContainer" class="row">
+<div *ngIf="loadingContainer" class="row">
   <div class="col-lg-6 offset-lg-3">
     <eg-progress-inline></eg-progress-inline>
   </div>
index ad4f2e3..0ebd84f 100644 (file)
@@ -97,6 +97,8 @@ export class AsnReceiveComponent implements OnInit {
         this.entries = [];
         this.liCache = {};
 
+        this.gridDataSource.reset();
+
         this.pcrud.search('acqsn',
             {container_code: this.barcode},
             {flesh: 1, flesh_fields: {acqsn: ['entries', 'provider']}}
@@ -116,6 +118,7 @@ export class AsnReceiveComponent implements OnInit {
                     });
                 } else if (this.containers.length === 0) {
                     this.notFound = true;
+                    this.loadingContainer = false;
                 }
 
                 const node = document.getElementById('barcode-search-input');
@@ -125,11 +128,17 @@ export class AsnReceiveComponent implements OnInit {
     }
 
     loadContainer(): Promise<any> {
-        if (!this.container) { return Promise.resolve(); }
+        if (!this.container) {
+            this.loadingContainer = false;
+            return Promise.resolve();
+        }
 
         const entries = this.container.entries();
 
-        if (entries.length === 0) { return Promise.resolve(); }
+        if (entries.length === 0) {
+            this.loadingContainer = false;
+            return Promise.resolve();
+        }
 
         return this.li.getFleshedLineitems(entries.map(e => e.lineitem()), {})
         .pipe(tap(li_struct => {