Support visibility for tags (#4086)

This commit is contained in:
Kevin Papst
2023-06-09 17:07:49 +02:00
committed by GitHub
parent 6e781b59e2
commit 2e2bf986a4
17 changed files with 246 additions and 161 deletions

View File

@@ -43,6 +43,11 @@ class Tag
#[Serializer\Expose]
#[Serializer\Groups(['Default'])]
private ?string $name = null;
#[ORM\Column(name: 'visible', type: 'boolean', nullable: false, options: ['default' => true])]
#[Assert\NotNull]
#[Serializer\Expose]
#[Serializer\Groups(['Default'])]
private bool $visible = true;
use ColorTrait;
@@ -74,6 +79,16 @@ class Tag
return $this->name;
}
public function isVisible(): bool
{
return $this->visible;
}
public function setVisible(bool $visible): void
{
$this->visible = $visible;
}
public function addTimesheet(Timesheet $timesheet): void
{
if ($this->timesheets->contains($timesheet)) {