Mercurial > gemma
changeset 1521:276df8dadc14
bought localized datestrings
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Thu, 06 Dec 2018 16:35:53 +0100 |
parents | 6ad1f431bc85 |
children | b34caa449c01 |
files | client/src/components/map/contextbox/Bottlenecks.vue client/src/components/map/fairway/Profiles.vue |
diffstat | 2 files changed, 12 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/map/contextbox/Bottlenecks.vue Thu Dec 06 15:37:06 2018 +0100 +++ b/client/src/components/map/contextbox/Bottlenecks.vue Thu Dec 06 16:35:53 2018 +0100 @@ -54,7 +54,7 @@ }}</a> </div> <div class="col-2 py-2"> - {{ displayCurrentSurvey(bottleneck.properties.current) }} + {{ formatSurveyDate(bottleneck.properties.current) }} </div> <div class="col-3 py-2"> {{ @@ -108,7 +108,7 @@ v-for="(survey, index) in openBottleneckSurveys" :key="index" @click="selectSurvey(survey, bottleneck)" - >{{ survey.date_info }}</a + >{{ formatSurveyDate(survey.date_info) }}</a > </div> </div> @@ -136,6 +136,7 @@ import { mapState } from "vuex"; import { HTTP } from "../../../lib/http"; import { displayError } from "../../../lib/errors.js"; +import { formatSurveyDate } from "../../../lib/date.js"; export default { name: "bottlenecks", @@ -162,6 +163,9 @@ } }, methods: { + formatSurveyDate(date) { + return formatSurveyDate(date); + }, filteredAndSortedBottlenecks() { return this.bottlenecks .filter(bn => { @@ -275,9 +279,6 @@ .finally(() => (this.loading = null)); } }, - displayCurrentSurvey(current) { - return current ? current : ""; - }, displayCurrentChainage(from, to) { return from / 10 + " - " + to / 10; }
--- a/client/src/components/map/fairway/Profiles.vue Thu Dec 06 15:37:06 2018 +0100 +++ b/client/src/components/map/fairway/Profiles.vue Thu Dec 06 16:35:53 2018 +0100 @@ -53,7 +53,7 @@ v-for="survey in surveys" :key="survey.date_info" :value="survey" - >{{ survey.date_info }}</option + >{{ formatSurveyDate(survey.date_info) }}</option > </select> </div> @@ -73,7 +73,7 @@ v-for="survey in additionalSurveys" :key="survey.date_info" :value="survey" - >{{ survey.date_info }}</option + >{{ formatSurveyDate(survey.date_info) }}</option > </select> </div> @@ -250,6 +250,7 @@ import Feature from "ol/Feature"; import LineString from "ol/geom/LineString"; import { displayError, displayInfo } from "../../../lib/errors.js"; +import { formatSurveyDate } from "../../../lib/date.js"; export default { name: "profiles", @@ -352,6 +353,9 @@ } }, methods: { + formatSurveyDate(date) { + return formatSurveyDate(date); + }, loadProfile(survey) { if (survey) { this.$store.commit("fairwayprofile/profileLoading", true);