mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
admin: fix adding of evaluation to social action
This commit is contained in:
parent
bc410b02e7
commit
2ac78a12db
@ -46,10 +46,8 @@ class SocialAction
|
|||||||
private $desactivationDate;
|
private $desactivationDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToMany(
|
* @ORM\ManyToMany(targetEntity=Evaluation::class, inversedBy="socialActions")
|
||||||
* targetEntity=Evaluation::class,
|
* @ORM\JoinTable(name="chill_person_social_work_evaluation_action")
|
||||||
* mappedBy="socialActions"
|
|
||||||
* )
|
|
||||||
*/
|
*/
|
||||||
private Collection $evaluations;
|
private Collection $evaluations;
|
||||||
|
|
||||||
@ -110,6 +108,15 @@ class SocialAction
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function addEvaluation(Evaluation $evaluation): self
|
||||||
|
{
|
||||||
|
if (!$this->evaluations->contains($evaluation)) {
|
||||||
|
$this->evaluations[] = $evaluation;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function addGoal(Goal $goal): self
|
public function addGoal(Goal $goal): self
|
||||||
{
|
{
|
||||||
if (!$this->goals->contains($goal)) {
|
if (!$this->goals->contains($goal)) {
|
||||||
@ -300,6 +307,13 @@ class SocialAction
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function removeEvaluation(Evaluation $evaluation): self
|
||||||
|
{
|
||||||
|
$this->evaluations->removeElement($evaluation);
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function removeGoal(Goal $goal): self
|
public function removeGoal(Goal $goal): self
|
||||||
{
|
{
|
||||||
$this->goals->removeElement($goal);
|
$this->goals->removeElement($goal);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user