LP1904036 Login session keys expire; hold patron uses login key
[evergreen-equinox.git] / Open-ILS / src / eg2 / src / app / staff / circ / patron / holds.component.ts
1 import {Component, OnInit, Input} from '@angular/core';
2 import {Router, ActivatedRoute, ParamMap} from '@angular/router';
3 import {NgbNav, NgbNavChangeEvent} from '@ng-bootstrap/ng-bootstrap';
4 import {OrgService} from '@eg/core/org.service';
5 import {NetService} from '@eg/core/net.service';
6 import {PatronService} from '@eg/staff/share/patron/patron.service';
7 import {PatronContextService} from './patron.service';
8 import {StoreService} from '@eg/core/store.service';
9
10 const HOLD_FOR_PATRON_KEY = 'eg.circ.patron_hold_target';
11
12 @Component({
13   templateUrl: 'holds.component.html',
14   selector: 'eg-patron-holds'
15 })
16 export class HoldsComponent implements OnInit {
17
18     constructor(
19         private router: Router,
20         private org: OrgService,
21         private net: NetService,
22         private store: StoreService,
23         public patronService: PatronService,
24         public context: PatronContextService
25     ) {}
26
27     ngOnInit() {
28     }
29
30     newHold() {
31
32         this.store.setLoginSessionItem(HOLD_FOR_PATRON_KEY,
33             this.context.summary.patron.card().barcode());
34
35         this.router.navigate(['/staff/catalog/search']);
36     }
37 }
38