Implement a user friendly part select element.

This commit is contained in:
Jan Böhmer 2022-12-24 14:04:46 +01:00
parent c78bc01d23
commit 670dd76ef5
5 changed files with 175 additions and 3 deletions

View file

@ -4,6 +4,7 @@ namespace App\Form\ProjectSystem;
use App\Entity\Parts\Part;
use App\Entity\ProjectSystem\ProjectBOMEntry;
use App\Form\Type\PartSelectType;
use Svg\Tag\Text;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
@ -23,9 +24,7 @@ class ProjectBOMEntryType extends AbstractType
'label' => 'project.bom.quantity',
])
->add('part', EntityType::class, [
'class' => Part::class,
'choice_label' => 'name',
->add('part', PartSelectType::class, [
'required' => false,
])