4 <div class="main container-fluid" v-if="ERMModule">
6 <div class="col-sm-10 col-sm-push-2">
13 <div class="col-sm-2 col-sm-pull-10">
16 <div id="navmenulist">
17 <h5>{{ $__("E-resource management") }}</h5>
21 to="/cgi-bin/koha/erm/agreements"
23 <i class="fa fa-check-circle-o"></i>
24 {{ $__("Agreements") }}</router-link
29 to="/cgi-bin/koha/erm/licenses"
31 <i class="fa fa-gavel"></i>
32 {{ $__("Licenses") }}</router-link
37 to="/cgi-bin/koha/erm/eholdings"
40 <i class="fa fa-crosshairs"></i>
41 {{ $__("eHoldings") }}
48 v-for="provider in erm_providers"
52 v-if="provider == 'local'"
53 :to="`/cgi-bin/koha/erm/eholdings/local`"
57 class="fa fa-map-marker"
67 :to="`/cgi-bin/koha/erm/eholdings/ebsco`"
70 <i class="fa fa-globe"></i>
78 :to="`/cgi-bin/koha/erm/eholdings/${provider}/packages`"
90 :to="`/cgi-bin/koha/erm/eholdings/${provider}/titles`"
93 class="fa fa-sort-alpha-asc"
111 <div class="main container-fluid" v-else>
118 import { inject } from "vue"
119 import Breadcrumb from "../../components/Breadcrumb.vue"
120 import Dialog from "../../components/Dialog.vue"
121 import { APIClient } from "../../fetch/api-client.js"
122 import "vue-select/dist/vue-select.css"
123 import { storeToRefs } from "pinia"
127 const vendorStore = inject("vendorStore")
129 const AVStore = inject("AVStore")
131 const mainStore = inject("mainStore")
133 const { loading, loaded, setError } = mainStore
147 component: "agreement",
151 if (!this.ERMModule) {
152 return this.setError(
154 'The e-resource management module is disabled, turn on <a href="/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=ERMModule">ERMModule</a> to use it'
161 const acq_client = APIClient.acquisition
162 acq_client.vendors.getAll().then(
164 this.vendorStore.vendors = vendors
165 this.initialized = true
170 const av_client = APIClient.authorised_values
171 const authorised_values = {
172 av_agreement_statuses: "ERM_AGREEMENT_STATUS",
173 av_agreement_closure_reasons: "ERM_AGREEMENT_CLOSURE_REASON",
174 av_agreement_renewal_priorities: "ERM_AGREEMENT_RENEWAL_PRIORITY",
175 av_user_roles: "ERM_USER_ROLES",
176 av_license_types: "ERM_LICENSE_TYPE",
177 av_license_statuses: "ERM_LICENSE_STATUS",
178 av_agreement_license_statuses: "ERM_AGREEMENT_LICENSE_STATUS",
179 av_agreement_license_location: "ERM_AGREEMENT_LICENSE_LOCATION",
180 av_package_types: "ERM_PACKAGE_TYPE",
181 av_package_content_types: "ERM_PACKAGE_CONTENT_TYPE",
182 av_title_publication_types: "ERM_TITLE_PUBLICATION_TYPE",
185 let av_cat_array = Object.keys(authorised_values).map(function (
188 return '"' + authorised_values[av_cat] + '"'
192 .getCategoriesWithValues(av_cat_array)
193 .then(av_categories => {
194 Object.entries(authorised_values).forEach(
195 ([av_var, av_cat]) => {
196 const av_match = av_categories.find(
197 element => element.category_name == av_cat
199 this.AVStore[av_var] = av_match.authorised_values
203 .then(() => this.loaded())
213 #navmenulist a.router-link-active {
223 display: inline-block;
224 background-color: white;
229 input:not([type="submit"]):not([type="search"]):not([type="button"]):not([type="checkbox"]),
231 border-color: rgba(60, 60, 60, 0.26);
240 #navmenulist ul li a.disabled {
242 pointer-events: none;
245 #navmenulist ul li a.disabled.router-link-active {