From cd62b35851b65ba26b786dfc70504c4ba950bdf3 Mon Sep 17 00:00:00 2001 From: Jan Hauke Rahm Date: Tue, 13 Mar 2012 15:57:58 +0100 Subject: [PATCH] Show new applicants to frontdesk even before advocacies are set --- restricted/templates/restricted/ammain.html | 4 ++++ restricted/views.py | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/restricted/templates/restricted/ammain.html b/restricted/templates/restricted/ammain.html index 12bfb4c..b158071 100644 --- a/restricted/templates/restricted/ammain.html +++ b/restricted/templates/restricted/ammain.html @@ -51,6 +51,10 @@

+

The following people have applied but have not replied to our initial mail +yet, or their advocacies are incomplete.

+{% usemacro process_table prog_app_new %} +

The following applicants are waiting for an Application Manager to be assigned (first one is oldest).

{% usemacro process_table prog_app_ok %} diff --git a/restricted/views.py b/restricted/views.py index 58d1449..f04d9e5 100644 --- a/restricted/views.py +++ b/restricted/views.py @@ -71,6 +71,12 @@ def ammain(request): am_available = bmodels.AM.list_free() + prog_app_new = bmodels.Process.objects.filter(progress__in=( + const.PROGRESS_APP_NEW, + const.PROGRESS_APP_RCVD, + const.PROGRESS_ADV_RCVD)) \ + .annotate(started=Min("log__logdate")).order_by("started") + prog_app_ok = bmodels.Process.objects.filter(progress=const.PROGRESS_APP_OK) \ .annotate(started=Min("log__logdate")).order_by("started") @@ -127,6 +133,7 @@ def ammain(request): person=person, am=person.am, am_available=am_available, + prog_app_new=prog_app_new, prog_app_ok=prog_app_ok, prog_app_hold=prog_app_hold, prog_am_rcvd=prog_am_rcvd, -- GitLab