From ae278ce2f35b92951c594cf60bb9a39acfbccf35 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Wed, 12 Apr 2023 09:42:29 +0000 Subject: [PATCH] Bug 33408: Move providers into syspref array ERMProviders is a sys pref, place it in sysprefs Signed-off-by: Pedro Amorim Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 741ccb6e44304a32acceb3e68d2fd25c27c6b37f) Signed-off-by: Matt Blenkinsop --- .../js/vue/components/ERM/EHoldingsEBSCOPackagesList.vue | 6 +++--- .../js/vue/components/ERM/EHoldingsEBSCOTitlesList.vue | 6 +++--- .../intranet-tmpl/prog/js/vue/components/ERM/Main.vue | 7 +++---- koha-tmpl/intranet-tmpl/prog/js/vue/stores/erm.js | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsEBSCOPackagesList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsEBSCOPackagesList.vue index 9cffce6f7e..d2573e988f 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsEBSCOPackagesList.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsEBSCOPackagesList.vue @@ -82,7 +82,7 @@ export default { const { get_lib_from_av, map_av_dt_filter } = AVStore const ERMStore = inject("ERMStore") - const { providers } = ERMStore + const { sysprefs } = ERMStore const table = ref() const filters = reactive({ @@ -98,7 +98,7 @@ export default { get_lib_from_av, escape_str, map_av_dt_filter, - providers, + sysprefs, table, } }, @@ -168,7 +168,7 @@ export default { this.show_table = true this.local_count_packages = null - if (this.providers.includes("local")) { + if (this.sysprefs.ERMProviders.includes("local")) { const client = APIClient.erm const query = this.filters ? { diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsEBSCOTitlesList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsEBSCOTitlesList.vue index be1333af6d..c29c9a2783 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsEBSCOTitlesList.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsEBSCOTitlesList.vue @@ -85,7 +85,7 @@ export default { const { get_lib_from_av } = AVStore const ERMStore = inject("ERMStore") - const { providers } = ERMStore + const { sysprefs } = ERMStore const table = ref() const filters = reactive({ @@ -99,7 +99,7 @@ export default { av_title_publication_types, get_lib_from_av, escape_str, - providers, + sysprefs, table, } }, @@ -178,7 +178,7 @@ export default { "/api/v1/erm/eholdings/ebsco/titles" ) } - if (this.providers.includes("local")) { + if (this.sysprefs.ERMProviders.includes("local")) { const client = APIClient.erm const q = this.filters diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue index ded1dae20c..9f4a1c99dd 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue @@ -48,7 +48,7 @@
    • { - this.providers = providers.value.split(",") + this.sysprefs.ERMProviders = providers.value.split(",") }, error => {} ) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/erm.js b/koha-tmpl/intranet-tmpl/prog/js/vue/stores/erm.js index 91a42d0c01..0b759b8741 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/erm.js +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/stores/erm.js @@ -4,7 +4,7 @@ export const useERMStore = defineStore("erm", { state: () => ({ sysprefs: { ERMModule: false, + ERMProviders: [], }, - providers: [], }), }); -- 2.39.2