2 <div v-if="!initialized">{{ $__("Loading") }}</div>
3 <div v-else id="licenses_show">
5 {{ $__("License #%s").format(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}`"
14 :title="$__('Delete')"
15 ><i class="fa fa-trash"></i
20 <fieldset class="rows">
23 <label>{{ $__("License name") }}:</label>
29 <label>{{ $__("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>{{ $__("Description") }}:</label>
41 {{ license.description }}
45 <label>{{ $__("Type") }}:</label>
47 get_lib_from_av("av_license_types", license.type)
51 <label>{{ $__("Status") }}:</label>
54 "av_license_statuses",
61 <label>{{ $__("Started on") }}:</label>
62 <span>{{ format_date(license.started_on) }}</span>
66 <label>{{ $__("Ended on") }}:</label>
67 <span>{{ format_date(license.ended_on) }}</span>
69 <li v-if="license.documents.length">
70 <label>{{ $__("Documents") }}</label>
71 <div id="license_documents">
74 v-for="document in license.documents"
75 v-bind:key="document.document_id"
77 <div v-if="document.file_name">
78 <span v-if="document.file_description"
79 >{{ document.file_description }} -
83 :href="`/api/v1/erm/documents/${document.document_id}/file/content`"
85 {{ document.file_name }}
86 <i class="fa fa-download"></i>
88 ({{ document.file_type }}) Uploaded on:
89 {{ format_date(document.uploaded_on) }}
91 <div v-if="document.physical_location">
92 {{ $__("Physical location") }}:
93 {{ document.physical_location }}
95 <div v-if="document.uri">
96 {{ $__("URI") }}: {{ document.uri }}
98 <div v-if="document.notes">
99 {{ $__("Notes") }}: {{ document.notes }}
107 <fieldset class="action">
109 to="/cgi-bin/koha/erm/licenses"
112 >{{ $__("Close") }}</router-link
120 import { inject } from "vue"
121 import { fetchLicense } from "../../fetch"
125 const format_date = $date
127 const AVStore = inject("AVStore")
128 const { get_lib_from_av } = AVStore
145 started_on: undefined,
151 beforeRouteEnter(to, from, next) {
153 vm.license = vm.getLicense(to.params.license_id)
157 async getLicense(license_id) {
158 const license = await fetchLicense(license_id)
159 this.license = license
160 this.initialized = true
164 name: "LicensesShow",
172 #license_documents ul {