WIP: Implement teamer dashboard
This commit is contained in:
+16
-1
@@ -103,7 +103,7 @@ class Teamer implements TimestampableEntityInterface
|
||||
#[ORM\OneToMany(mappedBy: 'teamer', targetEntity: License::class, cascade: ['remove'])]
|
||||
private Collection $licenses;
|
||||
|
||||
#[ORM\ManyToMany(targetEntity: JobProfile::class, orphanRemoval: true)]
|
||||
#[ORM\ManyToMany(targetEntity: JobProfile::class)]
|
||||
private Collection $jobProfiles;
|
||||
|
||||
#[ORM\ManyToMany(targetEntity: Assignment::class, inversedBy: 'teamers')]
|
||||
@@ -439,6 +439,21 @@ class Teamer implements TimestampableEntityInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getAllAvailabilities(): Collection
|
||||
{
|
||||
$allAvailabilities = new ArrayCollection();
|
||||
|
||||
foreach ($this->getAvailabilities() as $availability) {
|
||||
$allAvailabilities->add($availability);
|
||||
}
|
||||
|
||||
foreach ($this->getCustomAvailabilities() as $availability) {
|
||||
$allAvailabilities->add($availability);
|
||||
}
|
||||
|
||||
return $allAvailabilities;
|
||||
}
|
||||
|
||||
public function getPhoto(): ?Upload
|
||||
{
|
||||
return $this->photo;
|
||||
|
||||
Reference in New Issue
Block a user