diff --git a/jarvis/core/templates/dashboard/dashboard.html b/jarvis/core/templates/dashboard/dashboard.html
index a76614d..5f6d810 100644
--- a/jarvis/core/templates/dashboard/dashboard.html
+++ b/jarvis/core/templates/dashboard/dashboard.html
@@ -27,9 +27,9 @@
-
Welcome to Jarvi v0.83 (last update : 12-06-2023)
+
Welcome to Jarvi v0.84 (last update : 12-06-2023)
This application is here to help coaches to manage the gymnasts (evolution, evaluation, routines, scores, …). This tool is not perfect so feel free to make improvement proposals, bug reports, … by sending me an email.
-
You can find the user manuel here (in french).
+
You can find the user manual here (in french).
diff --git a/jarvis/followup/models.py b/jarvis/followup/models.py
index 9f0244c..396d641 100644
--- a/jarvis/followup/models.py
+++ b/jarvis/followup/models.py
@@ -72,6 +72,11 @@ AGE_CATOGORY_CHOICES = (
(22, "Senior"),
)
+NOTE_STATUS_CHOICES = (
+ (0, "Draft"),
+ (1, "Published"),
+)
+
class Chrono(Seasonisable):
"""
@@ -399,11 +404,6 @@ class Note(Markdownizable, Seasonisable):
Notes relatives à un gymnaste
"""
- STATUS_CHOICES = (
- (0, "Draft"),
- (1, "Published"),
- )
-
gymnast = models.ForeignKey(
Gymnast, on_delete=models.CASCADE, related_name="remarks"
)
@@ -411,9 +411,11 @@ class Note(Markdownizable, Seasonisable):
User, on_delete=models.SET_NULL, blank=True, null=True, related_name="notes"
)
status = models.PositiveSmallIntegerField(
- choices=STATUS_CHOICES, verbose_name="Status", default=0
+ choices=NOTE_STATUS_CHOICES, verbose_name="Status", default=0
+ )
+ title = models.CharField(
+ default="Note of the week", verbose_name="Title", max_length=255
)
- title = models.CharField(default="Note of the week", verbose_name="Title", max_length=255)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
diff --git a/jarvis/followup/views.py b/jarvis/followup/views.py
index deaa767..68e2350 100644
--- a/jarvis/followup/views.py
+++ b/jarvis/followup/views.py
@@ -721,6 +721,9 @@ def score_create_or_update(request, score_id=None, gymnast_id=None):
# notification
receiver = []
gymnast = Gymnast.objects.get(pk=form.cleaned_data["gymnast"].id)
+ event = form.cleaned_data["event"]
+ routine_type = form.cleaned_data["routine_type"]
+ total = form.cleaned_data["total"]
functionality = ContentType.objects.get(model="point")
for notification in gymnast.notifications.filter(
functionality=functionality
@@ -734,7 +737,7 @@ def score_create_or_update(request, score_id=None, gymnast_id=None):
receiver,
fail_silently=False,
html_message=f"""Un nouveau score a été enregistré pour {gymnast}.
Un nouveau score a été enregistré pour {gymnast} ({event}) : {routine_type} - {total}.
+
+
Time of flight
+ {% if number_of_tof_straightjump or number_of_tof_q1r1 or number_of_tof_q1r2 %}
+
+
+ |
+ |
+ Min |
+ Average |
+ Max |
+
+ {% if best_tof_straightjump.mean_score %}
+
+ 10 | |
+ ({{ number_of_tof_straightjump }}) |
+ {{ best_tof_straightjump.min_tof }} ({{ best_tof_straightjump.min_score }}) |
+ {{ best_tof_straightjump.mean_tof|stringformat:".3f" }} ({{ best_tof_straightjump.mean_score|stringformat:".3f" }}) |
+ {{ best_tof_straightjump.max_tof }} ({{ best_tof_straightjump.max_score }}) |
+
+ {% endif %}
+ {% if best_tof_q1r1.mean_score %}
+
+ Q1R1 |
+ ({{ number_of_tof_q1r1 }}) |
+ {{ best_tof_q1r1.min_tof }} ({{ best_tof_q1r1.min_score }}) |
+ {{ best_tof_q1r1.mean_tof|stringformat:".3f" }} ({{ best_tof_q1r1.mean_score|stringformat:".3f" }}) |
+ {{ best_tof_q1r1.max_tof }} ({{ best_tof_q1r1.max_score }}) |
+
+ {% endif %}
+ {% if best_tof_q1r2.mean_score %}
+
+ Q1R2 |
+ ({{ number_of_tof_q1r2 }}) |
+ {{ best_tof_q1r2.min_tof }} ({{ best_tof_q1r2.min_score }}) |
+ {{ best_tof_q1r2.mean_tof|stringformat:".3f" }} ({{ best_tof_q1r2.mean_score|stringformat:".3f" }}) |
+ {{ best_tof_q1r2.max_tof }} ({{ best_tof_q1r2.max_score }}) |
+
+ {% endif %}
+ {% if best_tof_q2r1.mean_score %}
+
+ Q2R1 |
+ ({{ number_of_tof_q2r1 }}) |
+ {{ best_tof_q2r1.min_tof }} ({{ best_tof_q2r1.min_score }}) |
+ {{ best_tof_q2r1.mean_tof|stringformat:".3f" }} ({{ best_tof_q2r1.mean_score|stringformat:".3f" }}) |
+ {{ best_tof_q2r1.max_tof }} ({{ best_tof_q2r1.max_score }}) |
+
+ {% endif %}
+ {% if best_tof_sf.mean_score %}
+
+ SF |
+ ({{ number_of_tof_sf }}) |
+ {{ best_tof_sf.min_tof }} ({{ best_tof_sf.min_score }}) |
+ {{ best_tof_sf.mean_tof|stringformat:".3f" }} ({{ best_tof_sf.mean_score|stringformat:".3f" }}) |
+ {{ best_tof_sf.max_tof }} ({{ best_tof_sf.max_score }}) |
+
+ {% endif %}
+ {% if best_tof_f.mean_score %}
+
+ F |
+ ({{ number_of_tof_f }}) |
+ {{ best_tof_f.min_tof }} ({{ best_tof_f.min_score }}) |
+ {{ best_tof_f.mean_tof|stringformat:".3f" }} ({{ best_tof_f.mean_score|stringformat:".3f" }}) |
+ {{ best_tof_f.max_tof }} ({{ best_tof_f.max_score }}) |
+
+ {% endif %}
+
+ {% else %}
+ No chrono/ToF found.
+ {% endif %}
+
+
+
+
Best Scores
+ {% if best_point_routine_1 or best_point_routine_2 or best_point_routine_3 or best_point_routine_4 or best_point_routine_5 %}
+
+
+ |
+ Exe. |
+ Diff. |
+ HD |
+ ToF |
+ Total |
+ |
+
+ {% if best_point_routine_1 %}
+
+ Q1R1 |
+ {{ best_point_routine_1.point_execution }} |
+ {{ best_point_routine_1.point_difficulty }} |
+ {{ best_point_routine_1.point_horizontal_displacement }} |
+ {{ best_point_routine_1.point_time_of_flight }} |
+ {{ best_point_routine_1.total }} |
+ {{ best_point_routine_1.event.date_begin|date:"j M Y" }} |
+
+ {% endif %}
+ {% if best_point_routine_2 %}
+
+ Q1R2 |
+ {{ best_point_routine_2.point_execution }} |
+ {{ best_point_routine_2.point_difficulty }} |
+ {{ best_point_routine_2.point_horizontal_displacement }} |
+ {{ best_point_routine_2.point_time_of_flight }} |
+ {{ best_point_routine_2.total }} |
+ {{ best_point_routine_2.event.date_begin|date:"j M Y" }} |
+
+ {% endif %}
+ {% if best_point_routine_3 %}
+
+ Q2R1 |
+ {{ best_point_routine_3.point_execution }} |
+ {{ best_point_routine_3.point_difficulty }} |
+ {{ best_point_routine_3.point_horizontal_displacement }} |
+ {{ best_point_routine_3.point_time_of_flight }} |
+ {{ best_point_routine_3.total }} |
+ {{ best_point_routine_3.event.date_begin|date:"j M Y" }} |
+
+ {% endif %}
+ {% if best_point_routine_4 %}
+
+ SF |
+ {{ best_point_routine_4.point_execution }} |
+ {{ best_point_routine_4.point_difficulty }} |
+ {{ best_point_routine_4.point_horizontal_displacement }} |
+ {{ best_point_routine_4.point_time_of_flight }} |
+ {{ best_point_routine_4.total }} |
+ {{ best_point_routine_4.event.date_begin|date:"j M Y" }} |
+
+ {% endif %}
+ {% if best_point_routine_5 %}
+
+ F |
+ {{ best_point_routine_5.point_execution }} |
+ {{ best_point_routine_5.point_difficulty }} |
+ {{ best_point_routine_5.point_horizontal_displacement }} |
+ {{ best_point_routine_5.point_time_of_flight }} |
+ {{ best_point_routine_5.total }} |
+ {{ best_point_routine_5.event.date_begin|date:"j M Y" }} |
+
+ {% endif %}
+
+ {% else %}
+ No scores during the selected week.
+ {% endif %}
+
+
+
+ {% if q1r1 or q1r2 or q2r1 or sfinal or final %}
+
+
Routines
+
+
+
Q1 routine 1
+ {% if q1r1 %}
+
+ {% for routine_skill in q1r1.routine.skill_links.all %}
+
+ {{ routine_skill.skill.notation }} |
+ {{ routine_skill.skill.difficulty }} |
+
+ {% endfor %}
+
+ |
+ {{ q1r1.routine.difficulty }} |
+
+
+ {% else %}
+ No routine defined.
+ {% endif %}
+ {% if q1r1_done_stat.total_succeeded %}
+ {{ q1r1_done_stat.total_succeeded }} | {{ q1r1_done_stat.total_try }} ({% widthratio q1r1_done_stat.total_succeeded q1r1_done_stat.total_try 100 %}%)
+ {% endif %}
+
+
+
Q1 routine 2
+ {% if q1r2 %}
+
+ {% for routine_skill in q1r2.routine.skill_links.all %}
+
+ {{ routine_skill.skill.notation }} |
+ {{ routine_skill.skill.difficulty }} |
+
+ {% endfor %}
+
+ |
+ {{ q1r2.routine.difficulty }} |
+
+
+ {% else %}
+ No routine defined.
+ {% endif %}
+ {% if q1r2_done_stat.total_succeeded %}
+ {{ q1r2_done_stat.total_succeeded }} | {{ q1r2_done_stat.total_try }} ({% widthratio q1r2_done_stat.total_succeeded q1r2_done_stat.total_try 100 %}%)
+ {% endif %}
+
+
+
Q2 routine 1
+ {% if q2r1 %}
+
+ {% for routine_skill in q2r1.routine.skill_links.all %}
+
+ {{ routine_skill.skill.notation }} |
+ {{ routine_skill.skill.difficulty }} |
+
+ {% endfor %}
+
+ |
+ {{ q2r1.routine.difficulty }} |
+
+
+ {% else %}
+ No routine defined.
+ {% endif %}
+ {% if q2r1_done_stat.total_succeeded %}
+ {{ q2r1_done_stat.total_succeeded }} | {{ q2r1_done_stat.total_try }} ({% widthratio q2r1_done_stat.total_succeeded q2r1_done_stat.total_try 100 %}%)
+ {% endif %}
+
+
+
Semi-final routine
+ {% if sfinal %}
+
+ {% for routine_skill in sfinal.routine.skill_links.all %}
+
+ {{ routine_skill.skill.notation }} |
+ {{ routine_skill.skill.difficulty }} |
+
+ {% endfor %}
+
+ |
+ {{ sfinal.routine.difficulty }} |
+
+
+ {% else %}
+ No routine defined.
+ {% endif %}
+ {% if sfinal_done_stat.total_succeeded %}
+ {{ sfinal_done_stat.total_succeeded }} | {{ sfinal_done_stat.total_try }} ({% widthratio sfinal_done_stat.total_succeeded sfinal_done_stat.total_try 100 %}%)
+ {% endif %}
+
+
+
Final routine
+ {% if final %}
+
+ {% for routine_skill in final.routine.skill_links.all %}
+
+ {{ routine_skill.skill.notation }} |
+ {{ routine_skill.skill.difficulty }} |
+
+ {% endfor %}
+
+ |
+ {{ final.routine.difficulty }} |
+
+
+ {% else %}
+ No routine defined.
+ {% endif %}
+ {% if final_done_stat.total_succeeded %}
+ {{ final_done_stat.total_succeeded }} | {{ final_done_stat.total_try }} ({% widthratio final_done_stat.total_succeeded final_done_stat.total_try 100 %}%)
+ {% endif %}
+
+ {% endif %}
+
+
+
+
+
diff --git a/jarvis/people/templates/gymnasts/reports/report_week.html b/jarvis/people/templates/gymnasts/reports/report_week.html
deleted file mode 100644
index 9468529..0000000
--- a/jarvis/people/templates/gymnasts/reports/report_week.html
+++ /dev/null
@@ -1,382 +0,0 @@
-{% load static %}
-
-
-
-
-
-
- {% if routine_1 or routine_2 or routine_3 or routine_4 or routine_5 %}
-
-
Routines
-
-
-
Q1 routine 1
- {% if routine_1 %}
-
- {% for routine_skill in routine_1.routine.skill_links.all %}
-
- {{ routine_skill.skill.notation }} |
- {{ routine_skill.skill.difficulty }} |
-
- {% endfor %}
-
- |
- {{ routine_1.routine.difficulty }} |
-
-
- {% else %}
- No routine defined.
- {% endif %}
- {% if routine_1_done_stat.total_succeeded %}
- {{ routine_1_done_stat.total_succeeded }} | {{ routine_1_done_stat.total_try }} ({% widthratio routine_1_done_stat.total_succeeded routine_1_done_stat.total_try 100 %}%)
- {% endif %}
-
-
-
Q1 routine 2
- {% if routine_2 %}
-
- {% for routine_skill in routine_2.routine.skill_links.all %}
-
- {{ routine_skill.skill.notation }} |
- {{ routine_skill.skill.difficulty }} |
-
- {% endfor %}
-
- |
- {{ routine_2.routine.difficulty }} |
-
-
- {% else %}
- No routine defined.
- {% endif %}
- {% if routine_2_done_stat.total_succeeded %}
- {{ routine_2_done_stat.total_succeeded }} | {{ routine_2_done_stat.total_try }} ({% widthratio routine_2_done_stat.total_succeeded routine_2_done_stat.total_try 100 %}%)
- {% endif %}
-
-
-
Q2 routine 1
- {% if routine_3 %}
-
- {% for routine_skill in routine_3.routine.skill_links.all %}
-
- {{ routine_skill.skill.notation }} |
- {{ routine_skill.skill.difficulty }} |
-
- {% endfor %}
-
- |
- {{ routine_3.routine.difficulty }} |
-
-
- {% else %}
- No routine defined.
- {% endif %}
- {% if routine_3_done_stat.total_succeeded %}
- {{ routine_3_done_stat.total_succeeded }} | {{ routine_3_done_stat.total_try }} ({% widthratio routine_3_done_stat.total_succeeded routine_3_done_stat.total_try 100 %}%)
- {% endif %}
-
-
-
Semi-final routine
- {% if routine_4 %}
-
- {% for routine_skill in routine_4.routine.skill_links.all %}
-
- {{ routine_skill.skill.notation }} |
- {{ routine_skill.skill.difficulty }} |
-
- {% endfor %}
-
- |
- {{ routine_4.routine.difficulty }} |
-
-
- {% else %}
- No routine defined.
- {% endif %}
- {% if routine_4_done_stat.total_succeeded %}
- {{ routine_4_done_stat.total_succeeded }} | {{ routine_4_done_stat.total_try }} ({% widthratio routine_4_done_stat.total_succeeded routine_4_done_stat.total_try 100 %}%)
- {% endif %}
-
-
-
Final routine
- {% if routine_5 %}
-
- {% for routine_skill in routine_5.routine.skill_links.all %}
-
- {{ routine_skill.skill.notation }} |
- {{ routine_skill.skill.difficulty }} |
-
- {% endfor %}
-
- |
- {{ routine_5.routine.difficulty }} |
-
-
- {% else %}
- No routine defined.
- {% endif %}
- {% if routine_5_done_stat.total_succeeded %}
- {{ routine_5_done_stat.total_succeeded }} | {{ routine_5_done_stat.total_try }} ({% widthratio routine_5_done_stat.total_succeeded routine_5_done_stat.total_try 100 %}%)
- {% endif %}
-
- {% endif %}
-
-
-
-
-
diff --git a/jarvis/people/urls.py b/jarvis/people/urls.py
index 9b36764..6ba7daa 100644
--- a/jarvis/people/urls.py
+++ b/jarvis/people/urls.py
@@ -66,16 +66,26 @@ gymnast_urlpatterns = [
views.get_distinct_week_number_for_season_and_gymnast,
name="get_distinct_week_number_for_season_and_gymnast",
),
+ # path(
+ # r"report/