View | Details | Raw Unified | Return to bug 38010
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/vendors.tt (-1 lines)
Lines 27-33 Link Here
27
    [% MACRO jsinclude BLOCK %]
27
    [% MACRO jsinclude BLOCK %]
28
        [% INCLUDE 'calendar.inc' %]
28
        [% INCLUDE 'calendar.inc' %]
29
        [% INCLUDE 'datatables.inc' %]
29
        [% INCLUDE 'datatables.inc' %]
30
        [% INCLUDE 'columns_settings.inc' %]
31
        [% INCLUDE 'js-patron-format.inc' %]
30
        [% INCLUDE 'js-patron-format.inc' %]
32
        [% INCLUDE 'js-date-format.inc' %]
31
        [% INCLUDE 'js-date-format.inc' %]
33
        [% INCLUDE 'format_price.inc' %]
32
        [% INCLUDE 'format_price.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/fetch/acquisition-api-client.js (-6 / +6 lines)
Lines 8-14 export class AcquisitionAPIClient { Link Here
8
    get vendors() {
8
    get vendors() {
9
        return {
9
        return {
10
            get: id =>
10
            get: id =>
11
                this.get({
11
                this.httpClient.get({
12
                    endpoint: "vendors/" + id,
12
                    endpoint: "vendors/" + id,
13
                    headers: {
13
                    headers: {
14
                        "x-koha-embed":
14
                        "x-koha-embed":
Lines 25-45 export class AcquisitionAPIClient { Link Here
25
                    },
25
                    },
26
                }),
26
                }),
27
            delete: id =>
27
            delete: id =>
28
                this.delete({
28
                this.httpClient.delete({
29
                    endpoint: "vendors/" + id,
29
                    endpoint: "vendors/" + id,
30
                }),
30
                }),
31
            create: vendor =>
31
            create: vendor =>
32
                this.post({
32
                this.httpClient.post({
33
                    endpoint: "vendors",
33
                    endpoint: "vendors",
34
                    body: vendor,
34
                    body: vendor,
35
                }),
35
                }),
36
            update: (vendor, id) =>
36
            update: (vendor, id) =>
37
                this.put({
37
                this.httpClient.put({
38
                    endpoint: "vendors/" + id,
38
                    endpoint: "vendors/" + id,
39
                    body: vendor,
39
                    body: vendor,
40
                }),
40
                }),
41
            count: (query = {}) =>
41
            count: (query = {}) =>
42
                this.count({
42
                this.httpClient.count({
43
                    endpoint:
43
                    endpoint:
44
                        "vendors?" +
44
                        "vendors?" +
45
                        new URLSearchParams({
45
                        new URLSearchParams({
Lines 54-60 export class AcquisitionAPIClient { Link Here
54
    get baskets() {
54
    get baskets() {
55
        return {
55
        return {
56
            count: (query = {}) =>
56
            count: (query = {}) =>
57
                this.count({
57
                this.httpClient.count({
58
                    endpoint:
58
                    endpoint:
59
                        "baskets?" +
59
                        "baskets?" +
60
                        new URLSearchParams({
60
                        new URLSearchParams({
(-)a/koha-tmpl/intranet-tmpl/prog/js/fetch/api-client.js (+2 lines)
Lines 12-21 import PatronListAPIClient from "./patron-list-api-client.js"; Link Here
12
import RecallAPIClient from "./recall-api-client.js";
12
import RecallAPIClient from "./recall-api-client.js";
13
import SysprefAPIClient from "./system-preferences-api-client.js";
13
import SysprefAPIClient from "./system-preferences-api-client.js";
14
import TicketAPIClient from "./ticket-api-client.js";
14
import TicketAPIClient from "./ticket-api-client.js";
15
import AcquisitionAPIClient from "./acquisition-api-client.js";
15
16
16
export const APIClient = {
17
export const APIClient = {
17
    article_request: new ArticleRequestAPIClient(HttpClient),
18
    article_request: new ArticleRequestAPIClient(HttpClient),
18
    authorised_values: new AVAPIClient(HttpClient),
19
    authorised_values: new AVAPIClient(HttpClient),
20
    acquisition: new AcquisitionAPIClient(HttpClient),
19
    cataloguing: new CataloguingAPIClient(HttpClient),
21
    cataloguing: new CataloguingAPIClient(HttpClient),
20
    circulation: new CirculationAPIClient(HttpClient),
22
    circulation: new CirculationAPIClient(HttpClient),
21
    club: new ClubAPIClient(HttpClient),
23
    club: new ClubAPIClient(HttpClient),
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/VendorMenu.vue (-1 / +1 lines)
Lines 1-5 Link Here
1
<template>
1
<template>
2
    <div id="menu" v-if="vendorId">
2
    <div id="vendor-menu" class="sidebar_menu" v-if="vendorId">
3
        <ul>
3
        <ul>
4
            <li
4
            <li
5
                v-if="
5
                v-if="
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/http-client.js (-1 / +3 lines)
Lines 6-12 class HttpClient { Link Here
6
        this._headers = options.headers || {
6
        this._headers = options.headers || {
7
            "Content-Type": "application/json;charset=utf-8",
7
            "Content-Type": "application/json;charset=utf-8",
8
        };
8
        };
9
        this.csrf_token = $('meta[name="csrf-token"]').attr("content");
9
        this.csrf_token = document
10
            .querySelector('meta[name="csrf-token"]')
11
            .getAttribute("content");
10
    }
12
    }
11
13
12
    async _fetchJSON(
14
    async _fetchJSON(
(-)a/rspack.config.js (-1 / +8 lines)
Lines 84-89 module.exports = [ Link Here
84
        },
84
        },
85
    },
85
    },
86
    {
86
    {
87
        resolve: {
88
            alias: {
89
                "@fetch": path.resolve(
90
                    __dirname,
91
                    "koha-tmpl/intranet-tmpl/prog/js/fetch"
92
                ),
93
            },
94
        },
87
        experiments: {
95
        experiments: {
88
            outputModule: true,
96
            outputModule: true,
89
        },
97
        },
90
- 

Return to bug 38010