diff --git a/src/Services/LogSystem/LogEntryExtraFormatter.php b/src/Services/LogSystem/LogEntryExtraFormatter.php index 2950842b..8ec328d0 100644 --- a/src/Services/LogSystem/LogEntryExtraFormatter.php +++ b/src/Services/LogSystem/LogEntryExtraFormatter.php @@ -131,9 +131,9 @@ class LogEntryExtraFormatter if (($context instanceof LogWithEventUndoInterface) && $context->isUndoEvent()) { if ('undo' === $context->getUndoMode()) { - $array['log.undo_mode.undo'] = (string) $context->getUndoEventID(); + $array['log.undo_mode.undo'] = '#' . $context->getUndoEventID(); } elseif ('revert' === $context->getUndoMode()) { - $array['log.undo_mode.revert'] = (string) $context->getUndoEventID(); + $array['log.undo_mode.revert'] = '#' . $context->getUndoEventID(); } } diff --git a/templates/log_system/details/log_details.html.twig b/templates/log_system/details/log_details.html.twig index 422548a0..dbffd8c9 100644 --- a/templates/log_system/details/log_details.html.twig +++ b/templates/log_system/details/log_details.html.twig @@ -28,6 +28,10 @@ {% if log_entry.type == 'part_stock_changed' %} ({{ ('log.part_stock_changed.' ~ log_entry.instockChangeType)|trans }}) {% endif %} + + {% if log_entry is instanceof('App\\Entity\\Contracts\\LogWithEventUndoInterface') and log_entry.undoEvent %} + ({{ ('log.undo_mode.' ~ log_entry.undoMode)|trans }}: #{{ log_entry.UndoEventID }}) + {% endif %}