# HG changeset patch # User Thomas Junk # Date 1568296171 -7200 # Node ID bad093433899167bc35aba7fcdc7568c106eea44 # Parent 610773d34e4f0952b91e170a0017ed04727228d8 AFD: frequency decoupled diff -r 610773d34e4f -r bad093433899 client/src/components/fairway/AvailableFairwayDepth.vue --- a/client/src/components/fairway/AvailableFairwayDepth.vue Thu Sep 12 15:06:53 2019 +0200 +++ b/client/src/components/fairway/AvailableFairwayDepth.vue Thu Sep 12 15:49:31 2019 +0200 @@ -100,6 +100,7 @@ }, data() { return { + frequencyD: null, selectedFairwayAvailabilityFeatureD: null, fromDate: null, toDate: null, @@ -204,29 +205,32 @@ return `data:text/csv;charset=utf-8, ${encodeURIComponent(this.csv)}`; }, csvFileName() { + if (!this.frequencyD) return; return `${this.$gettext("fairwayavailability")}-${ this.featureName }-${filters.surveyDate(this.fromDate)}-${filters.surveyDate( this.toDate - )}-${this.$gettext(this.frequency)}-.csv`; + )}-${this.$gettext(this.frequencyD)}-.csv`; }, frequencyToRange() { + if (!this.frequencyD) return; const frequencies = { [FREQUENCIES.MONTHLY]: [-33, 33], [FREQUENCIES.QUARTERLY]: [-93, 93], [FREQUENCIES.YEARLY]: [-370, 370] }; - return frequencies[this.frequency]; + return frequencies[this.frequencyD]; }, availability() { return this.plainAvailability; }, title() { + if (!this.frequencyD) return; return `Available Fairway Depth: ${ this.featureName } (${filters.surveyDate(this.fromDate)} - ${filters.surveyDate( this.toDate - )}) ${this.$gettext(this.frequency)}`; + )}) ${this.$gettext(this.frequencyD)}`; }, featureName() { if (this.selectedFairwayAvailabilityFeatureD == null) return ""; @@ -242,6 +246,7 @@ this.depthlimit2D = this.depthlimit2; this.widthlimit1D = this.widthlimit1; this.widthlimit2D = this.widthlimit2; + this.frequencyD = this.frequency; }, applyChange() { if (this.form.template.hasOwnProperty("properties")) {