Closed JeanFrancoisFournier closed 4 years ago
See ClientManager.get_birthday_boys_and_girls
in src/member/models.py
.
First lead (incomplete code): in HomeView.get_context_data:
diff --git a/src/page/views.py b/src/page/views.py
index ff3629b..d62d095 100644
--- a/src/page/views.py
+++ b/src/page/views.py
@@ -24,7 +24,7 @@ class HomeView(LoginRequiredMixin, PermissionRequiredMixin, TemplateView):
today = datetime.today()
active_clients = Client.active.all().count()
pending_clients = Client.pending.all().count()
- clients = Client.contact.get_birthday_boys_and_girls()
+ birthday_clients = Client.active.get_birthday_boys_and_girls()
billable_orders = Order.objects.get_billable_orders(
today.year, today.month
).count()
@@ -33,7 +33,7 @@ class HomeView(LoginRequiredMixin, PermissionRequiredMixin, TemplateView):
delivery_date__year=datetime.today().year).count()
context['active_clients'] = active_clients
context['pending_clients'] = pending_clients
- context['birthday'] = clients
+ context['birthday'] = birthday_clients
context['billable_orders_month'] = billable_orders
context['billable_orders_year'] = billable_orders_year
context['routes'] = self.calculate_route_table()
Confirmed working in staging environment.
Tested and confirmed
Expected Behaviour
Birthday dashboard should only display ACTIVE, PAUSED, PENDING clients
Actual Behaviour
Birthday dashboard currently displays all clients regardless of their status.
Steps to reproduce