Mercurial > gemma
changeset 5438:4d1b1df61f71 marking-single-beam
merge
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Tue, 13 Jul 2021 12:24:45 +0200 |
parents | eeee1c411576 (diff) a65b0891e8fd (current diff) |
children | a857d6ae1264 |
files | |
diffstat | 1 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/lib/mixins.js Tue Jul 13 11:27:17 2021 +0200 +++ b/client/src/lib/mixins.js Tue Jul 13 12:24:45 2021 +0200 @@ -440,9 +440,22 @@ if (text.includes("{date}")) { text = text.replace("{date}", new Date().toLocaleString(locale2)); } + const hasVisibleSurvey = + this.soundingInfo && + this.bottleneckForPrint && + this.selectedSurvey && + this.openLayersMap() + .getLayer("BOTTLENECKISOLINE") + .getVisible(); // get only day,month and year from the Date object if (text.includes("{date-minor}")) { - var date = new Date(); + var date; + if (hasVisibleSurvey) { + date = new Date(this.selectedSurvey["date_info"]); + } else { + date = new Date(); + } + var dt = (date.getDate() < 10 ? "0" : "") + date.getDate() +