From 38ba20aef6f49693aeb4918f04de83531f6254ee Mon Sep 17 00:00:00 2001 From: Iziram Date: Wed, 22 Nov 2023 15:53:25 +0100 Subject: [PATCH] Assiduites : Calendrier date_pivot --- app/scodoc/sco_utils.py | 11 +++++++++++ app/templates/assiduites/pages/calendrier.j2 | 8 ++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/app/scodoc/sco_utils.py b/app/scodoc/sco_utils.py index 1523c8e820..f93bf05269 100644 --- a/app/scodoc/sco_utils.py +++ b/app/scodoc/sco_utils.py @@ -1476,3 +1476,14 @@ def is_assiduites_module_forced( except (TypeError, ValueError): retour = sco_preferences.get_preference("forcer_module", dept_id=dept_id) return retour + + +def get_assiduites_time_config(config_type: str) -> str: + from app.models import ScoDocSiteConfig + match config_type: + case "matin": + return ScoDocSiteConfig.get("assi_morning_time", "08:00:00") + case "aprem": + return ScoDocSiteConfig.get("assi_afternoon_time", "18:00:00") + case "pivot": + return ScoDocSiteConfig.get("assi_lunch_time", "13:00:00") diff --git a/app/templates/assiduites/pages/calendrier.j2 b/app/templates/assiduites/pages/calendrier.j2 index 1114f628fe..1b3b59a497 100644 --- a/app/templates/assiduites/pages/calendrier.j2 +++ b/app/templates/assiduites/pages/calendrier.j2 @@ -343,6 +343,9 @@