Add attachments to workflow

This commit is contained in:
2025-02-03 21:15:00 +00:00
parent 9e191f1b5b
commit 37227a3aeb
106 changed files with 3455 additions and 619 deletions

View File

@@ -60,9 +60,10 @@ class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doct
#[ORM\ManyToOne(targetEntity: DocGeneratorTemplate::class)]
private ?DocGeneratorTemplate $template = null;
#[Serializer\Groups(['read', 'write', 'accompanying_period_work_evaluation:create'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: false, options: ['default' => ''])]
private ?string $title = '';
/**
* Store the title only if the storedObject is not yet associated with the instance.
*/
private string $proxyTitle = '';
public function getAccompanyingPeriodWorkEvaluation(): ?AccompanyingPeriodWorkEvaluation
{
@@ -89,9 +90,10 @@ class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doct
return $this->template;
}
#[Serializer\Groups(['read'])]
public function getTitle(): ?string
{
return $this->title;
return (string) $this->getStoredObject()?->getTitle();
}
public function setAccompanyingPeriodWorkEvaluation(?AccompanyingPeriodWorkEvaluation $accompanyingPeriodWorkEvaluation): AccompanyingPeriodWorkEvaluationDocument
@@ -125,6 +127,10 @@ class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doct
{
$this->storedObject = $storedObject;
if ('' !== $this->proxyTitle) {
$this->storedObject->setTitle($this->proxyTitle);
}
return $this;
}
@@ -135,9 +141,14 @@ class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doct
return $this;
}
public function setTitle(?string $title): AccompanyingPeriodWorkEvaluationDocument
#[Serializer\Groups(['write', 'accompanying_period_work_evaluation:create'])]
public function setTitle(?string $proxyTitle): AccompanyingPeriodWorkEvaluationDocument
{
$this->title = $title;
if (null !== $this->storedObject) {
$this->storedObject->setTitle((string) $proxyTitle);
} else {
$this->proxyTitle = (string) $proxyTitle;
}
return $this;
}