Allow to order by storelocation column

Related to discussion #269
This commit is contained in:
Jan Böhmer 2023-04-23 23:38:59 +02:00
parent 967be4451a
commit e8ec536a5a

View file

@ -152,6 +152,7 @@ final class PartsDataTable implements DataTableTypeInterface
if ($this->security->isGranted('@storelocations.read')) { if ($this->security->isGranted('@storelocations.read')) {
$dataTable->add('storelocation', TextColumn::class, [ $dataTable->add('storelocation', TextColumn::class, [
'label' => $this->translator->trans('part.table.storeLocations'), 'label' => $this->translator->trans('part.table.storeLocations'),
'orderField' => 'storelocations.name',
'render' => function ($value, Part $context) { 'render' => function ($value, Part $context) {
$tmp = []; $tmp = [];
foreach ($context->getPartLots() as $lot) { foreach ($context->getPartLots() as $lot) {