LP1904036 Patron place hold uses local storage (see LP1949226)
authorBill Erickson <berickxx@gmail.com>
Fri, 29 Oct 2021 18:49:43 +0000 (14:49 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 28 Oct 2022 00:13:38 +0000 (20:13 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jane Sandberg <js7389@princeton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>

Open-ILS/src/eg2/src/app/staff/circ/patron/holds.component.ts

index 0843880..1574f4e 100644 (file)
@@ -5,6 +5,7 @@ import {OrgService} from '@eg/core/org.service';
 import {NetService} from '@eg/core/net.service';
 import {PatronService} from '@eg/staff/share/patron/patron.service';
 import {PatronContextService} from './patron.service';
+import {StoreService} from '@eg/core/store.service';
 
 @Component({
   templateUrl: 'holds.component.html',
@@ -16,6 +17,7 @@ export class HoldsComponent implements OnInit {
         private router: Router,
         private org: OrgService,
         private net: NetService,
+        private store: StoreService,
         public patronService: PatronService,
         public context: PatronContextService
     ) {}
@@ -24,8 +26,12 @@ export class HoldsComponent implements OnInit {
     }
 
     newHold() {
-        this.router.navigate(['/staff/catalog/search'],
-          {queryParams: {holdForBarcode: this.context.summary.patron.card().barcode()}});
+
+        this.store.setLocalItem(
+            'eg.circ.patron_hold_target',
+            this.context.summary.patron.card().barcode());
+
+        this.router.navigate(['/staff/catalog/search']);
     }
 }