Mercurial > gemma
changeset 3397:3675c60afd4f
afd: breadth->width
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Thu, 23 May 2019 10:55:57 +0200 |
parents | 169680c3698b |
children | 01f64ee0831f |
files | client/src/components/fairway/AvailableFairwayDepthDialogue.vue client/src/store/fairwayavailability.js |
diffstat | 2 files changed, 30 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/fairway/AvailableFairwayDepthDialogue.vue Thu May 23 10:40:14 2019 +0200 +++ b/client/src/components/fairway/AvailableFairwayDepthDialogue.vue Thu May 23 10:55:57 2019 +0200 @@ -163,12 +163,12 @@ <div class="d-flex mt-2"> <div class="d-flex flex-column w-50 mr-1"> <small for="from" class="my-auto text-muted"> - <translate>Breadthlimit 1</translate> + <translate>Widthlimit 1</translate> </small> <input :key="3" - id="breadthLimit" - v-model.number="breadthLimit1" + id="widthLimit" + v-model.number="widthLimit1" class="form-control form-control-sm" type="number" min="0" @@ -176,12 +176,12 @@ </div> <div class="d-flex flex-column w-50 mr-1"> <small for="from" class="my-auto text-muted"> - <translate>Breadthlimit 2</translate> + <translate>Widthlimit 2</translate> </small> <input :key="4" - id="breadthLimit" - v-model.number="breadthLimit2" + id="widthLimit" + v-model.number="widthLimit2" class="form-control form-control-sm" type="number" min="0" @@ -236,7 +236,7 @@ import app from "@/main"; import { displayError } from "@/lib/errors"; import { mapState, mapGetters } from "vuex"; -import { FREQUENCIES } from "@/store/fairwayavailability"; +import { FREQUENCIES, LIMITINGFACTORS } from "@/store/fairwayavailability"; export default { data() { @@ -258,8 +258,8 @@ "LOS", "depthlimit1", "depthlimit2", - "breadthlimit1", - "breadthlimit2" + "widthlimit1", + "widthlimit2" ]), ...mapState("imports", [ "stretches", @@ -327,20 +327,20 @@ this.$store.commit("fairwayavailability/setDepthlimit2", value); } }, - breadthLimit1: { + widthLimit1: { get() { - return this.breadthlimit1; + return this.widthlimit1; }, set(value) { - this.$store.commit("fairwayavailability/setBreadthlimit1", value); + this.$store.commit("fairwayavailability/setWidthlimit1", value); } }, - breadthLimit2: { + widthLimit2: { get() { - return this.breadthlimit2; + return this.widthlimit2; }, set(value) { - this.$store.commit("fairwayavailability/setBreadthlimit2", value); + this.$store.commit("fairwayavailability/setWidthlimit2", value); } }, selectedFrequency: { @@ -540,6 +540,7 @@ SECTIONS: "sections", STRETCHES: "stretches", AVAILABLEFAIRWAYDEPTH: app.$gettext("Available Fairway Depth"), - FREQUENCIES: FREQUENCIES + FREQUENCIES: FREQUENCIES, + LIMITINGFACTORS: LIMITINGFACTORS }; </script>
--- a/client/src/store/fairwayavailability.js Thu May 23 10:40:14 2019 +0200 +++ b/client/src/store/fairwayavailability.js Thu May 23 10:55:57 2019 +0200 @@ -36,6 +36,11 @@ ] }; +const LIMITINGFACTORS = { + WIDTH: "width", + DEPTH: "depth" +}; + const FREQUENCIES = { MONTHLY: "monthly", QUARTERLY: "quarterly", @@ -71,10 +76,11 @@ to: format(new Date(), "YYYY-MM-DD"), from: format(subYears(new Date(), 1), "YYYY-MM-DD"), frequency: FREQUENCIES.MONTHLY, + limitingFactor: null, depthlimit1: 250, depthlimit2: 230, - breadthlimit1: null, - breadthlimit2: null, + widthlimit1: null, + widthlimit2: null, fwData: null, fwLNWLData: null, fwLNWLOverviewData: [], @@ -117,11 +123,11 @@ setDepthlimit2: (state, depthlimit2) => { state.depthlimit2 = depthlimit2; }, - setBreadthlimit1: (state, breadthlimit1) => { - state.breadthlimit1 = breadthlimit1; + setWidthlimit1: (state, widthlimit1) => { + state.widthlimit1 = widthlimit1; }, - setBreadthlimit2: (state, breadthlimit2) => { - state.breadthlimit2 = breadthlimit2; + setWidthlimit2: (state, widthlimit2) => { + state.widthlimit2 = widthlimit2; }, setSelectedFairwayAvailability: (state, feature) => { state.selectedFairwayAvailabilityFeature = feature; @@ -250,4 +256,4 @@ } }; -export { FREQUENCIES, fairwayavailability }; +export { LIMITINGFACTORS, FREQUENCIES, fairwayavailability };