Mercurial > gemma
comparison 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 |
comparison
equal
deleted
inserted
replaced
2585:0b25c75a3a63 | 2586:bc1b43885a4d |
---|---|
92 " | 92 " |
93 @urlChanged="setUrl" | 93 @urlChanged="setUrl" |
94 :url="url" | 94 :url="url" |
95 ></Availablefairwaydepth> | 95 ></Availablefairwaydepth> |
96 <Bottleneck | 96 <Bottleneck |
97 v-if="import_ == $options.IMPORTTYPES.BOTTLENECK && !directImport" | 97 v-if="import_ == $options.IMPORTTYPES.BOTTLENECK" |
98 @urlChanged="setUrl" | 98 @urlChanged="setUrl" |
99 @toleranceChanged="setTolerance" | 99 @toleranceChanged="setTolerance" |
100 :url="url" | 100 :url="url" |
101 :tolerance="tolerance" | 101 :tolerance="tolerance" |
102 :directImport="directImport" | |
102 ></Bottleneck> | 103 ></Bottleneck> |
103 <Distancemarksvirtual | 104 <Distancemarksvirtual |
104 v-if="import_ == $options.IMPORTTYPES.DISTANCEMARKSVIRTUAL" | 105 v-if="import_ == $options.IMPORTTYPES.DISTANCEMARKSVIRTUAL" |
105 @urlChanged="setUrl" | 106 @urlChanged="setUrl" |
106 @usernameChanged="setUsername" | 107 @usernameChanged="setUsername" |
584 return false; | 585 return false; |
585 } | 586 } |
586 }, | 587 }, |
587 isValid() { | 588 isValid() { |
588 if (!this.import_) return false; | 589 if (!this.import_) return false; |
590 if (this.isToleranceRequired && !this.tolerance) return false; | |
589 if (this.directImport && !this.uploadFile) return false; | 591 if (this.directImport && !this.uploadFile) return false; |
590 else if (!this.directImport) { | 592 else if (!this.directImport) { |
591 if (this.isURLRequired && !this.url) return false; | 593 if (this.isURLRequired && !this.url) return false; |
592 if (this.isSortbyRequired && !this.sortBy) return false; | 594 if (this.isSortbyRequired && !this.sortBy) return false; |
593 if (this.isFeatureTypeRequired && !this.featureType) return false; | 595 if (this.isFeatureTypeRequired && !this.featureType) return false; |
594 if (this.isToleranceRequired && !this.tolerance) return false; | |
595 if (this.isCredentialsRequired && (!this.username || !this.password)) | 596 if (this.isCredentialsRequired && (!this.username || !this.password)) |
596 return false; | 597 return false; |
597 if (this.import_ == this.$options.IMPORTTYPES.FAIRWAYDIMENSION) { | 598 if (this.import_ == this.$options.IMPORTTYPES.FAIRWAYDIMENSION) { |
598 if ( | 599 if ( |
599 !this.LOS || | 600 !this.LOS || |
718 if (!this.uploadFile) return; | 719 if (!this.uploadFile) return; |
719 let formData = new FormData(); | 720 let formData = new FormData(); |
720 let routeParam = ""; | 721 let routeParam = ""; |
721 switch (this.import_) { | 722 switch (this.import_) { |
722 case this.$options.IMPORTTYPES.BOTTLENECK: | 723 case this.$options.IMPORTTYPES.BOTTLENECK: |
724 formData.append("tolerance", this.tolerance); | |
723 routeParam = "ubn"; | 725 routeParam = "ubn"; |
724 break; | 726 break; |
725 case this.$options.IMPORTTYPES.FAIRWAYAVAILABILITY: | 727 case this.$options.IMPORTTYPES.FAIRWAYAVAILABILITY: |
726 routeParam = "ufa"; | 728 routeParam = "ufa"; |
727 break; | 729 break; |