From b47740fd82b00b581e63daa05d4e7d58f0c5f897 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 26 Aug 2021 15:03:48 -0400 Subject: [PATCH] LP1904036 Patron bills tab honors editor change warning Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- Open-ILS/src/eg2/src/app/staff/circ/patron/patron.component.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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() { -- 2.11.0