feat(heures) : tri des employés par ordre manuel sur l'export PDF jour (#26)
Auto Tag Develop / tag (push) Successful in 7s
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user