diff --git a/jarvis/followup/views.py b/jarvis/followup/views.py index 72515d8..fdf15bc 100644 --- a/jarvis/followup/views.py +++ b/jarvis/followup/views.py @@ -14,6 +14,14 @@ from jarvis.people.models import Gymnast from jarvis.planning.models import Event from jarvis.objective.models import Skill +from .models import ( + CHRONO_TYPE_CHOICE, + SCORE_TYPE_CHOICE, + INJURY_MECHANISM_CHOICE, + INJURY_BODY_SIDE_CHOICE, + INJURY_TYPE_CHOICE, + INJURY_LOCATION_CHOICE, +) from .models import ( Plan, Note, @@ -592,7 +600,7 @@ def chrono_create_or_update(request, chrono_id=None, gymnast_id=None): receiver, fail_silently=False, html_message=f"""

Bonjour,

-

Nouveau chrono pour {gymnast} : {chrono_type} - {score} ({score_type}).


+

Nouveau chrono pour {gymnast} : {CHRONO_TYPE_CHOICE[chrono_type]} - {score} ({SCORE_TYPE_CHOICE[score_type]}).


Excellente journée

Jarvis

""", ) @@ -862,6 +870,11 @@ def injury_create_or_update(request, injury_id=None, gymnast_id=None): # notification receiver = [] gymnast = Gymnast.objects.get(pk=form.cleaned_data["gymnast"].id) + location = form.cleaned_data["location"] + injury_type = form.cleaned_data["injury_type"] + body_side = form.cleaned_data["body_side"] + mechanism = form.cleaned_data["mechanism"] + date = form.cleaned_data["date"] functionality = ContentType.objects.get(model="injury") for notification in gymnast.notifications.filter( functionality=functionality @@ -875,8 +888,16 @@ def injury_create_or_update(request, injury_id=None, gymnast_id=None): receiver, fail_silently=False, html_message=f"""

Bonjour,

-

Un nouvelle blessure enregistrée pour {gymnast}.


-

Excellente journée

Jarvis

""", +

Un nouvelle blessure enregistrée pour {gymnast} pour le {date.strftime('%d %B %Y')}:

+ +
+

Excellente journée

+

Jarvis

""", ) return HttpResponseRedirect(reverse("injury_details", args=(injury.pk,))) @@ -982,7 +1003,7 @@ def wellbeing_create_or_update(
  • Sleep: {sleep}
  • Stress: {stress}
  • Fatigue: {fatigue}
  • -
  • Muscle_soreness: {muscle_soreness}
  • +
  • Muscle soreness: {muscle_soreness}

  • Excellente journée

    Jarvis

    """, @@ -1407,6 +1428,7 @@ def intensity_create_or_update(request, intensity_id=None, gymnast_id=None): difficulty = form.cleaned_data["difficulty"] quantity_of_skill = form.cleaned_data["quantity_of_skill"] number_of_passes = form.cleaned_data["number_of_passes"] + skill_by_time = quantity_of_skill / time skill_by_passe = quantity_of_skill / number_of_passes diff_by_skill = difficulty / quantity_of_skill diff_by_passe = difficulty / number_of_passes @@ -1430,14 +1452,15 @@ def intensity_create_or_update(request, intensity_id=None, gymnast_id=None):
  • {number_of_passes} passages
  • {time} minutes
  • {quantity_of_skill} figures
  • -
  • {difficulty} diff.
  • +
  • {difficulty / 10} diff.
  • -

    Statistiques :

    +

    Statistics :


    Excellente journée