</ngb-tab>
<ngb-tab id="type">
<ng-template ngbTabTitle>
- <span class="material-icons" *ngIf="resourceType.value">filter_list</span> <span i18n>Filter by resource type</span>
+ <span class="material-icons" *ngIf="resourceTypeForGrid">filter_list</span> <span i18n>Filter by resource type</span>
</ng-template>
<ng-template ngbTabContent>
<div class="m-2">
-import {Component, EventEmitter, Input, Output, OnInit, ViewChild} from '@angular/core';
+import {Component, EventEmitter, Input, Output, OnChanges, OnInit, ViewChild} from '@angular/core';
import {Router} from '@angular/router';
import {Observable, from, of} from 'rxjs';
import {tap, switchMap, mergeMap} from 'rxjs/operators';
selector: 'eg-reservations-grid',
templateUrl: './reservations-grid.component.html',
})
-export class ReservationsGridComponent implements OnInit {
+export class ReservationsGridComponent implements OnChanges, OnInit {
@Input() patron: number;
@Input() resourceBarcode: string;
};
}
+ ngOnChanges() { this.reloadGrid(); }
+
enrichRow$ = (row: IdlObject): Observable<IdlObject> => {
return from(this.org.settings('lib.timezone', row.pickup_lib().id())).pipe(
switchMap((tz) => {