From 9a127cfb8793ec3c0f8743540ac6b15542771079 Mon Sep 17 00:00:00 2001 From: Gregory Trullemans Date: Wed, 24 Apr 2024 10:04:37 +0200 Subject: [PATCH] Add gymnast trainer management. --- jarvis/core/templates/base.html | 79 ------------------ jarvis/core/templates/help/help.html | 5 ++ jarvis/core/templates/login.html | 22 ++--- jarvis/core/views.py | 13 +-- jarvis/followup/models.py | 2 +- jarvis/followup/templates/chronos/create.html | 10 +-- .../templates/heightweight/create.html | 10 +-- .../followup/templates/injuries/create.html | 16 ++-- jarvis/followup/templates/injuries/list.html | 6 +- .../templates/intensities/create.html | 22 ++--- .../templates/learnedskills/create.html | 10 +-- jarvis/followup/templates/notes/create.html | 8 +- jarvis/followup/templates/plan/create.html | 8 +- .../templates/routinedone/create.html | 6 +- jarvis/followup/templates/scores/create.html | 6 +- .../templates/seasoninformations/create.html | 16 ++-- jarvis/location/templates/clubs/create.html | 14 ++-- jarvis/location/templates/places/create.html | 10 +-- .../templates/combinations/create.html | 6 +- jarvis/objective/templates/passes/create.html | 4 +- jarvis/people/templates/gymnasts/create.html | 16 ++-- .../templates/gymnasts/link_to_routine.html | 2 +- .../gymnasts/link_trainer_to_gymnast.html | 65 ++++++++++++++ .../tabs/tab_season_informations.html | 36 ++++++++ jarvis/people/urls.py | 3 + jarvis/people/views.py | 67 +++++++++++++-- jarvis/planning/templates/events/create.html | 2 +- jarvis/profiles/templates/update.html | 6 +- .../img/help/gymnast_season_informations.png | Bin 114714 -> 174891 bytes 29 files changed, 271 insertions(+), 199 deletions(-) create mode 100644 jarvis/people/templates/gymnasts/link_trainer_to_gymnast.html diff --git a/jarvis/core/templates/base.html b/jarvis/core/templates/base.html index 760ef0b..aee1ade 100644 --- a/jarvis/core/templates/base.html +++ b/jarvis/core/templates/base.html @@ -202,8 +202,6 @@ - - @@ -250,79 +248,6 @@ $full_page.attr('filter-color', color); $sidebar_responsive.attr('data', color); - // $('.fixed-plugin a').click(function(event) { - // if ($(this).hasClass('switch-trigger')) { - // if (event.stopPropagation) { - // event.stopPropagation(); - // } else if (window.event) { - // window.event.cancelBubble = true; - // } - // } - // }); - - // $('.fixed-plugin .background-color span').click(function() { - // $(this).siblings().removeClass('active'); - // $(this).addClass('active'); - - // var new_color = $(this).data('color'); - - // if ($sidebar.length != 0) - // $sidebar.attr('data', new_color); - - // if ($main_panel.length != 0) - // $main_panel.attr('data', new_color); - - // if ($full_page.length != 0) - // $full_page.attr('filter-color', new_color); - - // if ($sidebar_responsive.length != 0) - // $sidebar_responsive.attr('data', new_color); - // }); - - // $('.switch-sidebar-mini input').on("switchChange.bootstrapSwitch", function() { - // var $btn = $(this); - - // if (sidebar_mini_active == true) { - // $('body').removeClass('sidebar-mini'); - // sidebar_mini_active = false; - // blackDashboard.showSidebarMessage('Sidebar mini deactivated...'); - // } else { - // $('body').addClass('sidebar-mini'); - // sidebar_mini_active = true; - // blackDashboard.showSidebarMessage('Sidebar mini activated...'); - // } - - // // we simulate the window Resize so the charts will get updated in realtime. - // var simulateWindowResize = setInterval(function() { - // window.dispatchEvent(new Event('resize')); - // }, 180); - - // // we stop the simulation of Window Resize after the animations are completed - // setTimeout(function() { - // clearInterval(simulateWindowResize); - // }, 1000); - // }); - - // $('.switch-change-color input').on("switchChange.bootstrapSwitch", function() { - // var $btn = $(this); - - // if (white_color == true) { - // $('body').addClass('change-background'); - // setTimeout(function() { - // $('body').removeClass('change-background'); - // $('body').removeClass('white-content'); - // }, 900); - // white_color = true; // false - // } else { - // $('body').addClass('change-background'); - // setTimeout(function() { - // $('body').removeClass('change-background'); - // $('body').addClass('white-content'); - // }, 900); - // white_color = true; - // } - // }); - $('.light-badge').click(function() { $('body').addClass('white-content'); }); @@ -330,10 +255,6 @@ $('.dark-badge').click(function() { $('body').removeClass('white-content'); }); - - // $('#searchModal').on('shown.bs.modal', function() { - // $('#inlineFormInputGroup').trigger('focus') - // }); }); }); diff --git a/jarvis/core/templates/help/help.html b/jarvis/core/templates/help/help.html index ae6f6e1..0d7eccd 100644 --- a/jarvis/core/templates/help/help.html +++ b/jarvis/core/templates/help/help.html @@ -883,6 +883,11 @@

Toutes ces données permettent aux coaches de pouvoir planifier la saison et d'avoir une vision du passé de l'élève.


+

Entraîneurs

+

L'application demande à chaque gymnaste d'encoder beaucoup d'informations, parfois très personnelles (taille, poids, …). L'elève à donc le choix de QUI peut voir ses informations.

+

Attention : en supprimant à un entraîneur le droit d'accès à vos informations, vous supprimez également la possibilité à ces entraîneurs d'encoder des informations pour vous (vous lier à un évènement, vous laisser une note, …).

+
+

Rapports

Pour l’instant la fonctionnalité est limitée : elle ne permet de générer un rapport que pour la dernière semaine et ne prend en compte que certaines données. Elle fera l’objet d’améliorations futures.

diff --git a/jarvis/core/templates/login.html b/jarvis/core/templates/login.html index 1617ccc..6c97ba7 100644 --- a/jarvis/core/templates/login.html +++ b/jarvis/core/templates/login.html @@ -89,33 +89,21 @@ - - - - + - - - - - - - - - - - - + - + + + +{% endblock %} diff --git a/jarvis/people/templates/gymnasts/tabs/tab_season_informations.html b/jarvis/people/templates/gymnasts/tabs/tab_season_informations.html index 5a51a91..c50cd8e 100644 --- a/jarvis/people/templates/gymnasts/tabs/tab_season_informations.html +++ b/jarvis/people/templates/gymnasts/tabs/tab_season_informations.html @@ -59,6 +59,42 @@ + +
+
+
+
+
+

Trainers

+
+
+
+

+ + + +

+
+
+
+
+
+ {% if trainers_list %} + + + {% for trainer in trainers_list %} + + + + {% endfor %} + +
{{ trainer.first_name }} {{ trainer.last_name }}
+ {% else %} +

Nobody can see your profile.

+ {% endif %} +
+
+