Skip to content
This repository was archived by the owner on Aug 30, 2025. It is now read-only.

Conversation

raphckrman
Copy link
Member

✨ Nouvelle Pull Request

Merci de contribuer à l'amélioration de Papillon !

Tu te poses des questions sur les pull requests (PR) ? Une documentation a spécialement été créée ici => https://gitbook.getpapillon.xyz/organisation/outils-internes/github

Avant toute chose...

Tu t'assures avoir respecté les points suivants (en rajoutant un x dans les crochets) :

  • 📲 J'ai testé l'application via Expo Go et/ou Build et elle fonctionne correctement
  • 🗣️ J'utilise le langage informel (tutoiement)
  • 📃 Cette PR n'est pas un duplicata et est prête à être review et merge
  • ❌ Je n'ai pas fait d'erreurs TypeScript et ESLint dans le code
  • 📝 J'ai fait une description des changement effectués ci-dessous

Résumé des changements effectués

Menu non affiché pour PRONOTE

Capture(s) d'écran (pour rendre le test de ta PR rapide)

image

close #872

@Kgeek33 Kgeek33 mentioned this pull request Mar 29, 2025
5 tasks
Copy link
Contributor

@Kgeek33 Kgeek33 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C'est bon, mais teste ça pour voir


if (day.date?.getTime() !== date.getTime()) {
const updatedDate = new Date(day.date);
updatedDate.setDate(updatedDate.getDate() + 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Est-ce qu'en faisant ceci, ça a une influence ?

Suggested change
updatedDate.setDate(updatedDate.getDate() + 1);
updatedDate.setUTCDate(updatedDate.getUTCDate() + 1);

@godetremy godetremy requested a review from Copilot March 30, 2025 15:10
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR simplifies the menu day existence check and refines the date comparison logic used when processing PRONOTE menus.

  • Simplifies the check for an empty menu day array using optional chaining.
  • Adjusts the date normalization by incrementing the retrieved day date before comparing with the provided date.
Comments suppressed due to low confidence (1)

src/services/pronote/menu.ts:17

  • Consider adding a check to ensure that day.date is defined and valid before constructing updatedDate to avoid potential issues with 'Invalid Date'.
const updatedDate = new Date(day.date);

@ecnivtwelve ecnivtwelve merged commit 7a69bab into PapillonApp:main Mar 30, 2025
1 of 2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Non affichage du menu
3 participants