changeset 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 352493221fa5
files client/src/components/importschedule/Importscheduledetail.vue client/src/components/importschedule/importtypes/Fairwaydimensions.vue
diffstat 2 files changed, 52 insertions(+), 8 deletions(-) [+]
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);
       }
--- a/client/src/components/importschedule/importtypes/Fairwaydimensions.vue	Thu Jan 24 14:10:08 2019 +0100
+++ b/client/src/components/importschedule/importtypes/Fairwaydimensions.vue	Thu Jan 24 14:24:00 2019 +0100
@@ -202,16 +202,16 @@
       this.$emit("sortByChanged", e.target.value);
     },
     depthChanged(e) {
-      this.$emit("depthChanged", e.target.value);
+      this.$emit("depthChanged", e.target.value * 1);
     },
     LOSChanged(e) {
-      this.$emit("LOSChanged", e.target.value);
+      this.$emit("LOSChanged", e.target.value * 1);
     },
     minWidthChanged(e) {
-      this.$emit("minWidthChanged", e.target.value);
+      this.$emit("minWidthChanged", e.target.value * 1);
     },
     maxWidthChanged(e) {
-      this.$emit("maxWidthChanged", e.target.value);
+      this.$emit("maxWidthChanged", e.target.value * 1);
     },
     sourceOrganizationChanged(e) {
       this.$emit("sourceOrganizationChanged", e.target.value);