mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-13 21:59:34 +00:00
added feature of part-id in project bom view
This commit is contained in:
parent
98b8c5b788
commit
a963880fd5
1 changed files with 8 additions and 1 deletions
|
|
@ -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)',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue