Added optional "stocked amount" and storage locations columns for the BOM list

This fixes issue #429
This commit is contained in:
Jan Böhmer 2023-11-19 22:13:25 +01:00
parent 958d59a0ff
commit 83ad99215f
4 changed files with 103 additions and 59 deletions

View file

@ -151,6 +151,28 @@ class ProjectBomEntriesDataTable implements DataTableTypeInterface
},
])
->add('instockAmount', TextColumn::class, [
'label' => 'project.bom.instockAmount',
'visible' => false,
'render' => function ($value, ProjectBOMEntry $context) {
if ($context->getPart()) {
return $this->partDataTableHelper->renderAmount($context->getPart());
}
return '';
}
])
->add('storageLocations', TextColumn::class, [
'label' => 'part.table.storeLocations',
'visible' => false,
'render' => function ($value, ProjectBOMEntry $context) {
if ($context->getPart()) {
return $this->partDataTableHelper->renderStorageLocations($context->getPart());
}
return '';
}
])
->add('addedDate', LocaleDateTimeColumn::class, [
'label' => $this->translator->trans('part.table.addedDate'),