Bugzilla – Attachment 174627 Details for
Bug 37301
Further improve how we build Vue components
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37301: Fix: URL param needs to match attr_id
Bug-37301-Fix-URL-param-needs-to-match-attrid.patch (text/plain), 8.17 KB, created by
Pedro Amorim
on 2024-11-15 16:45:30 UTC
(
hide
)
Description:
Bug 37301: Fix: URL param needs to match attr_id
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-11-15 16:45:30 UTC
Size:
8.17 KB
patch
obsolete
>From 3f21956048ee34bb24a625183b647adaa3deaff7 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Thu, 17 Oct 2024 15:15:53 +0000 >Subject: [PATCH] Bug 37301: Fix: URL param needs to match attr_id > >url param needs to match attr_id >usage statistics is non-standard when compared to agreements+licenses etc. >using usage_data_provider_id but resource id field is erm_usage_data_provider_id. >This patch is fixing that. >--- > .../ERM/UsageStatisticsDataProvidersCounterLogs.vue | 4 ++-- > .../ERM/UsageStatisticsDataProvidersFileImport.vue | 4 ++-- > .../ERM/UsageStatisticsDataProvidersFormAdd.vue | 10 +++++----- > .../ERM/UsageStatisticsDataProvidersShow.vue | 2 +- > .../components/ERM/UsageStatisticsProviderDataList.vue | 4 ++-- > koha-tmpl/intranet-tmpl/prog/js/vue/routes/erm.js | 4 ++-- > 6 files changed, 14 insertions(+), 14 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersCounterLogs.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersCounterLogs.vue >index 741545d07e..e676ddbe95 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersCounterLogs.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersCounterLogs.vue >@@ -66,7 +66,7 @@ export default { > await client.counter_files > .count({ > usage_data_provider_id: >- this.$route.params.usage_data_provider_id, >+ this.$route.params.erm_usage_data_provider_id, > }) > .then( > count => { >@@ -77,7 +77,7 @@ export default { > ) > }, > table_url() { >- let url = `/api/v1/erm/counter_logs?usage_data_provider_id=${this.$route.params.usage_data_provider_id}` >+ let url = `/api/v1/erm/counter_logs?usage_data_provider_id=${this.$route.params.erm_usage_data_provider_id}` > return url > }, > download_counter_file(counter_log, dt, event) { >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersFileImport.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersFileImport.vue >index 617af051ba..f0e1903728 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersFileImport.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersFileImport.vue >@@ -74,7 +74,7 @@ export default { > loadFile(filename, content) { > this.file.filename = filename > this.file.file_content = btoa(content) >- this.getDataProvider(this.$route.params.usage_data_provider_id) >+ this.getDataProvider(this.$route.params.erm_usage_data_provider_id) > }, > addDocument(e) { > e.preventDefault() >@@ -129,7 +129,7 @@ export default { > }, > }, > mounted() { >- this.getDataProvider(this.$route.params.usage_data_provider_id) >+ this.getDataProvider(this.$route.params.erm_usage_data_provider_id) > }, > components: { > ButtonSubmit, >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersFormAdd.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersFormAdd.vue >index b0c35107f5..973f655331 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersFormAdd.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersFormAdd.vue >@@ -435,12 +435,12 @@ export default { > }, > beforeRouteEnter(to, from, next) { > next(vm => { >- if (to.params.usage_data_provider_id) { >- vm.getDataProvider(to.params.usage_data_provider_id) >+ if (to.params.erm_usage_data_provider_id) { >+ vm.getDataProvider(to.params.erm_usage_data_provider_id) > } else { > vm.initialized = true > } >- if (from.params.usage_data_provider_id) { >+ if (from.params.erm_usage_data_provider_id) { > vm.previous_route = "data_provider_show" > } else { > vm.previous_route = "data_provider_list" >@@ -592,7 +592,7 @@ export default { > this.$router.push({ > name: "UsageStatisticsDataProvidersShow", > params: { >- usage_data_provider_id: >+ erm_usage_data_provider_id: > erm_usage_data_provider_id, > }, > }) >@@ -608,7 +608,7 @@ export default { > this.$router.push({ > name: "UsageStatisticsDataProvidersShow", > params: { >- usage_data_provider_id: >+ erm_usage_data_provider_id: > erm_usage_data_provider_id, > }, > }) >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersShow.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersShow.vue >index 1643dbc91a..47884e46bb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersShow.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersShow.vue >@@ -171,7 +171,7 @@ export default { > }, > beforeRouteEnter(to, from, next) { > next(vm => { >- vm.getUsageDataProvider(to.params.usage_data_provider_id) >+ vm.getUsageDataProvider(to.params.erm_usage_data_provider_id) > }) > }, > methods: { >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsProviderDataList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsProviderDataList.vue >index f3bdf85f75..df4f0586ac 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsProviderDataList.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsProviderDataList.vue >@@ -46,7 +46,7 @@ export default { > await client[`usage_${this.data_type}s`] > .count({ > usage_data_provider_id: >- this.$route.params.usage_data_provider_id, >+ this.$route.params.erm_usage_data_provider_id, > }) > .then( > count => { >@@ -59,7 +59,7 @@ export default { > table_url() { > let url = "/api/v1/erm/usage_%ss?usage_data_provider_id=%s".format( > this.data_type, >- this.$route.params.usage_data_provider_id >+ this.$route.params.erm_usage_data_provider_id > ) > return url > }, >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/routes/erm.js b/koha-tmpl/intranet-tmpl/prog/js/vue/routes/erm.js >index 46c10babbf..f94d1704fc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/routes/erm.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/routes/erm.js >@@ -306,7 +306,7 @@ export const routes = [ > ), > }, > { >- path: ":usage_data_provider_id", >+ path: ":erm_usage_data_provider_id", > name: "UsageStatisticsDataProvidersShow", > component: markRaw( > UsageStatisticsDataProvidersShow >@@ -322,7 +322,7 @@ export const routes = [ > title: $__("Add data provider"), > }, > { >- path: "edit/:usage_data_provider_id", >+ path: "edit/:erm_usage_data_provider_id", > name: "UsageStatisticsDataProvidersFormAddEdit", > component: markRaw( > UsageStatisticsDataProvidersFormAdd >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 37301
:
168709
|
168739
|
168740
|
168741
|
168800
|
168827
|
168828
|
168829
|
168836
|
172713
|
172911
|
172912
|
172913
|
172914
|
172915
|
172916
|
172917
|
172918
|
172919
|
172920
|
172921
|
174612
|
174613
|
174614
|
174615
|
174616
|
174617
|
174618
|
174619
|
174620
|
174621
|
174622
|
174623
|
174624
|
174625
|
174626
| 174627 |
174628
|
174629
|
174630
|
174631