From: Bill Erickson <berickxx@gmail.com>
Date: Thu, 26 Aug 2021 19:03:48 +0000 (-0400)
Subject: LP1904036 Patron bills tab honors editor change warning
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b47740fd82b00b581e63daa05d4e7d58f0c5f897;p=evergreen%2Ftadl.git

LP1904036 Patron bills tab honors editor change warning

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jane Sandberg <js7389@princeton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
---

diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/patron.component.ts b/Open-ILS/src/eg2/src/app/staff/circ/patron/patron.component.ts
index 4917db2337..38af2b8fd1 100644
--- a/Open-ILS/src/eg2/src/app/staff/circ/patron/patron.component.ts
+++ b/Open-ILS/src/eg2/src/app/staff/circ/patron/patron.component.ts
@@ -176,8 +176,13 @@ export class PatronComponent implements OnInit, AfterViewInit {
     // The bills tab has various sub-interfaces.  If the user is already
     // on the Bills tab and clicks the tab, return them to the main bills
     // screen.
+    // Avoid the navigate call when not on the bills tab because it
+    // interferes with the pre-tab-change "changes pending" confirm dialog
+    // used by the editor and possibily others.
     billsTabClicked() {
-        this.router.navigate(['/staff/circ/patron', this.patronId, 'bills']);
+        if (this.patronTab === 'bills') {
+            this.router.navigate(['/staff/circ/patron', this.patronId, 'bills']);
+        }
     }
 
     routeToTab() {