mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-01 10:59:45 +00:00
#365 Add works and activities counter
This commit is contained in:
@@ -511,6 +511,14 @@ class AccompanyingPeriod implements
|
||||
return $this->getParticipationsContainsPerson($person)->count() > 0;
|
||||
}
|
||||
|
||||
public function getOpenWorks(): Collection
|
||||
{
|
||||
return $this->getWorks()->filter(
|
||||
static fn (AccompanyingPeriodWork $work): bool => null === $work->getEndDate()
|
||||
or $work->getEndDate() > new \DateTimeImmutable('today')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Open a new participation for a person.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user