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

(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/api-client.js (+2 lines)
Lines 2-7 import ERMAPIClient from "./erm-api-client"; Link Here
2
import PatronAPIClient from "./patron-api-client";
2
import PatronAPIClient from "./patron-api-client";
3
import AcquisitionAPIClient from "./acquisition-api-client";
3
import AcquisitionAPIClient from "./acquisition-api-client";
4
import AVAPIClient from "./authorised-values-api-client";
4
import AVAPIClient from "./authorised-values-api-client";
5
import ItemAPIClient from "./item-api-client";
5
import SysprefAPIClient from "./system-preferences-api-client";
6
import SysprefAPIClient from "./system-preferences-api-client";
6
7
7
export const APIClient = {
8
export const APIClient = {
Lines 9-13 export const APIClient = { Link Here
9
    patron: new PatronAPIClient(),
10
    patron: new PatronAPIClient(),
10
    acquisition: new AcquisitionAPIClient(),
11
    acquisition: new AcquisitionAPIClient(),
11
    authorised_values: new AVAPIClient(),
12
    authorised_values: new AVAPIClient(),
13
    item: new ItemAPIClient(),
12
    sysprefs: new SysprefAPIClient(),
14
    sysprefs: new SysprefAPIClient(),
13
};
15
};
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/item-api-client.js (-1 / +26 lines)
Line 0 Link Here
0
- 
1
import HttpClient from "./http-client";
2
3
export class ItemAPIClient extends HttpClient {
4
    constructor() {
5
        super({
6
            baseURL: "/api/v1/",
7
        });
8
    }
9
10
    get items() {
11
        return {
12
            getAll: (query, params) =>
13
                this.get({
14
                    endpoint:
15
                        "items?" +
16
                        new URLSearchParams({
17
                            _per_page: -1,
18
                            ...(query && { q: JSON.stringify(query) }),
19
                        }),
20
                    ...params,
21
                }),
22
        };
23
    }
24
}
25
26
export default ItemAPIClient;

Return to bug 34055