Update periodical report
This commit is contained in:
parent
daf9afec7d
commit
95226c4271
|
@ -57,6 +57,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<br />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
<h4 class="mb-1">Physiological</h4>
|
<h4 class="mb-1">Physiological</h4>
|
||||||
|
@ -162,6 +163,51 @@
|
||||||
No intensty for selected period.
|
No intensty for selected period.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<h4 class="mb-1">Intensity</h4>
|
||||||
|
{% if injuries_list %}
|
||||||
|
<table class="table" id="injury_table">
|
||||||
|
<thead class="text-primary">
|
||||||
|
<tr>
|
||||||
|
<th class="header text-left" style="width: 7%">Date</th>
|
||||||
|
<th class="header text-left" style="width: 20%">Gymnast</th>
|
||||||
|
<th class="header text-left" style="width: 10%">Mechanism</th>
|
||||||
|
<th class="header text-left" style="width: 20%">Location</th>
|
||||||
|
<th class="header text-left" style="width: 10%">Side</th>
|
||||||
|
<th style="width: 20%">Skill</th>
|
||||||
|
<th style="width: 8%"># Week off</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for injury in injuries_list %}
|
||||||
|
<tr role="row" class="{% cycle 'odd' 'even' %}">
|
||||||
|
<td class="text-left">{{ injury.date | date:"d-m-Y" }}</td>
|
||||||
|
<td class="text-left">{{ injury.gymnast }}</td>
|
||||||
|
<td class="text-left">{{ injury.get_mechanism_display }}</td>
|
||||||
|
<td class="text-left">{{ injury.location }}</td>
|
||||||
|
<td class="text-left">{{ injury.get_body_side_display }}</td>
|
||||||
|
<td class="text-left">
|
||||||
|
{% if injury.skill %}
|
||||||
|
{{ injury.skill }}
|
||||||
|
{% else %}
|
||||||
|
-
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<td class="text-right">
|
||||||
|
{% if injury.nb_week_off %}
|
||||||
|
{{ injury.nb_week_off }}
|
||||||
|
{% else %}
|
||||||
|
-
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{% else %}
|
||||||
|
<p class="muted-text">There are no injury corresponding to your criterias.</p>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
|
@ -1003,6 +1003,8 @@ def generate_report_for_period(
|
||||||
max_number_of_passes_value=Max("number_of_passes"),
|
max_number_of_passes_value=Max("number_of_passes"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
injury_list = gymnast.injuries.filter(date__gte=date_begin, date__lte=date_end)
|
||||||
|
|
||||||
# BEST TOF
|
# BEST TOF
|
||||||
number_of_tof_straightjump = Chrono.objects.filter(
|
number_of_tof_straightjump = Chrono.objects.filter(
|
||||||
gymnast=gymnast, date__gte=date_begin, date__lte=date_end, chrono_type=0
|
gymnast=gymnast, date__gte=date_begin, date__lte=date_end, chrono_type=0
|
||||||
|
@ -1236,6 +1238,7 @@ def generate_report_for_period(
|
||||||
# MEDICAL INFORMATIONS
|
# MEDICAL INFORMATIONS
|
||||||
"wellbeing_score": wellbeing_score,
|
"wellbeing_score": wellbeing_score,
|
||||||
"height_weight_value": height_weight_value,
|
"height_weight_value": height_weight_value,
|
||||||
|
"injury_list": injury_list,
|
||||||
# INTENSITY
|
# INTENSITY
|
||||||
"intensity_value": intensity_value,
|
"intensity_value": intensity_value,
|
||||||
# TOF
|
# TOF
|
||||||
|
|
Loading…
Reference in New Issue