mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
accompanying period: add location to accompanying period + add delete button
This commit is contained in:
@@ -17,6 +17,7 @@ use Chill\MainBundle\Entity\Address;
|
||||
use Chill\MainBundle\Entity\Center;
|
||||
use Chill\MainBundle\Entity\HasCentersInterface;
|
||||
use Chill\MainBundle\Entity\HasScopesInterface;
|
||||
use Chill\MainBundle\Entity\Location;
|
||||
use Chill\MainBundle\Entity\Scope;
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork;
|
||||
@@ -118,6 +119,13 @@ class AccompanyingPeriod implements
|
||||
*/
|
||||
private ?Address $addressLocation = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Location")
|
||||
* @Groups({"read", "write"})
|
||||
* @Assert\NotBlank(groups={AccompanyingPeriod::STEP_CONFIRMED})
|
||||
*/
|
||||
private ?Location $administrativeLocation = null;
|
||||
|
||||
/**
|
||||
* @var DateTime
|
||||
*
|
||||
@@ -507,6 +515,11 @@ class AccompanyingPeriod implements
|
||||
return $this->addressLocation;
|
||||
}
|
||||
|
||||
public function getAdministrativeLocation(): ?Location
|
||||
{
|
||||
return $this->administrativeLocation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a list of person which have an adresse available for a valid location.
|
||||
*
|
||||
@@ -980,6 +993,13 @@ class AccompanyingPeriod implements
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setAdministrativeLocation(?Location $administrativeLocation): AccompanyingPeriod
|
||||
{
|
||||
$this->administrativeLocation = $administrativeLocation;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set closingDate.
|
||||
*
|
||||
|
Reference in New Issue
Block a user