LP#1942220: (follow-up) refresh LI list after PO activation
authorGalen Charlton <gmc@equinoxOLI.org>
Thu, 28 Jul 2022 15:29:55 +0000 (15:29 +0000)
committerGalen Charlton <gmc@equinoxOLI.org>
Thu, 28 Jul 2022 15:29:55 +0000 (15:29 +0000)
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/eg2/src/app/staff/acq/lineitem/lineitem.service.ts
Open-ILS/src/eg2/src/app/staff/acq/po/summary.component.ts

index 39d07e8..f86de35 100644 (file)
@@ -99,6 +99,10 @@ export class LineitemService {
         private loc: ItemLocationService
     ) {}
 
+    clearLiCache() {
+        this.liCache = [];
+    }
+
     getFleshedLineitems(ids: number[],
         params: FleshCacheParams = {}): Observable<BatchLineitemStruct> {
 
index 51fd162..8484cf0 100644 (file)
@@ -330,7 +330,11 @@ export class PoSummaryComponent implements OnInit, OnDestroy {
                 // Refresh everything.
                 this.initDone = false;
                 this.doingActivation = false;
-                this.load(false).then(_ => this.initDone = true);
+                this.load(false).then(_ => {
+                    this.initDone = true;
+                    this.liService.clearLiCache();
+                    this.router.navigate([]);
+                });
 
             } else {
                 this.progressDialog.update(