LP1904036 Recent patrons fixes
authorBill Erickson <berickxx@gmail.com>
Mon, 3 May 2021 14:34:08 +0000 (10:34 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 28 Oct 2022 00:13:34 +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.service.ts
Open-ILS/src/eg2/src/app/staff/nav.component.html
Open-ILS/src/eg2/src/app/staff/share/patron/search.component.ts

index 41940b6..db32264 100644 (file)
@@ -95,8 +95,7 @@ export class PatronContextService {
     addRecentPatron(): Promise<any> {
 
         return this.serverStore.getItem('ui.staff.max_recent_patrons')
-        .then(sets => {
-            const num = sets['ui.staff.max_recent_patrons'];
+        .then(num => {
             if (num) { this.maxRecentPatrons = num; }
 
             const patrons: number[] =
index 6e73bd4..b7afa93 100644 (file)
@@ -97,7 +97,7 @@
             <span class="material-icons" aria-hidden="true">redo</span>
             <span i18n>Retrieve Last Patron</span>
           </a>
-          <a class="dropdown-item" href="/eg/staff/circ/patron/search?show_recent=1">
+          <a class="dropdown-item" routerLink="/staff/circ/patron/search/recents">
             <span class="material-icons" aria-hidden="true">redo</span>
             <span i18n>Retrieve Recent Patrons</span>
           </a>
index 8ca36a9..9e73b28 100644 (file)
@@ -165,9 +165,9 @@ export class PatronSearchComponent implements OnInit, AfterViewInit {
 
         let observable: Observable<IdlObject>;
 
-        if (this.patronIds) {
+        if (this.patronIds && !this.startWithFired) {
             observable = this.searchById(this.patronIds);
-            this.patronIds = null;
+            this.startWithFired = true;
         } else if (this.search.id) {
             observable = this.searchById([this.search.id]);
         } else {