From cfa854d2fbc35f4873f933b88184a2962dcf3c6c Mon Sep 17 00:00:00 2001 From: Emily Lamancusa Date: Fri, 7 Mar 2025 12:01:34 -0500 Subject: [PATCH] Bug 38842: Use new reusable components for hold-found2 modal Refactor the code for hold-found2 to use the new modal_wrapper and passthrough_data block as a proof of concept. The modal is also renamed hold-found-modal. To test: Setup: 0. Set system preferences: - HoldsAutoFill = Don't - ShowAllCheckins = Show 1. Find a biblio record with multiple items 2. Set the homebranch on all of those items to the logged-in branch 3. Place two holds on that record: - One for pickup at the logged-in branch (Hold A) - One for pickup at a different branch (Hold B) 4. Keep the tab for the biblio record open, and open a new tab for checkins 5. Check in an item from that bib 6. Take a screenshot of the modal on main for easy comparison 7. Ignore the hold 8. Apply patches Test a hold for pickup at the logged-in branch: 9. Check in the item again --> Confirm that the new modal contains all the correct information for Hold A. The only change in the modal should be that the title is now in the modal body instead of the modal header. 10. Open all of the links in the modal body in new tabs. --> Confirm the links all work as expected, then close those tabs 11. Click to ignore the hold --> Confirm that the checkins table displays correctly 12. Reload the Holds tab of the biblio record --> Confirm the holds are unchanged 13. Switch to the Normal tab of the biblio record --> Confirm the item still shows as Available 14. Check in the item again and click the button to confirm the hold --> Confirm that the checkins table displays correctly 15. Reload the Holds tab of the biblio record --> Confirm Hold A is now set to Waiting 16. Revert the waiting status on Hold A 17. Check in the item again 18. Click the button to confirm and print slip --> Confirm the print dialog appears and slip information is correct 19. Cancel the print dialog --> Confirm that the checkins table displays correctly 20. Reload the Holds tab of the biblio record --> Confirm Hold A is now set to Waiting Test a hold for pickup at a different branch: 21. Check in a different item from that bib --> Confirm that the new modal contains all the correct information for Hold B, and correctly states that the item needs to be transferred 22. Click to ignore the hold --> Confirm that the checkins table displays correctly 23. Reload the Holds tab of the biblio record --> Confirm the hold is unchanged 24. Switch to the Normal tab of the biblio record --> Confirm the item still shows as Available 25. Check in the item again and click the button to confirm and transfer --> Confirm that the checkins table displays correctly 26. Reload the Holds tab of the biblio record --> Confirm Hold B is now set to in-transit 27. Revert the transit status on Hold B 28. Check in the item again 29. Click the button to print slip, transfer, and confirm --> Confirm the print dialog appears and slip information is correct 30. Cancel the print dialog --> Confirm that the checkins table displays correctly 31. Reload the Holds tab of the biblio record --> Confirm Hold B is now set to in-transit 32. Change your logged-in branch to match Hold B's pickup location 33. Check in the item again --> Confirm the modal still contains all the correct information for Hold B and does not say it needs to be transferred 34. Click to print slip and confirm --> Confirm that the print dialog appears and looks correct 35. Cancel the print dialog 36. Reload the Holds tab of the biblio record --> Confirm that both holds are now Waiting 37. Sign off :D --- .../prog/en/modules/circ/returns.tt | 211 ++++++++---------- 1 file changed, 92 insertions(+), 119 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index 6552e8c4ae1..dc9472c7045 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -8,6 +8,7 @@ [% USE TablesSettings %] [% PROCESS 'i18n.inc' %] [% PROCESS 'member-display-address-style.inc' %] +[% PROCESS 'html_helpers.inc' %] [% SET footerjs = 1 %] [% BLOCK display_bormessagepref %] [% IF ( bormessagepref ) %] @@ -841,132 +842,103 @@ [% IF ( reserved and !recalled and !waitingrecall ) %] - - - + [% PROCESS passthrough_data %] + + + + + + + + + + [% INCLUDE all_checkin_messages %] + [% END #/hold-found-modal %] [% END #/IF reserved %] [% IF ( recalled ) %] @@ -1486,11 +1458,12 @@ - [% FOREACH inputloo IN inputloop %] - - - - + [% FOREACH checkin IN checkins %] + + + + + [% END %] [% END %] -- 2.34.1