From 9e09581995ca155b1aae3d62ddf17bff41f54bcb Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 17 Nov 2021 16:07:40 +0000 Subject: [PATCH] Bug 29519: Allow resolution of claims return at checkin Add a 'Resolve' button in the alert dialogue that is displayed when a lost item with a return claim is checked in. The button will trigger the usual resolution modal allowing the user to pick their resolution. This patch splits the resolution modal out of checkouts.js and checkouts-table.inc so it can be used outside of the checkouts table. We then reload it, optionally based upon the presence of the claims preference, where needed. This has the added benefit that it saves a little bit of page load data in cases where the feature is not enabled. Test plan 1. As we alter the file locations of the resolution handling code we need to test that normal claims functionality continue to work as expected. 2. Test the new functoinality by checking in an item that has been claimed as returned (but not yet resolved). The dialogue box should now contain a 'resolve' button next to each claimant and clicking upon it should trigger the resolution modal where the librarian can subsequently pick the resolution and submit it. Signed-off-by: Andrew Fuerste-Henry Signed-off-by: Tomas Cohen Arazi Signed-off-by: Kyle M Hall --- .../prog/en/includes/checkouts-table.inc | 42 ------------------- .../includes/modals/resolve_return_claim.inc | 42 +++++++++++++++++++ .../prog/en/modules/circ/circulation.tt | 7 ++++ .../prog/en/modules/circ/returns.tt | 13 +++++- .../prog/en/modules/members/moremember.tt | 7 ++++ koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 42 ------------------- .../prog/js/resolve_claim_modal.js | 40 ++++++++++++++++++ 7 files changed, 108 insertions(+), 85 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/modals/resolve_return_claim.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/js/resolve_claim_modal.js diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc index 002a1b4440..a5bdaf7dfa 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc @@ -127,45 +127,3 @@ - - - diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/modals/resolve_return_claim.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/modals/resolve_return_claim.inc new file mode 100644 index 0000000000..01475ff5dc --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/modals/resolve_return_claim.inc @@ -0,0 +1,42 @@ + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 8fdc647294..0ea12ef84b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -932,6 +932,10 @@ + [% IF Koha.Preference('ClaimReturnedLostValue') %] + [% INCLUDE 'modals/resolve_return_claim.inc' %] + [% END %] +