Gestion du changement de type de contrat + correction du calcule des RTT sur un contrat qui commence en milieu de semaine #19
Reference in New Issue
Block a user
Delete Branch "feat/contract-phase-view-selector"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description de la PR
Modification du .env
Check list
The header hardcoded '218 jours' and '218 - presence restants', wrong for a forfait entered mid-year. Expose forfaitWorkTargetDays = businessDays(period) - acquiredDays (218 full year, prorated otherwise) and show 'Forfait - {target} jours ({presence} présence · {target-presence} restants)'. Grégory: 155 jours (11 présence · 144 restants). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>Non-forfait header now shows '{weeklyHours} heures ({presence} présence)'. Presence (presenceDaysByMonth/presenceDaysToToday) is bounded to the employee's contract start so business days before hire are not counted (Dylan CDD: 43.5, was 246). No change for employees present before the exercise or for forfait (already capped at phase start). Leave summary now eager-loaded for any employee with a leave tab to feed the header. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>Review follow-ups: (1) createFromFormat('Y-m-d') keeps the current time, so a raw DateTime comparison wrongly excluded an employee ending on the from-day (and dropped first-day absences); normalize from/to to day bounds and compare contract periods on date only (Y-m-d), mirroring the calendar view. (2) eager-load contractPeriods in findForPrintBySiteIds to avoid an N+1 during filtering. Added a boundary test. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>WIP: Gestion du changement de type de contrat + correction du calcule des RTT sur un contrat qui commence en milieu de semaineto Gestion du changement de type de contrat + correction du calcule des RTT sur un contrat qui commence en milieu de semaine