1 import { setError } from "./messages";
3 export const fetchAgreement = async function (agreement_id) {
4 if (!agreement_id) return;
5 const apiUrl = "/api/v1/erm/agreements/" + agreement_id;
10 "periods,user_roles,user_roles.patron,agreement_licenses,agreement_licenses.license,agreement_relationships,agreement_relationships.related_agreement,documents",
13 .then((res) => res.json())
25 export const fetchAgreements = async function () {
26 const apiUrl = "/api/v1/erm/agreements";
29 .then((res) => res.json())
41 export const fetchLicense = async function (license_id) {
42 if (!license_id) return;
43 const apiUrl = "/api/v1/erm/licenses/" + license_id;
46 .then((res) => res.json())
58 export const fetchLicenses = async function () {
59 const apiUrl = "/api/v1/erm/licenses";
62 .then((res) => res.json())
74 export const fetchPatron = async function (patron_id) {
75 if (!patron_id) return;
76 const apiUrl = "/api/v1/patrons/" + patron_id;
79 .then((res) => res.json())
91 export const fetchVendors = async function () {
92 const apiUrl = "/api/v1/acquisitions/vendors";
95 .then((res) => res.json())