Bug 28261: Add visual feedback on overridden pickup locations on patron's page
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 29 Apr 2021 11:53:43 +0000 (08:53 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 4 Aug 2021 12:06:43 +0000 (14:06 +0200)
commit9ec1bd1a1033f9573814468c5764c4cacaa77452
tree3d778265642bc7e8467c87f42f3f09bebc60f062
parent2dbae66f0419a9a8d68dbc04d94f8cae27b216a2
Bug 28261: Add visual feedback on overridden pickup locations on patron's page

This patch makes the patron pages in the staff interface use the API and
Select2 to render the pickup locations list. This has the effect of
adding visual feedback on those pickup locations that need an override,
based on the current configuration options.

All the checks are done in the GET /holds/:hold_id/pickup_locations
route, so this is a fairly trivial change.

To test:
1. Have a couple holds for a patron, some overrriden, some not
2. Visit the patrons' detail page, holds tab.
=> SUCCESS: You see the holds, pickup location has a dropdown
3. Repeat in the circulation tab for the patron
=> SUCCESS: You see the holds, pickup location has a dropdown
4. Apply this patch
5. Repeat 2 and 3
=> SUCCESS: Same behavior as before, but the dropdown is rendered with
Select2 and has a search feature. Overridden pickup locations have an
icon telling so
6. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
koha-tmpl/intranet-tmpl/prog/js/holds.js