diff --git a/assets/styles/css/intervention.css b/assets/styles/css/intervention.css index 100a4ac..b4a77b5 100644 --- a/assets/styles/css/intervention.css +++ b/assets/styles/css/intervention.css @@ -108,19 +108,19 @@ body { text-align: center; background-color: white; } -#vehicule1 { +#oui { position: absolute; margin: 30.7% 0 0 25%; } -#oui { +#oui p { position: absolute; margin: 30.3% 0 0 27%; } -#vehicule2 { +#non { position: absolute; margin: 30.7% 0 0 32%; } -#non { +#non p { position: absolute; margin: 30.3% 0 0 34%; } diff --git a/src/Entity/Intervention.php b/src/Entity/Intervention.php index 51fde19..1eb4db0 100644 --- a/src/Entity/Intervention.php +++ b/src/Entity/Intervention.php @@ -29,6 +29,10 @@ class Intervention #[ORM\Column(length: 255)] private ?string $Status = null; +// #[ORM\ManyToOne(targetEntity: Vehicule::class)] +// private ?Vehicule $vehicule = null; + + public function getId(): ?int { return $this->id; diff --git a/src/Form/InterventionType.php b/src/Form/InterventionType.php index 26cf5a2..a9f993c 100644 --- a/src/Form/InterventionType.php +++ b/src/Form/InterventionType.php @@ -22,6 +22,14 @@ class InterventionType extends AbstractType ->add('Address', TextType::class) ->add('Status', TextType::class) ; + +// // 👉 Sélecteur de véhicule +// ->add('vehicule', EntityType::class, [ +// 'class' => Vehicule::class, +// 'choice_label' => 'immatriculation', // ou n'importe quel champ que tu veux afficher +// 'placeholder' => 'Aucun véhicule sélectionné', +// 'required' => false, +// ]); } public function configureOptions(OptionsResolver $resolver): void diff --git a/templates/intervention/_form.html.twig b/templates/intervention/_form.html.twig index bf20b98..cda5a58 100644 --- a/templates/intervention/_form.html.twig +++ b/templates/intervention/_form.html.twig @@ -1,4 +1,47 @@ +{#{{ form_start(form) }}#} +{# {{ form_widget(form) }}#} +{# #} +{#{{ form_end(form) }}#} + + {{ form_start(form) }} - {{ form_widget(form) }} - + +
+ {{ form_label(form.Wording, 'Nom de l\'intervention') }} + {{ form_widget(form.Wording, {'attr': {'class': 'form-control'}}) }} + {{ form_errors(form.Wording) }} +
+ +
+ {{ form_label(form.Timestamp, 'Date') }} + {{ form_widget(form.Timestamp, {'attr': {'class': 'form-control'}}) }} + {{ form_errors(form.Timestamp) }} +
+ +
+ {{ form_label(form.Description, 'Description') }} + {{ form_widget(form.Description, {'attr': {'class': 'form-control'}}) }} + {{ form_errors(form.Description) }} +
+ +
+ {{ form_label(form.Address, 'Adresse') }} + {{ form_widget(form.Address, {'attr': {'class': 'form-control'}}) }} + {{ form_errors(form.Address) }} +
+ +
+ {{ form_label(form.Status, 'Statut') }} + {{ form_widget(form.Status, {'attr': {'class': 'form-control'}}) }} + {{ form_errors(form.Status) }} +
+ +{#
#} +{# {{ form_label(form.vehicule, 'Véhicule associé') }}#} +{# {{ form_widget(form.vehicule, {'attr': {'class': 'form-control'}}) }}#} +{# {{ form_errors(form.vehicule) }}#} +{#
#} + + + {{ form_end(form) }} diff --git a/templates/intervention/new.html.twig b/templates/intervention/new.html.twig index cb3248d..c34f2e4 100644 --- a/templates/intervention/new.html.twig +++ b/templates/intervention/new.html.twig @@ -24,54 +24,56 @@
- +{# #} - +{# #} - +{# #} - - +{# #} +{# #} -

Véhicule nécessaire

- - - - +{#

Véhicule nécessaire

#} +{#
#} +{# #} +{# #} +{#
#} -

Jour de l'intervention

- +{#

Jour de l'intervention

#} +{# #} - - +{# #} +{# #} - - +{# #} +{# #} - - - + {{ include('intervention/_form.html.twig') }} Retour à la liste