mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-15 06:39:33 +00:00
Started to work on the possibilty to create new entities directly from the part edit page.
This fixes issue #203.
This commit is contained in:
parent
672d55624f
commit
1654010ea3
8 changed files with 142 additions and 84 deletions
|
|
@ -63,6 +63,7 @@ class OrderdetailType extends AbstractType
|
|||
'class' => Supplier::class,
|
||||
'disable_not_selectable' => true,
|
||||
'label' => 'orderdetails.edit.supplier',
|
||||
'allow_add' => $this->security->isGranted('@suppliers.create'),
|
||||
]);
|
||||
|
||||
$builder->add('supplier_product_url', UrlType::class, [
|
||||
|
|
|
|||
|
|
@ -104,15 +104,15 @@ class PartBaseType extends AbstractType
|
|||
])
|
||||
->add('category', StructuralEntityType::class, [
|
||||
'class' => Category::class,
|
||||
'allow_add' => $this->security->isGranted('@categories.create'),
|
||||
'label' => 'part.edit.category',
|
||||
'disable_not_selectable' => true,
|
||||
'constraints' => [
|
||||
],
|
||||
])
|
||||
->add('footprint', StructuralEntityType::class, [
|
||||
'class' => Footprint::class,
|
||||
'required' => false,
|
||||
'label' => 'part.edit.footprint',
|
||||
'allow_add' => $this->security->isGranted('@footprints.create'),
|
||||
'disable_not_selectable' => true,
|
||||
])
|
||||
->add('tags', TextType::class, [
|
||||
|
|
@ -131,6 +131,7 @@ class PartBaseType extends AbstractType
|
|||
'class' => Manufacturer::class,
|
||||
'required' => false,
|
||||
'label' => 'part.edit.manufacturer.label',
|
||||
'allow_add' => $this->security->isGranted('@manufacturers.create'),
|
||||
'disable_not_selectable' => true,
|
||||
])
|
||||
->add('manufacturer_product_url', UrlType::class, [
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ class PartLotType extends AbstractType
|
|||
'label' => 'part_lot.edit.location',
|
||||
'required' => false,
|
||||
'disable_not_selectable' => true,
|
||||
'allow_add' => $this->security->isGranted('@storelocations.create'),
|
||||
]);
|
||||
|
||||
$builder->add('amount', SIUnitType::class, [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue