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 17-26 export class ERMAPIClient extends HttpClient { Link Here
17
                            "periods,user_roles,user_roles.patron,agreement_licenses,agreement_licenses.license,agreement_relationships,agreement_relationships.related_agreement,documents,agreement_packages,agreement_packages.package,vendor",
17
                            "periods,user_roles,user_roles.patron,agreement_licenses,agreement_licenses.license,agreement_relationships,agreement_relationships.related_agreement,documents,agreement_packages,agreement_packages.package,vendor",
18
                    },
18
                    },
19
                }),
19
                }),
20
            getAll: query =>
20
            getAll: (query, params) =>
21
                this.getAll({
21
                this.getAll({
22
                    endpoint: "agreements",
22
                    endpoint: "agreements",
23
                    query: query,
23
                    query,
24
                    params,
24
                }),
25
                }),
25
            delete: id =>
26
            delete: id =>
26
                this.delete({
27
                this.delete({
Lines 59-68 export class ERMAPIClient extends HttpClient { Link Here
59
                            "user_roles,user_roles.patron,vendor,documents",
60
                            "user_roles,user_roles.patron,vendor,documents",
60
                    },
61
                    },
61
                }),
62
                }),
62
            getAll: query =>
63
            getAll: (query, params) =>
63
                this.getAll({
64
                this.getAll({
64
                    endpoint: "licenses",
65
                    endpoint: "licenses",
65
                    query: query,
66
                    query,
67
                    params,
66
                    headers: {
68
                    headers: {
67
                        "x-koha-embed": "vendor",
69
                        "x-koha-embed": "vendor",
68
                    },
70
                    },
Lines 104-113 export class ERMAPIClient extends HttpClient { Link Here
104
                            "package_agreements,package_agreements.agreement,resources+count,vendor",
106
                            "package_agreements,package_agreements.agreement,resources+count,vendor",
105
                    },
107
                    },
106
                }),
108
                }),
107
            getAll: query =>
109
            getAll: (query, params) =>
108
                this.getAll({
110
                this.getAll({
109
                    endpoint: "eholdings/local/packages",
111
                    endpoint: "eholdings/local/packages",
110
                    query: query,
112
                    query,
113
                    params,
111
                    headers: {
114
                    headers: {
112
                        "x-koha-embed": "resources+count,vendor.name",
115
                        "x-koha-embed": "resources+count,vendor.name",
113
                    },
116
                    },
(-)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