This commit is contained in:
lubiana 2025-06-09 19:56:08 +02:00
parent 66c4c1fe4f
commit 2c2e34b71e
Signed by: lubiana
SSH key fingerprint: SHA256:vW1EA0fRR3Fw+dD/sM0K+x3Il2gSry6YRYHqOeQwrfk
42 changed files with 910 additions and 939 deletions

View file

@ -1,11 +1,14 @@
<?php
declare(strict_types=1);
namespace App\Form;
use App\Entity\DrinkType;
use App\Entity\InventoryRecord;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\NumberType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
@ -14,19 +17,14 @@ class InventoryRecordForm extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('quantity')
->add('timestamp', null, [
'widget' => 'single_text',
])
->add('createdAt', null, [
'widget' => 'single_text',
])
->add('updatedAt', null, [
'widget' => 'single_text',
])
->add('quantity', NumberType::class)
->add('drinkType', EntityType::class, [
'class' => DrinkType::class,
'choice_label' => 'id',
'attr' => [
'style' => 'display: none;',
],
'label' => false,
])
;
}