Added a very basic modal on part info page for changing part instock

Related to issue #201
This commit is contained in:
Jan Böhmer 2023-01-01 13:21:50 +01:00
parent 0e020dab74
commit ba4085d882
7 changed files with 488 additions and 4 deletions

View file

@ -38,21 +38,21 @@ class StorelocationAdminForm extends BaseEntityAdminForm
'required' => false,
'label' => 'storelocation.edit.is_full.label',
'help' => 'storelocation.edit.is_full.help',
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'move', $entity),
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
]);
$builder->add('limit_to_existing_parts', CheckboxType::class, [
'required' => false,
'label' => 'storelocation.limit_to_existing.label',
'help' => 'storelocation.limit_to_existing.help',
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'move', $entity),
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
]);
$builder->add('only_single_part', CheckboxType::class, [
'required' => false,
'label' => 'storelocation.only_single_part.label',
'help' => 'storelocation.only_single_part.help',
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'move', $entity),
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
]);
$builder->add('storage_type', StructuralEntityType::class, [
@ -61,7 +61,7 @@ class StorelocationAdminForm extends BaseEntityAdminForm
'help' => 'storelocation.storage_type.help',
'class' => MeasurementUnit::class,
'disable_not_selectable' => true,
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'move', $entity),
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
]);
}
}