2 <div v-if="_is_loading">
5 <div v-else-if="ERMModule">
7 <div class="main container-fluid">
9 <div class="col-sm-10 col-sm-push-2">
16 <div class="col-sm-2 col-sm-pull-10">
19 <div id="navmenulist">
20 <h5>{{ $__("E-resource management") }}</h5>
24 to="/cgi-bin/koha/erm/agreements"
26 <i class="fa fa-check-circle-o"></i>
27 {{ $__("Agreements") }}</router-link
32 to="/cgi-bin/koha/erm/licenses"
34 <i class="fa fa-gavel"></i>
35 {{ $__("Licenses") }}</router-link
40 to="/cgi-bin/koha/erm/eholdings"
43 <i class="fa fa-crosshairs"></i>
44 {{ $__("eHoldings") }}
51 v-for="provider in erm_providers"
55 v-if="provider == 'local'"
56 :to="`/cgi-bin/koha/erm/eholdings/local`"
60 class="fa fa-map-marker"
70 :to="`/cgi-bin/koha/erm/eholdings/ebsco`"
73 <i class="fa fa-globe"></i>
81 :to="`/cgi-bin/koha/erm/eholdings/${provider}/packages`"
93 :to="`/cgi-bin/koha/erm/eholdings/${provider}/titles`"
96 class="fa fa-sort-alpha-asc"
118 "The e-resource management module is disabled, turn on 'ERMModule' to use it"
125 import { inject } from "vue"
126 import Breadcrumb from "../../components/Breadcrumb.vue"
127 import Dialog from "../../components/Dialog.vue"
128 import { APIClient } from "../../fetch/api-client.js"
129 import "vue-select/dist/vue-select.css"
130 import { storeToRefs } from "pinia"
134 const vendorStore = inject("vendorStore")
136 const AVStore = inject("AVStore")
138 const mainStore = inject("mainStore")
140 // Note that we cannot use loading and loaded from messages
141 // Pinia is not initiated yet there
142 const { _is_loading } = storeToRefs(mainStore)
155 component: "agreement",
159 this.mainStore._is_loading = true
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.mainStore._is_loading = false))
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 {