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:
Hannes Rüger 2026-03-01 22:28:01 +01:00 committed by GitHub
parent b7cc14fa14
commit e5dcfad3ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 26 additions and 0 deletions

View file

@ -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),

View file

@ -52,6 +52,10 @@ enum PartTableColumns : string implements TranslatableInterface
case TAGS = "tags";
case ATTACHMENTS = "attachments";
case EDA_REFERENCE = "eda_reference";
case EDA_VALUE = "eda_value";
case EDA_STATUS = "eda_status";
case EDIT = "edit";

View file

@ -12689,6 +12689,18 @@ Buerklin-API Authentication server:
<target>Last stocktake</target>
</segment>
</unit>
<unit id="GNWhoTW" name="part.table.eda_reference">
<segment>
<source>part.table.eda_reference</source>
<target>EDA Reference</target>
</segment>
</unit>
<unit id="tW4yCbf" name="part.table.eda_value">
<segment>
<source>part.table.eda_value</source>
<target>EDA value</target>
</segment>
</unit>
<unit id="s1pgReC" name="settings.misc.kicad_eda.default_parameter_visibility">
<segment>
<source>settings.misc.kicad_eda.default_parameter_visibility</source>