Koha/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/acquisition-api-client.js
Jonathan Druart 17b134fcb9
Bug 36392: (bug 34219 follow-up) Fix getAll for vendors - ERM
In commit f1078daf8f
   Bug 34219: Allow getAll to receive additional URL parameters

We needed to call getAll instead of get to fetch all the vendors

Test plan:
Have more than 20 vendors and create/edit an agreement.
Notice that the vendor list contains all the vendors

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matthias Le Gac <matthias.le-gac@inlibro.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-25 17:34:08 +01:00

25 lines
581 B
JavaScript

import HttpClient from "./http-client";
export class AcquisitionAPIClient extends HttpClient {
constructor() {
super({
baseURL: "/api/v1/acquisitions/",
});
}
get vendors() {
return {
getAll: (query, params) =>
this.getAll({
endpoint: "vendors",
query,
params,
headers: {
"x-koha-embed": "aliases",
},
}),
};
}
}
export default AcquisitionAPIClient;