mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Use a own column type for entities.
This commit is contained in:
parent
01eff5e873
commit
b8f5b7628c
2 changed files with 73 additions and 7 deletions
|
@ -29,6 +29,7 @@
|
|||
|
||||
namespace App\DataTables;
|
||||
|
||||
use App\DataTables\Column\EntityColumn;
|
||||
use App\DataTables\Column\LocaleDateTimeColumn;
|
||||
use App\Entity\Parts\Category;
|
||||
use App\Entity\Parts\Part;
|
||||
|
@ -114,16 +115,16 @@ class PartsDataTable implements DataTableTypeInterface
|
|||
->add('description', TextColumn::class, [
|
||||
'label' => $this->translator->trans('part.table.description'),
|
||||
])
|
||||
->add('category', TextColumn::class, [
|
||||
'field' => 'category.name',
|
||||
'label' => $this->translator->trans('part.table.category')
|
||||
->add('category', EntityColumn::class, [
|
||||
'label' => $this->translator->trans('part.table.category'),
|
||||
'property' => 'category'
|
||||
])
|
||||
->add('footprint', TextColumn::class, [
|
||||
'field' => 'footprint.name',
|
||||
->add('footprint', EntityColumn::class, [
|
||||
'property' => 'footprint',
|
||||
'label' => $this->translator->trans('part.table.footprint')
|
||||
])
|
||||
->add('manufacturer', TextColumn::class, [
|
||||
'field' => 'manufacturer.name',
|
||||
->add('manufacturer', EntityColumn::class, [
|
||||
'property' => 'manufacturer',
|
||||
'label' => $this->translator->trans('part.table.manufacturer')
|
||||
])
|
||||
//->add('footprint', TextColumn::class, ['field' => 'footprint.name'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue