LP1904036 Patron Search clears previous patron
authorBill Erickson <berickxx@gmail.com>
Fri, 14 Jan 2022 16:28:12 +0000 (11:28 -0500)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 28 Oct 2022 00:13:40 +0000 (20:13 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jane Sandberg <js7389@princeton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>

Open-ILS/src/eg2/src/app/staff/circ/patron/patron.component.ts

index 0684348..96f64d8 100644 (file)
@@ -155,6 +155,13 @@ export class PatronComponent implements OnInit, AfterViewInit {
                 this.patronTab = 'other';
             }
 
+            // Clear all previous patron data when returning to the
+            // search from after other patron-level navigation.
+            if (this.patronTab === 'search') {
+                this.context.summary = null;
+                this.patronId = null;
+            }
+
             const prevId =
                 this.context.summary ? this.context.summary.id : null;