diff --git a/jarvis/followup/templates/heightweight/create.html b/jarvis/followup/templates/heightweight/create.html index b02bb6e..39bad21 100644 --- a/jarvis/followup/templates/heightweight/create.html +++ b/jarvis/followup/templates/heightweight/create.html @@ -7,7 +7,7 @@
Date | + {% if not gymnast %}Gymnast | -Height | -Hips height | -Weight | -BMI | + {% endif %} +Height | +Hips height | +Weight | +BMI | {{ heightweight.date | date:"d-m-Y" }} | +{{ heightweight.date | date:"j-n-Y" }} | + {% if not gymnast %}{{ heightweight.gymnast }} | -{{ heightweight.height }} | -{% if heightweight.hips_height == None %}-{% else %}{{ heightweight.hips_height }}{% endif %} | -{{ heightweight.weight }} | -+ {% endif %} + | {{ heightweight.height }} | +{% if heightweight.hips_height == None %}-{% else %}{{ heightweight.hips_height }}{% endif %} | +{{ heightweight.weight }} | +
{% if gymnast %}
{% if gymnast.gender == 0 %}
{% if heightweight.bmi < 19 %}
diff --git a/jarvis/followup/templates/wellbeing/create.html b/jarvis/followup/templates/wellbeing/create.html
index 99a914a..7949969 100644
--- a/jarvis/followup/templates/wellbeing/create.html
+++ b/jarvis/followup/templates/wellbeing/create.html
@@ -14,7 +14,7 @@
{% csrf_token %}
-
+
{% if request.user|has_group:"trainer" %}
{{ form.gymnast }}
{{ form.gymnast_related }}
@@ -31,7 +31,7 @@
-
+
-
{{ form.date }}
{% if form.date.errors %}{% for error in form.date.errors %}{{ error }}{% endfor %}{% endif %}
@@ -54,8 +54,8 @@
{{ form.mindstate }}
{% if form.mindstate.errors %} {% for error in form.mindstate.errors %}{{ error }}{% endfor %}{% endif %}
-
(1: Very Bad - 10: Very Good) +
+
(1: Very Bad - 10: Very Good)
@@ -64,8 +64,8 @@
{{ form.sleep }}
{% if form.sleep.errors %} {% for error in form.sleep.errors %}{{ error }}{% endfor %}{% endif %}
-
-
(1: Very Bad - 10: Very Good) +
+
(1: Very Bad - 10: Very Good)
@@ -74,8 +74,8 @@
{{ form.stress }}
{% if form.stress.errors %} {% for error in form.stress.errors %}{{ error }}{% endfor %}{% endif %}
-
-
(1: Very Low - 10: Very High) +
+
(1: Very Low - 10: Very High)
@@ -84,8 +84,8 @@
{{ form.fatigue }}
{% if form.fatigue.errors %} {% for error in form.fatigue.errors %}{{ error }}{% endfor %}{% endif %}
-
-
(1: Very Low - 10: Very High) +
+
(1: Very Low - 10: Very High)
@@ -94,8 +94,8 @@
{{ form.muscle_soreness }}
{% if form.muscle_soreness.errors %} {% for error in form.muscle_soreness.errors %}{{ error }}{% endfor %}{% endif %}
-
-
(1: Very Low - 10: Very High) +
+
(1: Very Low - 10: Very High)
diff --git a/jarvis/followup/templates/wellbeing/list.html b/jarvis/followup/templates/wellbeing/list.html
index 6e2cd04..b4b2025 100644
--- a/jarvis/followup/templates/wellbeing/list.html
+++ b/jarvis/followup/templates/wellbeing/list.html
@@ -6,10 +6,10 @@
-
+ Well being list {% if gymnast %}for {{ gymnast }}{% endif %}
+
{% if request.user|has_group:"trainer" %}
@@ -28,7 +28,9 @@
| Date |
+ {% if not gymnast %}
Gymnast |
+ {% endif %}
Mindstate |
Sleep |
Stress |
@@ -44,10 +46,16 @@
- {{ wellbeing.date | date:"d-m-Y" }} |
+
+ {{ wellbeing.date | date:"j-n-Y" }}
+ |
+ {% if not gymnast %}
- {{ wellbeing.gymnast }} |
+ {{ wellbeing.gymnast }}
+
+
+ {% endif %}
{% if wellbeing.mindstate < 5%}{% endif %}
{{ wellbeing.mindstate }}
diff --git a/jarvis/people/views.py b/jarvis/people/views.py
index 7d7d3f6..052c2f9 100644
--- a/jarvis/people/views.py
+++ b/jarvis/people/views.py
@@ -260,11 +260,16 @@ def gymnast_display_physiological(request, gymnast_id):
Args:
gymnast_id (int) identifiant du gymnast
"""
- injuries_list = Injury.objects.filter(gymnast=gymnast_id).order_by("date")
- wellbeing_list = WellBeing.objects.filter(gymnast=gymnast_id).order_by("date")
- height_weight_list = HeightWeight.objects.filter(gymnast=gymnast_id).order_by(
- "date"
- )
+ start_date = pendulum.now().date().subtract(months=6)
+ injuries_list = Injury.objects.filter(
+ gymnast=gymnast_id, date__gte=start_date
+ ).order_by("date")
+ wellbeing_list = WellBeing.objects.filter(
+ gymnast=gymnast_id, date__gte=start_date
+ ).order_by("date")
+ height_weight_list = HeightWeight.objects.filter(
+ gymnast=gymnast_id, date__gte=start_date
+ ).order_by("date")
context = {
"injuries_list": injuries_list,
@@ -286,8 +291,11 @@ def gymnast_display_scores_chrono(request, gymnast_id):
Args:
gymnast_id (int) identifiant du gymnast
"""
+ start_date = pendulum.now().date().subtract(months=6)
score_list = Point.objects.filter(gymnast=gymnast_id).order_by("-event__date_begin")
- chrono_list = Chrono.objects.filter(gymnast=gymnast_id).order_by("date")
+ chrono_list = Chrono.objects.filter(
+ gymnast=gymnast_id, date__gte=start_date
+ ).order_by("date")
base_queryset = chrono_list.values("date").annotate(score_avg=Avg("tof"))
context = {
diff --git a/static/css/jarvis.css b/static/css/jarvis.css
index 33e7f43..4166e51 100644
--- a/static/css/jarvis.css
+++ b/static/css/jarvis.css
@@ -90,6 +90,11 @@ textarea.form-control {
color: #0CA3E0 !important;
}
+.text-form-info {
+ font-weight: lighter !important;
+ font-size: 12px;
+}
+
.progress-bar-primary {
background: #ba54f5;
background-image: -webkit-linear-gradient(to bottom left, #ba54f5, #e14eca, #ba54f5);
| |
---|