mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29: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
@@ -41,7 +41,7 @@ export default {
|
||||
const schedulesCapacityBySplit = {}
|
||||
|
||||
const now = moment()
|
||||
const dailyCapacityMinutes = this.user.work_end - this.user.work_start
|
||||
const dailyCapacityMinutes = (this.user.work_end - this.user.work_start) * 60
|
||||
|
||||
this.timelineData.tasks.forEach(task => {
|
||||
if (task.type == 'non-working-hours' || task.subtask?.is_finished || task.blocker?.is_finished)
|
||||
@@ -85,8 +85,8 @@ export default {
|
||||
} else if (i == 1) {
|
||||
// Today
|
||||
const elapsedMinutes = now.diff(now.clone().startOf('day'), 'minutes')
|
||||
const workStart = this.user.work_start > elapsedMinutes ? this.user.workStart : elapsedMinutes
|
||||
const todayCapacityMinutes = this.user.work_end - workStart
|
||||
const workStart = this.user.work_start * 60 > elapsedMinutes ? this.user.workStart : elapsedMinutes
|
||||
const todayCapacityMinutes = this.user.work_end * 60 - workStart
|
||||
unscheduledTime = todayCapacityMinutes - schedulesCapacityBySplit[i + 1] < 0 ? 0 : todayCapacityMinutes - schedulesCapacityBySplit[i + 1]
|
||||
} else {
|
||||
// Future
|
||||
@@ -172,7 +172,7 @@ export default {
|
||||
|
||||
try {
|
||||
const { subtasks, blockers } = await this.$axios.get_auth(`v1/subtasks?${queryParameters}`)
|
||||
this.config.scrollHour = (this.filter?.employee.work_start / 60) - 1
|
||||
this.config.scrollHour = (this.filter?.employee.work_start) - 1
|
||||
this.config.date = this.filter.start
|
||||
this.subtasks = [...subtasks, ...blockers]
|
||||
} catch (error) {
|
||||
|
||||
Reference in new issue
Block a user