comparison client/src/components/fairway/Fairwayprofile.vue @ 3513:ca9590be1da2 waterlevel-in-crossprofile

client: fairway profiles: removed more code
author Markus Kottlaender <markus@intevation.de>
date Tue, 28 May 2019 18:40:02 +0200
parents 30a47d9fc667
children fcb4f3fabde8
comparison
equal deleted inserted replaced
3512:30a47d9fc667 3513:ca9590be1da2
149 "endPoint", 149 "endPoint",
150 "fairwayData", 150 "fairwayData",
151 "maxAlt", 151 "maxAlt",
152 "selectedWaterLevel" 152 "selectedWaterLevel"
153 ]), 153 ]),
154 ...mapState("bottlenecks", ["selectedSurvey", "selectedBottleneck"]),
154 ...mapState("application", ["paneSetup"]), 155 ...mapState("application", ["paneSetup"]),
155 title() { 156 title() {
156 let dates = [this.selectedSurvey.date_info]; 157 let dates = [this.selectedSurvey.date_info];
157 if (this.additionalSurvey) dates.push(this.additionalSurvey.date_info); 158 if (this.additionalSurvey) dates.push(this.additionalSurvey.date_info);
158 dates.map(d => this.$options.filters.dateTime(d, true)); 159 dates.map(d => this.$options.filters.dateTime(d, true));
159 return `${this.$gettext("Fairwayprofile")}: ${ 160 return `${this.$gettext("Fairwayprofile")}: ${
160 this.selectedBottleneck 161 this.selectedBottleneck
161 } (${dates.join(", ")})`; 162 } (${dates.join(", ")})`;
162 }, 163 },
163 selectedSurvey: {
164 get() {
165 return this.$store.state.bottlenecks.selectedSurvey;
166 }
167 },
168 selectedBottleneck: {
169 get() {
170 return this.$store.state.bottlenecks.selectedBottleneck;
171 }
172 },
173 ...mapState("bottlenecks", ["selectedSurvey"]),
174 currentData() { 164 currentData() {
175 if ( 165 if (
176 !this.selectedSurvey || 166 !this.selectedSurvey ||
177 !this.currentProfile.hasOwnProperty(this.selectedSurvey.date_info) 167 !this.currentProfile.hasOwnProperty(this.selectedSurvey.date_info)
178 ) 168 )