Merge remote-tracking branch 'origin/feature/Controller' into feature/Controller

# Conflicts:
#	templates/plats/index.html.twig
This commit is contained in:
bayard 2024-11-21 15:12:24 +01:00
commit ab4653d172
42 changed files with 975 additions and 150 deletions

View File

@ -0,0 +1,65 @@
#container_gestion_user {
background-color: white;
margin-left: 20%; /* Centrage vertical */
margin-top: 5%;
padding: 20px;
border: 1px solid black;
width: 75%; /* Largeur du contenu de la modal */
height: 100%; /* Hauteur du contenu de la modal */
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
display: none;
}
body {
width: 100%;
height: 100%;
}
/* Style pour chaque élément d'information de l'utilisateur */
.user-info-item {
display: flex;
padding: 10px 0;
border-bottom: 1px solid #e0e0e0;
}
/* Dernier élément sans bordure */
.user-info-item:last-child {
border-bottom: none;
}
/* Style pour le label de chaque information (Nom, Prénom, etc.) */
.user-info-label {
font-weight: bold;
color: #333;
width: 7%;
}
/* Style pour la valeur de chaque information (la donnée de l'utilisateur) */
.user-info-value {
color: #555;
text-align: right;
width: 65%;
word-wrap: break-word; /* Gère les débordements */
}
.btn-update {
margin-top: 1%;
}
/* Ajout d'un style pour rendre responsive */
@media (max-width: 600px) {
#InformationUser {
padding: 15px;
}
.user-info-item {
flex-direction: column;
padding: 8px 0;
}
.user-info-label, .user-info-value {
width: 100%;
}
}

View File

@ -0,0 +1,81 @@
<?php
namespace App\Controller;
use App\Entity\Reservations;
use App\Form\ReservationsType;
use App\Repository\ReservationsRepository;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
#[Route('/reservations')]
final class ReservationsController extends AbstractController
{
#[Route(name: 'app_reservations_index', methods: ['GET'])]
public function index(ReservationsRepository $reservationsRepository): Response
{
return $this->render('reservations/index.html.twig', [
'reservations' => $reservationsRepository->findAll(),
]);
}
#[Route('/new', name: 'app_reservations_new', methods: ['GET', 'POST'])]
public function new(Request $request, EntityManagerInterface $entityManager): Response
{
$reservation = new Reservations();
$form = $this->createForm(ReservationsType::class, $reservation);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$entityManager->persist($reservation);
$entityManager->flush();
return $this->redirectToRoute('app_reservations_index', [], Response::HTTP_SEE_OTHER);
}
return $this->render('reservations/new.html.twig', [
'reservation' => $reservation,
'form' => $form,
]);
}
#[Route('/{id}', name: 'app_reservations_show', methods: ['GET'])]
public function show(Reservations $reservation): Response
{
return $this->render('reservations/show.html.twig', [
'reservation' => $reservation,
]);
}
#[Route('/{id}/edit', name: 'app_reservations_edit', methods: ['GET', 'POST'])]
public function edit(Request $request, Reservations $reservation, EntityManagerInterface $entityManager): Response
{
$form = $this->createForm(ReservationsType::class, $reservation);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$entityManager->flush();
return $this->redirectToRoute('app_reservations_index', [], Response::HTTP_SEE_OTHER);
}
return $this->render('reservations/edit.html.twig', [
'reservation' => $reservation,
'form' => $form,
]);
}
#[Route('/{id}', name: 'app_reservations_delete', methods: ['POST'])]
public function delete(Request $request, Reservations $reservation, EntityManagerInterface $entityManager): Response
{
if ($this->isCsrfTokenValid('delete'.$reservation->getId(), $request->getPayload()->getString('_token'))) {
$entityManager->remove($reservation);
$entityManager->flush();
}
return $this->redirectToRoute('app_reservations_index', [], Response::HTTP_SEE_OTHER);
}
}

View File

@ -0,0 +1,81 @@
<?php
namespace App\Controller;
use App\Entity\StatutCommandes;
use App\Form\StatutCommandesType;
use App\Repository\StatutCommandesRepository;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
#[Route('/statut/commandes')]
final class StatutCommandesController extends AbstractController
{
#[Route(name: 'app_statut_commandes_index', methods: ['GET'])]
public function index(StatutCommandesRepository $statutCommandesRepository): Response
{
return $this->render('statut_commandes/index.html.twig', [
'statut_commandes' => $statutCommandesRepository->findAll(),
]);
}
#[Route('/new', name: 'app_statut_commandes_new', methods: ['GET', 'POST'])]
public function new(Request $request, EntityManagerInterface $entityManager): Response
{
$statutCommande = new StatutCommandes();
$form = $this->createForm(StatutCommandesType::class, $statutCommande);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$entityManager->persist($statutCommande);
$entityManager->flush();
return $this->redirectToRoute('app_statut_commandes_index', [], Response::HTTP_SEE_OTHER);
}
return $this->render('statut_commandes/new.html.twig', [
'statut_commande' => $statutCommande,
'form' => $form,
]);
}
#[Route('/{id}', name: 'app_statut_commandes_show', methods: ['GET'])]
public function show(StatutCommandes $statutCommande): Response
{
return $this->render('statut_commandes/show.html.twig', [
'statut_commande' => $statutCommande,
]);
}
#[Route('/{id}/edit', name: 'app_statut_commandes_edit', methods: ['GET', 'POST'])]
public function edit(Request $request, StatutCommandes $statutCommande, EntityManagerInterface $entityManager): Response
{
$form = $this->createForm(StatutCommandesType::class, $statutCommande);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$entityManager->flush();
return $this->redirectToRoute('app_statut_commandes_index', [], Response::HTTP_SEE_OTHER);
}
return $this->render('statut_commandes/edit.html.twig', [
'statut_commande' => $statutCommande,
'form' => $form,
]);
}
#[Route('/{id}', name: 'app_statut_commandes_delete', methods: ['POST'])]
public function delete(Request $request, StatutCommandes $statutCommande, EntityManagerInterface $entityManager): Response
{
if ($this->isCsrfTokenValid('delete'.$statutCommande->getId(), $request->getPayload()->getString('_token'))) {
$entityManager->remove($statutCommande);
$entityManager->flush();
}
return $this->redirectToRoute('app_statut_commandes_index', [], Response::HTTP_SEE_OTHER);
}
}

View File

@ -0,0 +1,81 @@
<?php
namespace App\Controller;
use App\Entity\StatutTables;
use App\Form\StatutTablesType;
use App\Repository\StatutTablesRepository;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
#[Route('/statut/tables')]
final class StatutTablesController extends AbstractController
{
#[Route(name: 'app_statut_tables_index', methods: ['GET'])]
public function index(StatutTablesRepository $statutTablesRepository): Response
{
return $this->render('statut_tables/index.html.twig', [
'statut_tables' => $statutTablesRepository->findAll(),
]);
}
#[Route('/new', name: 'app_statut_tables_new', methods: ['GET', 'POST'])]
public function new(Request $request, EntityManagerInterface $entityManager): Response
{
$statutTable = new StatutTables();
$form = $this->createForm(StatutTablesType::class, $statutTable);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$entityManager->persist($statutTable);
$entityManager->flush();
return $this->redirectToRoute('app_statut_tables_index', [], Response::HTTP_SEE_OTHER);
}
return $this->render('statut_tables/new.html.twig', [
'statut_table' => $statutTable,
'form' => $form,
]);
}
#[Route('/{id}', name: 'app_statut_tables_show', methods: ['GET'])]
public function show(StatutTables $statutTable): Response
{
return $this->render('statut_tables/show.html.twig', [
'statut_table' => $statutTable,
]);
}
#[Route('/{id}/edit', name: 'app_statut_tables_edit', methods: ['GET', 'POST'])]
public function edit(Request $request, StatutTables $statutTable, EntityManagerInterface $entityManager): Response
{
$form = $this->createForm(StatutTablesType::class, $statutTable);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$entityManager->flush();
return $this->redirectToRoute('app_statut_tables_index', [], Response::HTTP_SEE_OTHER);
}
return $this->render('statut_tables/edit.html.twig', [
'statut_table' => $statutTable,
'form' => $form,
]);
}
#[Route('/{id}', name: 'app_statut_tables_delete', methods: ['POST'])]
public function delete(Request $request, StatutTables $statutTable, EntityManagerInterface $entityManager): Response
{
if ($this->isCsrfTokenValid('delete'.$statutTable->getId(), $request->getPayload()->getString('_token'))) {
$entityManager->remove($statutTable);
$entityManager->flush();
}
return $this->redirectToRoute('app_statut_tables_index', [], Response::HTTP_SEE_OTHER);
}
}

View File

@ -0,0 +1,81 @@
<?php
namespace App\Controller;
use App\Entity\Tables;
use App\Form\TablesType;
use App\Repository\TablesRepository;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
#[Route('/tables')]
final class TablesController extends AbstractController
{
#[Route(name: 'app_tables_index', methods: ['GET'])]
public function index(TablesRepository $tablesRepository): Response
{
return $this->render('tables/index.html.twig', [
'tables' => $tablesRepository->findAll(),
]);
}
#[Route('/new', name: 'app_tables_new', methods: ['GET', 'POST'])]
public function new(Request $request, EntityManagerInterface $entityManager): Response
{
$table = new Tables();
$form = $this->createForm(TablesType::class, $table);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$entityManager->persist($table);
$entityManager->flush();
return $this->redirectToRoute('app_tables_index', [], Response::HTTP_SEE_OTHER);
}
return $this->render('tables/new.html.twig', [
'table' => $table,
'form' => $form,
]);
}
#[Route('/{id}', name: 'app_tables_show', methods: ['GET'])]
public function show(Tables $table): Response
{
return $this->render('tables/show.html.twig', [
'table' => $table,
]);
}
#[Route('/{id}/edit', name: 'app_tables_edit', methods: ['GET', 'POST'])]
public function edit(Request $request, Tables $table, EntityManagerInterface $entityManager): Response
{
$form = $this->createForm(TablesType::class, $table);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$entityManager->flush();
return $this->redirectToRoute('app_tables_index', [], Response::HTTP_SEE_OTHER);
}
return $this->render('tables/edit.html.twig', [
'table' => $table,
'form' => $form,
]);
}
#[Route('/{id}', name: 'app_tables_delete', methods: ['POST'])]
public function delete(Request $request, Tables $table, EntityManagerInterface $entityManager): Response
{
if ($this->isCsrfTokenValid('delete'.$table->getId(), $request->getPayload()->getString('_token'))) {
$entityManager->remove($table);
$entityManager->flush();
}
return $this->redirectToRoute('app_tables_index', [], Response::HTTP_SEE_OTHER);
}
}

View File

@ -31,8 +31,8 @@ class Clients
/** /**
* @var Collection<int, Tables> * @var Collection<int, Tables>
*/ */
#[ORM\ManyToMany(targetEntity: Tables::class, inversedBy: 'Client')] #[ORM\ManyToMany(targetEntity: Tables::class, mappedBy: 'Clients')]
private Collection $table; private Collection $tables;
/** /**
* @var Collection<int, Commandes> * @var Collection<int, Commandes>
@ -42,7 +42,7 @@ class Clients
public function __construct() public function __construct()
{ {
$this->table = new ArrayCollection(); $this->tables = new ArrayCollection();
$this->commandes = new ArrayCollection(); $this->commandes = new ArrayCollection();
} }
@ -102,23 +102,23 @@ class Clients
/** /**
* @return Collection<int, Tables> * @return Collection<int, Tables>
*/ */
public function getTable(): Collection public function getTables(): Collection
{ {
return $this->table; return $this->tables;
} }
public function addTable(Tables $table): static public function addTable(Tables $tables): static
{ {
if (!$this->table->contains($table)) { if (!$this->tables->contains($tables)) {
$this->table->add($table); $this->tables->add($tables);
} }
return $this; return $this;
} }
public function removeTable(Tables $table): static public function removeTable(Tables $tables): static
{ {
$this->table->removeElement($table); $this->tables->removeElement($tables);
return $this; return $this;
} }

View File

@ -23,7 +23,7 @@ class Reservations
private ?int $Nb_de_prsn = null; private ?int $Nb_de_prsn = null;
#[ORM\ManyToOne(inversedBy: 'reservations')] #[ORM\ManyToOne(inversedBy: 'reservations')]
private ?Tables $Table = null; private ?Tables $tables = null;
/** /**
* @var Collection<int, Utilisateurs> * @var Collection<int, Utilisateurs>
@ -65,14 +65,14 @@ class Reservations
return $this; return $this;
} }
public function getTable(): ?Tables public function getTables(): ?Tables
{ {
return $this->Table; return $this->tables;
} }
public function setTable(?Tables $Table): static public function setTable(?Tables $tables): static
{ {
$this->Table = $Table; $this->tables = $tables;
return $this; return $this;
} }

View File

@ -17,7 +17,7 @@ class StatutTables
private ?string $Libellé = null; private ?string $Libellé = null;
#[ORM\ManyToOne(inversedBy: 'statutTables')] #[ORM\ManyToOne(inversedBy: 'statutTables')]
private ?Tables $Table = null; private ?Tables $tables = null;
public function getId(): ?int public function getId(): ?int
{ {
@ -36,14 +36,14 @@ class StatutTables
return $this; return $this;
} }
public function getTable(): ?Tables public function getTables(): ?Tables
{ {
return $this->Table; return $this->tables;
} }
public function setTable(?Tables $Table): static public function setTable(?Tables $tables): static
{ {
$this->Table = $Table; $this->tables = $tables;
return $this; return $this;
} }

View File

@ -18,25 +18,25 @@ class Tables
/** /**
* @var Collection<int, Clients> * @var Collection<int, Clients>
*/ */
#[ORM\ManyToMany(targetEntity: Clients::class, mappedBy: 'table')] #[ORM\ManyToMany(targetEntity: Clients::class, inversedBy: 'tables')]
private Collection $Clients; private Collection $Clients;
/** /**
* @var Collection<int, Reservations> * @var Collection<int, Reservations>
*/ */
#[ORM\OneToMany(targetEntity: Reservations::class, mappedBy: 'Table')] #[ORM\OneToMany(targetEntity: Reservations::class, mappedBy: 'tables')]
private Collection $reservations; private Collection $reservations;
/** /**
* @var Collection<int, StatutTables> * @var Collection<int, StatutTables>
*/ */
#[ORM\OneToMany(targetEntity: StatutTables::class, mappedBy: 'Table')] #[ORM\OneToMany(targetEntity: StatutTables::class, mappedBy: 'tables')]
private Collection $statutTables; private Collection $statutTables;
/** /**
* @var Collection<int, Utilisateurs> * @var Collection<int, Utilisateurs>
*/ */
#[ORM\ManyToMany(targetEntity: Utilisateurs::class, mappedBy: 'table')] #[ORM\ManyToMany(targetEntity: Utilisateurs::class, mappedBy: 'tables')]
private Collection $utilisateurs; private Collection $utilisateurs;
public function __construct() public function __construct()
@ -55,7 +55,7 @@ class Tables
/** /**
* @return Collection<int, Clients> * @return Collection<int, Clients>
*/ */
public function getClient(): Collection public function getClients(): Collection
{ {
return $this->Clients; return $this->Clients;
} }
@ -101,7 +101,7 @@ class Tables
{ {
if ($this->reservations->removeElement($reservation)) { if ($this->reservations->removeElement($reservation)) {
// set the owning side to null (unless already changed) // set the owning side to null (unless already changed)
if ($reservation->getTable() === $this) { if ($reservation->getTables() === $this) {
$reservation->setTable(null); $reservation->setTable(null);
} }
} }
@ -131,7 +131,7 @@ class Tables
{ {
if ($this->statutTables->removeElement($statutTable)) { if ($this->statutTables->removeElement($statutTable)) {
// set the owning side to null (unless already changed) // set the owning side to null (unless already changed)
if ($statutTable->getTable() === $this) { if ($statutTable->getTables() === $this) {
$statutTable->setTable(null); $statutTable->setTable(null);
} }
} }

View File

@ -42,12 +42,12 @@ class Utilisateurs implements UserInterface, PasswordAuthenticatedUserInterface
* @var Collection<int, Tables> * @var Collection<int, Tables>
*/ */
#[ORM\ManyToMany(targetEntity: Tables::class, inversedBy: 'utilisateurs')] #[ORM\ManyToMany(targetEntity: Tables::class, inversedBy: 'utilisateurs')]
private Collection $table; private Collection $tables;
public function __construct() public function __construct()
{ {
$this->Reservation = new ArrayCollection(); $this->Reservation = new ArrayCollection();
$this->table = new ArrayCollection(); $this->tables = new ArrayCollection();
} }
public function getId(): ?int public function getId(): ?int
@ -157,23 +157,23 @@ class Utilisateurs implements UserInterface, PasswordAuthenticatedUserInterface
/** /**
* @return Collection<int, Tables> * @return Collection<int, Tables>
*/ */
public function getTable(): Collection public function getTables(): Collection
{ {
return $this->table; return $this->tables;
} }
public function addTable(Tables $table): static public function addTable(Tables $tables): static
{ {
if (!$this->table->contains($table)) { if (!$this->tables->contains($tables)) {
$this->table->add($table); $this->tables->add($tables);
} }
return $this; return $this;
} }
public function removeTable(Tables $table): static public function removeTable(Tables $tables): static
{ {
$this->table->removeElement($table); $this->tables->removeElement($tables);
return $this; return $this;
} }

View File

@ -0,0 +1,40 @@
<?php
namespace App\Form;
use App\Entity\Reservations;
use App\Entity\Tables;
use App\Entity\Utilisateurs;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class ReservationsType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('DateHeure', null, [
'widget' => 'single_text',
])
->add('Nb_de_prsn')
->add('tables', EntityType::class, [
'class' => Tables::class,
'choice_label' => 'id',
])
->add('utilisateurs', EntityType::class, [
'class' => Utilisateurs::class,
'choice_label' => 'id',
'multiple' => true,
])
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => Reservations::class,
]);
}
}

View File

@ -0,0 +1,25 @@
<?php
namespace App\Form;
use App\Entity\StatutCommandes;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class StatutCommandesType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('Libelle')
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => StatutCommandes::class,
]);
}
}

View File

@ -0,0 +1,31 @@
<?php
namespace App\Form;
use App\Entity\StatutTables;
use App\Entity\Tables;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class StatutTablesType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('Libellé')
->add('tables', EntityType::class, [
'class' => Tables::class,
'choice_label' => 'id',
])
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => StatutTables::class,
]);
}
}

37
src/Form/TablesType.php Normal file
View File

@ -0,0 +1,37 @@
<?php
namespace App\Form;
use App\Entity\Clients;
use App\Entity\Tables;
use App\Entity\Utilisateurs;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class TablesType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('Clients', EntityType::class, [
'class' => Clients::class,
'choice_label' => 'id',
'multiple' => true,
])
->add('utilisateurs', EntityType::class, [
'class' => Utilisateurs::class,
'choice_label' => 'id',
'multiple' => true,
])
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => Tables::class,
]);
}
}

View File

@ -4,110 +4,31 @@
{% block body %} {% block body %}
<style> <style>
body {
width: 100%;
height: 100%;
}
/* Style pour chaque élément d'information de l'utilisateur */
.user-info-item {
display: flex;
padding: 10px 0;
border-bottom: 1px solid #e0e0e0;
}
/* Dernier élément sans bordure */
.user-info-item:last-child {
border-bottom: none;
}
/* Style pour le label de chaque information (Nom, Prénom, etc.) */
.user-info-label {
font-weight: bold;
color: #333;
width: 7%;
}
/* Style pour la valeur de chaque information (la donnée de l'utilisateur) */
.user-info-value {
color: #555;
text-align: left;
width: 65%;
word-wrap: break-word; /* Gère les débordements */
}
.password {
display: flex;
flex-direction: column;
width: 100%;
text-align: left;
}
/* Ajout d'un style pour rendre responsive */
@media (max-width: 600px) {
#InformationUser {
padding: 15px;
}
.user-info-item {
flex-direction: column;
padding: 8px 0;
}
.user-info-label, .user-info-value {
width: 100%;
}
}
</style> </style>
<form id="UpdateUser" action="{{ path('update-user', { 'id': app.user.id }) }}" method="post">
<div id="InformationUser">
<div class="user-info-item">
<span class="user-info-label">Nom :</span>
<span class="user-info-value">{{ app.user.nom }}</span>
</div>
<div class="user-info-item">
<span class="user-info-label">Prénom :</span>
<span class="user-info-value">{{ app.user.prenom }}</span>
</div>
<div class="user-info-item">
<span class="user-info-label">Email :</span>
<span class="user-info-value">{{ app.user.userIdentifier }}</span>
</div>
<div class="user-info-item">
<span class="user-info-label">Roles :</span>
<span class="user-info-value">{{ app.user.getRolesAsString() }}</span>
</div>
<p>Test</p> <div class="btn-update">
<button>Modifier</button>
{# {{ form_start(form) }}#} </div>
{# <div> #} </div>
{# {{ form_row(form.UserIdentifier) }}#} </form>
{# {{ form_row(form.Password) }}#}
{# {{ form_row(form.Nom) }}#}
{# {{ form_row(form.Prenom) }}#}
{# {{ form_row(form.Roles) }}#}
{# </div>#}
{# {{ form_end(form) }}#}
{# <form id="UpdateUser" action="{{ path('update-user', { 'id': app.user.id }) }}" method="post">#}
{# <div id="InformationUser">#}
{# <div class="user-info-item">#}
{# <span class="user-info-label">Nom :</span>#}
{# <span class="user-info-value">{{ app.user.nom }}</span>#}
{# <input type="text" id="nom" name="nom" value="{{ app.user.nom }}" class="user-info-input">#}
{# </div>#}
{# <div class="user-info-item">#}
{# <span class="user-info-label">Prénom :</span>#}
{# <span class="user-info-value">{{ app.user.prenom }}</span>#}
{# <input type="text" id="prenom" name="prenom" value="{{ app.user.prenom }}" class="user-info-input">#}
{# </div>#}
{# <div class="user-info-item">#}
{# <span class="user-info-label">Email :</span>#}
{# <span class="user-info-value">{{ app.user.userIdentifier }}</span>#}
{# <input type="text" id="email" name="email" value="{{ app.user.userIdentifier }}" class="user-info-input">#}
{# </div>#}
{# <div class="user-info-item">#}
{# <div id="passwordConfirmDiv" class="password-confirm-div">#}
{# <label for="confirm_password" class="user-info-label">Confirmer ou modifier le mot de passe :</label>#}
{# <input type="password" id="confirm_password" name="confirm_password" class="user-info-input" placeholder="Mot de passe">#}
{# </div>#}
{# </div>#}
{# <div class="user-info-item">#}
{# <span class="user-info-label">Roles :</span>#}
{# <span class="user-info-value">{{ app.user.getRolesAsString() }}</span>#}
{# <input type="checkbox" id="roles" name="roles" value="{{ app.user.getRolesAsString() }}" class="user-info-input" readonly>#}
{# </div>#}
{# <div class="btn">#}
{# <button type="submit" class="submit-button">Mettre à jour</button>#}
{# </div>#}
{# </div>#}
{# </form>#}
{% endblock %} {% endblock %}

View File

@ -10,22 +10,12 @@
{% endblock %} {% endblock %}
{% block stylesheets %} {% block stylesheets %}
<link rel="stylesheet" href="{{ asset('css/modal.css') }}"> <!-- Ajout du fichier CSS --> <link rel="stylesheet" href="{{ asset('css/Index.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/GestionUser.css') }}"> <!-- Ajout du fichier CSS -->
{% endblock %} {% endblock %}
{% block body %} {% block body %}
<style> <style>
#container_gestion_user {
background-color: white;
margin-left: 20%; /* Centrage vertical */
margin-top: 5%;
padding: 20px;
border: 1px solid black;
width: 75%; /* Largeur du contenu de la modal */
height: 100%; /* Hauteur du contenu de la modal */
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
display: none;
}
</style> </style>
<!-- Top Bar --> <!-- Top Bar -->

View File

@ -0,0 +1,20 @@
{% extends 'base.html.twig' %}
{% block title %}Hello PlatController!{% endblock %}
{% block body %}
<style>
.example-wrapper { margin: 1em auto; max-width: 800px; width: 95%; font: 18px/1.5 sans-serif; }
.example-wrapper code { background: #F5F5F5; padding: 2px 6px; }
</style>
<div class="example-wrapper">
<h1>Hello {{ controller_name }}! ✅</h1>
This friendly message is coming from:
<ul>
<li>Your controller at <code>/home/leroyv@stsio.lan/SLAM/FestinHegre/src/Controller/PlatController.php</code></li>
<li>Your template at <code>/home/leroyv@stsio.lan/SLAM/FestinHegre/templates/plat/index.html.twig</code></li>
</ul>
</div>
{% endblock %}

View File

@ -0,0 +1,4 @@
<form method="post" action="{{ path('app_reservations_delete', {'id': reservation.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ reservation.id) }}">
<button class="btn">Delete</button>
</form>

View File

@ -0,0 +1,4 @@
{{ form_start(form) }}
{{ form_widget(form) }}
<button class="btn">{{ button_label|default('Save') }}</button>
{{ form_end(form) }}

View File

@ -0,0 +1,13 @@
{% extends 'base.html.twig' %}
{% block title %}Edit Reservations{% endblock %}
{% block body %}
<h1>Edit Reservations</h1>
{{ include('reservations/_form.html.twig', {'button_label': 'Update'}) }}
<a href="{{ path('app_reservations_index') }}">back to list</a>
{{ include('reservations/_delete_form.html.twig') }}
{% endblock %}

View File

@ -0,0 +1,37 @@
{% extends 'base.html.twig' %}
{% block title %}Reservations index{% endblock %}
{% block body %}
<h1>Reservations index</h1>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>DateHeure</th>
<th>Nb_de_prsn</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for reservation in reservations %}
<tr>
<td>{{ reservation.id }}</td>
<td>{{ reservation.DateHeure ? reservation.DateHeure|date('Y-m-d H:i:s') : '' }}</td>
<td>{{ reservation.NbDePrsn }}</td>
<td>
<a href="{{ path('app_reservations_show', {'id': reservation.id}) }}">show</a>
<a href="{{ path('app_reservations_edit', {'id': reservation.id}) }}">edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="4">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_reservations_new') }}">Create new</a>
{% endblock %}

View File

@ -0,0 +1,11 @@
{% extends 'base.html.twig' %}
{% block title %}New Reservations{% endblock %}
{% block body %}
<h1>Create new Reservations</h1>
{{ include('reservations/_form.html.twig') }}
<a href="{{ path('app_reservations_index') }}">back to list</a>
{% endblock %}

View File

@ -0,0 +1,30 @@
{% extends 'base.html.twig' %}
{% block title %}Reservations{% endblock %}
{% block body %}
<h1>Reservations</h1>
<table class="table">
<tbody>
<tr>
<th>Id</th>
<td>{{ reservation.id }}</td>
</tr>
<tr>
<th>DateHeure</th>
<td>{{ reservation.DateHeure ? reservation.DateHeure|date('Y-m-d H:i:s') : '' }}</td>
</tr>
<tr>
<th>Nb_de_prsn</th>
<td>{{ reservation.NbDePrsn }}</td>
</tr>
</tbody>
</table>
<a href="{{ path('app_reservations_index') }}">back to list</a>
<a href="{{ path('app_reservations_edit', {'id': reservation.id}) }}">edit</a>
{{ include('reservations/_delete_form.html.twig') }}
{% endblock %}

View File

@ -0,0 +1,4 @@
<form method="post" action="{{ path('app_statut_commandes_delete', {'id': statut_commande.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ statut_commande.id) }}">
<button class="btn">Delete</button>
</form>

View File

@ -0,0 +1,4 @@
{{ form_start(form) }}
{{ form_widget(form) }}
<button class="btn">{{ button_label|default('Save') }}</button>
{{ form_end(form) }}

View File

@ -0,0 +1,13 @@
{% extends 'base.html.twig' %}
{% block title %}Edit StatutCommandes{% endblock %}
{% block body %}
<h1>Edit StatutCommandes</h1>
{{ include('statut_commandes/_form.html.twig', {'button_label': 'Update'}) }}
<a href="{{ path('app_statut_commandes_index') }}">back to list</a>
{{ include('statut_commandes/_delete_form.html.twig') }}
{% endblock %}

View File

@ -0,0 +1,35 @@
{% extends 'base.html.twig' %}
{% block title %}StatutCommandes index{% endblock %}
{% block body %}
<h1>StatutCommandes index</h1>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>Libelle</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for statut_commande in statut_commandes %}
<tr>
<td>{{ statut_commande.id }}</td>
<td>{{ statut_commande.Libelle }}</td>
<td>
<a href="{{ path('app_statut_commandes_show', {'id': statut_commande.id}) }}">show</a>
<a href="{{ path('app_statut_commandes_edit', {'id': statut_commande.id}) }}">edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="3">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_statut_commandes_new') }}">Create new</a>
{% endblock %}

View File

@ -0,0 +1,11 @@
{% extends 'base.html.twig' %}
{% block title %}New StatutCommandes{% endblock %}
{% block body %}
<h1>Create new StatutCommandes</h1>
{{ include('statut_commandes/_form.html.twig') }}
<a href="{{ path('app_statut_commandes_index') }}">back to list</a>
{% endblock %}

View File

@ -0,0 +1,26 @@
{% extends 'base.html.twig' %}
{% block title %}StatutCommandes{% endblock %}
{% block body %}
<h1>StatutCommandes</h1>
<table class="table">
<tbody>
<tr>
<th>Id</th>
<td>{{ statut_commande.id }}</td>
</tr>
<tr>
<th>Libelle</th>
<td>{{ statut_commande.Libelle }}</td>
</tr>
</tbody>
</table>
<a href="{{ path('app_statut_commandes_index') }}">back to list</a>
<a href="{{ path('app_statut_commandes_edit', {'id': statut_commande.id}) }}">edit</a>
{{ include('statut_commandes/_delete_form.html.twig') }}
{% endblock %}

View File

@ -0,0 +1,4 @@
<form method="post" action="{{ path('app_statut_tables_delete', {'id': statut_table.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ statut_table.id) }}">
<button class="btn">Delete</button>
</form>

View File

@ -0,0 +1,4 @@
{{ form_start(form) }}
{{ form_widget(form) }}
<button class="btn">{{ button_label|default('Save') }}</button>
{{ form_end(form) }}

View File

@ -0,0 +1,13 @@
{% extends 'base.html.twig' %}
{% block title %}Edit StatutTables{% endblock %}
{% block body %}
<h1>Edit StatutTables</h1>
{{ include('statut_tables/_form.html.twig', {'button_label': 'Update'}) }}
<a href="{{ path('app_statut_tables_index') }}">back to list</a>
{{ include('statut_tables/_delete_form.html.twig') }}
{% endblock %}

View File

@ -0,0 +1,35 @@
{% extends 'base.html.twig' %}
{% block title %}StatutTables index{% endblock %}
{% block body %}
<h1>StatutTables index</h1>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>Libellé</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for statut_table in statut_tables %}
<tr>
<td>{{ statut_table.id }}</td>
<td>{{ statut_table.Libellé }}</td>
<td>
<a href="{{ path('app_statut_tables_show', {'id': statut_table.id}) }}">show</a>
<a href="{{ path('app_statut_tables_edit', {'id': statut_table.id}) }}">edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="3">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_statut_tables_new') }}">Create new</a>
{% endblock %}

View File

@ -0,0 +1,11 @@
{% extends 'base.html.twig' %}
{% block title %}New StatutTables{% endblock %}
{% block body %}
<h1>Create new StatutTables</h1>
{{ include('statut_tables/_form.html.twig') }}
<a href="{{ path('app_statut_tables_index') }}">back to list</a>
{% endblock %}

View File

@ -0,0 +1,26 @@
{% extends 'base.html.twig' %}
{% block title %}StatutTables{% endblock %}
{% block body %}
<h1>StatutTables</h1>
<table class="table">
<tbody>
<tr>
<th>Id</th>
<td>{{ statut_table.id }}</td>
</tr>
<tr>
<th>Libellé</th>
<td>{{ statut_table.Libellé }}</td>
</tr>
</tbody>
</table>
<a href="{{ path('app_statut_tables_index') }}">back to list</a>
<a href="{{ path('app_statut_tables_edit', {'id': statut_table.id}) }}">edit</a>
{{ include('statut_tables/_delete_form.html.twig') }}
{% endblock %}

View File

@ -0,0 +1,4 @@
<form method="post" action="{{ path('app_tables_delete', {'id': table.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ table.id) }}">
<button class="btn">Delete</button>
</form>

View File

@ -0,0 +1,4 @@
{{ form_start(form) }}
{{ form_widget(form) }}
<button class="btn">{{ button_label|default('Save') }}</button>
{{ form_end(form) }}

View File

@ -0,0 +1,13 @@
{% extends 'base.html.twig' %}
{% block title %}Edit Tables{% endblock %}
{% block body %}
<h1>Edit Tables</h1>
{{ include('tables/_form.html.twig', {'button_label': 'Update'}) }}
<a href="{{ path('app_tables_index') }}">back to list</a>
{{ include('tables/_delete_form.html.twig') }}
{% endblock %}

View File

@ -0,0 +1,33 @@
{% extends 'base.html.twig' %}
{% block title %}Tables index{% endblock %}
{% block body %}
<h1>Tables index</h1>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for table in tables %}
<tr>
<td>{{ table.id }}</td>
<td>
<a href="{{ path('app_tables_show', {'id': table.id}) }}">show</a>
<a href="{{ path('app_tables_edit', {'id': table.id}) }}">edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="2">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_tables_new') }}">Create new</a>
{% endblock %}

View File

@ -0,0 +1,11 @@
{% extends 'base.html.twig' %}
{% block title %}New Tables{% endblock %}
{% block body %}
<h1>Create new Tables</h1>
{{ include('tables/_form.html.twig') }}
<a href="{{ path('app_tables_index') }}">back to list</a>
{% endblock %}

View File

@ -0,0 +1,22 @@
{% extends 'base.html.twig' %}
{% block title %}Tables{% endblock %}
{% block body %}
<h1>Tables</h1>
<table class="table">
<tbody>
<tr>
<th>Id</th>
<td>{{ table.id }}</td>
</tr>
</tbody>
</table>
<a href="{{ path('app_tables_index') }}">back to list</a>
<a href="{{ path('app_tables_edit', {'id': table.id}) }}">edit</a>
{{ include('tables/_delete_form.html.twig') }}
{% endblock %}