Added very basic controls to edit a projects BOM

This commit is contained in:
Jan Böhmer 2022-12-23 13:12:22 +01:00
parent b1ed52bcc3
commit c78bc01d23
6 changed files with 158 additions and 7 deletions

View file

@ -21,7 +21,9 @@
namespace App\Form\AdminPages;
use App\Entity\Base\AbstractNamedDBElement;
use App\Form\ProjectSystem\ProjectBOMEntryType;
use App\Form\Type\RichTextEditorType;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use Symfony\Component\Form\FormBuilderInterface;
class ProjectAdminForm extends BaseEntityAdminForm
@ -38,5 +40,17 @@ class ProjectAdminForm extends BaseEntityAdminForm
'rows' => 2,
],
]);
$builder->add('bom_entries', CollectionType::class, [
'entry_type' => ProjectBOMEntryType::class,
'entry_options' => [
'label' => false,
],
'allow_add' => true,
'allow_delete' => true,
'by_reference' => false,
'reindex_enable' => true,
'label' => false,
]);
}
}