From 1e6cb7a8714f5b37277d55085d72db90a5c1b86c Mon Sep 17 00:00:00 2001
From: Jane Sandberg <sandbej@linnbenton.edu>
Date: Fri, 13 Sep 2019 11:04:27 -0700
Subject: [PATCH] LP1816475: Fix resource type filter in manage reservations
 grid

Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
---
 .../eg2/src/app/staff/booking/manage-reservations.component.html    | 2 +-
 .../src/eg2/src/app/staff/booking/reservations-grid.component.ts    | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Open-ILS/src/eg2/src/app/staff/booking/manage-reservations.component.html b/Open-ILS/src/eg2/src/app/staff/booking/manage-reservations.component.html
index 82cd431e21..1a7e94b8da 100644
--- a/Open-ILS/src/eg2/src/app/staff/booking/manage-reservations.component.html
+++ b/Open-ILS/src/eg2/src/app/staff/booking/manage-reservations.component.html
@@ -49,7 +49,7 @@
         </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">
diff --git a/Open-ILS/src/eg2/src/app/staff/booking/reservations-grid.component.ts b/Open-ILS/src/eg2/src/app/staff/booking/reservations-grid.component.ts
index 40cf8f8005..4e75a61503 100644
--- a/Open-ILS/src/eg2/src/app/staff/booking/reservations-grid.component.ts
+++ b/Open-ILS/src/eg2/src/app/staff/booking/reservations-grid.component.ts
@@ -1,4 +1,4 @@
-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';
@@ -25,7 +25,7 @@ import * as Moment from 'moment-timezone';
     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;
@@ -276,6 +276,8 @@ export class ReservationsGridComponent implements OnInit {
         };
     }
 
+    ngOnChanges() { this.reloadGrid(); }
+
     enrichRow$ = (row: IdlObject): Observable<IdlObject> => {
         return from(this.org.settings('lib.timezone', row.pickup_lib().id())).pipe(
             switchMap((tz) => {
-- 
2.11.0