From 1bc3d012b4ea77367e620665aa566640c013bd4c Mon Sep 17 00:00:00 2001
From: Galen Charlton <gmc@equinoxinitiative.org>
Date: Fri, 6 Sep 2019 11:04:48 -0400
Subject: [PATCH] LP#1816475: (follow-up) ensure that manage reservations grid
 refreshes

This applies the changes from LP#1823041 to make editing a record
refresh the grid.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
---
 .../app/staff/booking/reservations-grid.component.ts   | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

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 b14a8111e2..72b2d0458e 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
@@ -141,7 +141,7 @@ export class ReservationsGridComponent implements OnInit {
         this.editSelected = (idlThings: IdlObject[]) => {
             const editOneThing = (thing: IdlObject) => {
                 if (!thing) { return; }
-                this.showEditDialog(thing).subscribe(
+                this.showEditDialog(thing).then(
                     () => editOneThing(idlThings.shift()));
             };
            editOneThing(idlThings.shift()); };
@@ -283,12 +283,16 @@ export class ReservationsGridComponent implements OnInit {
     showEditDialog(idlThing: IdlObject) {
         this.editDialog.recId = idlThing.id();
         this.editDialog.timezone = idlThing['timezone'];
-        return this.editDialog.open({size: 'lg'}).pipe(tap(
-            () => {
-                this.toast.success('Reservation successfully updated'); // TODO: needs i18n, pluralization
-                this.grid.reload();
-            }
-        ));
+        return new Promise((resolve, reject) => {
+            this.editDialog.open({size: 'lg'}).subscribe(
+                ok => {
+                    this.toast.success('Reservation successfully updated'); // TODO: needs i18n, pluralization
+                    this.grid.reload();
+                    resolve(ok)
+                },
+                rejection => {}
+            );
+        });
     }
 
     filterByResourceBarcode(barcode: string) {
-- 
2.11.0