From a95b659e6845d09ba2fcf595bc0a9ecd5393fd0e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 5 May 2022 10:13:56 +0200 Subject: [PATCH] =?UTF-8?q?Bug=2032030:=20Use=20Pinia=20for=20vendors=20?= =?UTF-8?q?=F0=9F=8D=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jonathan Field Signed-off-by: Martin Renvoize Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- .../prog/js/vue/components/ERM/Agreements.vue | 22 +---------------- .../vue/components/ERM/AgreementsFormAdd.vue | 14 +++++++++-- .../js/vue/components/ERM/AgreementsList.vue | 11 ++++++++- .../js/vue/components/ERM/AgreementsShow.vue | 16 ++++++++++--- .../prog/js/vue/components/ERM/ERMMain.vue | 24 ++++++++++++++++--- .../intranet-tmpl/prog/js/vue/main-erm.ts | 4 +++- .../prog/js/vue/stores/vendors.js | 7 ++++++ package.json | 1 + 8 files changed, 68 insertions(+), 31 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/js/vue/stores/vendors.js diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Agreements.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Agreements.vue index 37615a5f0d..aa08f6f9fa 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Agreements.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Agreements.vue @@ -4,7 +4,6 @@
{{ error }}
res.json()) - .then( - (result) => { - this.vendors = result - }).catch( - (error) => { - this.$emit('set-error', error) - } - ) - - }, methods: { switchView(view) { this.message = null diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue index cdfc2a2d93..2e8e693a94 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue @@ -165,7 +165,9 @@ /> {{ patron_to_html(role.patron) }} - {{ get_lib_from_av(av_agreement_user_roles, role.role) }} + {{ + get_lib_from_av( + av_agreement_user_roles, + role.role + ) + }} @@ -164,6 +169,8 @@