LP#1996818 Issues Placing Holds from the Patron Record user/dbriem/lp1996818_broadcast_patron_hold_target
authorDan Briem <dbriem@wlsmail.org>
Fri, 26 May 2023 16:24:54 +0000 (16:24 +0000)
committerDan Briem <dbriem@wlsmail.org>
Fri, 26 May 2023 16:24:54 +0000 (16:24 +0000)
commitd8940dca4747614714868f4985aca50c8e9688bb
tree505be73f293fcc385259110e3b27f172a6598e81
parentc0a1bc4fb0aec908aff11c01c6b2729403fd73f4
LP#1996818 Issues Placing Holds from the Patron Record

Set the hold target using the same cookie Angular uses when
placing holds from AngularJS patron records.

Clear the cookie and broadcast to all catalog tabs to remove
the hold target when:
- the Clear button for the hold target is pressed
- the hold interface loads a different patron
- a different Angular route loads
- AngularJS app starts (left the Angular context)

When a catalog tab is closed, clear the cookie and broadcast
it so that any open catalog tabs can restore it.

To test:
1. After loading the patch, build Angular and AngularJS
2. Place a hold from AngJS patron record, note target is set
3. Open multiple catalog tabs
5. Close one catalog tab, note target persists in other tabs
6. Click Clear button, note target is cleared in all tabs
7. Repeat steps 2-3, load a different patron in the hold
   interface, note target is cleared in all tabs
8. Repeat steps 2-3, click the home icon in the navbar, note
   target is cleared in all tabs
9. Repeat steps 2-3, click AngJS Check Out in the navbar,
   note target is cleared in all tabs

Signed-off-by: Dan Briem <dbriem@wlsmail.org>
Open-ILS/src/eg2/src/app/staff/catalog/catalog.component.ts
Open-ILS/src/eg2/src/app/staff/catalog/catalog.service.ts
Open-ILS/web/js/ui/default/staff/circ/patron/holds.js
Open-ILS/web/js/ui/default/staff/services/startup.js