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>
|
{% if handler is not null %}
|
||||||
|
<h2>
|
||||||
{{ 'workflow_'|trans }}
|
{{ 'workflow_'|trans }}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<div class="item-row col" style="display: block;">
|
<div class="item-row col" style="display: block;">
|
||||||
{% include handler.template(entity_workflow) with handler.templateData(entity_workflow)|merge({
|
{% include handler.template(entity_workflow) with handler.templateData(entity_workflow)|merge({
|
||||||
'description': true,
|
'description': true,
|
||||||
'breadcrumb': true,
|
'breadcrumb': true,
|
||||||
'add_classes': ''
|
'add_classes': ''
|
||||||
}) %}
|
}) %}
|
||||||
</div>
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<h2>{{ 'workflow.deleted_title'|trans }}</h2>
|
||||||
|
{% endif %}
|
||||||
|
@ -33,7 +33,7 @@ class WorkflowNotificationHandler implements NotificationHandlerInterface
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
'entity_workflow' => $entityWorkflow,
|
'entity_workflow' => $entityWorkflow,
|
||||||
'handler' => $this->entityWorkflowManager->getHandler($entityWorkflow),
|
'handler' => null !== $entityWorkflow ? $this->entityWorkflowManager->getHandler($entityWorkflow): null,
|
||||||
'notificationCc' => $this->isNotificationCc($notification),
|
'notificationCc' => $this->isNotificationCc($notification),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -45,6 +45,10 @@ class WorkflowNotificationHandler implements NotificationHandlerInterface
|
|||||||
if (EntityWorkflow::class === $notification->getRelatedEntityClass()) {
|
if (EntityWorkflow::class === $notification->getRelatedEntityClass()) {
|
||||||
$relatedEntity = $this->entityWorkflowRepository->findOneBy(['id' => $notification->getRelatedEntityId()]);
|
$relatedEntity = $this->entityWorkflowRepository->findOneBy(['id' => $notification->getRelatedEntityId()]);
|
||||||
|
|
||||||
|
if (null === $relatedEntity) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if ($relatedEntity->getCurrentStepCreatedBy() !== $this->security->getUser()) {
|
if ($relatedEntity->getCurrentStepCreatedBy() !== $this->security->getUser()) {
|
||||||
$notificationCc = true;
|
$notificationCc = true;
|
||||||
}
|
}
|
||||||
|
@ -568,6 +568,7 @@ workflow:
|
|||||||
transition_destinee_emails_help: Le lien sécurisé sera envoyé à chaque adresse indiquée
|
transition_destinee_emails_help: Le lien sécurisé sera envoyé à chaque adresse indiquée
|
||||||
sent_through_secured_link: Envoi par lien sécurisé
|
sent_through_secured_link: Envoi par lien sécurisé
|
||||||
public_views_by_ip: Visualisation par adresse IP
|
public_views_by_ip: Visualisation par adresse IP
|
||||||
|
deleted_title: Workflow supprimé
|
||||||
|
|
||||||
public_link:
|
public_link:
|
||||||
expired_link_title: Lien expiré
|
expired_link_title: Lien expiré
|
||||||
|
Loading…
x
Reference in New Issue
Block a user