Bugzilla – Attachment 144714 Details for
Bug 32468
Vendors select only allows selecting from first 20 vendors by default
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32468: ERM - Populate dropdown list with all entries
Bug-32468-ERM---Populate-dropdown-list-with-all-en.patch (text/plain), 2.51 KB, created by
Martin Renvoize (ashimema)
on 2022-12-19 14:42:36 UTC
(
hide
)
Description:
Bug 32468: ERM - Populate dropdown list with all entries
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-12-19 14:42:36 UTC
Size:
2.51 KB
patch
obsolete
>From ab4a4d7df9266c2be4d56d1c684ef0958b04f46a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 15 Dec 2022 07:58:36 +0100 >Subject: [PATCH] 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> >--- > koha-tmpl/intranet-tmpl/prog/js/vue/fetch.js | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/fetch.js b/koha-tmpl/intranet-tmpl/prog/js/vue/fetch.js >index 228e7841413..39ff7c9f7e1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/fetch.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/fetch.js >@@ -23,7 +23,7 @@ export const fetchAgreement = async function (agreement_id) { > }; > > export const fetchAgreements = async function () { >- const apiUrl = "/api/v1/erm/agreements"; >+ const apiUrl = "/api/v1/erm/agreements?_per_page=-1"; > let agreements; > await fetch(apiUrl) > .then(checkError) >@@ -60,7 +60,7 @@ export const fetchLicense = async function (license_id) { > }; > > export const fetchLicenses = async function () { >- const apiUrl = "/api/v1/erm/licenses"; >+ const apiUrl = "/api/v1/erm/licenses?_per_page=-1"; > let licenses; > await fetch(apiUrl, { > headers: { >@@ -97,7 +97,7 @@ export const fetchPatron = async function (patron_id) { > }; > > export const fetchVendors = async function () { >- const apiUrl = "/api/v1/acquisitions/vendors"; >+ const apiUrl = "/api/v1/acquisitions/vendors?_per_page=-1"; > let vendors; > await fetch(apiUrl) > .then(checkError) >@@ -207,7 +207,7 @@ export const _fetchPackages = async function (apiUrl) { > return packages; > }; > export const fetchLocalPackages = function () { >- const apiUrl = "/api/v1/erm/eholdings/local/packages"; >+ const apiUrl = "/api/v1/erm/eholdings/local/packages?_per_page=-1"; > return _fetchPackages(apiUrl); > }; > export const fetchEBSCOPackages = function () { >-- >2.39.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 32468
:
144601
|
144602
|
144603
|
144620
|
144621
|
144622
| 144714 |
144715
|
144716