[Blockers] Teams screen

This commit is contained in:
Matej Glasnák committed 2023-04-11 15:46:12 +02:00
1 parent b6f2249440
commit 3b23e5bfff
6 files changed
+19 -13

No files matched your search

@@ -17,13 +17,21 @@ export default {
splitDays() {
const days = []
const homeoffice = {}
this.filter.team.employees.forEach((employee, index) => {
let workingHours = 0
this.calendarData.tasks.forEach(task => {
if (task?.subtask?.employee_id == employee.id)
workingHours += timelineUtils._getDifferenceInHours(task.end, task.start)
if ((task.subtask?.employee.id == employee.id) || (task.blocker?.employee?.id == employee.id))
return
console.log(task.type)
if (task.type == 'home_office')
return homeoffice[task.split] = true
workingHours += timelineUtils._getDifferenceInHours(task.end, task.start)
})
days.push({
@@ -31,7 +39,8 @@ export default {
name: employee.name,
fullname: `${employee.name} ${employee.surname}`,
initials: employee.name.charAt(0).toUpperCase() + employee.surname.charAt(0).toUpperCase(),
unscheduledTime: workingHours
unscheduledTime: workingHours,
isHomeoffice: homeoffice[index + 1] ? true : false
})
})
@@ -107,7 +116,7 @@ export default {
initials: employee?.name?.charAt(0)?.toUpperCase() + employee?.surname?.charAt(0)?.toUpperCase(),
split: split,
project_code: subtask.project_code,
subtask: subtask,
subtask,
_timeblock_id: timeblock.id
})
}
@@ -136,7 +145,8 @@ export default {
split,
start: new Date(blocker.start),
end: new Date(blocker.end),
type: 'blocker',
type: blocker.type,
isBlocker: true,
initials: `${employee?.name[0]}${employee?.surname[0]}`,
color: '#B00020',
draggable: false,