From 8ab5e5b34defa03707cb5c811f6bdf8a2f364b20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Glasn=C3=A1k?= Date: Tue, 11 Apr 2023 21:58:08 +0200 Subject: [PATCH] . --- .../plugins/tm@dashboard/teams/_components/a-team-filter.vue | 3 ++- .../plugins/tm@dashboard/teams/_mixins/TeamsCalendar.mixin.ts | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/plugins/tm@dashboard/teams/_components/a-team-filter.vue b/app/src/plugins/tm@dashboard/teams/_components/a-team-filter.vue index e9a0e8e..d9ae81f 100644 --- a/app/src/plugins/tm@dashboard/teams/_components/a-team-filter.vue +++ b/app/src/plugins/tm@dashboard/teams/_components/a-team-filter.vue @@ -83,7 +83,8 @@ export default { _updateFilters() { this.filter.start = this.date - this.filter.end = addDays(this.date, 1) + this.filter.end = this.date + // this.filter.end = addDays(this.date, 1) this.selectedDate = String(this.filter.start?.toLocaleDateString('sk-SK')) this._emitFilterChanged() diff --git a/app/src/plugins/tm@dashboard/teams/_mixins/TeamsCalendar.mixin.ts b/app/src/plugins/tm@dashboard/teams/_mixins/TeamsCalendar.mixin.ts index ccddf7c..2213927 100644 --- a/app/src/plugins/tm@dashboard/teams/_mixins/TeamsCalendar.mixin.ts +++ b/app/src/plugins/tm@dashboard/teams/_mixins/TeamsCalendar.mixin.ts @@ -11,6 +11,8 @@ export default { const blockers = this._generateBlockers() + console.log([...this._generateNonWorking(), ...this._generateTasks(), ...blockers.filter(blocker => blocker.type != 'home_office')]) + return { unscheduledTime: 333, tasks: [...this._generateNonWorking(), ...this._generateTasks(), ...blockers.filter(blocker => blocker.type != 'home_office')], @@ -26,7 +28,7 @@ export default { let workingHours = 0 this.calendarData.tasks.forEach(task => { - if ((task.subtask?.employee.id != employee.id) && (task.blocker?.employee?.id != employee.id)) + if ((task.subtask?.employee?.id != employee.id) && (task.blocker?.employee?.id != employee.id)) return workingHours += timelineUtils._getDifferenceInHours(task.end, task.start)