feat(heures) : tri des employés par ordre manuel sur l'export PDF jour (#26)
Auto Tag Develop / tag (push) Successful in 7s

Le tri intra-site de l'export PDF des heures (vue Jour) reprend désormais celui du calendrier : **`displayOrder` (ordre manuel) → nom → prénom**, au lieu du nom seul.

`doc/` (CLAUDE.md) mis à jour. Tests backend verts (173/361).

Reviewed-on: #26
Co-authored-by: tristan <tristan@yuno.malio.fr>
Co-committed-by: tristan <tristan@yuno.malio.fr>
This commit was merged in pull request #26.
This commit is contained in:
2026-06-09 15:35:32 +00:00
committed by Autin
parent 9cc5024e25
commit 589018064b
4 changed files with 9 additions and 6 deletions
+5 -1
View File
@@ -78,7 +78,11 @@ class WorkHourDayExportProvider implements ProviderInterface
$legend = [];
foreach ($siteMeta as $siteId => $meta) {
$siteEmployees = $bySite[$siteId];
usort($siteEmployees, static fn ($a, $b) => ($a->getLastName() ?? '') <=> ($b->getLastName() ?? ''));
// Même tri que le calendrier : ordre manuel (displayOrder) puis nom, puis prénom.
usort($siteEmployees, static function ($a, $b): int {
return [$a->getDisplayOrder(), $a->getLastName(), $a->getFirstName()]
<=> [$b->getDisplayOrder(), $b->getLastName(), $b->getFirstName()];
});
$rows = $this->exportBuilder->buildDayRowsForEmployees($siteEmployees, $date);
if ([] === $rows) {