Mercurial > gemma
diff client/src/application/Main.vue @ 1111:f106aee673e7 store-refactoring
selected bottleneck and surveys now handled by bottleneck store
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Mon, 05 Nov 2018 13:12:33 +0100 |
parents | ca4e0cd607ce |
children | d9e6a1f6f394 |
line wrap: on
line diff
--- a/client/src/application/Main.vue Fri Nov 02 14:51:14 2018 +0100 +++ b/client/src/application/Main.vue Mon Nov 05 13:12:33 2018 +0100 @@ -70,14 +70,14 @@ "totalLength", "waterLevels", "fairwayCoordinates", - "selectedWaterLevel", - "availableSurveys", - "selectedMorph" + "selectedWaterLevel" ]), + ...mapState("bottlenecks", ["surveys", "selectedSurvey"]), additionalSurveys() { - if (!this.availableSurveys) return []; - return this.availableSurveys.surveys.filter(x => { - return x.date_info !== this.selectedMorph.date_info; + if (!this.surveys) return []; + if (!this.selectedSurvey) return this.surveys; + return this.surveys.filter(survey => { + return survey.date_info !== this.selectedSurvey.date_info; }); }, xAxis() {