Write a special log entry to DB when a user withdraws/add/move parts stock

This commit is contained in:
Jan Böhmer 2023-01-08 01:22:02 +01:00
parent b2157c93e3
commit 4c94d9c150
6 changed files with 256 additions and 10 deletions

View file

@ -31,7 +31,7 @@ use App\Entity\LogSystem\ElementCreatedLogEntry;
use App\Entity\LogSystem\ElementDeletedLogEntry;
use App\Entity\LogSystem\ElementEditedLogEntry;
use App\Entity\LogSystem\ExceptionLogEntry;
use App\Entity\LogSystem\InstockChangedLogEntry;
use App\Entity\LogSystem\LegacyInstockChangedLogEntry;
use App\Entity\LogSystem\SecurityEventLogEntry;
use App\Entity\LogSystem\UserLoginLogEntry;
use App\Entity\LogSystem\UserLogoutLogEntry;
@ -155,7 +155,7 @@ class LogEntryExtraFormatter
$array['log.element_edited.changed_fields'] = htmlspecialchars(implode(', ', $context->getChangedFields()));
}
if ($context instanceof InstockChangedLogEntry) {
if ($context instanceof LegacyInstockChangedLogEntry) {
$array[] = $this->translator->trans($context->isWithdrawal() ? 'log.instock_changed.withdrawal' : 'log.instock_changed.added');
$array[] = sprintf(
'%s <i class="fas fa-long-arrow-alt-right"></i> %s (%s)',