From 8ffb8fa05b2a45704412e9fd4edcdb41049b9c18 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Fri, 23 Oct 2020 13:29:06 +0100 Subject: only private events are counted for home page stats --- ctrack/core/views.py | 10 +++++----- ctrack/templates/pages/home.html | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ctrack/core/views.py b/ctrack/core/views.py index 3984b2d..5fc94ec 100644 --- a/ctrack/core/views.py +++ b/ctrack/core/views.py @@ -30,11 +30,11 @@ def home_page(request): caf_users = get_user_model().objects.all() no_orgs = Organisation.objects.count() no_people = Person.objects.count() - no_singledatetime_events = SingleDateTimeEvent.objects.count() - no_meetings = SingleDateTimeEvent.objects.filter(type_descriptor="MEETING").count() - no_emails = SingleDateTimeEvent.objects.filter(type_descriptor="EMAIL").count() - no_phone_calls = SingleDateTimeEvent.objects.filter(type_descriptor="PHONE_CALL").count() - no_video_conferences = SingleDateTimeEvent.objects.filter(type_descriptor="VIDEO_CALL").count() + no_singledatetime_events = SingleDateTimeEvent.objects.filter(private=False).count() + no_meetings = SingleDateTimeEvent.objects.filter(type_descriptor="MEETING", private=False).count() + no_emails = SingleDateTimeEvent.objects.filter(type_descriptor="EMAIL", private=False).count() + no_phone_calls = SingleDateTimeEvent.objects.filter(type_descriptor="PHONE_CALL", private=False).count() + no_video_conferences = SingleDateTimeEvent.objects.filter(type_descriptor="VIDEO_CALL", private=False).count() no_cafs = CAF.objects.count() no_oes = Organisation.objects.filter(oes=True).count() no_essential_services = EssentialService.objects.count() diff --git a/ctrack/templates/pages/home.html b/ctrack/templates/pages/home.html index d3a1309..edf3182 100644 --- a/ctrack/templates/pages/home.html +++ b/ctrack/templates/pages/home.html @@ -37,7 +37,7 @@ class="lead font-weight-bold">{{ no_people }} people. OES are responsible for {{ no_essential_services }} NIS essential services. There have been a total of {{ no_singledatetime_events }} interactions with OES by + class="lead font-weight-bold">{{ no_singledatetime_events }} official interactions with OES by inspectors, including {{ no_emails }} emails, {{ no_phone_calls }} -- cgit v1.2.3