mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[Blockers] Implemented homeoffice, adhoc, vacation blockers
This commit is contained in:
1 parent
4a9dfc6520
commit
b6f2249440
4 files changed
+26
-23
No files matched your search
@@ -38,11 +38,18 @@ export default {
|
||||
splitDays() {
|
||||
const days = []
|
||||
const workingHours = {}
|
||||
const homeoffice = {}
|
||||
|
||||
console.log(this.timelineData.tasks.filter(task => task.type != 'subtask' && task.type != 'non-working-hours'))
|
||||
|
||||
this.timelineData.tasks.forEach(task => {
|
||||
if (!workingHours[task.split])
|
||||
workingHours[task.split] = 0
|
||||
|
||||
if (task.type == 'home_office') {
|
||||
return homeoffice[task.split] = true
|
||||
}
|
||||
|
||||
if (task.type == 'non-working-hours' || task.subtask?.is_finished || task.blocker?.is_finished)
|
||||
return
|
||||
|
||||
@@ -56,6 +63,7 @@ export default {
|
||||
initials: this.filter.employee.name.charAt(0).toUpperCase() + this.filter.employee.surname.charAt(0).toUpperCase(),
|
||||
unscheduledTime: workingHours[i + 1],
|
||||
date: addDays(this.filter.start, i),
|
||||
isHomeoffice: homeoffice[i],
|
||||
isWeekend: timelineUtils.isWeekend(addDays(this.filter.start, i))
|
||||
})
|
||||
}
|
||||
@@ -123,7 +131,7 @@ export default {
|
||||
const { subtasks, blockers } = await this.$axios.get_auth(`v1/subtasks?${queryParameters}`)
|
||||
this.config.scrollHour = (this.filter?.employee.work_start / 60) - 1
|
||||
this.config.date = this.filter.start
|
||||
this.subtasks = [...subtasks, ...blockers.map(blocker => ({...blocker, type: 'blocker'}))]
|
||||
this.subtasks = [...subtasks, ...blockers]
|
||||
} catch (error) {
|
||||
this.$toast.error('Nepodarilo sa nacitat data!')
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user