+
Loading...
+
There are no agreements defined.
-
Loading...
@@ -15,6 +15,7 @@ import { createVNode, defineComponent, render, resolveComponent } from 'vue'
import { useVendorStore } from "../../stores/vendors"
import { useAVStore } from "../../stores/authorised_values"
import { storeToRefs } from "pinia"
+import { fetchAgreements } from "../../fetch"
export default {
setup() {
@@ -47,6 +48,17 @@ export default {
}
)
},
+ beforeRouteEnter(to, from, next) {
+ next(vm => {
+ vm.getAgreements()
+ })
+ },
+ methods: {
+ async getAgreements() {
+ const agreements = await fetchAgreements()
+ this.agreements = agreements
+ },
+ },
updated() {
let show_agreement = this.show_agreement
let edit_agreement = this.edit_agreement
diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsShow.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsShow.vue
index 10377d0e25..d96a29af9b 100644
--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsShow.vue
+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsShow.vue
@@ -1,168 +1,182 @@
- Agreement #{{ agreement.agreement_id }}
-
-