LP1904036 Patron 'Done' button clears hold recipient
authorBill Erickson <berickxx@gmail.com>
Mon, 18 Apr 2022 15:21:17 +0000 (11:21 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 28 Oct 2022 00:13:42 +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/catalog/catalog.service.ts
Open-ILS/src/eg2/src/app/staff/circ/patron/checkout.component.ts

index 51a92ed..24d32df 100644 (file)
@@ -89,6 +89,9 @@ export class StaffCatalogService {
                 this.holdForUser = user;
                 this.holdForChange.emit();
             });
+        } else {
+            // In case the session item was cleared from another component.
+            this.clearHoldPatron();
         }
 
         this.searchContext.org = this.org; // service, not searchOrg
index f8a1fe3..7d40790 100644 (file)
@@ -394,8 +394,10 @@ export class CheckoutComponent implements OnInit, AfterViewInit {
     }
 
     doneRedirect() {
+        // Clear the assumed hold recipient since we're done with
+        // this patron.
+        this.store.removeLoginSessionItem('eg.circ.patron_hold_target');
         this.router.navigate(['/staff/circ/patron/bcsearch']);
     }
-
 }