mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
change definition of person involved: add all periods which are not closed
This commit is contained in:
parent
3eaa8494cd
commit
f9b33fdfb8
@ -642,7 +642,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
|
||||
/**
|
||||
* Return a collection of participation, where the participation
|
||||
* is still opened, not a draft, and the period is still opened
|
||||
* is still opened or in draft state
|
||||
*
|
||||
* @return AccompanyingPeriodParticipation[]|Collection
|
||||
*/
|
||||
@ -658,12 +658,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
return $this->getAccompanyingPeriodParticipations()
|
||||
->matching($criteria)
|
||||
->filter(function (AccompanyingPeriodParticipation $app) {
|
||||
$period = $app->getAccompanyingPeriod();
|
||||
return (
|
||||
NULL === $period->getClosingDate()
|
||||
|| new \DateTime('now') < $period->getClosingDate()
|
||||
)
|
||||
&& AccompanyingPeriod::STEP_DRAFT !== $period->getStep();
|
||||
return AccompanyingPeriod::STEP_CLOSED !== $app->getAccompanyingPeriod()->getStep();
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user