# HG changeset patch # User Thomas Junk # Date 1552304379 -3600 # Node ID 2d18b8d5b9db382c6121342ccba5dc737b84406f # Parent c546e38008de0021889d072bc9edf853321c8f6e define_stretch: tolerance only visible for new stretch definitions diff -r c546e38008de -r 2d18b8d5b9db client/src/components/ImportStretches.vue --- a/client/src/components/ImportStretches.vue Mon Mar 11 12:05:38 2019 +0100 +++ b/client/src/components/ImportStretches.vue Mon Mar 11 12:39:39 2019 +0100 @@ -64,7 +64,7 @@ placeholder="AT_Section_12" aria-label="id" v-model="id" - :disabled="!idEditable" + :disabled="editExistingStretch" /> @@ -151,7 +151,10 @@ -
+
Tolerance for snapping of waterway axis @@ -283,7 +286,7 @@ data() { return { edit: false, - idEditable: true, + editExistingStretch: false, id: "", funktion: "", startrhm: "", @@ -363,8 +366,7 @@ this.edit = true; this.startrhm = properties.lower; this.endrhm = properties.upper; - this.tolerance = properties.tolerance; - this.idEditable = false; + this.editExistingStretch = true; }, deleteStretch(stretch) { this.$store.commit("application/popup", { @@ -415,7 +417,7 @@ clean() { this.id = ""; this.edit = false; - this.idEditable = true; + this.editExistingStretch = false; this.funktion = ""; this.startrhm = ""; this.tolerance = 5; @@ -480,7 +482,7 @@ !this.id || !this.startrhm || !this.endrhm || - !this.tolerance || + (!this.tolerance && this.editExistingStretch) || !this.source || !this.date_info || !this.objbn || @@ -491,7 +493,6 @@ name: this.id, from: this.startrhm, to: this.endrhm, - tolerance: this.tolerance, "source-organization": this.source, "date-info": this.date_info, objnam: this.objbn, @@ -500,6 +501,9 @@ return x.trim(); }) }; + if (!this.editExistingStretch) { + data["tolerance"] = this.tolerance; + } this.$store .dispatch("imports/saveStretch", data) .then(() => {