mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
vue activity: fix duplicates and add condition in initial loading
This commit is contained in:
@@ -108,15 +108,14 @@ class Activity implements HasCenterInterface, HasScopeInterface
|
||||
* @ORM\JoinTable(name="chill_activity_activity_chill_person_socialissue")
|
||||
* @Groups({"read"})
|
||||
*/
|
||||
private $socialIssues;
|
||||
private ?Collection $socialIssues = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToMany(targetEntity="Chill\PersonBundle\Entity\SocialWork\SocialAction")
|
||||
* @ORM\JoinTable(name="chill_activity_activity_chill_person_socialaction")
|
||||
* @Groups({"read"})
|
||||
*/
|
||||
private $socialActions;
|
||||
|
||||
private ?Collection $socialActions = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Chill\ActivityBundle\Entity\ActivityType")
|
||||
@@ -283,7 +282,7 @@ class Activity implements HasCenterInterface, HasScopeInterface
|
||||
return $this->socialIssues;
|
||||
}
|
||||
|
||||
public function addSocialIssue(SocialIssue $socialIssue): self
|
||||
public function addSocialIssue(?SocialIssue $socialIssue): self
|
||||
{
|
||||
if (!$this->socialIssues->contains($socialIssue)) {
|
||||
$this->socialIssues[] = $socialIssue;
|
||||
@@ -307,7 +306,7 @@ class Activity implements HasCenterInterface, HasScopeInterface
|
||||
return $this->socialActions;
|
||||
}
|
||||
|
||||
public function addSocialAction(SocialAction $socialAction): self
|
||||
public function addSocialAction(?SocialAction $socialAction): self
|
||||
{
|
||||
if (!$this->socialActions->contains($socialAction)) {
|
||||
$this->socialActions[] = $socialAction;
|
||||
|
Reference in New Issue
Block a user