mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-22 14:59:34 +00:00
[Work hours] Changed minutes to float hours
This commit is contained in:
1 parent
8ab5e5b34d
commit
c38258ee1e
4 files changed
+28
-19
No files matched your search
@@ -58,20 +58,20 @@ export default {
|
||||
_generateNonWorking() {
|
||||
const nonWorkingHours = []
|
||||
const date = new Date(this.filter.start)
|
||||
let earliestStartMinutes = null
|
||||
let earliestHour = null
|
||||
this.calendarConfig.date = date
|
||||
|
||||
const { start: dayStart, end: dayEnd } = this._getDayStartEnd()
|
||||
|
||||
this.filter.team.employees.forEach((employee, index) => {
|
||||
if (!earliestStartMinutes || (employee.work_start) < earliestStartMinutes)
|
||||
earliestStartMinutes = employee.work_start
|
||||
if (!earliestHour || (employee.work_start) < earliestHour)
|
||||
earliestHour = employee.work_start
|
||||
|
||||
|
||||
nonWorkingHours.push({
|
||||
title: "Non working hours",
|
||||
start: dayStart,
|
||||
end: this._setMinutesToDate(employee.work_start),
|
||||
end: this._setMinutesToDate(employee.work_start * 60),
|
||||
split: index + 1,
|
||||
type: 'non-working-hours',
|
||||
draggable: false
|
||||
@@ -79,7 +79,7 @@ export default {
|
||||
|
||||
nonWorkingHours.push({
|
||||
title: "Non working hours",
|
||||
start: this._setMinutesToDate(employee.work_end),
|
||||
start: this._setMinutesToDate(employee.work_end * 60),
|
||||
end: dayEnd,
|
||||
split: index + 1,
|
||||
type: 'non-working-hours',
|
||||
@@ -87,7 +87,7 @@ export default {
|
||||
})
|
||||
})
|
||||
|
||||
this.calendarConfig.scrollHour = (earliestStartMinutes) - 1
|
||||
this.calendarConfig.scrollHour = (earliestHour) - 1
|
||||
return nonWorkingHours
|
||||
},
|
||||
|
||||
|
||||
Reference in new issue
Block a user