The ERM module search header has three options: Search agreements, Search packages, and Search titles. If you click through the sidebar options (Agreements, Packages, and Titles) the search header doesn't change to reflect the area you are in. If you change the header to another option, for example 'Search titles', then perform a search, the header goes back to 'Agreement search'. To replicate: 1. Enable the ERM module: ERMModule system preference. 2. Go to the ERM module: Home > E-resource management. 3. Select the options from the sidebar menu (Agreements, Packages and Titles), and note that the ERM search header options don't change. 4. Add a minimal agreement, package and title. 5. Change the search header to another option, for example 'Search titles', then perform a search. Note that: - the appropriate sidebar menu option is highlighted, for example: 'Titles' - the search header changes back to 'Agreement search' This was noted as a potential issue when testing bug 32683 - Convert header search tabs to Bootstrap.
Created attachment 145897 [details] [review] Bug 32728: ERM - Update search header depending on navigation Search header should change to match the section you are in. Default is "agreement". If you are in "local titles" or "local packages", the header will be positionned on the relevant tab.
I am not convinced by this patch. Ideally we should embed the search header into the Vue app, but that is much more work!
Created attachment 146264 [details] [review] Bug 32728: ERM - Update search header depending on navigation Search header should change to match the section you are in. Default is "agreement". If you are in "local titles" or "local packages", the header will be positionned on the relevant tab. Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Please remember to include the test plans in the commit messages :)
Created attachment 147334 [details] [review] Bug 32728: ERM - Update search header depending on navigation Search header should change to match the section you are in. Default is "agreement". If you are in "local titles" or "local packages", the header will be positionned on the relevant tab. To replicate: 1. Enable the ERM module: ERMModule system preference. 2. Go to the ERM module: Home > E-resource management. 3. Select the options from the sidebar menu (Agreements, Packages and Titles), and note that the ERM search header options don't change. 4. Add a minimal agreement, package and title. 5. Change the search header to another option, for example 'Search titles', then perform a search. Note that: - the appropriate sidebar menu option is highlighted, for example: 'Titles' - the search header changes back to 'Agreement search' 6. Apply patch, run yarn build 7. Verify the search options are now switched when moving between pages Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Pushed to master for 23.05. Nice work everyone, thanks!
Many hands makes light work, thankyou everyone! Pushed to 22.11.x for the next release
Created attachment 147482 [details] [review] Bug 32728: Fix warning There is a couple of wrong things from the previous patch: * There is a warning in the console Firefox [Vue Router warn]: Unexpected error when starting the router: TypeError: document.getElementById(...) is null Chrome [Vue Router warn]: Unexpected error when starting the router: TypeError: Cannot read properties of null (reading 'click') That's because the tabs are not initialized yet, and so the tab is not correctly selected when the app is loaded. * "Search titles" is selected when on packages, and "Search packages" is selected when on titles This patch remove the warning and fix the second problem. However the tab is still wrong when the app is loaded. Will see later if that can be fixed, but it's not trivial at first glance.
Simple enough patch to clean up the warning and get us display correctly most of the time.. we can deal with the initial load issue as a distinct thing in my opinion. PQA on that follow-up from me.
No ERM in 22.05.x, no backport.
Follow-up in master. Please check it is in 22.11
Follow-up is on 22.11.x https://github.com/Koha-Community/Koha/blob/22.11.x/koha-tmpl/intranet-tmpl/prog/js/vue/modules/erm.ts