LP1816475: Fix resource type filter in manage reservations grid
authorJane Sandberg <sandbej@linnbenton.edu>
Fri, 13 Sep 2019 18:04:27 +0000 (11:04 -0700)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 21 Oct 2019 19:45:22 +0000 (15:45 -0400)
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/eg2/src/app/staff/booking/manage-reservations.component.html
Open-ILS/src/eg2/src/app/staff/booking/reservations-grid.component.ts

index 82cd431..1a7e94b 100644 (file)
@@ -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">
index 1ec400e..f098e79 100644 (file)
@@ -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) => {