LP1816475: Return reservations screen refreshes properly
authorJane Sandberg <sandbej@linnbenton.edu>
Mon, 9 Sep 2019 15:02:53 +0000 (08:02 -0700)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 21 Oct 2019 19:42:58 +0000 (15:42 -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/reservations-grid.component.ts

index a8c5443..05fe104 100644 (file)
@@ -19,6 +19,8 @@ import {CancelReservationDialogComponent} from './cancel-reservation-dialog.comp
 
 import * as Moment from 'moment-timezone';
 
+// A filterable grid of reservations used in various booking interfaces
+
 @Component({
     selector: 'eg-reservations-grid',
     templateUrl: './reservations-grid.component.html',
@@ -34,6 +36,7 @@ export class ReservationsGridComponent implements OnInit {
     @Input() onlyCaptured = false;
 
     @Output() onPickup = new EventEmitter<IdlObject>();
+    @Output() onReturn = new EventEmitter<IdlObject>();
 
     gridSource: GridDataSource;
     patronBarcode: string;
@@ -237,7 +240,10 @@ export class ReservationsGridComponent implements OnInit {
                this.auth.token(),
                {'patron_barcode': this.patronBarcode, 'reservation': reservation})
                .pipe(tap(
-                   () => { this.grid.reload(); },
+                   () => {
+                       this.onReturn.emit(reservation);
+                       this.grid.reload();
+                   },
                ));
         };