diff --git a/src/Bundle/ChillDocStoreBundle/Workflow/AccompanyingCourseDocumentWorkflowHandler.php b/src/Bundle/ChillDocStoreBundle/Workflow/AccompanyingCourseDocumentWorkflowHandler.php index 33fba8d3f..f201d9f78 100644 --- a/src/Bundle/ChillDocStoreBundle/Workflow/AccompanyingCourseDocumentWorkflowHandler.php +++ b/src/Bundle/ChillDocStoreBundle/Workflow/AccompanyingCourseDocumentWorkflowHandler.php @@ -13,6 +13,7 @@ namespace Chill\DocStoreBundle\Workflow; use Chill\DocStoreBundle\Entity\AccompanyingCourseDocument; use Chill\MainBundle\Entity\Workflow\EntityWorkflow; +use Chill\MainBundle\Templating\TranslatableStringHelperInterface; use Chill\MainBundle\Workflow\EntityWorkflowHandlerInterface; use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation; use Doctrine\ORM\EntityManagerInterface; @@ -28,8 +29,10 @@ class AccompanyingCourseDocumentWorkflowHandler implements EntityWorkflowHandler /** * TODO: injecter le repository directement. */ - public function __construct(EntityManagerInterface $em, TranslatorInterface $translator) - { + public function __construct( + EntityManagerInterface $em, + TranslatorInterface $translator + ) { $this->repository = $em->getRepository(AccompanyingCourseDocument::class); $this->translator = $translator; } @@ -53,7 +56,11 @@ class AccompanyingCourseDocumentWorkflowHandler implements EntityWorkflowHandler public function getEntityTitle(EntityWorkflow $entityWorkflow, array $options = []): string { - return $this->translator->trans('workflow.Document (n°%doc%)', ['%doc%' => $entityWorkflow->getRelatedEntityId()]); + $doc = $this->getRelatedEntity($entityWorkflow); + + return $this->translator->trans('workflow.Document (n°%doc%)', ['%doc%' => $entityWorkflow->getRelatedEntityId()]) + .' - '.$doc->getTitle() + ; } public function getRelatedEntity(EntityWorkflow $entityWorkflow): ?AccompanyingCourseDocument diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/ListWorkflow.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/ListWorkflow.vue index 38643dace..0e16b522f 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/ListWorkflow.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/EntityWorkflow/ListWorkflow.vue @@ -5,7 +5,7 @@