From 4dca5d6e647032c9999ab82fdabab8403def8932 Mon Sep 17 00:00:00 2001 From: Carlo Beltrame Date: Mon, 25 Mar 2024 19:08:08 +0100 Subject: [PATCH] Shorter dates on client print picasso --- pdf/src/campPrint/picasso/DayColumn.vue | 5 ++--- pdf/src/campPrint/picasso/DayHeader.vue | 7 ++++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pdf/src/campPrint/picasso/DayColumn.vue b/pdf/src/campPrint/picasso/DayColumn.vue index f4132785228..e3d4a992492 100644 --- a/pdf/src/campPrint/picasso/DayColumn.vue +++ b/pdf/src/campPrint/picasso/DayColumn.vue @@ -32,7 +32,6 @@ import { } from '../../../common/helpers/picasso.js' import keyBy from 'lodash/keyBy.js' -import dayjs from '../../../common/helpers/dayjs.js' export default { name: 'DayColumn', @@ -54,7 +53,7 @@ export default { const radius = '2pt' return keyBy( this.relevantScheduleEntries.map((scheduleEntry) => { - const start = dayjs.utc(scheduleEntry.start) + const start = this.$date.utc(scheduleEntry.start) const startsOnThisDay = start.isSameOrAfter(dayStart(this.day, this.times)) && start.isSameOrBefore(dayEnd(this.day, this.times)) @@ -62,7 +61,7 @@ export default { ? { borderTopRightRadius: radius, borderTopLeftRadius: radius } : {} - const end = dayjs.utc(scheduleEntry.end) + const end = this.$date.utc(scheduleEntry.end) const endsOnThisDay = end.isSameOrAfter(dayStart(this.day, this.times)) && end.isSameOrBefore(dayEnd(this.day, this.times)) diff --git a/pdf/src/campPrint/picasso/DayHeader.vue b/pdf/src/campPrint/picasso/DayHeader.vue index 7bdfbfb7ce8..658ca47757c 100644 --- a/pdf/src/campPrint/picasso/DayHeader.vue +++ b/pdf/src/campPrint/picasso/DayHeader.vue @@ -22,7 +22,12 @@ export default { }, computed: { date() { - return this.$date.utc(this.day.start).hour(0).minute(0).second(0).format('ddd LL') + return this.$date + .utc(this.day.start) + .hour(0) + .minute(0) + .second(0) + .format(this.$tc('global.datetime.dateLong')) }, dayResponsibles() { if (filterDayResponsiblesByDay(this.day).length === 0) return ''