Add more debug logs for gantt charts
This commit is contained in:
parent
8dc6d24003
commit
c3aae638f7
1 changed files with 4 additions and 4 deletions
|
@ -283,10 +283,12 @@ export default {
|
||||||
setDates() {
|
setDates() {
|
||||||
this.startDate = new Date(this.dateFrom)
|
this.startDate = new Date(this.dateFrom)
|
||||||
this.endDate = new Date(this.dateTo)
|
this.endDate = new Date(this.dateTo)
|
||||||
|
console.debug('setDates; start date: ', this.startDate, 'end date:', this.endDate, 'date from:', this.dateFrom, 'date to:', this.dateTo)
|
||||||
|
|
||||||
this.dayOffsetUntilToday = Math.floor((this.now - this.startDate) / 1000 / 60 / 60 / 24) + 1
|
this.dayOffsetUntilToday = Math.floor((this.now - this.startDate) / 1000 / 60 / 60 / 24) + 1
|
||||||
},
|
},
|
||||||
prepareGanttDays() {
|
prepareGanttDays() {
|
||||||
|
console.debug('prepareGanttDays; start date: ', this.startDate, 'end date:', this.endDate)
|
||||||
// Layout: years => [months => [days]]
|
// Layout: years => [months => [days]]
|
||||||
let years = {}
|
let years = {}
|
||||||
for (
|
for (
|
||||||
|
@ -298,15 +300,13 @@ export default {
|
||||||
if (years[date.getFullYear() + ''] === undefined) {
|
if (years[date.getFullYear() + ''] === undefined) {
|
||||||
years[date.getFullYear() + ''] = {}
|
years[date.getFullYear() + ''] = {}
|
||||||
}
|
}
|
||||||
if (
|
if (years[date.getFullYear() + ''][date.getMonth() + ''] === undefined) {
|
||||||
years[date.getFullYear() + ''][date.getMonth() + ''] === undefined
|
|
||||||
) {
|
|
||||||
years[date.getFullYear() + ''][date.getMonth() + ''] = []
|
years[date.getFullYear() + ''][date.getMonth() + ''] = []
|
||||||
}
|
}
|
||||||
years[date.getFullYear() + ''][date.getMonth() + ''].push(date)
|
years[date.getFullYear() + ''][date.getMonth() + ''].push(date)
|
||||||
this.fullWidth += this.dayWidth
|
this.fullWidth += this.dayWidth
|
||||||
}
|
}
|
||||||
console.log(years)
|
console.debug('prepareGanttDays; years:', years)
|
||||||
this.$set(this, 'days', years)
|
this.$set(this, 'days', years)
|
||||||
},
|
},
|
||||||
parseTasks() {
|
parseTasks() {
|
||||||
|
|
Loading…
Reference in a new issue