changeset 5389:661e8a2deed9 extented-report

add simple validation to statsupdate import
author Thomas Junk <thomas.junk@intevation.de>
date Fri, 02 Jul 2021 14:16:02 +0200
parents 60bba8e6322b
children 90fc90148ef8 064ac1014713
files client/src/components/importconfiguration/ScheduledImports.vue client/src/components/importconfiguration/types/Statsupdate.vue
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/importconfiguration/ScheduledImports.vue	Fri Jul 02 13:56:51 2021 +0200
+++ b/client/src/components/importconfiguration/ScheduledImports.vue	Fri Jul 02 14:16:02 2021 +0200
@@ -927,6 +927,7 @@
         data["name"] = "data-quality-report";
       }
       if (this.import_ === this.$options.IMPORTTYPES.STATSUPDATE) {
+        if (!this.statsUpdate) return;
         data["name"] = this.statsUpdate;
       }
       data["send-email"] = this.eMailNotification;
@@ -1024,6 +1025,7 @@
         config["name"] = "data-quality-report";
       }
       if (this.import_ === this.$options.IMPORTTYPES.STATSUPDATE) {
+        if (!this.statsUpdate) return;
         config["name"] = this.statsUpdate;
       }
       config["send-email"] = this.eMailNotification;
--- a/client/src/components/importconfiguration/types/Statsupdate.vue	Fri Jul 02 13:56:51 2021 +0200
+++ b/client/src/components/importconfiguration/types/Statsupdate.vue	Fri Jul 02 14:16:02 2021 +0200
@@ -12,6 +12,9 @@
             v-model="selectedStatsUpdate"
             class="ml-1 mr-1 form-control form-control-sm"
           >
+            <option value="" v-if="this.statsUpdates.length === 0"
+              ><translate>No data selectable</translate></option
+            >
             <option
               v-for="(option, index) in this.statsUpdates"
               :key="index"