diff client/src/components/fairway/Profiles.vue @ 2541:468c8dc796cf

client: convert lib helper functions to Vue filters
author Markus Kottlaender <markus@intevation.de>
date Thu, 07 Mar 2019 15:53:12 +0100
parents 3c17d401fbd4
children dc42faf90e1d
line wrap: on
line diff
--- a/client/src/components/fairway/Profiles.vue	Thu Mar 07 15:19:16 2019 +0100
+++ b/client/src/components/fairway/Profiles.vue	Thu Mar 07 15:53:12 2019 +0100
@@ -47,7 +47,7 @@
                   :key="wl"
                   :value="wl"
                 >
-                  {{ formatSurveyDate(wl) }}
+                  {{ wl | surveyDate }}
                 </option>
               </select>
             </div>
@@ -61,7 +61,7 @@
                   v-for="survey in surveys"
                   :key="survey.date_info"
                   :value="survey"
-                  >{{ formatSurveyDate(survey.date_info) }}</option
+                  >{{ survey.date_info | surveyDate }}</option
                 >
               </select>
             </div>
@@ -81,7 +81,7 @@
                   v-for="survey in additionalSurveys"
                   :key="survey.date_info"
                   :value="survey"
-                  >{{ formatSurveyDate(survey.date_info) }}</option
+                  >{{ survey.date_info | surveyDate }}</option
                 >
               </select>
             </div>
@@ -244,7 +244,6 @@
 import Feature from "ol/Feature";
 import LineString from "ol/geom/LineString";
 import { displayError, displayInfo } from "@/lib/errors.js";
-import { formatSurveyDate } from "@/lib/date.js";
 import { LAYERS } from "@/store/map.js";
 
 export default {
@@ -366,9 +365,6 @@
     close() {
       this.$store.commit("application/showProfiles", false);
     },
-    formatSurveyDate(date) {
-      return formatSurveyDate(date);
-    },
     loadProfile(survey) {
       if (survey) {
         this.$store.commit("fairwayprofile/profileLoading", true);