2021-12-13 15:51:07 +01:00
|
|
|
<div class="row justify-content-center ml-3 pr-0">
|
2021-12-19 13:20:29 +01:00
|
|
|
<div class="col-md-6">
|
2021-12-13 15:51:07 +01:00
|
|
|
<div class="card">
|
|
|
|
<div class="card-header">
|
|
|
|
<h4>Height/Weight</h4>
|
|
|
|
</div>
|
2021-12-19 19:59:20 +01:00
|
|
|
<div class="card-body pt-0 pb-0 pr-0 pl-0">
|
2021-12-13 15:51:07 +01:00
|
|
|
{% if height_weight_list %}
|
|
|
|
<div>
|
|
|
|
<canvas id="chartjs_height_weight_state" class="chartjs" width="400" height="200"></canvas>
|
|
|
|
</div>
|
2021-12-19 13:20:29 +01:00
|
|
|
{% else %}
|
2021-12-22 14:47:00 +01:00
|
|
|
<p class="pl-3 text-muted">No height/weight recorded for this gymnast.</p>
|
2021-12-19 13:20:29 +01:00
|
|
|
{% endif %}
|
2021-12-13 15:51:07 +01:00
|
|
|
</div>
|
|
|
|
<div class="card-footer text-right text-muted pt-0">
|
2021-12-24 07:48:46 +01:00
|
|
|
{% if height_weight_list %}
|
2021-12-19 19:59:20 +01:00
|
|
|
<a href="{% url 'heightweight_list_for_gymnast' gymnast_id %}">
|
|
|
|
<button type="submit" value="add" class="btn btn-icon btn-warning ">
|
|
|
|
<i class="fal fa-line-height"></i>
|
|
|
|
</button>
|
|
|
|
</a>
|
2021-12-24 07:48:46 +01:00
|
|
|
{% endif %}
|
2021-12-19 19:59:20 +01:00
|
|
|
|
2021-12-19 13:22:11 +01:00
|
|
|
<a href="{% url 'heightweight_create_for_gymnast' gymnast_id %}">
|
2021-12-13 15:51:07 +01:00
|
|
|
<button type="submit" value="add" class="btn btn-icon btn-warning ">
|
|
|
|
<i class="tim-icons icon-simple-add"></i>
|
|
|
|
</button>
|
2021-12-16 09:49:36 +01:00
|
|
|
</a>
|
2021-12-13 15:51:07 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-12-19 13:20:29 +01:00
|
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
2021-12-13 15:51:07 +01:00
|
|
|
<div class="card">
|
|
|
|
<div class="card-header">
|
|
|
|
<h4>Mindstates</h4>
|
|
|
|
</div>
|
2021-12-19 19:59:20 +01:00
|
|
|
<div class="card-body pt-0 pb-0 pr-0 pl-0">
|
2021-12-13 15:51:07 +01:00
|
|
|
{% if mindstate_list %}
|
|
|
|
<div>
|
|
|
|
<canvas id="chartjs_mindstate" class="chartjs" width="400" height="200"></canvas>
|
|
|
|
</div>
|
2021-12-19 20:03:35 +01:00
|
|
|
{% else %}
|
2021-12-22 14:47:00 +01:00
|
|
|
<p class="pl-3 text-muted">No mindstate recorded for this gymnast.</p>
|
2021-12-19 20:03:35 +01:00
|
|
|
{% endif %}
|
2021-12-13 15:51:07 +01:00
|
|
|
</div>
|
|
|
|
<div class="card-footer text-right text-muted pt-0">
|
2021-12-24 07:48:46 +01:00
|
|
|
{% if mindstate_list %}
|
2021-12-19 19:59:20 +01:00
|
|
|
<a href="{% url 'mindstate_list_for_gymnast' gymnast_id %}">
|
|
|
|
<button type="submit" value="add" class="btn btn-icon btn-warning ">
|
|
|
|
<i class="fal fa-file-medical-alt"></i>
|
|
|
|
</button>
|
|
|
|
</a>
|
2021-12-24 07:48:46 +01:00
|
|
|
{% endif %}
|
2021-12-19 19:59:20 +01:00
|
|
|
|
2021-12-19 13:22:11 +01:00
|
|
|
<a href="{% url 'mindstate_create_for_gymnast' gymnast_id %}">
|
2021-12-13 15:51:07 +01:00
|
|
|
<button type="submit" value="add" class="btn btn-icon btn-warning ">
|
|
|
|
<i class="tim-icons icon-simple-add"></i>
|
|
|
|
</button>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-12-19 13:20:29 +01:00
|
|
|
</div>
|
2021-12-19 19:59:20 +01:00
|
|
|
</div>
|
|
|
|
<div class="row justify-content-center ml-3 pr-0">
|
|
|
|
<div class="col-md-12">
|
2021-12-13 15:51:07 +01:00
|
|
|
<div class="card">
|
|
|
|
<div class="card-header">
|
|
|
|
<h4>Accidents</h4>
|
|
|
|
</div>
|
|
|
|
<div class="card-body pt-0 pb-0">
|
|
|
|
{% if accident_list %}
|
2021-12-16 08:27:06 +01:00
|
|
|
<table class="table tablesorter table-striped table-condensed" id="accident_table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th style="width: 3%"></th>
|
|
|
|
<th class="header text-center" style="width: 10%">Date</th>
|
|
|
|
<th class="header text-left" style="width: 50%">Skill</th>
|
|
|
|
<th class="header text-left" style="width: 40%"># Week Off</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for accident in accident_list %}
|
|
|
|
<tr>
|
|
|
|
<td class="text-left">
|
|
|
|
<a href="{% url 'accident_update' accident.id %}">
|
|
|
|
<span class="tim-icons icon-pencil text-warning"></span>
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
<td class="text-center"><a href="{% url 'accident_details' accident.id %}">{{ accident.date | date:"d-m-Y" }}</a></td>
|
|
|
|
<td class="text-left">{% if accident.skill %}<a href="{% url 'skill_details' accident.skill.id %}">{{ accident.skill }}</a>{% else %}-{% endif %}</td>
|
|
|
|
<td class="text-left">{{ accident.nb_week_off }}</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2021-12-13 15:51:07 +01:00
|
|
|
{% else %}
|
2021-12-24 07:48:46 +01:00
|
|
|
<p class="text-muted">No accident known for this gymnast.</p>
|
2021-12-13 15:51:07 +01:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<div class="card-footer text-right text-muted pt-0">
|
2021-12-19 13:22:11 +01:00
|
|
|
<a href="{% url 'accident_create_for_gymnast' gymnast_id %}">
|
2021-12-13 15:51:07 +01:00
|
|
|
<button type="submit" value="add" class="btn btn-icon btn-warning ">
|
|
|
|
<i class="tim-icons icon-simple-add"></i>
|
|
|
|
</button>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
2021-12-19 13:20:29 +01:00
|
|
|
|
|
|
|
var ctx = document.getElementById("chartjs_height_weight_state").getContext("2d");
|
|
|
|
var gradientStroke_1 = ctx.createLinearGradient(0, 230, 0, 50);
|
|
|
|
var gradientStroke_2 = ctx.createLinearGradient(0, 230, 0, 50);
|
|
|
|
|
|
|
|
gradientStroke_1.addColorStop(1, 'rgba(255, 99, 132, 0.4)');
|
|
|
|
gradientStroke_1.addColorStop(0.75, 'rgba(255, 99, 132, 0.3)');
|
|
|
|
gradientStroke_1.addColorStop(0.5, 'rgba(255, 99, 132, 0.2)');
|
|
|
|
gradientStroke_1.addColorStop(0.25, 'rgba(255, 99, 132, 0)');
|
|
|
|
|
|
|
|
gradientStroke_2.addColorStop(1, 'rgba(255, 159, 64, 0.4)');
|
|
|
|
gradientStroke_2.addColorStop(0.75, 'rgba(255, 159, 64, 0.3)');
|
|
|
|
gradientStroke_2.addColorStop(0.5, 'rgba(255, 159, 64, 0.2)');
|
|
|
|
gradientStroke_2.addColorStop(0.25, 'rgba(255, 159, 64, 0)');
|
|
|
|
|
2021-12-13 15:51:07 +01:00
|
|
|
new Chart(document.getElementById("chartjs_height_weight_state"),{
|
2021-12-19 13:20:29 +01:00
|
|
|
tooltips: {
|
|
|
|
backgroundColor: '#f5f5f5',
|
|
|
|
titleFontColor: '#333',
|
|
|
|
bodyFontColor: '#666',
|
|
|
|
bodySpacing: 4,
|
|
|
|
xPadding: 12,
|
|
|
|
mode: "nearest",
|
|
|
|
intersect: 0,
|
|
|
|
position: "nearest"
|
|
|
|
},
|
|
|
|
responsive: true,
|
2021-12-13 15:51:07 +01:00
|
|
|
type: 'line',
|
|
|
|
data:{
|
|
|
|
datasets:[
|
|
|
|
{% if height_weight_list %}
|
|
|
|
{
|
|
|
|
label: 'Weight',
|
2021-12-19 13:20:29 +01:00
|
|
|
backgroundColor: gradientStroke_1,
|
2021-12-13 15:51:07 +01:00
|
|
|
borderColor: 'rgb(255, 99, 132)',
|
|
|
|
fill: true,
|
|
|
|
data: [
|
2021-12-19 13:20:29 +01:00
|
|
|
{% for height_weight in height_weight_list %}
|
2021-12-13 15:51:07 +01:00
|
|
|
{
|
2021-12-19 13:20:29 +01:00
|
|
|
x: '{{ height_weight.date | date:"d-m-Y" }}',
|
|
|
|
y: '{{ height_weight.weight }}'
|
2021-12-13 15:51:07 +01:00
|
|
|
},
|
|
|
|
{% endfor%}
|
|
|
|
]
|
|
|
|
},
|
2021-12-16 09:49:36 +01:00
|
|
|
{
|
|
|
|
label: 'Height',
|
2021-12-19 13:20:29 +01:00
|
|
|
backgroundColor: gradientStroke_2,
|
2021-12-16 09:49:36 +01:00
|
|
|
borderColor: 'rgb(255, 159, 64)',
|
|
|
|
fill: true,
|
|
|
|
data: [
|
2021-12-19 13:20:29 +01:00
|
|
|
{% for height_weight in height_weight_list %}
|
2021-12-16 09:49:36 +01:00
|
|
|
{
|
2021-12-19 13:20:29 +01:00
|
|
|
x: '{{ height_weight.date | date:"d-m-Y" }}',
|
|
|
|
y: '{{ height_weight.height | add:"-100" }}'
|
2021-12-16 09:49:36 +01:00
|
|
|
},
|
|
|
|
{% endfor%}
|
|
|
|
]
|
|
|
|
},
|
2021-12-13 15:51:07 +01:00
|
|
|
{% endif %}
|
|
|
|
],
|
|
|
|
},
|
|
|
|
options: {
|
|
|
|
scales: {
|
|
|
|
xAxes: [{
|
|
|
|
type: "time",
|
|
|
|
time: {
|
|
|
|
format: 'DD-MM-YYYY',
|
|
|
|
round: 'day'
|
|
|
|
},
|
|
|
|
scaleLabel: {
|
|
|
|
display: true,
|
|
|
|
}
|
|
|
|
}, ],
|
|
|
|
yAxes: [{
|
|
|
|
scaleLabel: {
|
|
|
|
display: true,
|
|
|
|
},
|
|
|
|
// ticks: {
|
|
|
|
// beginAtZero: true,
|
|
|
|
// max: 10
|
|
|
|
// }
|
|
|
|
}]
|
|
|
|
},
|
|
|
|
legend: {
|
2021-12-16 09:49:36 +01:00
|
|
|
display: true,
|
|
|
|
position: 'bottom',
|
2021-12-13 15:51:07 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
2021-12-19 21:14:04 +01:00
|
|
|
var ctx = document.getElementById("chartjs_mindstate").getContext("2d");
|
|
|
|
var gradient_stroke_1 = ctx.createLinearGradient(0, 230, 0, 50);
|
|
|
|
|
|
|
|
gradient_stroke_1.addColorStop(1, 'rgba(75, 192, 192, 0.4)');
|
|
|
|
gradient_stroke_1.addColorStop(0.75, 'rgba(75, 192, 192, 0.3)');
|
|
|
|
gradient_stroke_1.addColorStop(0.5, 'rgba(75, 192, 192, 0.2)');
|
|
|
|
gradient_stroke_1.addColorStop(0.25, 'rgba(75, 192, 192, 0)');
|
|
|
|
|
2021-12-13 15:51:07 +01:00
|
|
|
new Chart(document.getElementById("chartjs_mindstate"),{
|
|
|
|
type: 'line',
|
|
|
|
data:{
|
|
|
|
datasets:[
|
|
|
|
{% if mindstate_list %}
|
|
|
|
{
|
2021-12-19 13:20:29 +01:00
|
|
|
label: 'Mindstate',
|
2021-12-19 21:14:04 +01:00
|
|
|
backgroundColor: gradient_stroke_1,
|
|
|
|
borderColor: 'rgb(75, 192, 192)',
|
2021-12-13 15:51:07 +01:00
|
|
|
fill: true,
|
|
|
|
data: [
|
|
|
|
{% for state in mindstate_list %}
|
|
|
|
{
|
|
|
|
x: '{{ state.date | date:"d-m-Y" }}',
|
|
|
|
y: '{{ state.score }}'
|
|
|
|
},
|
|
|
|
{% endfor%}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{% endif %}
|
|
|
|
],
|
|
|
|
},
|
|
|
|
options: {
|
|
|
|
scales: {
|
|
|
|
xAxes: [{
|
|
|
|
type: "time",
|
|
|
|
time: {
|
|
|
|
format: 'DD-MM-YYYY',
|
|
|
|
round: 'day'
|
|
|
|
},
|
|
|
|
scaleLabel: {
|
|
|
|
display: true,
|
|
|
|
}
|
|
|
|
}, ],
|
|
|
|
yAxes: [{
|
|
|
|
scaleLabel: {
|
|
|
|
display: true,
|
|
|
|
},
|
|
|
|
ticks: {
|
|
|
|
beginAtZero: true,
|
|
|
|
max: 10
|
|
|
|
}
|
|
|
|
}]
|
|
|
|
},
|
|
|
|
legend: {
|
|
|
|
display: false,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|