Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Affiche le nb de congés payés restants #442
Affiche le nb de congés payés restants #442
Changes from all commits
0647c1e
2687722
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je me demande si c'est vraiment utile d'avoir la date en param de fonction ? En soit la période de référence est sera toujours calculée de la même façon en fonction de la date actuelle ? Je pense qu'on peut s'en affranchir sur toute la chaîne (Query, QueryHandler, etc) et calculer avec
now
? Ou alors y a un truc que j'ai pas compris xDThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est pour les tests
Dans le code de DateUtilsAdapter on ne fait jamais
new Date('now')
, on prend une date de l'extérieurCar sinon les tests ne sont pas fixés... Par ex ici j'aurais comme résultat 1er juin 2024 / 31 mai 2025, mais le 1er juin 2025 la CI sera KO car le test ne passera plus
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
D'acc, dans ce cas on pourrait peut aussi mettre une valeur par défaut pour ce param
En vrai c'est pas hyper important, je te laisse juge :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vu qu'on fait déjà comme ça ailleurs je vais aller dans le sens de la continuité... et laisser comme ça
Même si je serais OK pour passer sur cette approche de "par défaut on prend now mais pour tester tu peux passer une date spécifique"
Check warning on line 76 in src/Infrastructure/HumanResource/Leave/Repository/LeaveRepository.ts
Codecov / codecov/patch
src/Infrastructure/HumanResource/Leave/Repository/LeaveRepository.ts#L76
Check warning on line 78 in src/Infrastructure/HumanResource/Leave/Repository/LeaveRepository.ts
Codecov / codecov/patch
src/Infrastructure/HumanResource/Leave/Repository/LeaveRepository.ts#L78