Merge branch '331-manage-attachments-to-workflow' into 'master'

Add attachments to workflow

Closes #331

See merge request Chill-Projet/chill-bundles!764
This commit is contained in:
2025-02-03 21:15:00 +00:00
106 changed files with 3455 additions and 619 deletions

View File

@@ -20,6 +20,7 @@ use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
use Chill\MainBundle\Workflow\EntityWorkflowWithPublicViewInterface;
use Chill\MainBundle\Workflow\EntityWorkflowWithStoredObjectHandlerInterface;
use Chill\MainBundle\Workflow\Templating\EntityWorkflowViewMetadataDTO;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluationDocument;
use Chill\PersonBundle\Repository\AccompanyingPeriod\AccompanyingPeriodWorkEvaluationDocumentRepository;
use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodWorkEvaluationDocumentVoter;
@@ -85,6 +86,12 @@ class AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler implements EntityW
return $this->repository->find($entityWorkflow->getRelatedEntityId());
}
public function getRelatedAccompanyingPeriod(EntityWorkflow $entityWorkflow): ?AccompanyingPeriod
{
return $this->getRelatedEntity($entityWorkflow)?->getAccompanyingPeriodWorkEvaluation()->getAccompanyingPeriodWork()
->getAccompanyingPeriod();
}
/**
* @return array[]
*/

View File

@@ -15,6 +15,7 @@ use Chill\MainBundle\Entity\Workflow\EntityWorkflow;
use Chill\MainBundle\Repository\Workflow\EntityWorkflowRepository;
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
use Chill\MainBundle\Workflow\EntityWorkflowHandlerInterface;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluation;
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluationDocument;
use Chill\PersonBundle\Repository\AccompanyingPeriod\AccompanyingPeriodWorkEvaluationRepository;
@@ -66,6 +67,11 @@ readonly class AccompanyingPeriodWorkEvaluationWorkflowHandler implements Entity
return $this->repository->find($entityWorkflow->getRelatedEntityId());
}
public function getRelatedAccompanyingPeriod(EntityWorkflow $entityWorkflow): ?AccompanyingPeriod
{
return $this->getRelatedEntity($entityWorkflow)?->getAccompanyingPeriodWork()->getAccompanyingPeriod();
}
public function getRelatedObjects(object $object): array
{
$relateds = [];

View File

@@ -15,6 +15,7 @@ use Chill\MainBundle\Entity\Workflow\EntityWorkflow;
use Chill\MainBundle\Repository\Workflow\EntityWorkflowRepository;
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
use Chill\MainBundle\Workflow\EntityWorkflowHandlerInterface;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork;
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluation;
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluationDocument;
@@ -68,6 +69,11 @@ readonly class AccompanyingPeriodWorkWorkflowHandler implements EntityWorkflowHa
return $this->repository->find($entityWorkflow->getRelatedEntityId());
}
public function getRelatedAccompanyingPeriod(EntityWorkflow $entityWorkflow): ?AccompanyingPeriod
{
return $this->getRelatedEntity($entityWorkflow)?->getAccompanyingPeriod();
}
public function getRelatedObjects(object $object): array
{
$relateds = [];