Skip to content

Commit

Permalink
Shorter dates on client print picasso
Browse files Browse the repository at this point in the history
  • Loading branch information
carlobeltrame committed Mar 25, 2024
1 parent c9ab08b commit 4dca5d6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 2 additions & 3 deletions pdf/src/campPrint/picasso/DayColumn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -54,15 +53,15 @@ 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))
const topStyles = startsOnThisDay
? { 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))
Expand Down
7 changes: 6 additions & 1 deletion pdf/src/campPrint/picasso/DayHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 ''
Expand Down

0 comments on commit 4dca5d6

Please sign in to comment.