]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/eg2/src/app/staff/acq/picklist/picklist.component.ts
LP1929741 ACQ Selection List & PO Angluar Port
[Evergreen.git] / Open-ILS / src / eg2 / src / app / staff / acq / picklist / picklist.component.ts
1 import {Component, OnInit} from '@angular/core';
2 import {ActivatedRoute, ParamMap} from '@angular/router';
3
4 /**
5  * Parent component for all Selection List sub-displays.
6  */
7
8
9 @Component({
10   templateUrl: 'picklist.component.html'
11 })
12 export class PicklistComponent implements OnInit {
13
14     picklistId: number;
15
16     constructor(private route: ActivatedRoute) {}
17
18     ngOnInit() {
19         this.route.paramMap.subscribe((params: ParamMap) => {
20             this.picklistId = +params.get('picklistId');
21         });
22     }
23
24     isBasePage(): boolean {
25         return !this.route.firstChild ||
26             this.route.firstChild.snapshot.url.length === 0;
27     }
28 }