]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/eg2/src/app/staff/catalog/catalog.component.ts
LP1869898 Angular staff cat place hold from patron
[Evergreen.git] / Open-ILS / src / eg2 / src / app / staff / catalog / catalog.component.ts
1 import {Component, OnInit} from '@angular/core';
2 import {IdlObject} from '@eg/core/idl.service';
3 import {StaffCatalogService} from './catalog.service';
4 import {BasketService} from '@eg/share/catalog/basket.service';
5
6 @Component({
7   templateUrl: 'catalog.component.html'
8 })
9 export class CatalogComponent implements OnInit {
10
11     constructor(
12         private basket: BasketService,
13         private staffCat: StaffCatalogService
14     ) {}
15
16     ngOnInit() {
17         // Create the search context that will be used by all of my
18         // child components.  After initial creation, the context is
19         // reset and updated as needed to apply new search parameters.
20         this.staffCat.createContext();
21     }
22
23     // Returns the 'au' object for the patron who we are
24     // trying to place a hold for.
25     holdForUser(): IdlObject {
26         return this.staffCat.holdForUser;
27     }
28
29     clearHoldPatron() {
30         this.staffCat.holdForUser = null;
31         this.staffCat.holdForBarcode = null;
32     }
33 }
34