mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-08 08:19:35 +00:00
feat(parts table): add eda reference prefix and value columns (#1266)
* feat(parts table): add eda reference prefix and value columns * Use better labels for column names and made it visible as default column selection --------- Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
This commit is contained in:
parent
b7cc14fa14
commit
e5dcfad3ff
3 changed files with 26 additions and 0 deletions
|
|
@ -233,6 +233,16 @@ final class PartsDataTable implements DataTableTypeInterface
|
|||
->add('attachments', PartAttachmentsColumn::class, [
|
||||
'label' => $this->translator->trans('part.table.attachments'),
|
||||
])
|
||||
->add('eda_reference', TextColumn::class, [
|
||||
'label' => $this->translator->trans('part.table.eda_reference'),
|
||||
'render' => static fn($value, Part $context) => htmlspecialchars($context->getEdaInfo()->getReferencePrefix() ?? ''),
|
||||
'orderField' => 'NATSORT(part.eda_info.reference_prefix)'
|
||||
])
|
||||
->add('eda_value', TextColumn::class, [
|
||||
'label' => $this->translator->trans('part.table.eda_value'),
|
||||
'render' => static fn($value, Part $context) => htmlspecialchars($context->getEdaInfo()->getValue() ?? ''),
|
||||
'orderField' => 'NATSORT(part.eda_info.value)'
|
||||
])
|
||||
->add('eda_status', TextColumn::class, [
|
||||
'label' => $this->translator->trans('part.table.eda_status'),
|
||||
'render' => fn($value, Part $context) => $this->partDataTableHelper->renderEdaStatus($context),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue