Bug 33408: Move providers into syspref array
ERMProviders is a sys pref, place it in sysprefs
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 741ccb6e44)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This commit is contained in:
parent
ac5e350ead
commit
ae278ce2f3
|
|
@ -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
|
||||
? {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
<li>
|
||||
<ul>
|
||||
<li
|
||||
v-for="provider in providers"
|
||||
v-for="provider in sysprefs.ERMProviders"
|
||||
:key="provider"
|
||||
>
|
||||
<router-link
|
||||
|
|
@ -138,14 +138,13 @@ export default {
|
|||
|
||||
const ERMStore = inject("ERMStore")
|
||||
|
||||
const { sysprefs, providers } = storeToRefs(ERMStore)
|
||||
const { sysprefs } = storeToRefs(ERMStore)
|
||||
|
||||
return {
|
||||
vendorStore,
|
||||
AVStore,
|
||||
ERMStore,
|
||||
sysprefs,
|
||||
providers,
|
||||
setError,
|
||||
loading,
|
||||
loaded,
|
||||
|
|
@ -214,7 +213,7 @@ export default {
|
|||
promises.push(
|
||||
sysprefs_client.sysprefs.get("ERMProviders").then(
|
||||
providers => {
|
||||
this.providers = providers.value.split(",")
|
||||
this.sysprefs.ERMProviders = providers.value.split(",")
|
||||
},
|
||||
error => {}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ export const useERMStore = defineStore("erm", {
|
|||
state: () => ({
|
||||
sysprefs: {
|
||||
ERMModule: false,
|
||||
ERMProviders: [],
|
||||
},
|
||||
providers: [],
|
||||
}),
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue