mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 05:44:24 +00:00
rdv: allow null concerned persons in form
This commit is contained in:
parent
db06a64a2b
commit
44a5955f40
@ -58,7 +58,7 @@ class Calendar
|
||||
* @ORM\JoinTable(name="chill_calendar.calendar_to_persons")
|
||||
* @Groups({"read"})
|
||||
*/
|
||||
private Collection $persons;
|
||||
private ?Collection $persons = null;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -67,7 +67,7 @@ class Calendar
|
||||
* cascade={"persist", "remove", "merge", "detach"})
|
||||
* @ORM\JoinTable(name="chill_calendar.calendar_to_non_professionals")
|
||||
*/
|
||||
private Collection $nonProfessionals;
|
||||
private ?Collection $nonProfessionals = null;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -77,7 +77,7 @@ class Calendar
|
||||
* @ORM\JoinTable(name="chill_calendar.calendar_to_thirdparties")
|
||||
* @Groups({"read"})
|
||||
*/
|
||||
private Collection $professionals;
|
||||
private ?Collection $professionals = null;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -87,7 +87,7 @@ class Calendar
|
||||
* @ORM\JoinTable(name="chill_calendar.calendar_to_invites")
|
||||
* @Groups({"read"})
|
||||
*/
|
||||
private Collection $invites;
|
||||
private ?Collection $invites = null;
|
||||
|
||||
/**
|
||||
* @ORM\Embedded(class=CommentEmbeddable::class, columnPrefix="comment_")
|
||||
@ -250,9 +250,9 @@ class Calendar
|
||||
return $this->persons;
|
||||
}
|
||||
|
||||
public function addPerson(Person $person): self
|
||||
public function addPerson(?Person $person): self
|
||||
{
|
||||
if (!$this->persons->contains($person)) {
|
||||
if (null !== $person) {
|
||||
$this->persons[] = $person;
|
||||
}
|
||||
|
||||
@ -298,9 +298,9 @@ class Calendar
|
||||
return $this->professionals;
|
||||
}
|
||||
|
||||
public function addProfessional(ThirdParty $professional): self
|
||||
public function addProfessional(?ThirdParty $professional): self
|
||||
{
|
||||
if (!$this->professionals->contains($professional)) {
|
||||
if (null !== $professional) {
|
||||
$this->professionals[] = $professional;
|
||||
}
|
||||
|
||||
@ -322,9 +322,9 @@ class Calendar
|
||||
return $this->invites;
|
||||
}
|
||||
|
||||
public function addInvite(Invite $invite): self
|
||||
public function addInvite(?Invite $invite): self
|
||||
{
|
||||
if (!$this->invites->contains($invite)) {
|
||||
if (null !== $invite) {
|
||||
$this->invites[] = $invite;
|
||||
}
|
||||
|
||||
@ -401,4 +401,15 @@ class Calendar
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
public function getThirdParties(): Collection
|
||||
{
|
||||
return $this->getProfessionals();
|
||||
}
|
||||
|
||||
public function getusers(): Collection
|
||||
{
|
||||
return $this->getInvites(); //TODO get users of the invite
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,9 @@
|
||||
|
||||
</dl>
|
||||
|
||||
<h2 class="chill-red">{{ 'Concerned groups'|trans }}</h2>
|
||||
{% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {'context': context, 'with_display': 'bloc' } %}
|
||||
|
||||
|
||||
<h2 class="chill-red">{{ 'Calendar data'|trans }}</h2>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user