2 <h2>License #{{ license.license_id }}</h2>
4 <fieldset class="rows">
7 <label>License name:</label>
13 <label>Description: </label>
15 {{ license.description }}
21 get_lib_from_av(av_license_types, license.type)
25 <label>Status: </label>
27 get_lib_from_av(av_license_statuses, license.status)
32 <label>Started on:</label>
33 <span>{{ format_date(license.started_on) }}</span>
37 <label>Ended on:</label>
38 <span>{{ format_date(license.ended_on) }}</span>
42 <fieldset class="action">
44 to="/cgi-bin/koha/erm/licenses"
54 import { useAVStore } from "../../stores/authorised_values"
55 import { useMainStore } from "../../stores/main"
56 import { storeToRefs } from "pinia"
57 import { fetchLicense } from "../../fetch"
61 const format_date = $date
62 const get_lib_from_av = function (arr, av) {
64 (e) => e.authorised_value == av
69 const AVStore = useAVStore()
73 } = storeToRefs(AVStore)
75 const mainStore = useMainStore()
76 const { setError } = mainStore
94 started_on: undefined,
99 beforeRouteEnter(to, from, next) {
100 if (to.params.license_id) {
102 vm.license = vm.getLicense(to.params.license_id)
109 async getLicense(license_id) {
110 const license = await fetchLicense(license_id)
111 this.license = license
116 name: "LicensesShow",