[Blockers] Teams screen

This commit is contained in:
Matej Glasnák committed 2023-04-11 17:12:33 +02:00
1 parent 3b23e5bfff
commit f3adc68c73
2 files changed
+12 -8

No files matched your search

@@ -46,7 +46,7 @@ export default {
data() { data() {
return { return {
date: new Date('2023-03-24'), date: new Date(),
selectedTeam: null, selectedTeam: null,
selectedDate: null, selectedDate: null,
time: null, time: null,
@@ -9,9 +9,12 @@ export default {
if (!this.subtasks || !this.blockers) if (!this.subtasks || !this.blockers)
return return
const blockers = this._generateBlockers()
return { return {
unscheduledTime: 333, unscheduledTime: 333,
tasks: [...this._generateNonWorking(), ...this._generateTasks(), ...this._generateBlockers()] tasks: [...this._generateNonWorking(), ...this._generateTasks(), ...blockers.filter(blocker => blocker.type != 'home_office')],
homeoffices: [...blockers.filter(blocker => blocker.type == 'home_office')]
} }
}, },
@@ -23,17 +26,18 @@ export default {
let workingHours = 0 let workingHours = 0
this.calendarData.tasks.forEach(task => { this.calendarData.tasks.forEach(task => {
if ((task.subtask?.employee.id == employee.id) || (task.blocker?.employee?.id == employee.id)) if ((task.subtask?.employee.id != employee.id) && (task.blocker?.employee?.id != employee.id))
return return
console.log(task.type)
if (task.type == 'home_office')
return homeoffice[task.split] = true
workingHours += timelineUtils._getDifferenceInHours(task.end, task.start) workingHours += timelineUtils._getDifferenceInHours(task.end, task.start)
}) })
this.calendarData.homeoffices.forEach(task => {
if (task.blocker.employee?.id != employee.id) return
homeoffice[task.split] = true
})
days.push({ days.push({
id: index + 1, id: index + 1,
name: employee.name, name: employee.name,