mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-29 10:05:03 +00:00
Fix serialization of accompangying period work referrers
This commit is contained in:
5
.changes/unreleased/Fixed-20231114-183343.yaml
Normal file
5
.changes/unreleased/Fixed-20231114-183343.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
kind: Fixed
|
||||
body: 'Fix loading of accompanying period work referrers '
|
||||
time: 2023-11-14T18:33:43.284236146+01:00
|
||||
custom:
|
||||
Issue: "205"
|
@@ -392,9 +392,13 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
|
||||
*/
|
||||
public function getReferrers(): ReadableCollection
|
||||
{
|
||||
return $this->referrersHistory
|
||||
$users = $this->referrersHistory
|
||||
->filter(fn (AccompanyingPeriodWorkReferrerHistory $h) => null === $h->getEndDate())
|
||||
->map(fn (AccompanyingPeriodWorkReferrerHistory $h) => $h->getUser());
|
||||
->map(fn (AccompanyingPeriodWorkReferrerHistory $h) => $h->getUser())
|
||||
->getValues()
|
||||
;
|
||||
|
||||
return new ArrayCollection(array_values($users));
|
||||
}
|
||||
|
||||
public function getReferrersHistory(): Collection
|
||||
|
Reference in New Issue
Block a user