mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Do not fail displaying notification when workflow has been deleted
This commit is contained in:
parent
3ec0d26001
commit
c3cc6c8353
@ -1,11 +1,15 @@
|
||||
<h2>
|
||||
{{ 'workflow_'|trans }}
|
||||
</h2>
|
||||
{% if handler is not null %}
|
||||
<h2>
|
||||
{{ 'workflow_'|trans }}
|
||||
</h2>
|
||||
|
||||
<div class="item-row col" style="display: block;">
|
||||
{% include handler.template(entity_workflow) with handler.templateData(entity_workflow)|merge({
|
||||
'description': true,
|
||||
'breadcrumb': true,
|
||||
'add_classes': ''
|
||||
}) %}
|
||||
</div>
|
||||
<div class="item-row col" style="display: block;">
|
||||
{% include handler.template(entity_workflow) with handler.templateData(entity_workflow)|merge({
|
||||
'description': true,
|
||||
'breadcrumb': true,
|
||||
'add_classes': ''
|
||||
}) %}
|
||||
</div>
|
||||
{% else %}
|
||||
<h2>{{ 'workflow.deleted_title'|trans }}</h2>
|
||||
{% endif %}
|
||||
|
@ -33,7 +33,7 @@ class WorkflowNotificationHandler implements NotificationHandlerInterface
|
||||
|
||||
return [
|
||||
'entity_workflow' => $entityWorkflow,
|
||||
'handler' => $this->entityWorkflowManager->getHandler($entityWorkflow),
|
||||
'handler' => null !== $entityWorkflow ? $this->entityWorkflowManager->getHandler($entityWorkflow): null,
|
||||
'notificationCc' => $this->isNotificationCc($notification),
|
||||
];
|
||||
}
|
||||
@ -45,6 +45,10 @@ class WorkflowNotificationHandler implements NotificationHandlerInterface
|
||||
if (EntityWorkflow::class === $notification->getRelatedEntityClass()) {
|
||||
$relatedEntity = $this->entityWorkflowRepository->findOneBy(['id' => $notification->getRelatedEntityId()]);
|
||||
|
||||
if (null === $relatedEntity) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($relatedEntity->getCurrentStepCreatedBy() !== $this->security->getUser()) {
|
||||
$notificationCc = true;
|
||||
}
|
||||
|
@ -568,6 +568,7 @@ workflow:
|
||||
transition_destinee_emails_help: Le lien sécurisé sera envoyé à chaque adresse indiquée
|
||||
sent_through_secured_link: Envoi par lien sécurisé
|
||||
public_views_by_ip: Visualisation par adresse IP
|
||||
deleted_title: Workflow supprimé
|
||||
|
||||
public_link:
|
||||
expired_link_title: Lien expiré
|
||||
|
Loading…
x
Reference in New Issue
Block a user