diff --git a/restricted/templates/restricted/ammain.html b/restricted/templates/restricted/ammain.html index 12bfb4c061bcbfe6d0ea7a8b5384540eaf3054bf..b1580713c9b271a975ee11e99c3c7b863754c03c 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 58d1449dd3c15c11d1a38d62d77d581f171e3e9f..f04d9e5658db11ba5e3524ca6c02eeac45d3b7f8 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,