forked from mirror/Part-DB.Part-DB-server
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
|
@ -43,7 +43,7 @@ class EnumColumn extends AbstractColumn
|
|||
return ($this->getEnumClass())::from($value);
|
||||
}
|
||||
|
||||
protected function configureOptions(OptionsResolver $resolver)
|
||||
protected function configureOptions(OptionsResolver $resolver): static
|
||||
{
|
||||
parent::configureOptions($resolver);
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ class LogDataTable implements DataTableTypeInterface
|
|||
if ($context instanceof PartStockChangedLogEntry) {
|
||||
$text .= sprintf(
|
||||
' (<i>%s</i>)',
|
||||
$this->translator->trans('log.part_stock_changed.' . $context->getInstockChangeType())
|
||||
$this->translator->trans('log.part_stock_changed.' . $context->getInstockChangeType()->toExtraShortType())
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue