2 <div v-if="!this.initialized">{{ $t("Loading") }}</div>
3 <div v-else id="licenses_show">
5 {{ $t("License .id", { id: license.license_id }) }}
6 <span class="action_links">
8 :to="`/cgi-bin/koha/erm/licenses/edit/${license.license_id}`"
10 ><i class="fa fa-pencil"></i
13 :to="`/cgi-bin/koha/erm/licenses/delete/${license.license_id}`"
15 ><i class="fa fa-trash"></i
20 <fieldset class="rows">
23 <label>{{ $t("License name") }}:</label>
29 <label>{{ $t("Vendor") }}:</label>
30 <span v-if="license.vendor_id">
32 :href="`/cgi-bin/koha/acqui/booksellers.pl?booksellerid=${license.vendor_id}`"
34 {{ license.vendor.name }}
39 <label>{{ $t("Description") }}:</label>
41 {{ license.description }}
45 <label>{{ $t("Type") }}:</label>
47 get_lib_from_av("av_license_types", license.type)
51 <label>{{ $t("Status") }}:</label>
54 "av_license_statuses",
61 <label>{{ $t("Started on") }}:</label>
62 <span>{{ format_date(license.started_on) }}</span>
66 <label>{{ $t("Ended on") }}:</label>
67 <span>{{ format_date(license.ended_on) }}</span>
71 <fieldset class="action">
73 to="/cgi-bin/koha/erm/licenses"
76 >{{ $t("Close") }}</router-link
84 import { useAVStore } from "../../stores/authorised_values"
85 import { fetchLicense } from "../../fetch"
89 const format_date = $date
91 const AVStore = useAVStore()
92 const { get_lib_from_av } = AVStore
109 started_on: undefined,
115 beforeRouteEnter(to, from, next) {
117 vm.license = vm.getLicense(to.params.license_id)
121 async getLicense(license_id) {
122 const license = await fetchLicense(license_id)
123 this.license = license
124 this.initialized = true
129 name: "LicensesShow",