added feature of part-id in project bom view

This commit is contained in:
fsbrc 2025-12-18 13:34:21 +01:00
parent 98b8c5b788
commit a963880fd5

View file

@ -79,7 +79,14 @@ class ProjectBomEntriesDataTable implements DataTableTypeInterface
return htmlspecialchars($this->amountFormatter->format($context->getQuantity(), $context->getPart()->getPartUnit()));
},
])
->add('part_id', TextColumn::class, [
'label' => 'part-id',
'visible' => true,
'orderField' => 'part.id',
'render' => function ($value, ProjectBOMEntry $context) {
return $context->getPart() instanceof Part ? (string) $context->getPart()->getId() : '';
},
])
->add('name', TextColumn::class, [
'label' => $this->translator->trans('part.table.name'),
'orderField' => 'NATSORT(part.name)',