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

(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersCounterLogs.vue (-2 / +2 lines)
Lines 66-72 export default { Link Here
66
            await client.counter_files
66
            await client.counter_files
67
                .count({
67
                .count({
68
                    usage_data_provider_id:
68
                    usage_data_provider_id:
69
                        this.$route.params.usage_data_provider_id,
69
                        this.$route.params.erm_usage_data_provider_id,
70
                })
70
                })
71
                .then(
71
                .then(
72
                    count => {
72
                    count => {
Lines 77-83 export default { Link Here
77
                )
77
                )
78
        },
78
        },
79
        table_url() {
79
        table_url() {
80
            let url = `/api/v1/erm/counter_logs?usage_data_provider_id=${this.$route.params.usage_data_provider_id}`
80
            let url = `/api/v1/erm/counter_logs?usage_data_provider_id=${this.$route.params.erm_usage_data_provider_id}`
81
            return url
81
            return url
82
        },
82
        },
83
        download_counter_file(counter_log, dt, event) {
83
        download_counter_file(counter_log, dt, event) {
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersFileImport.vue (-2 / +2 lines)
Lines 74-80 export default { Link Here
74
        loadFile(filename, content) {
74
        loadFile(filename, content) {
75
            this.file.filename = filename
75
            this.file.filename = filename
76
            this.file.file_content = btoa(content)
76
            this.file.file_content = btoa(content)
77
            this.getDataProvider(this.$route.params.usage_data_provider_id)
77
            this.getDataProvider(this.$route.params.erm_usage_data_provider_id)
78
        },
78
        },
79
        addDocument(e) {
79
        addDocument(e) {
80
            e.preventDefault()
80
            e.preventDefault()
Lines 129-135 export default { Link Here
129
        },
129
        },
130
    },
130
    },
131
    mounted() {
131
    mounted() {
132
        this.getDataProvider(this.$route.params.usage_data_provider_id)
132
        this.getDataProvider(this.$route.params.erm_usage_data_provider_id)
133
    },
133
    },
134
    components: {
134
    components: {
135
        ButtonSubmit,
135
        ButtonSubmit,
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersFormAdd.vue (-5 / +5 lines)
Lines 435-446 export default { Link Here
435
    },
435
    },
436
    beforeRouteEnter(to, from, next) {
436
    beforeRouteEnter(to, from, next) {
437
        next(vm => {
437
        next(vm => {
438
            if (to.params.usage_data_provider_id) {
438
            if (to.params.erm_usage_data_provider_id) {
439
                vm.getDataProvider(to.params.usage_data_provider_id)
439
                vm.getDataProvider(to.params.erm_usage_data_provider_id)
440
            } else {
440
            } else {
441
                vm.initialized = true
441
                vm.initialized = true
442
            }
442
            }
443
            if (from.params.usage_data_provider_id) {
443
            if (from.params.erm_usage_data_provider_id) {
444
                vm.previous_route = "data_provider_show"
444
                vm.previous_route = "data_provider_show"
445
            } else {
445
            } else {
446
                vm.previous_route = "data_provider_list"
446
                vm.previous_route = "data_provider_list"
Lines 592-598 export default { Link Here
592
                            this.$router.push({
592
                            this.$router.push({
593
                                name: "UsageStatisticsDataProvidersShow",
593
                                name: "UsageStatisticsDataProvidersShow",
594
                                params: {
594
                                params: {
595
                                    usage_data_provider_id:
595
                                    erm_usage_data_provider_id:
596
                                        erm_usage_data_provider_id,
596
                                        erm_usage_data_provider_id,
597
                                },
597
                                },
598
                            })
598
                            })
Lines 608-614 export default { Link Here
608
                        this.$router.push({
608
                        this.$router.push({
609
                            name: "UsageStatisticsDataProvidersShow",
609
                            name: "UsageStatisticsDataProvidersShow",
610
                            params: {
610
                            params: {
611
                                usage_data_provider_id:
611
                                erm_usage_data_provider_id:
612
                                    erm_usage_data_provider_id,
612
                                    erm_usage_data_provider_id,
613
                            },
613
                            },
614
                        })
614
                        })
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersShow.vue (-1 / +1 lines)
Lines 171-177 export default { Link Here
171
    },
171
    },
172
    beforeRouteEnter(to, from, next) {
172
    beforeRouteEnter(to, from, next) {
173
        next(vm => {
173
        next(vm => {
174
            vm.getUsageDataProvider(to.params.usage_data_provider_id)
174
            vm.getUsageDataProvider(to.params.erm_usage_data_provider_id)
175
        })
175
        })
176
    },
176
    },
177
    methods: {
177
    methods: {
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsProviderDataList.vue (-2 / +2 lines)
Lines 46-52 export default { Link Here
46
            await client[`usage_${this.data_type}s`]
46
            await client[`usage_${this.data_type}s`]
47
                .count({
47
                .count({
48
                    usage_data_provider_id:
48
                    usage_data_provider_id:
49
                        this.$route.params.usage_data_provider_id,
49
                        this.$route.params.erm_usage_data_provider_id,
50
                })
50
                })
51
                .then(
51
                .then(
52
                    count => {
52
                    count => {
Lines 59-65 export default { Link Here
59
        table_url() {
59
        table_url() {
60
            let url = "/api/v1/erm/usage_%ss?usage_data_provider_id=%s".format(
60
            let url = "/api/v1/erm/usage_%ss?usage_data_provider_id=%s".format(
61
                this.data_type,
61
                this.data_type,
62
                this.$route.params.usage_data_provider_id
62
                this.$route.params.erm_usage_data_provider_id
63
            )
63
            )
64
            return url
64
            return url
65
        },
65
        },
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/routes/erm.js (-3 / +2 lines)
Lines 306-312 export const routes = [ Link Here
306
                                ),
306
                                ),
307
                            },
307
                            },
308
                            {
308
                            {
309
                                path: ":usage_data_provider_id",
309
                                path: ":erm_usage_data_provider_id",
310
                                name: "UsageStatisticsDataProvidersShow",
310
                                name: "UsageStatisticsDataProvidersShow",
311
                                component: markRaw(
311
                                component: markRaw(
312
                                    UsageStatisticsDataProvidersShow
312
                                    UsageStatisticsDataProvidersShow
Lines 322-328 export const routes = [ Link Here
322
                                title: $__("Add data provider"),
322
                                title: $__("Add data provider"),
323
                            },
323
                            },
324
                            {
324
                            {
325
                                path: "edit/:usage_data_provider_id",
325
                                path: "edit/:erm_usage_data_provider_id",
326
                                name: "UsageStatisticsDataProvidersFormAddEdit",
326
                                name: "UsageStatisticsDataProvidersFormAddEdit",
327
                                component: markRaw(
327
                                component: markRaw(
328
                                    UsageStatisticsDataProvidersFormAdd
328
                                    UsageStatisticsDataProvidersFormAdd
329
- 

Return to bug 37301