mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[auth] Added auth guard
This commit is contained in:
1 parent
ef6369714b
commit
1e86dbbbb3
5 files changed
+44
-21
No files matched your search
@@ -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))
|
||||
})
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
label="Nenaplánované hodiny"
|
||||
v-model="time"
|
||||
variant="outlined"
|
||||
:disabled="true"
|
||||
></v-text-field>
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
@@ -37,7 +37,6 @@ export default {
|
||||
|
||||
this.filter.team.employees.forEach((employee, index) => {
|
||||
let workingHours = 0
|
||||
const capacityPerDay = employee.work_end - employee.work_start
|
||||
|
||||
this.timelineData.tasks.forEach(task => {
|
||||
if (task?.subtask?.employee_id == employee.id)
|
||||
@@ -49,7 +48,7 @@ export default {
|
||||
name: employee.name,
|
||||
fullname: `${employee.name} ${employee.surname}`,
|
||||
initials: employee.name.charAt(0).toUpperCase() + employee.surname.charAt(0).toUpperCase(),
|
||||
unscheduledTime: capacityPerDay - workingHours
|
||||
unscheduledTime: workingHours
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user