From dcfeb1b252328af7136a07a809f0dd5bc0ce6285 Mon Sep 17 00:00:00 2001 From: Marc Kreidler Date: Tue, 24 Feb 2026 20:48:57 +0100 Subject: [PATCH] Added a custom render function for the 'manufacturing_status' column to handle null values and translate the status using the translator service. --- src/DataTables/ProjectBomEntriesDataTable.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/DataTables/ProjectBomEntriesDataTable.php b/src/DataTables/ProjectBomEntriesDataTable.php index e605697d..38d89fcc 100644 --- a/src/DataTables/ProjectBomEntriesDataTable.php +++ b/src/DataTables/ProjectBomEntriesDataTable.php @@ -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 ''; }