Mercurial > gemma
changeset 4901:1f2d90312ac6 fairway-marks-import
added dropdown to FM import to further specify the kind of fairwaymark to be imported
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Wed, 05 Feb 2020 16:40:11 +0100 |
parents | bbcea42bba87 |
children | 60d9f9220fb4 |
files | client/src/components/importconfiguration/ScheduledImports.vue client/src/components/importconfiguration/types/Fairwaymarks.vue client/src/store/importschedule.js |
diffstat | 3 files changed, 54 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/importconfiguration/ScheduledImports.vue Wed Feb 05 11:15:01 2020 +0100 +++ b/client/src/components/importconfiguration/ScheduledImports.vue Wed Feb 05 16:40:11 2020 +0100 @@ -104,9 +104,11 @@ @urlChanged="setUrl" @featureTypeChanged="setFeatureType" @sortByChanged="setSortBy" + @selectedMarkChanged="setSelectedMark" :url="url" :featureType="featureType" :sortBy="sortBy" + :mark="selectedMark" /> <Gaugemeasurement v-if="import_ == $options.IMPORTTYPES.GAUGEMEASUREMENT && !directImport" @@ -712,6 +714,9 @@ setSortBy(value) { this.sortBy = value; }, + setSelectedMark(value) { + this.selectedMark = value; + }, setTolerance(value) { this.tolerance = value; }, @@ -789,6 +794,7 @@ this.directImport = false; this.trys = this.currentSchedule.trys; this.waitRetry = this.currentSchedule.waitRetry; + this.selectedMark = this.currentSchedule.selectedMark; this.retry = this.currentSchedule.trys === null || this.currentSchedule.trys === undefined ||
--- a/client/src/components/importconfiguration/types/Fairwaymarks.vue Wed Feb 05 11:15:01 2020 +0100 +++ b/client/src/components/importconfiguration/types/Fairwaymarks.vue Wed Feb 05 16:40:11 2020 +0100 @@ -15,10 +15,24 @@ </div> </div> </div> - <div v-if="!url" class="d-flex px-2"> - <small - ><translate class="text-danger">Please enter a URL</translate></small - > + <div class="d-flex px-2"> + <div class="flex-column w-100"> + <div class="flex-row text-left"> + <small class="text-muted"> + <translate>Type of mark</translate> + </small> + </div> + <div class="w-50 mt-2"> + <select v-model="selectedMark" class="form-control form-control-sm"> + <option + v-for="(option, value) in $options.FAIRWAYMARKS" + :key="value" + :value="value" + >{{ option }}</option + > + </select> + </div> + </div> </div> <div class="d-flex px-2"> <div class="flex-column mt-2 mr-3 w-50"> @@ -81,7 +95,18 @@ */ export default { name: "waterwayarea", - props: ["url", "featureType", "sortBy"], + props: ["url", "featureType", "sortBy", "mark"], + computed: { + selectedMark: { + get() { + return this.mark; + }, + set(value) { + this.selected = value; + this.$emit("selectedMarkChanged", value); + } + } + }, methods: { urlChanged(e) { this.$emit("urlChanged", e.target.value); @@ -92,6 +117,22 @@ sortByChanged(e) { this.$emit("sortByChanged", e.target.value); } + }, + FAIRWAYMARKS: { + BEACONLATERAL: "Beacon, lateral", + BUOYCARDINAL: "Buoy, cardinal", + BUOYLATERAL: "Buoy, lateral", + BUOYSAFEWATER: "Buoy, safe water", + BUOYSPECIALPURPOSEGENERAL: "Buoy, special purpose/general", + COVERAGE: "Coverage", + DAYMARK: "Daymark", + DISTANCEMARK: "Distance mark", + FAIRWAY: "Fairway", + LIGHT: "Light", + NOTICEMARK: "Notice mark", + RADARTRANSPONDERBEACON: "Radar transponder beacon", + SEAAREANAMEDWATERAREA: "Sea area/named water area", + TOPMARK: "Topmark" } }; </script>