750f2bffa8223004e7103111aee04331793f5ec2
computeWeeklyOvertime25StartMinutes used a ternary that fell back to 35h when a day had no active contract. Once periodFrom was uncapped (so the RTT week iterates the full exercise), pre-hire days were silently contributing 7h each to the weekly threshold, erasing the 25% overtime for the employee's first partial week. Dylan CHABOISSON week 12 (Mar 19 hire, worked Thu 9h + Fri 9h30 + Sat 3h30 = 22h): threshold was 36h (incorrect), now back to 15h (Thu 8h + Fri 7h) so the 7h above threshold + 1h45 bonus are correctly credited. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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';
Récupérer la bdd de prod en local
Sur le serveur de prod, créer le dump :
sudo -u postgres pg_dump --no-owner --no-privileges --clean --if-exists sirh_prod > /tmp/sirh_prod_$(date +%F).sql
En local, récupérer le fichier et l'importer (remplace YYYY-MM-DD par la date du dump) :
scp user@<serveur>:/tmp/sirh_prod_YYYY-MM-DD.sql ~/workspace/SIRH/sirh.sql
docker compose exec -T db psql -U root -d sirh -c "DROP SCHEMA public CASCADE; CREATE SCHEMA public;"
docker compose exec -T db psql -U root -d sirh < ~/workspace/SIRH/sirh.sql
Description