From 1d4ec3d7659b657ddb37e368051227335164ac1d Mon Sep 17 00:00:00 2001 From: Theenoro Date: Sun, 5 May 2019 15:00:58 +0200 Subject: [PATCH] 2.3.0.1 - minor fix in templates\nsoon date format can be chosen --- public/templates/wochenbericht_2.ptt | 4 ++-- public/templates/wochenbericht_2_wo_time.ptt | 4 ++-- src/jsx/ui/print_modi/week.jsx | 9 +++++++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/public/templates/wochenbericht_2.ptt b/public/templates/wochenbericht_2.ptt index 689b194..ffa8846 100644 --- a/public/templates/wochenbericht_2.ptt +++ b/public/templates/wochenbericht_2.ptt @@ -989,13 +989,13 @@

Vom

-

26/02/2018

+

{{week.start}}

bis

-

02/03/2018

+

{{week.end}}

diff --git a/public/templates/wochenbericht_2_wo_time.ptt b/public/templates/wochenbericht_2_wo_time.ptt index df62052..9ba8b6a 100644 --- a/public/templates/wochenbericht_2_wo_time.ptt +++ b/public/templates/wochenbericht_2_wo_time.ptt @@ -989,13 +989,13 @@

Vom

-

26/02/2018

+

{{week.start}}

bis

-

02/03/2018

+

{{week.end}}

diff --git a/src/jsx/ui/print_modi/week.jsx b/src/jsx/ui/print_modi/week.jsx index 023d486..b01c6bd 100644 --- a/src/jsx/ui/print_modi/week.jsx +++ b/src/jsx/ui/print_modi/week.jsx @@ -85,8 +85,13 @@ export class Modi_Week{ } for(var w in weeks){ - weeks[w].start = moment(weeks[w].start).add(-1, "days").format('YYYY-MM-DD'); - weeks[w].end = moment(moment(weeks[w].start).day(7)).format('YYYY-MM-DD'); + if(choosenTemplate != "wochenbericht"){ + weeks[w].start = moment(weeks[w].start).add(-1, "days").format('DD/MM/YYYY'); + weeks[w].end = moment(moment(weeks[w].start).day(7)).format('DD/MM/YYYY'); + }else{ + weeks[w].start = moment(weeks[w].start).add(-1, "days").format('YYYY-MM-DD'); + weeks[w].end = moment(moment(weeks[w].start).day(7)).format('YYYY-MM-DD'); + } for(d in weeks[w].data){