LP1867834 Staffcat clear basket on logout user/sandbergja/lp186734-staffcat-clear-basket-signoff
authorBill Erickson <berickxx@gmail.com>
Wed, 18 Mar 2020 16:41:38 +0000 (12:41 -0400)
committerJane Sandberg <sandbej@linnbenton.edu>
Wed, 5 Aug 2020 14:11:46 +0000 (07:11 -0700)
Tell the browser/local store service to treat the staff catalog basket
cache key as a "login item", meaning it should be cleared upon logout.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Open-ILS/src/eg2/src/app/share/catalog/basket.service.ts

index 0d97220..20fb491 100644 (file)
@@ -30,6 +30,9 @@ export class BasketService {
     ) {
         this.idList = [];
         this.onChange = new EventEmitter<number[]>();
+
+        // Tell the browser store service to clear the basket on logout.
+        this.store.addLoginSessionKey(BASKET_CACHE_KEY_COOKIE);
     }
 
     hasRecordId(id: number): boolean {