From d63839b6f1f90258ae5fdf70d25f5c976b17d6e4 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Mon, 29 Jul 2024 08:52:39 +0000 Subject: [PATCH] Bug 37288: Allow manual providers to be edited There is a bug preventing manually created providers from being edited. This patch fixes that issue and allows providers to be edited if they have been created manually Test plan: 1) Create a data provider in the ERM manually using the Create manually option 2) Click to edit that provider 3) The form will not load 4) Apply patch and run yarn build 5) Hard refresh the browser 6) The form should now load correctly Signed-off-by: David Nind Signed-off-by: Martin Renvoize --- .../components/ERM/UsageStatisticsDataProvidersFormAdd.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 8311922e2b2..b205956d2da 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 @@ -455,7 +455,7 @@ export default { client.counter_registry.getAll({ name: query }).then( registry_data => { this.registry_data = registry_data - if (caller === "edit") { + if (caller === "edit" && registry_data.length > 0) { this.selected_provider = registry_data.find( platform => platform.name === this.usage_data_provider.name @@ -466,6 +466,8 @@ export default { r => r.report_id === report.value ) ) + } else { + this.manual_form = true } this.searching = false this.initialized = true -- 2.45.2