diff client/src/components/importschedule/Importscheduledetail.vue @ 2586:bc1b43885a4d

Expose axis snapping tolerance in bottleneck upload import
author Tom Gottfried <tom@intevation.de>
date Mon, 11 Mar 2019 17:31:39 +0100
parents ab819b1b748b
children 2ee6c32f1ba6
line wrap: on
line diff
--- a/client/src/components/importschedule/Importscheduledetail.vue	Mon Mar 11 16:53:48 2019 +0100
+++ b/client/src/components/importschedule/Importscheduledetail.vue	Mon Mar 11 17:31:39 2019 +0100
@@ -94,11 +94,12 @@
             :url="url"
           ></Availablefairwaydepth>
           <Bottleneck
-            v-if="import_ == $options.IMPORTTYPES.BOTTLENECK && !directImport"
+            v-if="import_ == $options.IMPORTTYPES.BOTTLENECK"
             @urlChanged="setUrl"
             @toleranceChanged="setTolerance"
             :url="url"
             :tolerance="tolerance"
+            :directImport="directImport"
           ></Bottleneck>
           <Distancemarksvirtual
             v-if="import_ == $options.IMPORTTYPES.DISTANCEMARKSVIRTUAL"
@@ -586,12 +587,12 @@
     },
     isValid() {
       if (!this.import_) return false;
+      if (this.isToleranceRequired && !this.tolerance) return false;
       if (this.directImport && !this.uploadFile) return false;
       else if (!this.directImport) {
         if (this.isURLRequired && !this.url) return false;
         if (this.isSortbyRequired && !this.sortBy) return false;
         if (this.isFeatureTypeRequired && !this.featureType) return false;
-        if (this.isToleranceRequired && !this.tolerance) return false;
         if (this.isCredentialsRequired && (!this.username || !this.password))
           return false;
         if (this.import_ == this.$options.IMPORTTYPES.FAIRWAYDIMENSION) {
@@ -720,6 +721,7 @@
       let routeParam = "";
       switch (this.import_) {
         case this.$options.IMPORTTYPES.BOTTLENECK:
+          formData.append("tolerance", this.tolerance);
           routeParam = "ubn";
           break;
         case this.$options.IMPORTTYPES.FAIRWAYAVAILABILITY: