# HG changeset patch # User Markus Kottlaender # Date 1559145847 -7200 # Node ID 804df080c8267d92c4e7c25247577e1c2bc5139e # Parent 8a9ee18de13f8643d25ca83f2801b632f2cf74a4 client: fairway profiles: added waterlevel to title and used title as pdf filename diff -r 8a9ee18de13f -r 804df080c826 client/src/components/fairway/Fairwayprofile.vue --- a/client/src/components/fairway/Fairwayprofile.vue Wed May 29 15:56:14 2019 +0200 +++ b/client/src/components/fairway/Fairwayprofile.vue Wed May 29 18:04:07 2019 +0200 @@ -156,11 +156,15 @@ ...mapState("application", ["paneSetup"]), title() { let dates = [this.selectedSurvey.date_info]; + let waterlevelLabel = + this.selectedWaterLevel === "ref" + ? this.selectedSurvey.depth_reference + : "Current"; if (this.additionalSurvey) dates.push(this.additionalSurvey.date_info); dates.map(d => this.$options.filters.dateTime(d, true)); return `${this.$gettext("Fairwayprofile")}: ${ this.selectedBottleneck - } (${dates.join(", ")})`; + } (${dates.join(", ")}) WL: ${waterlevelLabel} (${this.waterlevel} cm)`; }, currentData() { if ( @@ -362,7 +366,7 @@ } }); } - this.pdf.doc.save("Fairwayprofile diagram"); + this.pdf.doc.save(this.title.replace(/\s/g, "_").replace(/[():,]/g, "")); }, addDiagram(position, offset, width, height) { let x = offset.x,