changeset 1960:e5c5954fbd84

define stretches: validation
author Thomas Junk <thomas.junk@intevation.de>
date Tue, 22 Jan 2019 17:22:46 +0100
parents 84e475938b75
children 9b9f1d164f26
files client/src/components/ImportStretches.vue
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/ImportStretches.vue	Tue Jan 22 17:12:57 2019 +0100
+++ b/client/src/components/ImportStretches.vue	Tue Jan 22 17:22:46 2019 +0100
@@ -367,6 +367,8 @@
         "startrhm",
         "endrhm",
         "objbn",
+        "nobjbn",
+        "countryCode",
         "date_info",
         "source"
       ];
@@ -380,6 +382,18 @@
     },
     save() {
       this.validate();
+      if (!this.pointsValid) return;
+      if (
+        !this.id ||
+        !this.startrhm ||
+        !this.endrhm ||
+        !this.source ||
+        !this.date_info ||
+        !this.objbn ||
+        !this.nobjbn ||
+        !this.countryCode
+      )
+        return;
       const data = {
         name: this.id,
         from: this.startrhm,