[task overview] header

This commit is contained in:
Filip Kaluža committed 2022-12-09 16:40:55 +01:00
1 parent a630a360de
commit 288ff16e7d
7 files changed
+118 -11

No files matched your search

@@ -30,9 +30,14 @@ export default {
props: {
transitionDirection: { type: String, default: 'right' },
weekDays: { type: Array, default: () => [] },
switchToNarrowerView: { type: Function, default: () => {} }
switchToNarrowerView: { type: Function, default: () => {} },
unscheduledTime: { type: Array, default: [] }
},
// created() {
// console.log(this.weekDays)
// },
methods: {
selectCell (date, DOMEvent) {
if (date.getTime() !== this.view.selectedDate.getTime()) {
@@ -43,6 +48,9 @@ export default {
cleanupHeading: heading => ({
label: heading.full,
date: heading.date,
unscheduledTime: heading.unscheduledTime,
name: heading.name,
initials: heading.initials,
...(heading.today ? { today: heading.today } : {})
})
},
@@ -54,6 +62,10 @@ export default {
let todayFound = false
const headings = this.weekDays.map((cell, i) => {
const date = this.utils.date.addDays(this.view.startDate, this.vuecal.startWeekOnSunday ? i - 1 : i)
let unscheduledTime = this.unscheduledTime[i].time ? this.unscheduledTime[i].time : 0
unscheduledTime = Math.floor(unscheduledTime / 60) + "," + String(unscheduledTime % 60)[0]
const name = this.unscheduledTime[i].name + " " + this.unscheduledTime[i].surname
const initials = this.unscheduledTime[i].name.charAt(0).toUpperCase() + this.unscheduledTime[i].surname.charAt(0).toUpperCase()
return {
hide: cell.hide,
@@ -62,6 +74,9 @@ export default {
// week days when does not fit on screen or with small/xsmall options.
small: cell.short || cell.label.substr(0, 3),
xsmall: cell.short || cell.label.substr(0, 1),
unscheduledTime: unscheduledTime,
name: name,
initials: initials,
// Only for week view.
...(this.view.id === 'week' ? {
@@ -71,6 +86,8 @@ export default {
} : {})
}
})
console.log(headings)
return headings
},
cellWidth () {