fix dashboard api logic

This commit is contained in:
Chaiyawut Thengket 2023-11-27 15:54:57 +07:00
parent 778594ab9a
commit cb7067de48

View File

@ -86,11 +86,10 @@ class DashboardStatsTodoViewSet(viewsets.GenericViewSet, mixins.ListModelMixin):
total_tasks_today = Todo.objects.filter(
user=user,
completion_date__gte=today_start,
completion_date__lte=today_end
start_event__gte=today_start,
end_event__lte=today_end
).count()
data = {
"completed_last_7_days": completed_last_7_days,
"tasks_assigned_last_week": tasks_assigned_last_week,