[auth] Added auth guard

This commit is contained in:
Matej Glasnák committed 2023-02-22 19:09:12 +01:00
1 parent ef6369714b
commit 1e86dbbbb3
5 files changed
+44 -21

No files matched your search

+2 -3
View File
@@ -35,13 +35,12 @@ export default {
splitDays() {
const days = []
const workingHours = {}
const capacityPerDay = this.$store.getters['auth/user'].work_end - this.$store.getters['auth/user'].work_start
this.timelineData.tasks.forEach(task => {
if (!workingHours[task.split])
workingHours[task.split] = 0
if (task.nonWorking)
if (task.nonWorking || task.subtask.is_finished)
return
workingHours[task.split] += timelineUtils._getDifferenceInHours(task.end, task.start)
@@ -52,7 +51,7 @@ export default {
id: i + 1,
fullname: `${this.filter.employee.name} ${this.filter.employee.surname}`,
initials: this.filter.employee.name.charAt(0).toUpperCase() + this.filter.employee.surname.charAt(0).toUpperCase(),
unscheduledTime: capacityPerDay - workingHours[i + 1],
unscheduledTime: workingHours[i + 1],
date: addDays(this.filter.start, i),
isWeekend: timelineUtils.isWeekend(addDays(this.filter.start, i))
})