tristan 5a2a43bf51 refactor(leave) : address Task 3 review (helper, dead param, phase nature, regression test)
- Extract private helper `exerciseYearForDate(date, isForfait)` to dedupe
  the date->leave-exercise-year expression duplicated across `clampYearToPhase`
  and `resolveFirstComputationYear` (4 copies collapsed into 1 helper + 4
  call sites).

- Remove the unused `ContractPhase $phase` parameter from
  `resolveLeavePeriodBounds`: the body never reads it (the phase cap is
  applied later by `resolvePeriodBounds`).

- Add `ContractNature $contractNature` to `ContractPhase` DTO, populated
  from the first period of the group by `EmployeeContractPhaseResolver`.
  Drop the `resolveNatureForPhase` lookup in `EmployeeLeaveSummaryProvider`
  in favor of `$phase->contractNature`. Expose `contractNature` in
  `Employee::getContractPhases()` array shape for frontend use.

- Fix regression for terminated employees calling `computeYearSummary`
  without an explicit phase (LeaveRecapRowBuilder,
  DumpVerificationSnapshotCommand). Before the refactor the period bounds,
  accrual end and taken end were NOT capped at the contract end for
  terminated employees, because `Employee::getCurrentContractEndDate()`
  returns null when no period covers "today". The new fallback phase
  (`isCurrent=false`, real `endDate`) was silently capping `to`. Add an
  internal `applyPhaseEndCap` flag, true when phase is explicit, false
  for legacy callers, threaded through `resolvePeriodBounds`,
  `resolveAccrualCalculationEndDate` and `resolveTakenCalculationEndDate`.

- Add regression test
  `testTerminatedEmployeeWithoutExplicitPhaseSkipsPhaseEndCap` proving
  that legacy callers keep the natural exercise upper bound while explicit
  phase callers get the cap.

- Add `contractNature` assertion in `EmployeeContractPhaseResolverTest`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 11:07:38 +02:00
2026-02-03 18:04:06 +01:00
2026-05-04 07:59:16 +00:00
2026-02-03 18:04:06 +01:00
2026-02-03 18:04:06 +01:00
2026-02-03 18:04:06 +01:00
2026-02-03 17:59:39 +01:00
2026-02-03 17:59:39 +01:00
2026-02-03 18:04:06 +01:00
2026-02-03 18:04:06 +01:00
2026-02-03 18:04:06 +01:00
2026-02-03 18:04:06 +01:00
2026-02-03 18:04:06 +01:00

SIRH

Application de gestion des absences employée

Importer un dump de prod en dev

Sur adminer fait un export bdd :

  • Sortie : enregistrer
  • Format : SQL
  • Tables : DROP+CREATE, Incrément automatique, Déclencheurs
  • Données : INSERT

Supprime la bdd et créer la bdd :

docker compose exec -T db psql -U root -d sirh -c "DROP SCHEMA public CASCADE; CREATE SCHEMA public;"

Remplie la base avec le dump :

docker compose exec -T db psql -U root -d sirh < sirh.sql

Mettre SUPER_ADMIN sur un user

UPDATE users SET roles = '["ROLE_ADMIN","ROLE_SUPER_ADMIN"]' WHERE username = 'emilie';

sudo -u postgres pg_dump --no-owner --no-privileges --clean --if-exists sirh_prod > /tmp/sirh_prod_$(date +%F).sql scp user@:/tmp/sirh_prod_2026-04-14.dump ~/workspace/

Description
No description provided
Readme 2.7 MiB
v0.1.67 Latest
2026-03-30 13:08:13 +00:00
Languages
PHP 57.9%
Vue 24.7%
TypeScript 13.9%
Twig 2.5%
Shell 0.3%
Other 0.6%