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';
7 templateUrl: 'catalog.component.html'
9 export class CatalogComponent implements OnInit {
12 private basket: BasketService,
13 private staffCat: StaffCatalogService
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();
22 // Subscribe to these emissions so that we can force
23 // change detection in this component even though the
24 // hold-for value was modified by a child component.
25 this.staffCat.holdForChange.subscribe(() => {});
28 // Returns the 'au' object for the patron who we are
29 // trying to place a hold for.
30 holdForUser(): IdlObject {
31 return this.staffCat.holdForUser;
35 this.staffCat.clearHoldPatron();