Bug 38010: (QA follow-up) Rebase on main

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Matt Blenkinsop 2025-04-23 11:50:24 +01:00 committed by Katrin Fischer
parent 64a43ee022
commit 30606d2373
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
6 changed files with 20 additions and 9 deletions

View File

@ -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' %]

View File

@ -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({

View File

@ -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),

View File

@ -1,5 +1,5 @@
<template>
<div id="menu" v-if="vendorId">
<div id="vendor-menu" class="sidebar_menu" v-if="vendorId">
<ul>
<li
v-if="

View File

@ -6,7 +6,9 @@ class HttpClient {
this._headers = options.headers || {
"Content-Type": "application/json;charset=utf-8",
};
this.csrf_token = $('meta[name="csrf-token"]').attr("content");
this.csrf_token = document
.querySelector('meta[name="csrf-token"]')
.getAttribute("content");
}
async _fetchJSON(

View File

@ -84,6 +84,14 @@ module.exports = [
},
},
{
resolve: {
alias: {
"@fetch": path.resolve(
__dirname,
"koha-tmpl/intranet-tmpl/prog/js/fetch"
),
},
},
experiments: {
outputModule: true,
},