From 222cf41a95d3beccbbda1a808bd1c3c49154d64d Mon Sep 17 00:00:00 2001 From: Gregory Trullemans Date: Wed, 10 Apr 2024 14:02:46 +0200 Subject: [PATCH] Update wellbeing listing for a gymnast --- .../followup/templates/heightweight/list.html | 11 +- jarvis/followup/templates/wellbeing/list.html | 371 +++++++++++++++--- 2 files changed, 307 insertions(+), 75 deletions(-) diff --git a/jarvis/followup/templates/heightweight/list.html b/jarvis/followup/templates/heightweight/list.html index 9fac766..d9cad38 100644 --- a/jarvis/followup/templates/heightweight/list.html +++ b/jarvis/followup/templates/heightweight/list.html @@ -187,17 +187,8 @@ }); }); - var timeFormat = 'DD-M-YYYY'; - - $('#injury_table').tablesorter({ - headers: { - 0: { sorter: false }, - }, - dateFormat: "uk", - sortList: [[1, 1]] - }); - {% if height_weight_list %} + var timeFormat = 'DD-M-YYYY'; var ctx = document.getElementById("chart_height_weight").getContext("2d"); var border_color_pink = 'rgb(255, 99, 132)'; diff --git a/jarvis/followup/templates/wellbeing/list.html b/jarvis/followup/templates/wellbeing/list.html index 40d54c8..c56006f 100644 --- a/jarvis/followup/templates/wellbeing/list.html +++ b/jarvis/followup/templates/wellbeing/list.html @@ -1,5 +1,6 @@ {% extends "listing.html" %} {% load has_group %} +{% load static %} {% block datacontent %}
@@ -8,7 +9,17 @@

- {% if gymnast %}{% if gymnast.id in request.session.available_gymnast or request.user.is_superuser %}{% endif %}{{ gymnast }}'s {% endif %} Well being list + {% if gymnast %} + + {% if gymnast.id in request.session.available_gymnast or request.user.is_superuser %} + + {% endif %} + {{ gymnast }} + + {% if gymnast.id in request.session.available_gymnast or request.user.is_superuser %} + + {% endif %}'s + {% endif %} Well being listing

@@ -24,71 +35,133 @@
- {% if wellbeing_list %} - - - - - - {% if not gymnast %} - - {% endif %} - - - - - - - - - {% for wellbeing in wellbeing_list %} - - - - {% if not gymnast %} - - {% endif %} - - - - - - - {% endfor %} - -
DateGymnastMindstateSleepStressFatigueMuscle soreness
- - - - - {% if wellbeing.gymnast.id in request.session.available_gymnast or request.user.is_superuser %}{% endif %}{{ wellbeing.date | date:"j-n-Y" }} - - {% if wellbeing.gymnast.id in request.session.available_gymnast or request.user.is_superuser %}{% endif %} - {{ wellbeing.gymnast }} - - - {% if wellbeing.mindstate < 5%}{% endif %} - {{ wellbeing.mindstate }} - {% if wellbeing.mindstate < 5%}{% endif %} - - {% if wellbeing.sleep < 5%}{% endif %} - {{ wellbeing.sleep }} - {% if wellbeing.sleep < 5%}{% endif %} - - {% if wellbeing.stress > 5%}{% endif %} - {{ wellbeing.stress }} - {% if wellbeing.stress > 5%}{% endif %} - - {% if wellbeing.fatigue > 5%}{% endif %} - {{ wellbeing.fatigue }} - {% if wellbeing.fatigue > 5%}{% endif %} - - {% if wellbeing.muscle_soreness > 5%}{% endif %} - {{ wellbeing.muscle_soreness }} - {% if wellbeing.muscle_soreness > 5%}{% endif %} -
+ {% if gymnast %} +
+
+ + + + + + + + + + + + + + {% for wellbeing in wellbeing_list %} + + + + + + + + + + {% endfor %} + +
DateMindstateSleepStressFatigueMuscle soreness
+ + + + + {% if wellbeing.gymnast.id in request.session.available_gymnast or request.user.is_superuser %}{% endif %}{{ wellbeing.date | date:"j-n-Y" }} + + {% if wellbeing.mindstate < 5%}{% endif %} + {{ wellbeing.mindstate }} + {% if wellbeing.mindstate < 5%}{% endif %} + + {% if wellbeing.sleep < 5%}{% endif %} + {{ wellbeing.sleep }} + {% if wellbeing.sleep < 5%}{% endif %} + + {% if wellbeing.stress > 5%}{% endif %} + {{ wellbeing.stress }} + {% if wellbeing.stress > 5%}{% endif %} + + {% if wellbeing.fatigue > 5%}{% endif %} + {{ wellbeing.fatigue }} + {% if wellbeing.fatigue > 5%}{% endif %} + + {% if wellbeing.muscle_soreness > 5%}{% endif %} + {{ wellbeing.muscle_soreness }} + {% if wellbeing.muscle_soreness > 5%}{% endif %} +
+
+
+ +
+
{% else %} -

There are no well being corresponding to your criterias

+ {% if wellbeing_list %} + + + + + + {% if not gymnast %} + + {% endif %} + + + + + + + + + {% for wellbeing in wellbeing_list %} + + + + {% if not gymnast %} + + {% endif %} + + + + + + + {% endfor %} + +
DateGymnastMindstateSleepStressFatigueMuscle soreness
+ + + + + {% if wellbeing.gymnast.id in request.session.available_gymnast or request.user.is_superuser %}{% endif %}{{ wellbeing.date | date:"j-n-Y" }} + + {% if wellbeing.gymnast.id in request.session.available_gymnast or request.user.is_superuser %}{% endif %} + {{ wellbeing.gymnast }} + + + {% if wellbeing.mindstate < 5%}{% endif %} + {{ wellbeing.mindstate }} + {% if wellbeing.mindstate < 5%}{% endif %} + + {% if wellbeing.sleep < 5%}{% endif %} + {{ wellbeing.sleep }} + {% if wellbeing.sleep < 5%}{% endif %} + + {% if wellbeing.stress > 5%}{% endif %} + {{ wellbeing.stress }} + {% if wellbeing.stress > 5%}{% endif %} + + {% if wellbeing.fatigue > 5%}{% endif %} + {{ wellbeing.fatigue }} + {% if wellbeing.fatigue > 5%}{% endif %} + + {% if wellbeing.muscle_soreness > 5%}{% endif %} + {{ wellbeing.muscle_soreness }} + {% if wellbeing.muscle_soreness > 5%}{% endif %} +
+ {% else %} +

There are no well being corresponding to your criterias

+ {% endif %} {% endif %}
@@ -97,6 +170,7 @@ {% endblock %} {% block footerscript %} + {% endblock %} \ No newline at end of file