LP#1942220: (follow-up) add basic event reporting to PO cancelation
authorGalen Charlton <gmc@equinoxOLI.org>
Tue, 11 Jan 2022 22:51:07 +0000 (17:51 -0500)
committerGalen Charlton <gmc@equinoxOLI.org>
Tue, 11 Jan 2022 22:51:07 +0000 (17:51 -0500)
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/eg2/src/app/staff/acq/po/summary.component.ts

index ec02900..6a4af23 100644 (file)
@@ -166,9 +166,15 @@ export class PoSummaryComponent implements OnInit, OnDestroy {
             this.net.request('open-ils.acq',
                 'open-ils.acq.purchase_order.cancel',
                 this.auth.token(), this.poId, reason
-            ).subscribe(ok => {
+            ).subscribe(resp => {
                 this.progressDialog.close();
-                location.href = location.href;
+
+                const evt = this.evt.parse(resp);
+                if (evt) {
+                    alert(evt);
+                } else {
+                    location.href = location.href;
+                }
             });
         });
     }