]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/eg2/src/app/staff/share/patron/search-dialog.component.ts
LP1859241 Angular holds patron search dialog
[Evergreen.git] / Open-ILS / src / eg2 / src / app / staff / share / patron / search-dialog.component.ts
1 import {Component, OnInit, Input, Output, ViewChild} from '@angular/core';
2 import {IdlService, IdlObject} from '@eg/core/idl.service';
3 import {NgbModal} from '@ng-bootstrap/ng-bootstrap';
4 import {DialogComponent} from '@eg/share/dialog/dialog.component';
5 import {PatronSearchComponent} from './search.component';
6
7 /**
8  * Dialog container for patron search component
9  *
10  * <eg-patron-search-dialog (patronsSelected)="process($event)">
11  * </eg-patron-search-dialog>
12  */
13
14 @Component({
15   selector: 'eg-patron-search-dialog',
16   templateUrl: 'search-dialog.component.html'
17 })
18
19 export class PatronSearchDialogComponent
20     extends DialogComponent implements OnInit {
21
22     @ViewChild('searchForm', {static: false})
23         searchForm: PatronSearchComponent;
24
25     constructor(private modal: NgbModal) { super(modal); }
26
27     ngOnInit() {}
28
29     // Fired when a row in the search grid is dbl-clicked / activated
30     patronsSelected(patrons: IdlObject[]) {
31         this.close(patrons);
32     }
33 }
34
35
36