From 66b029072895de720bc38ce764b44cd74240403f Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 30 Mar 2022 10:08:38 -0400 Subject: [PATCH] LP1952931 More data loading indictor support Signed-off-by: Bill Erickson --- .../src/eg2/src/app/staff/acq/asn/receive.component.html | 2 +- Open-ILS/src/eg2/src/app/staff/acq/asn/receive.component.ts | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/acq/asn/receive.component.html b/Open-ILS/src/eg2/src/app/staff/acq/asn/receive.component.html index ccff5c51bd..92f5362060 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/asn/receive.component.html +++ b/Open-ILS/src/eg2/src/app/staff/acq/asn/receive.component.html @@ -170,7 +170,7 @@ across different vendors to match a container code. -
+
diff --git a/Open-ILS/src/eg2/src/app/staff/acq/asn/receive.component.ts b/Open-ILS/src/eg2/src/app/staff/acq/asn/receive.component.ts index ad4f2e3713..0ebd84f155 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/asn/receive.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/asn/receive.component.ts @@ -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 { - 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 => { -- 2.11.0