Description
Martin Renvoize (ashimema)
2022-12-14 16:22:25 UTC
We need that: https://select2.org/data-sources/ajax#pagination Are we using vue-select? I should look at the code, that component appears inspired by select2, with many similar options. Created attachment 144601 [details] [review] Bug 32468: ERM - Populate dropdown list with all entries The REST API routes is configured to return the 20 first results if _per_page is not provided. Here we want to display all the vendors/agreements/licenses/packages in the dropdown lists. Ideally we should implement an infinite scroll to not load all the data at once (https://vue-select.org/guide/infinite-scroll.html) Test plan: Create more than 20 vendors and confirm that, with this patch, all the vendors are display in the dropdown list displayed on the add agreement form Same for agreements, licenses and local packages Created attachment 144602 [details] [review] Bug 32468: Use fetchLocalTitleCount to know if local titles exist We don't need to fetch 20 titles to know if there is at least one. We should call fetchLocalTitleCount. Note that this should be implemented for all 'List' views. Created attachment 144603 [details] [review] Bug 32468: Remove unecessary fetch titles JS functions Those JS functions are no longer in use and can be removed. Created attachment 144620 [details] [review] Bug 32468: ERM - Populate dropdown list with all entries The REST API routes is configured to return the 20 first results if _per_page is not provided. Here we want to display all the vendors/agreements/licenses/packages in the dropdown lists. Ideally we should implement an infinite scroll to not load all the data at once (https://vue-select.org/guide/infinite-scroll.html) Test plan: Create more than 20 vendors and confirm that, with this patch, all the vendors are display in the dropdown list displayed on the add agreement form Same for agreements, licenses and local packages Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 144621 [details] [review] Bug 32468: Use fetchLocalTitleCount to know if local titles exist We don't need to fetch 20 titles to know if there is at least one. We should call fetchLocalTitleCount. Note that this should be implemented for all 'List' views. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 144622 [details] [review] Bug 32468: Remove unecessary fetch titles JS functions Those JS functions are no longer in use and can be removed. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Just a couple notes to myself or anyone else testing ERM/vue stuff: -Apply patch -run yarn build_js -clear browser cache -test patch Like with SCSS toss out the compiled changes ( koha-tmpl/intranet-tmpl/prog/js/vue/dist/main.js ) and leave that to the RM/RMaints Created attachment 144714 [details] [review] Bug 32468: ERM - Populate dropdown list with all entries The REST API routes is configured to return the 20 first results if _per_page is not provided. Here we want to display all the vendors/agreements/licenses/packages in the dropdown lists. Ideally we should implement an infinite scroll to not load all the data at once (https://vue-select.org/guide/infinite-scroll.html) Test plan: Create more than 20 vendors and confirm that, with this patch, all the vendors are display in the dropdown list displayed on the add agreement form Same for agreements, licenses and local packages Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 144715 [details] [review] Bug 32468: Use fetchLocalTitleCount to know if local titles exist We don't need to fetch 20 titles to know if there is at least one. We should call fetchLocalTitleCount. Note that this should be implemented for all 'List' views. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 144716 [details] [review] Bug 32468: Remove unecessary fetch titles JS functions Those JS functions are no longer in use and can be removed. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Thanks for the quick fix Jonathan and the quick testing Lucas. All looks good and works for me.. Passing QA Pushed to master for 23.05. Nice work everyone, thanks! Nice work everyone! Pushed to 22.11.x for the next release |