From bac1c4d72684b08b98c6b10894971272e10cc252 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 10 Jul 2024 14:01:27 +0200 Subject: [PATCH] Bug 37301: Remove methods We do not need the methods, we can emit from the template. Also rename the events to the wording more consistent with what we have. --- .../js/vue/components/ERM/AgreementsList.vue | 2 +- .../js/vue/components/ERM/AgreementsShow.vue | 4 ++-- .../prog/js/vue/components/ToolbarButton.vue | 19 ++++--------------- 3 files changed, 7 insertions(+), 18 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue index 577f43c6fa4..a79e0c973cf 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue @@ -4,7 +4,7 @@ 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 000614ef4c5..a7bc5f23046 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 @@ -2,8 +2,8 @@
{{ $__("Loading") }}
- - + +

diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ToolbarButton.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ToolbarButton.vue index 84cec0d11ff..c226ed98f52 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ToolbarButton.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ToolbarButton.vue @@ -1,11 +1,11 @@ @@ -32,18 +32,7 @@ export default { type: String, }, }, - methods: { - click_add() { - this.$emit("add-clicked") - }, - click_delete() { - this.$emit("delete-clicked") - }, - click_edit() { - this.$emit("edit-clicked") - }, - }, - emits: ["add-clicked", "delete-clicked", "edit-clicked"], + emits: ["addResource", "deleteResource", "editResource"], name: "Toolbar", } -- 2.34.1