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

(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/erm.js (-1 / +15 lines)
Lines 1-5 Link Here
1
import { setError } from "../messages";
1
import { setError } from "../messages";
2
2
3
export const fetchAgreement = function (agreement_id) {
4
    if (!agreement_id) return;
5
    const apiUrl = "/api/v1/erm/agreements/" + agreement_id;
6
    return myFetch(apiUrl, {
7
        headers: {
8
            "x-koha-embed":
9
                "periods,user_roles,user_roles.patron,agreement_licenses,agreement_licenses.license,agreement_relationships,agreement_relationships.related_agreement,documents,agreement_packages,agreement_packages.package,vendor",
10
        },
11
    });
12
};
13
14
export const fetchAgreements = function () {
15
    const apiUrl = "/api/v1/erm/agreements?_per_page=-1";
16
    return myFetch(apiUrl);
17
};
3
//TODO: all of these functions should be deleted and reimplemented in the components using ERMAPIClient
18
//TODO: all of these functions should be deleted and reimplemented in the components using ERMAPIClient
4
19
5
export const fetchLicense = function (license_id) {
20
export const fetchLicense = function (license_id) {
6
- 

Return to bug 32939