diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-10-23 13:29:06 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-10-23 13:29:06 +0100 |
commit | 8ffb8fa05b2a45704412e9fd4edcdb41049b9c18 (patch) | |
tree | b8d82bbad02c813393184299d64d46e2c39e2f16 | |
parent | a8f9414979b79cc7799c7f6ff1ce318c7ebc2ba9 (diff) |
only private events are counted for home page stats
-rw-r--r-- | ctrack/core/views.py | 10 | ||||
-rw-r--r-- | 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 }}</span> <a href="{% url "organisations:people" %}">people</a>. OES are responsible for <span class="lead font-weight-bold">{{ no_essential_services }}</span> NIS <a href="#">essential services</a>. There have been a total of <span - class="lead font-weight-bold">{{ no_singledatetime_events }}</span> interactions with OES by + class="lead font-weight-bold">{{ no_singledatetime_events }}</span> official interactions with OES by inspectors, including <span class="lead font-weight-bold">{{ no_emails }}</span> emails, <span class="lead font-weight-bold">{{ no_phone_calls }}</span> |