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("Description") }}:</label>
31 {{ license.description }}
35 <label>{{ $t("Type") }}:</label>
37 get_lib_from_av("av_license_types", license.type)
41 <label>{{ $t("Status") }}:</label>
44 "av_license_statuses",
51 <label>{{ $t("Started on") }}:</label>
52 <span>{{ format_date(license.started_on) }}</span>
56 <label>{{ $t("Ended on") }}:</label>
57 <span>{{ format_date(license.ended_on) }}</span>
61 <fieldset class="action">
63 to="/cgi-bin/koha/erm/licenses"
66 >{{ $t("Close") }}</router-link
74 import { useAVStore } from "../../stores/authorised_values"
75 import { storeToRefs } from "pinia"
76 import { fetchLicense } from "../../fetch"
80 const format_date = $date
82 const AVStore = useAVStore()
83 const { get_lib_from_av } = AVStore
98 started_on: undefined,
104 beforeRouteEnter(to, from, next) {
106 vm.license = vm.getLicense(to.params.license_id)
110 async getLicense(license_id) {
111 const license = await fetchLicense(license_id)
112 this.license = license
113 this.initialized = true
118 name: "LicensesShow",