mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-10 10:24:31 +02:00
Use an enum for the part stock change type
This commit is contained in:
parent
9adfcc7aec
commit
7d99607919
5 changed files with 65 additions and 43 deletions
|
@ -33,6 +33,7 @@ use App\Entity\LogSystem\ElementEditedLogEntry;
|
|||
use App\Entity\LogSystem\ExceptionLogEntry;
|
||||
use App\Entity\LogSystem\LegacyInstockChangedLogEntry;
|
||||
use App\Entity\LogSystem\PartStockChangedLogEntry;
|
||||
use App\Entity\LogSystem\PartStockChangeType;
|
||||
use App\Entity\LogSystem\SecurityEventLogEntry;
|
||||
use App\Entity\LogSystem\UserLoginLogEntry;
|
||||
use App\Entity\LogSystem\UserLogoutLogEntry;
|
||||
|
@ -187,7 +188,7 @@ class LogEntryExtraFormatter
|
|||
if ($context->getComment() !== '') {
|
||||
$array['log.part_stock_changed.comment'] = htmlspecialchars($context->getComment());
|
||||
}
|
||||
if ($context->getInstockChangeType() === PartStockChangedLogEntry::TYPE_MOVE) {
|
||||
if ($context->getInstockChangeType() === PartStockChangeType::MOVE) {
|
||||
$array['log.part_stock_changed.move_target'] =
|
||||
htmlspecialchars($this->elementTypeNameGenerator->getLocalizedTypeLabel(PartLot::class))
|
||||
.' ' . $context->getMoveToTargetID();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue