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

(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/acquisition-api-client.js (-2 / +4 lines)
Lines 9-17 export class AcquisitionAPIClient extends HttpClient { Link Here
9
9
10
    get vendors() {
10
    get vendors() {
11
        return {
11
        return {
12
            getAll: query =>
12
            getAll: (query, params) =>
13
                this.get({
13
                this.get({
14
                    endpoint: "vendors?" + (query || "_per_page=-1"),
14
                    endpoint: "vendors",
15
                    query,
16
                    params,
15
                    headers: {
17
                    headers: {
16
                        "x-koha-embed": "aliases",
18
                        "x-koha-embed": "aliases",
17
                    },
19
                    },
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/erm-api-client.js (-6 / +9 lines)
Lines 26-35 export class ERMAPIClient extends HttpClient { Link Here
26
                            "periods,user_roles,user_roles.patron,agreement_licenses,agreement_licenses.license,agreement_relationships,agreement_relationships.related_agreement,documents,agreement_packages,agreement_packages.package,vendor",
26
                            "periods,user_roles,user_roles.patron,agreement_licenses,agreement_licenses.license,agreement_relationships,agreement_relationships.related_agreement,documents,agreement_packages,agreement_packages.package,vendor",
27
                    },
27
                    },
28
                }),
28
                }),
29
            getAll: query =>
29
            getAll: (query, params) =>
30
                this.getAll({
30
                this.getAll({
31
                    endpoint: "agreements",
31
                    endpoint: "agreements",
32
                    query: query,
32
                    query,
33
                    params,
33
                }),
34
                }),
34
            delete: id =>
35
            delete: id =>
35
                this.delete({
36
                this.delete({
Lines 68-77 export class ERMAPIClient extends HttpClient { Link Here
68
                            "user_roles,user_roles.patron,vendor,documents",
69
                            "user_roles,user_roles.patron,vendor,documents",
69
                    },
70
                    },
70
                }),
71
                }),
71
            getAll: query =>
72
            getAll: (query, params) =>
72
                this.getAll({
73
                this.getAll({
73
                    endpoint: "licenses",
74
                    endpoint: "licenses",
74
                    query: query,
75
                    query,
76
                    params,
75
                    headers: {
77
                    headers: {
76
                        "x-koha-embed": "vendor",
78
                        "x-koha-embed": "vendor",
77
                    },
79
                    },
Lines 113-122 export class ERMAPIClient extends HttpClient { Link Here
113
                            "package_agreements,package_agreements.agreement,resources+count,vendor",
115
                            "package_agreements,package_agreements.agreement,resources+count,vendor",
114
                    },
116
                    },
115
                }),
117
                }),
116
            getAll: query =>
118
            getAll: (query, params) =>
117
                this.getAll({
119
                this.getAll({
118
                    endpoint: "eholdings/local/packages",
120
                    endpoint: "eholdings/local/packages",
119
                    query: query,
121
                    query,
122
                    params,
120
                    headers: {
123
                    headers: {
121
                        "x-koha-embed": "resources+count,vendor.name",
124
                        "x-koha-embed": "resources+count,vendor.name",
122
                    },
125
                    },
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/http-client.js (-1 / +1 lines)
Lines 57-62 class HttpClient { Link Here
57
            "?" +
57
            "?" +
58
            new URLSearchParams({
58
            new URLSearchParams({
59
                _per_page: -1,
59
                _per_page: -1,
60
                ...(params.params && params.params),
60
                ...(params.query && { q: JSON.stringify(params.query) }),
61
                ...(params.query && { q: JSON.stringify(params.query) }),
61
            });
62
            });
62
        return this._fetchJSON(url, params.headers, {
63
        return this._fetchJSON(url, params.headers, {
63
- 

Return to bug 34219