From fc0f9c99d973f7f6ca844ed02be98194a3552b96 Mon Sep 17 00:00:00 2001 From: TheBestDeveloper Date: Sun, 8 Feb 2026 14:06:35 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20exclude=20'=C3=89valuatio?= =?UTF-8?q?n=20sp=C3=A9cifique=20de=20DNL'=20from=20current=20period=20cal?= =?UTF-8?q?culation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Papillon/Info.plist | 19 +++++++++++++++++++ utils/grades/helper/period.ts | 19 ++++++++++++++++--- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/ios/Papillon/Info.plist b/ios/Papillon/Info.plist index 681fa106..551dc5ee 100644 --- a/ios/Papillon/Info.plist +++ b/ios/Papillon/Info.plist @@ -36,6 +36,25 @@ sq uk vi + bg + bn + cs + da + fi + he + hu + id + no + sk + sv + sw + th + it + fa + ur + ms + hr + et CFBundleName $(PRODUCT_NAME) diff --git a/utils/grades/helper/period.ts b/utils/grades/helper/period.ts index 33817c62..eec86191 100644 --- a/utils/grades/helper/period.ts +++ b/utils/grades/helper/period.ts @@ -3,7 +3,18 @@ import { error, warn } from "@/utils/logger/logger"; export function getCurrentPeriod(periods: Period[]): Period { const now = new Date().getTime(); - const excludedNames = ["Bac blanc", "Brevet blanc", "Hors période", "Année", "Contrôle en cours de formation", "EPREUVES PONCTUELLES 1ERE SERIE", "EPREUVES PONCTUELLES 2EME SERIE", "MI-SEMESTRE 1", "MI-SEMESTRE 2"]; + const excludedNames = [ + "Bac blanc", + "Brevet blanc", + "Hors période", + "Année", + "Contrôle en cours de formation", + "EPREUVES PONCTUELLES 1ERE SERIE", + "EPREUVES PONCTUELLES 2EME SERIE", + "MI-SEMESTRE 1", + "MI-SEMESTRE 2", + "Évaluation spécifique de DNL", + ]; periods = periods .filter(period => !excludedNames.includes(period.name)) .sort((a, b) => a.start.getTime() - b.start.getTime()); @@ -15,9 +26,11 @@ export function getCurrentPeriod(periods: Period[]): Period { } if (periods.length > 0) { - warn("Current period not found. Falling back to the first period in the array."); + warn( + "Current period not found. Falling back to the first period in the array." + ); return periods[0]; } error("Unable to find the current period and unable to fallback..."); -} \ No newline at end of file +}