From dc6050ac5f4ec99c359c7772ea5c67fe7cca4006 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Wed, 23 Apr 2025 11:50:24 +0100 Subject: [PATCH] Bug 38010: (QA follow-up) Rebase on main Signed-off-by: Michaela Sieber Signed-off-by: Jonathan Druart --- .../intranet-tmpl/prog/en/modules/acqui/vendors.tt | 1 - .../prog/js/fetch/acquisition-api-client.js | 12 ++++++------ koha-tmpl/intranet-tmpl/prog/js/fetch/api-client.js | 2 ++ .../prog/js/vue/components/Islands/VendorMenu.vue | 2 +- .../intranet-tmpl/prog/js/vue/fetch/http-client.js | 4 +++- rspack.config.js | 8 ++++++++ 6 files changed, 20 insertions(+), 9 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/vendors.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/vendors.tt index d9242efd1fd..f0db6268e9b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/vendors.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/vendors.tt @@ -27,7 +27,6 @@ [% MACRO jsinclude BLOCK %] [% INCLUDE 'calendar.inc' %] [% INCLUDE 'datatables.inc' %] - [% INCLUDE 'columns_settings.inc' %] [% INCLUDE 'js-patron-format.inc' %] [% INCLUDE 'js-date-format.inc' %] [% INCLUDE 'format_price.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/js/fetch/acquisition-api-client.js b/koha-tmpl/intranet-tmpl/prog/js/fetch/acquisition-api-client.js index 6db8d0b0205..0316beb3b33 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/fetch/acquisition-api-client.js +++ b/koha-tmpl/intranet-tmpl/prog/js/fetch/acquisition-api-client.js @@ -8,7 +8,7 @@ export class AcquisitionAPIClient { get vendors() { return { get: id => - this.get({ + this.httpClient.get({ endpoint: "vendors/" + id, headers: { "x-koha-embed": @@ -25,21 +25,21 @@ export class AcquisitionAPIClient { }, }), delete: id => - this.delete({ + this.httpClient.delete({ endpoint: "vendors/" + id, }), create: vendor => - this.post({ + this.httpClient.post({ endpoint: "vendors", body: vendor, }), update: (vendor, id) => - this.put({ + this.httpClient.put({ endpoint: "vendors/" + id, body: vendor, }), count: (query = {}) => - this.count({ + this.httpClient.count({ endpoint: "vendors?" + new URLSearchParams({ @@ -54,7 +54,7 @@ export class AcquisitionAPIClient { get baskets() { return { count: (query = {}) => - this.count({ + this.httpClient.count({ endpoint: "baskets?" + new URLSearchParams({ diff --git a/koha-tmpl/intranet-tmpl/prog/js/fetch/api-client.js b/koha-tmpl/intranet-tmpl/prog/js/fetch/api-client.js index 2d623b6f9bd..5b516fa4458 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/fetch/api-client.js +++ b/koha-tmpl/intranet-tmpl/prog/js/fetch/api-client.js @@ -12,10 +12,12 @@ import PatronListAPIClient from "./patron-list-api-client.js"; import RecallAPIClient from "./recall-api-client.js"; import SysprefAPIClient from "./system-preferences-api-client.js"; import TicketAPIClient from "./ticket-api-client.js"; +import AcquisitionAPIClient from "./acquisition-api-client.js"; export const APIClient = { article_request: new ArticleRequestAPIClient(HttpClient), authorised_values: new AVAPIClient(HttpClient), + acquisition: new AcquisitionAPIClient(HttpClient), cataloguing: new CataloguingAPIClient(HttpClient), circulation: new CirculationAPIClient(HttpClient), club: new ClubAPIClient(HttpClient), diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/VendorMenu.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/VendorMenu.vue index 4a4ea82c21c..84d5469bb96 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/VendorMenu.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/VendorMenu.vue @@ -1,5 +1,5 @@