mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-02-23 09:59:34 +00:00
Allow to set stocktake date for part lots
This commit is contained in:
parent
e5231e29f2
commit
2f9601364e
6 changed files with 53 additions and 25 deletions
|
|
@ -31,6 +31,7 @@ use App\Form\Type\StructuralEntityType;
|
|||
use App\Form\Type\UserSelectType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\DateTimeType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\DateType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
|
@ -110,6 +111,14 @@ class PartLotType extends AbstractType
|
|||
//Do not remove whitespace chars on the beginning and end of the string
|
||||
'trim' => false,
|
||||
]);
|
||||
|
||||
$builder->add('last_stocktake_at', DateTimeType::class, [
|
||||
'label' => 'part_lot.edit.last_stocktake_at',
|
||||
'widget' => 'single_text',
|
||||
'disabled' => !$this->security->isGranted('@parts_stock.stocktake'),
|
||||
'required' => false,
|
||||
'empty_data' => null,
|
||||
]);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue