mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-27 18:13:48 +00:00
able to see the workflow if the evaluation document has been deleted
This commit is contained in:
@@ -48,6 +48,12 @@ class AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler implements EntityW
|
||||
{
|
||||
$doc = $this->getRelatedEntity($entityWorkflow);
|
||||
|
||||
if (null === $doc) {
|
||||
return [
|
||||
'persons' => [],
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
'persons' => $doc->getAccompanyingPeriodWorkEvaluation()
|
||||
->getAccompanyingPeriodWork()->getPersons(),
|
||||
@@ -58,6 +64,10 @@ class AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler implements EntityW
|
||||
{
|
||||
$doc = $this->getRelatedEntity($entityWorkflow);
|
||||
|
||||
if (null === $doc) {
|
||||
return $this->translator->trans('workflow.doc for evaluation deleted');
|
||||
}
|
||||
|
||||
return $this->translator->trans(
|
||||
'workflow.Doc for evaluation (n°%eval%)',
|
||||
['%eval%' => $entityWorkflow->getRelatedEntityId()]
|
||||
@@ -98,7 +108,7 @@ class AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler implements EntityW
|
||||
|
||||
return [
|
||||
'entity_workflow' => $entityWorkflow,
|
||||
'evaluation' => $doc->getAccompanyingPeriodWorkEvaluation(),
|
||||
'evaluation' => null !== $doc ? $doc->getAccompanyingPeriodWorkEvaluation() : $doc,
|
||||
'doc' => $doc,
|
||||
];
|
||||
}
|
||||
|
Reference in New Issue
Block a user