Use better labels for column names and made it visible as default column selection

This commit is contained in:
Jan Böhmer 2026-03-01 22:23:36 +01:00
parent e19f83fdc1
commit 232c973a18
4 changed files with 115 additions and 94 deletions

View file

@ -229,14 +229,14 @@ final class PartsDataTable implements DataTableTypeInterface
->add('attachments', PartAttachmentsColumn::class, [
'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() ?? ''),
->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_info_value', TextColumn::class, [
'label' => $this->translator->trans('eda_info.value'),
'render' => fn($value, Part $context) => htmlspecialchars($context->getEdaInfo()->getValue() ?? ''),
->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)'
]);