View | Details | Raw Unified | Return to bug 33408
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsEBSCOPackagesList.vue (-3 / +3 lines)
Lines 82-88 export default { Link Here
82
        const { get_lib_from_av, map_av_dt_filter } = AVStore
82
        const { get_lib_from_av, map_av_dt_filter } = AVStore
83
83
84
        const ERMStore = inject("ERMStore")
84
        const ERMStore = inject("ERMStore")
85
        const { providers } = ERMStore
85
        const { sysprefs } = ERMStore
86
86
87
        const table = ref()
87
        const table = ref()
88
        const filters = reactive({
88
        const filters = reactive({
Lines 98-104 export default { Link Here
98
            get_lib_from_av,
98
            get_lib_from_av,
99
            escape_str,
99
            escape_str,
100
            map_av_dt_filter,
100
            map_av_dt_filter,
101
            providers,
101
            sysprefs,
102
            table,
102
            table,
103
        }
103
        }
104
    },
104
    },
Lines 168-174 export default { Link Here
168
            this.show_table = true
168
            this.show_table = true
169
            this.local_count_packages = null
169
            this.local_count_packages = null
170
170
171
            if (this.providers.includes("local")) {
171
            if (this.sysprefs.ERMProviders.includes("local")) {
172
                const client = APIClient.erm
172
                const client = APIClient.erm
173
                const query = this.filters
173
                const query = this.filters
174
                    ? {
174
                    ? {
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsEBSCOTitlesList.vue (-3 / +3 lines)
Lines 85-91 export default { Link Here
85
        const { get_lib_from_av } = AVStore
85
        const { get_lib_from_av } = AVStore
86
86
87
        const ERMStore = inject("ERMStore")
87
        const ERMStore = inject("ERMStore")
88
        const { providers } = ERMStore
88
        const { sysprefs } = ERMStore
89
89
90
        const table = ref()
90
        const table = ref()
91
        const filters = reactive({
91
        const filters = reactive({
Lines 99-105 export default { Link Here
99
            av_title_publication_types,
99
            av_title_publication_types,
100
            get_lib_from_av,
100
            get_lib_from_av,
101
            escape_str,
101
            escape_str,
102
            providers,
102
            sysprefs,
103
            table,
103
            table,
104
        }
104
        }
105
    },
105
    },
Lines 178-184 export default { Link Here
178
                        "/api/v1/erm/eholdings/ebsco/titles"
178
                        "/api/v1/erm/eholdings/ebsco/titles"
179
                    )
179
                    )
180
                }
180
                }
181
                if (this.providers.includes("local")) {
181
                if (this.sysprefs.ERMProviders.includes("local")) {
182
                    const client = APIClient.erm
182
                    const client = APIClient.erm
183
183
184
                    const q = this.filters
184
                    const q = this.filters
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue (-4 / +3 lines)
Lines 48-54 Link Here
48
                                    <li>
48
                                    <li>
49
                                        <ul>
49
                                        <ul>
50
                                            <li
50
                                            <li
51
                                                v-for="provider in providers"
51
                                                v-for="provider in sysprefs.ERMProviders"
52
                                                :key="provider"
52
                                                :key="provider"
53
                                            >
53
                                            >
54
                                                <router-link
54
                                                <router-link
Lines 138-151 export default { Link Here
138
138
139
        const ERMStore = inject("ERMStore")
139
        const ERMStore = inject("ERMStore")
140
140
141
        const { sysprefs, providers } = storeToRefs(ERMStore)
141
        const { sysprefs } = storeToRefs(ERMStore)
142
142
143
        return {
143
        return {
144
            vendorStore,
144
            vendorStore,
145
            AVStore,
145
            AVStore,
146
            ERMStore,
146
            ERMStore,
147
            sysprefs,
147
            sysprefs,
148
            providers,
149
            setError,
148
            setError,
150
            loading,
149
            loading,
151
            loaded,
150
            loaded,
Lines 214-220 export default { Link Here
214
            promises.push(
213
            promises.push(
215
                sysprefs_client.sysprefs.get("ERMProviders").then(
214
                sysprefs_client.sysprefs.get("ERMProviders").then(
216
                    providers => {
215
                    providers => {
217
                        this.providers = providers.value.split(",")
216
                        this.sysprefs.ERMProviders = providers.value.split(",")
218
                    },
217
                    },
219
                    error => {}
218
                    error => {}
220
                )
219
                )
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/erm.js (-2 / +1 lines)
Lines 4-10 export const useERMStore = defineStore("erm", { Link Here
4
    state: () => ({
4
    state: () => ({
5
        sysprefs: {
5
        sysprefs: {
6
            ERMModule: false,
6
            ERMModule: false,
7
            ERMProviders: [],
7
        },
8
        },
8
        providers: [],
9
    }),
9
    }),
10
});
10
});
11
- 

Return to bug 33408