Mercurial > gemma
changeset 1858:108a049c8394
importqueue: fairwaydimensions removed typos. should work now
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Thu, 17 Jan 2019 12:42:19 +0100 |
parents | 9141abe7c75a |
children | 9780cb4ef6a6 |
files | client/src/components/importschedule/Importscheduledetail.vue client/src/store/imports.js |
diffstat | 2 files changed, 28 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/importschedule/Importscheduledetail.vue Thu Jan 17 12:05:12 2019 +0100 +++ b/client/src/components/importschedule/Importscheduledetail.vue Thu Jan 17 12:42:19 2019 +0100 @@ -37,8 +37,8 @@ <option :value="$options.IMPORTTYPES.WATERWAYAREA" ><translate>Waterwayarea</translate></option > - <option :value="$options.IMPORTTYPES.FAIRWAYDIMENSIONS" - ><translate>Fairwaydimensions</translate></option + <option :value="$options.IMPORTTYPES.FAIRWAYDIMENSION" + ><translate>Fairwaydimension</translate></option > <option :value="$options.IMPORTTYPES.WATERWAYGAUGES" ><translate>Waterway gauges</translate></option @@ -190,7 +190,7 @@ </div> </div> </div> - <div v-if="import_ == $options.IMPORTTYPES.FAIRWAYDIMENSIONS"> + <div v-if="import_ == $options.IMPORTTYPES.FAIRWAYDIMENSION"> <div class="d-flex flex-row"> <div class="flex-column mt-3 mr-3 w-50"> <div class="flex-row text-left"> @@ -644,7 +644,7 @@ case this.$options.IMPORTTYPES.GAUGEMEASUREMENT: case this.$options.IMPORTTYPES.FAIRWAYAVAILABILITY: case this.$options.IMPORTTYPES.WATERWAYAREA: - case this.$options.IMPORTTYPES.FAIRWAYDIMENSIONS: + case this.$options.IMPORTTYPES.FAIRWAYDIMENSION: case this.$options.IMPORTTYPES.WATERWAYGAUGES: return true; default: @@ -655,7 +655,7 @@ switch (this.import_) { case this.$options.IMPORTTYPES.WATERWAYAXIS: case this.$options.IMPORTTYPES.WATERWAYAREA: - case this.$options.IMPORTTYPES.FAIRWAYDIMENSIONS: + case this.$options.IMPORTTYPES.FAIRWAYDIMENSION: return true; default: return false; @@ -665,7 +665,7 @@ switch (this.import_) { case this.$options.IMPORTTYPES.WATERWAYAXIS: case this.$options.IMPORTTYPES.WATERWAYAREA: - case this.$options.IMPORTTYPES.FAIRWAYDIMENSIONS: + case this.$options.IMPORTTYPES.FAIRWAYDIMENSION: return true; default: return false; @@ -756,6 +756,23 @@ data["username"] = this.username; data["password"] = this.password; } + if (this.import_ == this.$options.IMPORTTYPES.FAIRWAYDIMENSION) { + if ( + !this.LOS || + !this.minWidth || + !this.maxWidth || + !this.depth || + !this.sourceOrganization + ) + return; + data["feature-type"] = this.featureType; + data["sort-by"] = this.sortBy; + data["los"] = this.LOS * 1; + data["min-width"] = this.minWidth * 1; + data["max-width"] = this.maxWidth * 1; + data["depth"] = this.depth * 1; + data["source-organization"] = this.sourceOrganization; + } this.triggerActive = false; this.$store .dispatch("imports/triggerImport", { type: this.import_, data }) @@ -815,7 +832,7 @@ password: this.password }); } - if (this.import_ == this.$options.IMPORTTYPES.FAIRWAYDIMENSIONS) { + if (this.import_ == this.$options.IMPORTTYPES.FAIRWAYDIMENSION) { if ( !this.LOS || !this.minWidth ||
--- a/client/src/store/imports.js Thu Jan 17 12:05:12 2019 +0100 +++ b/client/src/store/imports.js Thu Jan 17 12:42:19 2019 +0100 @@ -29,7 +29,7 @@ GAUGEMEASUREMENT: "gaugemeasurement", FAIRWAYAVAILABILITY: "fairwayavailability", WATERWAYAREA: "waterwayarea", - FAIRWAYDIMENSIONS: "fairwaydimensions", + FAIRWAYDIMENSION: "fairwaydimension", WATERWAYGAUGES: "waterwaygauges" }; @@ -44,7 +44,7 @@ gaugemeasurement: "gm", waterwayaxis: "wx", waterwayarea: "wa", - fairwaydimensions: "fd", + fairwaydimension: "fd", waterwaygauges: "wg" }; @@ -54,8 +54,8 @@ gm: "gaugemeasurement", wx: "waterwayaxis", wa: "waterwayarea", - fd: "fairwaydimensions", - wg: "waterwaygauges" + fd: "fairwaydimension", + wg: "waterwaygauge" }; const initializeCurrentSchedule = () => {