fix(calendar): enhance task filtering logic and update date handling in scheduled capacity calculation

This commit is contained in:
Matej Glasnák committed 2025-06-25 15:07:37 +02:00
1 parent ec0e46d986
commit 38ea746cfc
1 file changed
+2 -3
@@ -28,11 +28,10 @@ export default {
let totalScheduledTime = 0
this.calendarData.tasks.forEach(task => {
// console.log(task)
if ((task.subtask?.employee_id != employee.id) && (task.blocker?.employee?.id != employee.id))
return
if (task.type == 'non-working-hours' || task.subtask?.is_finished || task.blocker?.is_finished)
if (task.type == 'non-working-hours' || task.subtask?.is_finished || task.blocker?.is_finished || task.isBlocker)
return
if (selectedDate.isBefore(moment(), 'days')) {
@@ -51,7 +50,7 @@ export default {
if (isTaskCurrentlyInProgress) {
scheduledCapacityMinutes +=
timelineUtils._getDifferenceInMinutes(
moment(),
new Date(),
task._real_end,
);
} else if (isTaskInFuture) {