mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-02-28 20:39:35 +00:00
Added a custom render function for the 'manufacturing_status' column to handle null values and translate the status using the translator service.
This commit is contained in:
parent
04ca6e5f24
commit
dcfeb1b252
1 changed files with 1 additions and 2 deletions
|
|
@ -150,8 +150,7 @@ class ProjectBomEntriesDataTable implements DataTableTypeInterface
|
|||
->add('manufacturing_status', EnumColumn::class, [
|
||||
'label' => $this->translator->trans('part.table.manufacturingStatus'),
|
||||
'class' => ManufacturingStatus::class,
|
||||
'data' => fn (ProjectBOMEntry $context): ?ManufacturingStatus => $context->getPart()?->getManufacturingStatus(),
|
||||
'render' => function (?ManufacturingStatus $status): string {
|
||||
'render' => function (?ManufacturingStatus $status, Part $context): string {
|
||||
if ($status === null) {
|
||||
return '';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue