mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +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;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToMany(
|
||||
* targetEntity=Evaluation::class,
|
||||
* mappedBy="socialActions"
|
||||
* )
|
||||
* @ORM\ManyToMany(targetEntity=Evaluation::class, inversedBy="socialActions")
|
||||
* @ORM\JoinTable(name="chill_person_social_work_evaluation_action")
|
||||
*/
|
||||
private Collection $evaluations;
|
||||
|
||||
@ -110,6 +108,15 @@ class SocialAction
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function addEvaluation(Evaluation $evaluation): self
|
||||
{
|
||||
if (!$this->evaluations->contains($evaluation)) {
|
||||
$this->evaluations[] = $evaluation;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function addGoal(Goal $goal): self
|
||||
{
|
||||
if (!$this->goals->contains($goal)) {
|
||||
@ -300,6 +307,13 @@ class SocialAction
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeEvaluation(Evaluation $evaluation): self
|
||||
{
|
||||
$this->evaluations->removeElement($evaluation);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeGoal(Goal $goal): self
|
||||
{
|
||||
$this->goals->removeElement($goal);
|
||||
|
Loading…
x
Reference in New Issue
Block a user