diff client/src/components/importschedule/Importscheduledetail.vue @ 1999:c420add2dec2 importschedulerefac

small errors fixed
author Thomas Junk <thomas.junk@intevation.de>
date Thu, 24 Jan 2019 14:24:00 +0100
parents ceb6aaff6c8b
children d8874f78fd7b
line wrap: on
line diff
--- a/client/src/components/importschedule/Importscheduledetail.vue	Thu Jan 24 14:10:08 2019 +0100
+++ b/client/src/components/importschedule/Importscheduledetail.vue	Thu Jan 24 14:24:00 2019 +0100
@@ -490,6 +490,50 @@
     dialogLabel() {
       if (this.id) return this.$gettext("Import") + " " + this.id;
       return this.$gettext("New Import");
+    },
+    isCredentialsRequired() {
+      switch (this.import_) {
+        case this.$options.IMPORTTYPES.WATERWAYGAUGES:
+        case this.$options.IMPORTTYPES.DISTANCEMARKSVIRTUAL:
+          return true;
+        default:
+          return false;
+      }
+    },
+    isURLRequired() {
+      switch (this.import_) {
+        case this.$options.IMPORTTYPES.BOTTLENECK:
+        case this.$options.IMPORTTYPES.WATERWAYAXIS:
+        case this.$options.IMPORTTYPES.GAUGEMEASUREMENT:
+        case this.$options.IMPORTTYPES.FAIRWAYAVAILABILITY:
+        case this.$options.IMPORTTYPES.WATERWAYAREA:
+        case this.$options.IMPORTTYPES.FAIRWAYDIMENSION:
+        case this.$options.IMPORTTYPES.WATERWAYGAUGES:
+        case this.$options.IMPORTTYPES.DISTANCEMARKSVIRTUAL:
+          return true;
+        default:
+          return false;
+      }
+    },
+    isFeatureTypeRequired() {
+      switch (this.import_) {
+        case this.$options.IMPORTTYPES.WATERWAYAXIS:
+        case this.$options.IMPORTTYPES.WATERWAYAREA:
+        case this.$options.IMPORTTYPES.FAIRWAYDIMENSION:
+          return true;
+        default:
+          return false;
+      }
+    },
+    isSortbyRequired() {
+      switch (this.import_) {
+        case this.$options.IMPORTTYPES.WATERWAYAXIS:
+        case this.$options.IMPORTTYPES.WATERWAYAREA:
+        case this.$options.IMPORTTYPES.FAIRWAYDIMENSION:
+          return true;
+        default:
+          return false;
+      }
     }
   },
   methods: {
@@ -688,11 +732,11 @@
         )
           return;
         const values = {
-          los: this.LOS,
-          depth: this.depth
+          los: this.LOS * 1,
+          depth: this.depth * 1
         };
-        values["min-width"] = this.minWidth;
-        values["max-width"] = this.maxWidth;
+        values["min-width"] = this.minWidth * 1;
+        values["max-width"] = this.maxWidth * 1;
         values["source-organization"] = this.sourceOrganization;
         addAttribute(data, values);
       }