Fix filtres and scopes to take into account job and scope when the refferrer is add to the accompanying period work

This commit is contained in:
2023-10-16 10:58:41 +02:00
parent 63e9d1a96f
commit 68d28f3e28
24 changed files with 352 additions and 173 deletions

View File

@@ -292,9 +292,7 @@ class User implements UserInterface, \Stringable
$sortedScopeHistories = $scopeHistories->toArray();
usort($sortedScopeHistories, function ($a, $b) {
return $a->getStartDate() < $b->getStartDate() ? 1 : -1;
});
usort($sortedScopeHistories, fn ($a, $b) => $a->getStartDate() < $b->getStartDate() ? 1 : -1);
return new ArrayCollection($sortedScopeHistories);
}
@@ -346,9 +344,7 @@ class User implements UserInterface, \Stringable
$sortedJobHistories = $jobHistories->toArray();
usort($sortedJobHistories, function ($a, $b) {
return $a->getStartDate() < $b->getStartDate() ? 1 : -1;
});
usort($sortedJobHistories, fn ($a, $b) => $a->getStartDate() < $b->getStartDate() ? 1 : -1);
return new ArrayCollection($sortedJobHistories);
}