Merge branch '106_tasks_to_parcours'

This commit is contained in:
2021-11-03 11:45:40 +01:00
66 changed files with 2211 additions and 1247 deletions

View File

@@ -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"})
*/

View File

@@ -66,7 +66,7 @@ class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface
'routeParameters' => [
'id' => $period->getId()
]])
->setExtras(['order' => 50]);
->setExtras(['order' => 40]);
}