]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/eg2/src/app/staff/circ/patron/bcsearch/bcsearch.component.ts
Docs: merge 3.2 release notes
[working/Evergreen.git] / Open-ILS / src / eg2 / src / app / staff / circ / patron / bcsearch / bcsearch.component.ts
1 import {Component, OnInit, Renderer2} from '@angular/core';
2 import {ActivatedRoute} from '@angular/router';
3 import {NetService} from '@eg/core/net.service';
4 import {AuthService} from '@eg/core/auth.service';
5
6 @Component({
7   templateUrl: 'bcsearch.component.html'
8 })
9
10 export class BcSearchComponent implements OnInit {
11
12     barcode = '';
13
14     constructor(
15         private route: ActivatedRoute,
16         private renderer: Renderer2,
17         private net: NetService,
18         private auth: AuthService
19     ) {}
20
21     ngOnInit() {
22
23         this.renderer.selectRootElement('#barcode-search-input').focus();
24         this.barcode = this.route.snapshot.paramMap.get('barcode');
25
26         if (this.barcode) {
27             this.findUser();
28         }
29     }
30
31     findUser(): void {
32         alert('Searching for user ' + this.barcode);
33     }
34 }
35
36