From b8fa28d2257abd1c394f3ed3cf97cd6cfa4f0bb6 Mon Sep 17 00:00:00 2001 From: Gregory Trullemans Date: Sat, 11 May 2024 08:41:29 +0100 Subject: [PATCH] Update Dashboard for gymnast: add link --- jarvis/core/templates/dashboard/dashboard.html | 15 ++++++++++----- jarvis/core/views.py | 3 +++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/jarvis/core/templates/dashboard/dashboard.html b/jarvis/core/templates/dashboard/dashboard.html index 562e2ee..f67d1db 100644 --- a/jarvis/core/templates/dashboard/dashboard.html +++ b/jarvis/core/templates/dashboard/dashboard.html @@ -131,7 +131,8 @@
    -
  1. Wellbeing: +
  2. + Wellbeing: {% if wellbeing_state %} {% endif %} @@ -140,7 +141,8 @@ {% endif %}
  3. -
  4. Height/Weight: +
  5. + Height/Weight: {% if height_weight_state %} {% endif %} @@ -149,7 +151,8 @@ {% endif %}
  6. -
  7. Intensity: +
  8. + Intensity: {% if intensity_state %} {% endif %} @@ -159,7 +162,8 @@ {% endif %}
  9. -
  10. Chrono: +
  11. + Chrono: {% if chrono_state %} {% endif %} @@ -168,7 +172,8 @@ {% endif %}
  12. -
  13. Learned Skill: +
  14. + Learned Skill: {% if known_skills_state %} {% endif %} diff --git a/jarvis/core/views.py b/jarvis/core/views.py index 68e06cc..ab90705 100644 --- a/jarvis/core/views.py +++ b/jarvis/core/views.py @@ -104,6 +104,8 @@ def gymnast_have_birthday(request): # def get_last_updated_gymnasts(expiration_date): # ... +# TODO: liste de mots pour souhaiter la bienvenue + # TODO: véririer si c'est l'anniversaire de la personne qui est connectée. # TODO: check if gymnast have point @@ -191,6 +193,7 @@ def home(request): todate = pendulum.now().date() birthday_list = gymnast_have_birthday(request) gymnast = get_object_or_404(Gymnast, pk=request.user.gymnast.id) + context["gymnast"] = gymnast # if birthday_list is not None and gymnast.id in birthday_list: # print("C'est l'anniversaire du gymnaste !")