mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
Merge branch '106_tasks_to_parcours'
This commit is contained in:
@@ -28,6 +28,7 @@ use Chill\MainBundle\Entity\HasCentersInterface;
|
||||
use Chill\MainBundle\Entity\HasScopesInterface;
|
||||
use Chill\MainBundle\Entity\Scope;
|
||||
use Chill\MainBundle\Entity\Address;
|
||||
use Chill\MainBundle\Entity\Center;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod\Comment;
|
||||
@@ -502,7 +503,7 @@ class AccompanyingPeriod implements TrackCreationInterface, TrackUpdateInterface
|
||||
return $collection->count() > 0 ? $collection->first() : NULL;
|
||||
}
|
||||
|
||||
public function getOPenParticipations(): Collection
|
||||
public function getOpenParticipations(): Collection
|
||||
{
|
||||
return $this
|
||||
->getParticipations()
|
||||
@@ -513,6 +514,11 @@ class AccompanyingPeriod implements TrackCreationInterface, TrackUpdateInterface
|
||||
);
|
||||
}
|
||||
|
||||
public function getCurrentParticipations(): Collection
|
||||
{
|
||||
return $this->getOpenParticipations();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an array with open participations sorted by household
|
||||
* [
|
||||
@@ -1015,6 +1021,15 @@ class AccompanyingPeriod implements TrackCreationInterface, TrackUpdateInterface
|
||||
return $this->addressLocation;
|
||||
}
|
||||
|
||||
public function getCenter(): ?Center
|
||||
{
|
||||
if (count($this->getPersons()) === 0){
|
||||
return null;
|
||||
} else {
|
||||
return $this->getPersons()->first()->getCenter();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Groups({"write"})
|
||||
*/
|
||||
|
@@ -66,7 +66,7 @@ class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface
|
||||
'routeParameters' => [
|
||||
'id' => $period->getId()
|
||||
]])
|
||||
->setExtras(['order' => 50]);
|
||||
->setExtras(['order' => 40]);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user