LP1929749: (follow-up) reload the upload form if we navigate to it from itself
authorGalen Charlton <gmc@equinoxOLI.org>
Fri, 15 Jul 2022 22:16:23 +0000 (22:16 +0000)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 15 Jul 2022 22:16:23 +0000 (22:16 +0000)
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/eg2/src/app/staff/acq/picklist/upload.component.ts

index ef12730..39300fb 100644 (file)
@@ -1,5 +1,6 @@
 import {Component, OnInit, AfterViewInit, Input,
     ViewChild, OnDestroy} from '@angular/core';
+import {Router} from '@angular/router';
 import {Subject} from 'rxjs';
 import {tap} from 'rxjs/operators';
 import {IdlObject} from '@eg/core/idl.service';
@@ -151,6 +152,7 @@ export class UploadComponent implements OnInit, AfterViewInit, OnDestroy {
 
     constructor(
         private http: HttpClient,
+        private router: Router,
         private toast: ToastService,
         private evt: EventService,
         private net: NetService,
@@ -159,6 +161,11 @@ export class UploadComponent implements OnInit, AfterViewInit, OnDestroy {
         private store: ServerStoreService,
         private vlagent: PicklistUploadService
     ) {
+        // force a reload of the component if we navigate to it
+        // from itself
+        this.router.routeReuseStrategy.shouldReuseRoute = () => {
+            return false;
+        };
         this.applyDefaults();
         this.applySettings();
     }