mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-01 04:49:36 +00:00
feat(parts table): add eda reference prefix and value columns
This commit is contained in:
parent
8ef9dd432f
commit
e19f83fdc1
1 changed files with 10 additions and 0 deletions
|
|
@ -228,6 +228,16 @@ final class PartsDataTable implements DataTableTypeInterface
|
||||||
])
|
])
|
||||||
->add('attachments', PartAttachmentsColumn::class, [
|
->add('attachments', PartAttachmentsColumn::class, [
|
||||||
'label' => $this->translator->trans('part.table.attachments'),
|
'label' => $this->translator->trans('part.table.attachments'),
|
||||||
|
])
|
||||||
|
->add('eda_info_reference_prefix', TextColumn::class, [
|
||||||
|
'label' => $this->translator->trans('eda_info.reference_prefix'),
|
||||||
|
'render' => fn($value, Part $context) => htmlspecialchars($context->getEdaInfo()->getReferencePrefix() ?? ''),
|
||||||
|
'orderField' => 'NATSORT(part.eda_info.reference_prefix)'
|
||||||
|
])
|
||||||
|
->add('eda_info_value', TextColumn::class, [
|
||||||
|
'label' => $this->translator->trans('eda_info.value'),
|
||||||
|
'render' => fn($value, Part $context) => htmlspecialchars($context->getEdaInfo()->getValue() ?? ''),
|
||||||
|
'orderField' => 'NATSORT(part.eda_info.value)'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
//Add a column to list the projects where the part is used, when the user has the permission to see the projects
|
//Add a column to list the projects where the part is used, when the user has the permission to see the projects
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue