From b51a75285a4780ae003d932837d543c2741a7537 Mon Sep 17 00:00:00 2001 From: Joshua Date: Thu, 14 Nov 2024 17:48:57 +0100 Subject: [PATCH 01/19] Maj de la table : Tables Changement CSS --- public/css/GestionUser.css | 65 +++++++++++++ public/css/{modal.css => Index.css} | 0 src/Entity/Clients.php | 20 ++-- src/Entity/Reservations.php | 10 +- src/Entity/StatutTables.php | 10 +- src/Entity/Tables.php | 14 +-- src/Entity/Utilisateurs.php | 18 ++-- templates/gestion_user/index.html.twig | 125 +++++-------------------- templates/index/index.html.twig | 14 +-- 9 files changed, 126 insertions(+), 150 deletions(-) create mode 100644 public/css/GestionUser.css rename public/css/{modal.css => Index.css} (100%) diff --git a/public/css/GestionUser.css b/public/css/GestionUser.css new file mode 100644 index 0000000..a2cb857 --- /dev/null +++ b/public/css/GestionUser.css @@ -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%; + } +} + diff --git a/public/css/modal.css b/public/css/Index.css similarity index 100% rename from public/css/modal.css rename to public/css/Index.css diff --git a/src/Entity/Clients.php b/src/Entity/Clients.php index 35a78f3..3722d87 100644 --- a/src/Entity/Clients.php +++ b/src/Entity/Clients.php @@ -30,8 +30,8 @@ class Clients /** * @var Collection */ - #[ORM\ManyToMany(targetEntity: Tables::class, inversedBy: 'Client')] - private Collection $table; + #[ORM\ManyToMany(targetEntity: Tables::class, mappedBy: 'Clients')] + private Collection $tables; /** * @var Collection @@ -41,7 +41,7 @@ class Clients public function __construct() { - $this->table = new ArrayCollection(); + $this->tables = new ArrayCollection(); $this->commandes = new ArrayCollection(); } @@ -101,23 +101,23 @@ class Clients /** * @return Collection */ - 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)) { - $this->table->add($table); + if (!$this->tables->contains($tables)) { + $this->tables->add($tables); } return $this; } - public function removeTable(Tables $table): static + public function removeTable(Tables $tables): static { - $this->table->removeElement($table); + $this->tables->removeElement($tables); return $this; } diff --git a/src/Entity/Reservations.php b/src/Entity/Reservations.php index 8ad6096..757d358 100644 --- a/src/Entity/Reservations.php +++ b/src/Entity/Reservations.php @@ -23,7 +23,7 @@ class Reservations private ?int $Nb_de_prsn = null; #[ORM\ManyToOne(inversedBy: 'reservations')] - private ?Tables $Table = null; + private ?Tables $tables = null; /** * @var Collection @@ -65,14 +65,14 @@ class Reservations 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; } diff --git a/src/Entity/StatutTables.php b/src/Entity/StatutTables.php index f336a5a..5b500b9 100644 --- a/src/Entity/StatutTables.php +++ b/src/Entity/StatutTables.php @@ -17,7 +17,7 @@ class StatutTables private ?string $Libellé = null; #[ORM\ManyToOne(inversedBy: 'statutTables')] - private ?Tables $Table = null; + private ?Tables $tables = null; public function getId(): ?int { @@ -36,14 +36,14 @@ class StatutTables 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; } diff --git a/src/Entity/Tables.php b/src/Entity/Tables.php index 25d3763..1d1820a 100644 --- a/src/Entity/Tables.php +++ b/src/Entity/Tables.php @@ -18,25 +18,25 @@ class Tables /** * @var Collection */ - #[ORM\ManyToMany(targetEntity: Clients::class, mappedBy: 'table')] + #[ORM\ManyToMany(targetEntity: Clients::class, inversedBy: 'tables')] private Collection $Clients; /** * @var Collection */ - #[ORM\OneToMany(targetEntity: Reservations::class, mappedBy: 'Table')] + #[ORM\OneToMany(targetEntity: Reservations::class, mappedBy: 'tables')] private Collection $reservations; /** * @var Collection */ - #[ORM\OneToMany(targetEntity: StatutTables::class, mappedBy: 'Table')] + #[ORM\OneToMany(targetEntity: StatutTables::class, mappedBy: 'tables')] private Collection $statutTables; /** * @var Collection */ - #[ORM\ManyToMany(targetEntity: Utilisateurs::class, mappedBy: 'table')] + #[ORM\ManyToMany(targetEntity: Utilisateurs::class, mappedBy: 'tables')] private Collection $utilisateurs; public function __construct() @@ -55,7 +55,7 @@ class Tables /** * @return Collection */ - public function getClient(): Collection + public function getClients(): Collection { return $this->Clients; } @@ -101,7 +101,7 @@ class Tables { if ($this->reservations->removeElement($reservation)) { // set the owning side to null (unless already changed) - if ($reservation->getTable() === $this) { + if ($reservation->getTables() === $this) { $reservation->setTable(null); } } @@ -131,7 +131,7 @@ class Tables { if ($this->statutTables->removeElement($statutTable)) { // set the owning side to null (unless already changed) - if ($statutTable->getTable() === $this) { + if ($statutTable->getTables() === $this) { $statutTable->setTable(null); } } diff --git a/src/Entity/Utilisateurs.php b/src/Entity/Utilisateurs.php index c4af5ea..c9a6ead 100644 --- a/src/Entity/Utilisateurs.php +++ b/src/Entity/Utilisateurs.php @@ -42,12 +42,12 @@ class Utilisateurs implements UserInterface, PasswordAuthenticatedUserInterface * @var Collection */ #[ORM\ManyToMany(targetEntity: Tables::class, inversedBy: 'utilisateurs')] - private Collection $table; + private Collection $tables; public function __construct() { $this->Reservation = new ArrayCollection(); - $this->table = new ArrayCollection(); + $this->tables = new ArrayCollection(); } public function getId(): ?int @@ -157,23 +157,23 @@ class Utilisateurs implements UserInterface, PasswordAuthenticatedUserInterface /** * @return Collection */ - 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)) { - $this->table->add($table); + if (!$this->tables->contains($tables)) { + $this->tables->add($tables); } return $this; } - public function removeTable(Tables $table): static + public function removeTable(Tables $tables): static { - $this->table->removeElement($table); + $this->tables->removeElement($tables); return $this; } diff --git a/templates/gestion_user/index.html.twig b/templates/gestion_user/index.html.twig index 21ac47f..f82de26 100644 --- a/templates/gestion_user/index.html.twig +++ b/templates/gestion_user/index.html.twig @@ -4,110 +4,31 @@ {% block body %} +
+
+ + + + -

Test

- -{# {{ form_start(form) }}#} -{#
#} -{# {{ form_row(form.UserIdentifier) }}#} -{# {{ form_row(form.Password) }}#} -{# {{ form_row(form.Nom) }}#} -{# {{ form_row(form.Prenom) }}#} -{# {{ form_row(form.Roles) }}#} -{#
#} -{# {{ form_end(form) }}#} - -{# #} -{#
#} -{# #} -{# #} -{# #} -{# #} -{# #} - -{#
#} -{# #} -{#
#} -{#
#} -{# #} +
+ +
+
+ {% endblock %} diff --git a/templates/index/index.html.twig b/templates/index/index.html.twig index f363b1d..93d945c 100644 --- a/templates/index/index.html.twig +++ b/templates/index/index.html.twig @@ -10,22 +10,12 @@ {% endblock %} {% block stylesheets %} - + + {% endblock %} {% block body %} From 61adedb824f3a796cf0c270961b1e5955518e01b Mon Sep 17 00:00:00 2001 From: leroyv Date: Thu, 21 Nov 2024 14:28:29 +0100 Subject: [PATCH 02/19] Controller pour Reservations StatutCommandes,StatutTables et Tables avec le form et templates. --- src/Controller/PlatController.php | 78 ++++++++++++++++++ src/Controller/ReservationsController.php | 81 +++++++++++++++++++ src/Controller/StatutCommandesController.php | 81 +++++++++++++++++++ src/Controller/StatutTablesController.php | 81 +++++++++++++++++++ src/Controller/TablesController.php | 81 +++++++++++++++++++ src/Form/PlatType.php | 24 ++++++ src/Form/ReservationsType.php | 40 +++++++++ src/Form/StatutCommandesType.php | 25 ++++++ src/Form/StatutTablesType.php | 31 +++++++ src/Form/TablesType.php | 37 +++++++++ templates/plat/index.html.twig | 20 +++++ templates/reservations/_delete_form.html.twig | 4 + templates/reservations/_form.html.twig | 4 + templates/reservations/edit.html.twig | 13 +++ templates/reservations/index.html.twig | 37 +++++++++ templates/reservations/new.html.twig | 11 +++ templates/reservations/show.html.twig | 30 +++++++ .../statut_commandes/_delete_form.html.twig | 4 + templates/statut_commandes/_form.html.twig | 4 + templates/statut_commandes/edit.html.twig | 13 +++ templates/statut_commandes/index.html.twig | 35 ++++++++ templates/statut_commandes/new.html.twig | 11 +++ templates/statut_commandes/show.html.twig | 26 ++++++ .../statut_tables/_delete_form.html.twig | 4 + templates/statut_tables/_form.html.twig | 4 + templates/statut_tables/edit.html.twig | 13 +++ templates/statut_tables/index.html.twig | 35 ++++++++ templates/statut_tables/new.html.twig | 11 +++ templates/statut_tables/show.html.twig | 26 ++++++ templates/tables/_delete_form.html.twig | 4 + templates/tables/_form.html.twig | 4 + templates/tables/edit.html.twig | 13 +++ templates/tables/index.html.twig | 33 ++++++++ templates/tables/new.html.twig | 11 +++ templates/tables/show.html.twig | 22 +++++ 35 files changed, 951 insertions(+) create mode 100644 src/Controller/PlatController.php create mode 100644 src/Controller/ReservationsController.php create mode 100644 src/Controller/StatutCommandesController.php create mode 100644 src/Controller/StatutTablesController.php create mode 100644 src/Controller/TablesController.php create mode 100644 src/Form/PlatType.php create mode 100644 src/Form/ReservationsType.php create mode 100644 src/Form/StatutCommandesType.php create mode 100644 src/Form/StatutTablesType.php create mode 100644 src/Form/TablesType.php create mode 100644 templates/plat/index.html.twig create mode 100644 templates/reservations/_delete_form.html.twig create mode 100644 templates/reservations/_form.html.twig create mode 100644 templates/reservations/edit.html.twig create mode 100644 templates/reservations/index.html.twig create mode 100644 templates/reservations/new.html.twig create mode 100644 templates/reservations/show.html.twig create mode 100644 templates/statut_commandes/_delete_form.html.twig create mode 100644 templates/statut_commandes/_form.html.twig create mode 100644 templates/statut_commandes/edit.html.twig create mode 100644 templates/statut_commandes/index.html.twig create mode 100644 templates/statut_commandes/new.html.twig create mode 100644 templates/statut_commandes/show.html.twig create mode 100644 templates/statut_tables/_delete_form.html.twig create mode 100644 templates/statut_tables/_form.html.twig create mode 100644 templates/statut_tables/edit.html.twig create mode 100644 templates/statut_tables/index.html.twig create mode 100644 templates/statut_tables/new.html.twig create mode 100644 templates/statut_tables/show.html.twig create mode 100644 templates/tables/_delete_form.html.twig create mode 100644 templates/tables/_form.html.twig create mode 100644 templates/tables/edit.html.twig create mode 100644 templates/tables/index.html.twig create mode 100644 templates/tables/new.html.twig create mode 100644 templates/tables/show.html.twig diff --git a/src/Controller/PlatController.php b/src/Controller/PlatController.php new file mode 100644 index 0000000..d139b88 --- /dev/null +++ b/src/Controller/PlatController.php @@ -0,0 +1,78 @@ +createForm(PlatType::class, $plat); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $this->entityManager->persist($plat); + $this->entityManager->flush(); + } + + return $this->render('plat/add.html.twig', [ + 'formAdd' => $form, + ]); + } + + #[Route('/list', name: '_list')] + public function list(): Response + { + $plat = $this->platsRepository->findAll(); + return $this->render('plat/list.html.twig', [ + 'plat' => $plat, + ]); + } + + #[Route('/update/{id}', name: '_update')] + public function update(int $id, Request $request): Response + { + $plat = $this->platsRepository->find($id); + $form = $this->createForm(PlatType::class, $plat); + $form->handleRequest($request); + + if($form->isSubmitted() && $form->isValid()) + { + $this->entityManager->persist($plat); + $this->entityManager->flush(); + } + + return $this->render('plat/add.html.twig', [ + 'formAdd' => $form, + ]); + } + + #[Route('/delete/{id}', name: '_delete')] + public function delete(int $id): Response + { + $statutCommandes = $this->platsRepository->find($id); + $this->entityManager->remove($statutCommandes); + $this->entityManager->flush(); + + return $this->redirectToRoute('app_plat_list'); + } +} diff --git a/src/Controller/ReservationsController.php b/src/Controller/ReservationsController.php new file mode 100644 index 0000000..3098b4c --- /dev/null +++ b/src/Controller/ReservationsController.php @@ -0,0 +1,81 @@ +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); + } +} diff --git a/src/Controller/StatutCommandesController.php b/src/Controller/StatutCommandesController.php new file mode 100644 index 0000000..347914c --- /dev/null +++ b/src/Controller/StatutCommandesController.php @@ -0,0 +1,81 @@ +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); + } +} diff --git a/src/Controller/StatutTablesController.php b/src/Controller/StatutTablesController.php new file mode 100644 index 0000000..ab9f2a6 --- /dev/null +++ b/src/Controller/StatutTablesController.php @@ -0,0 +1,81 @@ +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); + } +} diff --git a/src/Controller/TablesController.php b/src/Controller/TablesController.php new file mode 100644 index 0000000..cb2e641 --- /dev/null +++ b/src/Controller/TablesController.php @@ -0,0 +1,81 @@ +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); + } +} diff --git a/src/Form/PlatType.php b/src/Form/PlatType.php new file mode 100644 index 0000000..3e3981c --- /dev/null +++ b/src/Form/PlatType.php @@ -0,0 +1,24 @@ +add('field_name') + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + // Configure your form options here + ]); + } +} diff --git a/src/Form/ReservationsType.php b/src/Form/ReservationsType.php new file mode 100644 index 0000000..8a59b2b --- /dev/null +++ b/src/Form/ReservationsType.php @@ -0,0 +1,40 @@ +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, + ]); + } +} diff --git a/src/Form/StatutCommandesType.php b/src/Form/StatutCommandesType.php new file mode 100644 index 0000000..695fee2 --- /dev/null +++ b/src/Form/StatutCommandesType.php @@ -0,0 +1,25 @@ +add('Libelle') + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => StatutCommandes::class, + ]); + } +} diff --git a/src/Form/StatutTablesType.php b/src/Form/StatutTablesType.php new file mode 100644 index 0000000..ff6c013 --- /dev/null +++ b/src/Form/StatutTablesType.php @@ -0,0 +1,31 @@ +add('Libellé') + ->add('tables', EntityType::class, [ + 'class' => Tables::class, + 'choice_label' => 'id', + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => StatutTables::class, + ]); + } +} diff --git a/src/Form/TablesType.php b/src/Form/TablesType.php new file mode 100644 index 0000000..ff62602 --- /dev/null +++ b/src/Form/TablesType.php @@ -0,0 +1,37 @@ +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, + ]); + } +} diff --git a/templates/plat/index.html.twig b/templates/plat/index.html.twig new file mode 100644 index 0000000..e2d1ec7 --- /dev/null +++ b/templates/plat/index.html.twig @@ -0,0 +1,20 @@ +{% extends 'base.html.twig' %} + +{% block title %}Hello PlatController!{% endblock %} + +{% block body %} + + +
+

Hello {{ controller_name }}! ✅

+ + This friendly message is coming from: +
    +
  • Your controller at /home/leroyv@stsio.lan/SLAM/FestinHegre/src/Controller/PlatController.php
  • +
  • Your template at /home/leroyv@stsio.lan/SLAM/FestinHegre/templates/plat/index.html.twig
  • +
+
+{% endblock %} diff --git a/templates/reservations/_delete_form.html.twig b/templates/reservations/_delete_form.html.twig new file mode 100644 index 0000000..47202e3 --- /dev/null +++ b/templates/reservations/_delete_form.html.twig @@ -0,0 +1,4 @@ +
+ + +
diff --git a/templates/reservations/_form.html.twig b/templates/reservations/_form.html.twig new file mode 100644 index 0000000..bf20b98 --- /dev/null +++ b/templates/reservations/_form.html.twig @@ -0,0 +1,4 @@ +{{ form_start(form) }} + {{ form_widget(form) }} + +{{ form_end(form) }} diff --git a/templates/reservations/edit.html.twig b/templates/reservations/edit.html.twig new file mode 100644 index 0000000..6d6ca47 --- /dev/null +++ b/templates/reservations/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit Reservations{% endblock %} + +{% block body %} +

Edit Reservations

+ + {{ include('reservations/_form.html.twig', {'button_label': 'Update'}) }} + + back to list + + {{ include('reservations/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/reservations/index.html.twig b/templates/reservations/index.html.twig new file mode 100644 index 0000000..573e019 --- /dev/null +++ b/templates/reservations/index.html.twig @@ -0,0 +1,37 @@ +{% extends 'base.html.twig' %} + +{% block title %}Reservations index{% endblock %} + +{% block body %} +

Reservations index

+ + + + + + + + + + + + {% for reservation in reservations %} + + + + + + + {% else %} + + + + {% endfor %} + +
IdDateHeureNb_de_prsnactions
{{ reservation.id }}{{ reservation.DateHeure ? reservation.DateHeure|date('Y-m-d H:i:s') : '' }}{{ reservation.NbDePrsn }} + show + edit +
no records found
+ + Create new +{% endblock %} diff --git a/templates/reservations/new.html.twig b/templates/reservations/new.html.twig new file mode 100644 index 0000000..c7c1981 --- /dev/null +++ b/templates/reservations/new.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}New Reservations{% endblock %} + +{% block body %} +

Create new Reservations

+ + {{ include('reservations/_form.html.twig') }} + + back to list +{% endblock %} diff --git a/templates/reservations/show.html.twig b/templates/reservations/show.html.twig new file mode 100644 index 0000000..1e99f32 --- /dev/null +++ b/templates/reservations/show.html.twig @@ -0,0 +1,30 @@ +{% extends 'base.html.twig' %} + +{% block title %}Reservations{% endblock %} + +{% block body %} +

Reservations

+ + + + + + + + + + + + + + + + +
Id{{ reservation.id }}
DateHeure{{ reservation.DateHeure ? reservation.DateHeure|date('Y-m-d H:i:s') : '' }}
Nb_de_prsn{{ reservation.NbDePrsn }}
+ + back to list + + edit + + {{ include('reservations/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/statut_commandes/_delete_form.html.twig b/templates/statut_commandes/_delete_form.html.twig new file mode 100644 index 0000000..454d917 --- /dev/null +++ b/templates/statut_commandes/_delete_form.html.twig @@ -0,0 +1,4 @@ +
+ + +
diff --git a/templates/statut_commandes/_form.html.twig b/templates/statut_commandes/_form.html.twig new file mode 100644 index 0000000..bf20b98 --- /dev/null +++ b/templates/statut_commandes/_form.html.twig @@ -0,0 +1,4 @@ +{{ form_start(form) }} + {{ form_widget(form) }} + +{{ form_end(form) }} diff --git a/templates/statut_commandes/edit.html.twig b/templates/statut_commandes/edit.html.twig new file mode 100644 index 0000000..d9c145b --- /dev/null +++ b/templates/statut_commandes/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit StatutCommandes{% endblock %} + +{% block body %} +

Edit StatutCommandes

+ + {{ include('statut_commandes/_form.html.twig', {'button_label': 'Update'}) }} + + back to list + + {{ include('statut_commandes/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/statut_commandes/index.html.twig b/templates/statut_commandes/index.html.twig new file mode 100644 index 0000000..31d2a17 --- /dev/null +++ b/templates/statut_commandes/index.html.twig @@ -0,0 +1,35 @@ +{% extends 'base.html.twig' %} + +{% block title %}StatutCommandes index{% endblock %} + +{% block body %} +

StatutCommandes index

+ + + + + + + + + + + {% for statut_commande in statut_commandes %} + + + + + + {% else %} + + + + {% endfor %} + +
IdLibelleactions
{{ statut_commande.id }}{{ statut_commande.Libelle }} + show + edit +
no records found
+ + Create new +{% endblock %} diff --git a/templates/statut_commandes/new.html.twig b/templates/statut_commandes/new.html.twig new file mode 100644 index 0000000..ff46e9a --- /dev/null +++ b/templates/statut_commandes/new.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}New StatutCommandes{% endblock %} + +{% block body %} +

Create new StatutCommandes

+ + {{ include('statut_commandes/_form.html.twig') }} + + back to list +{% endblock %} diff --git a/templates/statut_commandes/show.html.twig b/templates/statut_commandes/show.html.twig new file mode 100644 index 0000000..e42d6a3 --- /dev/null +++ b/templates/statut_commandes/show.html.twig @@ -0,0 +1,26 @@ +{% extends 'base.html.twig' %} + +{% block title %}StatutCommandes{% endblock %} + +{% block body %} +

StatutCommandes

+ + + + + + + + + + + + +
Id{{ statut_commande.id }}
Libelle{{ statut_commande.Libelle }}
+ + back to list + + edit + + {{ include('statut_commandes/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/statut_tables/_delete_form.html.twig b/templates/statut_tables/_delete_form.html.twig new file mode 100644 index 0000000..b87f5e4 --- /dev/null +++ b/templates/statut_tables/_delete_form.html.twig @@ -0,0 +1,4 @@ +
+ + +
diff --git a/templates/statut_tables/_form.html.twig b/templates/statut_tables/_form.html.twig new file mode 100644 index 0000000..bf20b98 --- /dev/null +++ b/templates/statut_tables/_form.html.twig @@ -0,0 +1,4 @@ +{{ form_start(form) }} + {{ form_widget(form) }} + +{{ form_end(form) }} diff --git a/templates/statut_tables/edit.html.twig b/templates/statut_tables/edit.html.twig new file mode 100644 index 0000000..b478d3a --- /dev/null +++ b/templates/statut_tables/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit StatutTables{% endblock %} + +{% block body %} +

Edit StatutTables

+ + {{ include('statut_tables/_form.html.twig', {'button_label': 'Update'}) }} + + back to list + + {{ include('statut_tables/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/statut_tables/index.html.twig b/templates/statut_tables/index.html.twig new file mode 100644 index 0000000..b721a5a --- /dev/null +++ b/templates/statut_tables/index.html.twig @@ -0,0 +1,35 @@ +{% extends 'base.html.twig' %} + +{% block title %}StatutTables index{% endblock %} + +{% block body %} +

StatutTables index

+ + + + + + + + + + + {% for statut_table in statut_tables %} + + + + + + {% else %} + + + + {% endfor %} + +
IdLibelléactions
{{ statut_table.id }}{{ statut_table.Libellé }} + show + edit +
no records found
+ + Create new +{% endblock %} diff --git a/templates/statut_tables/new.html.twig b/templates/statut_tables/new.html.twig new file mode 100644 index 0000000..c2a3a60 --- /dev/null +++ b/templates/statut_tables/new.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}New StatutTables{% endblock %} + +{% block body %} +

Create new StatutTables

+ + {{ include('statut_tables/_form.html.twig') }} + + back to list +{% endblock %} diff --git a/templates/statut_tables/show.html.twig b/templates/statut_tables/show.html.twig new file mode 100644 index 0000000..2b395af --- /dev/null +++ b/templates/statut_tables/show.html.twig @@ -0,0 +1,26 @@ +{% extends 'base.html.twig' %} + +{% block title %}StatutTables{% endblock %} + +{% block body %} +

StatutTables

+ + + + + + + + + + + + +
Id{{ statut_table.id }}
Libellé{{ statut_table.Libellé }}
+ + back to list + + edit + + {{ include('statut_tables/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/tables/_delete_form.html.twig b/templates/tables/_delete_form.html.twig new file mode 100644 index 0000000..dad5b99 --- /dev/null +++ b/templates/tables/_delete_form.html.twig @@ -0,0 +1,4 @@ +
+ + +
diff --git a/templates/tables/_form.html.twig b/templates/tables/_form.html.twig new file mode 100644 index 0000000..bf20b98 --- /dev/null +++ b/templates/tables/_form.html.twig @@ -0,0 +1,4 @@ +{{ form_start(form) }} + {{ form_widget(form) }} + +{{ form_end(form) }} diff --git a/templates/tables/edit.html.twig b/templates/tables/edit.html.twig new file mode 100644 index 0000000..a0a1a92 --- /dev/null +++ b/templates/tables/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit Tables{% endblock %} + +{% block body %} +

Edit Tables

+ + {{ include('tables/_form.html.twig', {'button_label': 'Update'}) }} + + back to list + + {{ include('tables/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/tables/index.html.twig b/templates/tables/index.html.twig new file mode 100644 index 0000000..979d669 --- /dev/null +++ b/templates/tables/index.html.twig @@ -0,0 +1,33 @@ +{% extends 'base.html.twig' %} + +{% block title %}Tables index{% endblock %} + +{% block body %} +

Tables index

+ + + + + + + + + + {% for table in tables %} + + + + + {% else %} + + + + {% endfor %} + +
Idactions
{{ table.id }} + show + edit +
no records found
+ + Create new +{% endblock %} diff --git a/templates/tables/new.html.twig b/templates/tables/new.html.twig new file mode 100644 index 0000000..f25965a --- /dev/null +++ b/templates/tables/new.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}New Tables{% endblock %} + +{% block body %} +

Create new Tables

+ + {{ include('tables/_form.html.twig') }} + + back to list +{% endblock %} diff --git a/templates/tables/show.html.twig b/templates/tables/show.html.twig new file mode 100644 index 0000000..dfe40f5 --- /dev/null +++ b/templates/tables/show.html.twig @@ -0,0 +1,22 @@ +{% extends 'base.html.twig' %} + +{% block title %}Tables{% endblock %} + +{% block body %} +

Tables

+ + + + + + + + +
Id{{ table.id }}
+ + back to list + + edit + + {{ include('tables/_delete_form.html.twig') }} +{% endblock %} From 41dbddb1f7fb24127877932463e14230591e1d7e Mon Sep 17 00:00:00 2001 From: leroyv Date: Thu, 21 Nov 2024 14:30:26 +0100 Subject: [PATCH 03/19] Controller pour Reservations StatutCommandes,StatutTables et Tables avec le form et templates. --- src/Controller/PlatController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Controller/PlatController.php b/src/Controller/PlatController.php index d139b88..21bc50a 100644 --- a/src/Controller/PlatController.php +++ b/src/Controller/PlatController.php @@ -4,7 +4,7 @@ namespace App\Controller; use App\Entity\Plats; use App\Form\PlatType; -use App\Form\StatutCommandeType; +use App\Form\StatutCommandesType; use App\Repository\PlatsRepository; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Response; From 3f4507958c12a3dc011dcd28e40a11dc64c9171b Mon Sep 17 00:00:00 2001 From: leroyv Date: Thu, 21 Nov 2024 14:58:12 +0100 Subject: [PATCH 04/19] Controller pour Plats avec le form et templates. --- src/Controller/CuisinierController.php | 46 --------------- src/Controller/PlatController.php | 78 ------------------------- src/Controller/PlatsController.php | 81 ++++++++++++++++++++++++++ src/Form/PlatType.php | 24 -------- src/Form/PlatsType.php | 42 +++++++++++++ templates/plats/_delete_form.html.twig | 4 ++ templates/plats/_form.html.twig | 4 ++ templates/plats/edit.html.twig | 13 +++++ templates/plats/index.html.twig | 45 ++++++++++++++ templates/plats/new.html.twig | 11 ++++ templates/plats/show.html.twig | 46 +++++++++++++++ 11 files changed, 246 insertions(+), 148 deletions(-) delete mode 100644 src/Controller/CuisinierController.php delete mode 100644 src/Controller/PlatController.php create mode 100644 src/Controller/PlatsController.php delete mode 100644 src/Form/PlatType.php create mode 100644 src/Form/PlatsType.php create mode 100644 templates/plats/_delete_form.html.twig create mode 100644 templates/plats/_form.html.twig create mode 100644 templates/plats/edit.html.twig create mode 100644 templates/plats/index.html.twig create mode 100644 templates/plats/new.html.twig create mode 100644 templates/plats/show.html.twig diff --git a/src/Controller/CuisinierController.php b/src/Controller/CuisinierController.php deleted file mode 100644 index c2097ea..0000000 --- a/src/Controller/CuisinierController.php +++ /dev/null @@ -1,46 +0,0 @@ -createForm(CuisinierType::class, $cuisinier); - - $form->handleRequest($request); - if ($form->isSubmitted() && $form->isValid()) { - $entityManager->persist($cuisinier); - $entityManager->flush(); - - $this->addFlash('success', 'Cuisinier ajouté avec succès !'); - return $this->redirectToRoute('ajouter_cuisinier'); - } - - return $this->render('cuisinier/ajouter.html.twig', [ - 'form' => $form->createView(), - ]); - } - - #[Route('/cuisinier/supprimer/{id}', name: 'supprimer_cuisinier', methods: ['POST'])] - public function supprimer(int $id, EntityManagerInterface $entityManager): Response - { - $cuisinier = $entityManager->getRepository(Cuisinier::class)->find($id); - - if (!$cuisinier) { - throw $this->createNotFoundException('Ce cuisinier n\'existe pas'); - } - - $entityManager->remove($cuisinier); - $entityManager->flush(); - - $this->addFlash('success', 'Cuisinier supprimé avec succès !'); - return $this->redirectToRoute('ajouter_cuisinier'); - } -} \ No newline at end of file diff --git a/src/Controller/PlatController.php b/src/Controller/PlatController.php deleted file mode 100644 index 21bc50a..0000000 --- a/src/Controller/PlatController.php +++ /dev/null @@ -1,78 +0,0 @@ -createForm(PlatType::class, $plat); - $form->handleRequest($request); - - if ($form->isSubmitted() && $form->isValid()) { - $this->entityManager->persist($plat); - $this->entityManager->flush(); - } - - return $this->render('plat/add.html.twig', [ - 'formAdd' => $form, - ]); - } - - #[Route('/list', name: '_list')] - public function list(): Response - { - $plat = $this->platsRepository->findAll(); - return $this->render('plat/list.html.twig', [ - 'plat' => $plat, - ]); - } - - #[Route('/update/{id}', name: '_update')] - public function update(int $id, Request $request): Response - { - $plat = $this->platsRepository->find($id); - $form = $this->createForm(PlatType::class, $plat); - $form->handleRequest($request); - - if($form->isSubmitted() && $form->isValid()) - { - $this->entityManager->persist($plat); - $this->entityManager->flush(); - } - - return $this->render('plat/add.html.twig', [ - 'formAdd' => $form, - ]); - } - - #[Route('/delete/{id}', name: '_delete')] - public function delete(int $id): Response - { - $statutCommandes = $this->platsRepository->find($id); - $this->entityManager->remove($statutCommandes); - $this->entityManager->flush(); - - return $this->redirectToRoute('app_plat_list'); - } -} diff --git a/src/Controller/PlatsController.php b/src/Controller/PlatsController.php new file mode 100644 index 0000000..e9c034d --- /dev/null +++ b/src/Controller/PlatsController.php @@ -0,0 +1,81 @@ +render('plats/index.html.twig', [ + 'plats' => $platsRepository->findAll(), + ]); + } + + #[Route('/new', name: 'app_plats_new', methods: ['GET', 'POST'])] + public function new(Request $request, EntityManagerInterface $entityManager): Response + { + $plat = new Plats(); + $form = $this->createForm(PlatsType::class, $plat); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->persist($plat); + $entityManager->flush(); + + return $this->redirectToRoute('app_plats_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('plats/new.html.twig', [ + 'plat' => $plat, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_plats_show', methods: ['GET'])] + public function show(Plats $plat): Response + { + return $this->render('plats/show.html.twig', [ + 'plat' => $plat, + ]); + } + + #[Route('/{id}/edit', name: 'app_plats_edit', methods: ['GET', 'POST'])] + public function edit(Request $request, Plats $plat, EntityManagerInterface $entityManager): Response + { + $form = $this->createForm(PlatsType::class, $plat); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->flush(); + + return $this->redirectToRoute('app_plats_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('plats/edit.html.twig', [ + 'plat' => $plat, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_plats_delete', methods: ['POST'])] + public function delete(Request $request, Plats $plat, EntityManagerInterface $entityManager): Response + { + if ($this->isCsrfTokenValid('delete'.$plat->getId(), $request->getPayload()->getString('_token'))) { + $entityManager->remove($plat); + $entityManager->flush(); + } + + return $this->redirectToRoute('app_plats_index', [], Response::HTTP_SEE_OTHER); + } +} diff --git a/src/Form/PlatType.php b/src/Form/PlatType.php deleted file mode 100644 index 3e3981c..0000000 --- a/src/Form/PlatType.php +++ /dev/null @@ -1,24 +0,0 @@ -add('field_name') - ; - } - - public function configureOptions(OptionsResolver $resolver): void - { - $resolver->setDefaults([ - // Configure your form options here - ]); - } -} diff --git a/src/Form/PlatsType.php b/src/Form/PlatsType.php new file mode 100644 index 0000000..5946a7d --- /dev/null +++ b/src/Form/PlatsType.php @@ -0,0 +1,42 @@ +add('Nom') + ->add('Description') + ->add('Prix') + ->add('Categorie') + ->add('Statut') + ->add('Nb_de_commande') + ->add('Commande', EntityType::class, [ + 'class' => Commandes::class, + 'choice_label' => 'id', + 'multiple' => true, + ]) + ->add('Reduction', EntityType::class, [ + 'class' => Reductions::class, + 'choice_label' => 'id', + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Plats::class, + ]); + } +} diff --git a/templates/plats/_delete_form.html.twig b/templates/plats/_delete_form.html.twig new file mode 100644 index 0000000..bc89faf --- /dev/null +++ b/templates/plats/_delete_form.html.twig @@ -0,0 +1,4 @@ +
+ + +
diff --git a/templates/plats/_form.html.twig b/templates/plats/_form.html.twig new file mode 100644 index 0000000..bf20b98 --- /dev/null +++ b/templates/plats/_form.html.twig @@ -0,0 +1,4 @@ +{{ form_start(form) }} + {{ form_widget(form) }} + +{{ form_end(form) }} diff --git a/templates/plats/edit.html.twig b/templates/plats/edit.html.twig new file mode 100644 index 0000000..14afd7b --- /dev/null +++ b/templates/plats/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit Plats{% endblock %} + +{% block body %} +

Edit Plats

+ + {{ include('plats/_form.html.twig', {'button_label': 'Update'}) }} + + back to list + + {{ include('plats/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/plats/index.html.twig b/templates/plats/index.html.twig new file mode 100644 index 0000000..cb94e30 --- /dev/null +++ b/templates/plats/index.html.twig @@ -0,0 +1,45 @@ +{% extends 'base.html.twig' %} + +{% block title %}Plats index{% endblock %} + +{% block body %} +

Plats index

+ + + + + + + + + + + + + + + + {% for plat in plats %} + + + + + + + + + + + {% else %} + + + + {% endfor %} + +
IdNomDescriptionPrixCategorieStatutNb_de_commandeactions
{{ plat.id }}{{ plat.Nom }}{{ plat.Description }}{{ plat.Prix }}{{ plat.Categorie }}{{ plat.Statut ? 'Yes' : 'No' }}{{ plat.NbDeCommande }} + show + edit +
no records found
+ + Create new +{% endblock %} diff --git a/templates/plats/new.html.twig b/templates/plats/new.html.twig new file mode 100644 index 0000000..a59e66b --- /dev/null +++ b/templates/plats/new.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}New Plats{% endblock %} + +{% block body %} +

Create new Plats

+ + {{ include('plats/_form.html.twig') }} + + back to list +{% endblock %} diff --git a/templates/plats/show.html.twig b/templates/plats/show.html.twig new file mode 100644 index 0000000..41fa96e --- /dev/null +++ b/templates/plats/show.html.twig @@ -0,0 +1,46 @@ +{% extends 'base.html.twig' %} + +{% block title %}Plats{% endblock %} + +{% block body %} +

Plats

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Id{{ plat.id }}
Nom{{ plat.Nom }}
Description{{ plat.Description }}
Prix{{ plat.Prix }}
Categorie{{ plat.Categorie }}
Statut{{ plat.Statut ? 'Yes' : 'No' }}
Nb_de_commande{{ plat.NbDeCommande }}
+ + back to list + + edit + + {{ include('plats/_delete_form.html.twig') }} +{% endblock %} From 825cdab07b6206840a41baf4cd55d9e3640296cd Mon Sep 17 00:00:00 2001 From: Joshua Date: Thu, 14 Nov 2024 17:48:57 +0100 Subject: [PATCH 05/19] Maj de la table : Tables Changement CSS --- public/css/GestionUser.css | 65 +++++++++++++++++++++++++++++ public/css/{modal.css => Index.css} | 0 src/Entity/Clients.php | 20 ++++----- src/Entity/Reservations.php | 10 ++--- src/Entity/StatutTables.php | 10 ++--- src/Entity/Tables.php | 14 +++---- src/Entity/Utilisateurs.php | 18 ++++---- 7 files changed, 101 insertions(+), 36 deletions(-) create mode 100644 public/css/GestionUser.css rename public/css/{modal.css => Index.css} (100%) diff --git a/public/css/GestionUser.css b/public/css/GestionUser.css new file mode 100644 index 0000000..a2cb857 --- /dev/null +++ b/public/css/GestionUser.css @@ -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%; + } +} + diff --git a/public/css/modal.css b/public/css/Index.css similarity index 100% rename from public/css/modal.css rename to public/css/Index.css diff --git a/src/Entity/Clients.php b/src/Entity/Clients.php index 35a78f3..3722d87 100644 --- a/src/Entity/Clients.php +++ b/src/Entity/Clients.php @@ -30,8 +30,8 @@ class Clients /** * @var Collection */ - #[ORM\ManyToMany(targetEntity: Tables::class, inversedBy: 'Client')] - private Collection $table; + #[ORM\ManyToMany(targetEntity: Tables::class, mappedBy: 'Clients')] + private Collection $tables; /** * @var Collection @@ -41,7 +41,7 @@ class Clients public function __construct() { - $this->table = new ArrayCollection(); + $this->tables = new ArrayCollection(); $this->commandes = new ArrayCollection(); } @@ -101,23 +101,23 @@ class Clients /** * @return Collection */ - 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)) { - $this->table->add($table); + if (!$this->tables->contains($tables)) { + $this->tables->add($tables); } return $this; } - public function removeTable(Tables $table): static + public function removeTable(Tables $tables): static { - $this->table->removeElement($table); + $this->tables->removeElement($tables); return $this; } diff --git a/src/Entity/Reservations.php b/src/Entity/Reservations.php index 8ad6096..757d358 100644 --- a/src/Entity/Reservations.php +++ b/src/Entity/Reservations.php @@ -23,7 +23,7 @@ class Reservations private ?int $Nb_de_prsn = null; #[ORM\ManyToOne(inversedBy: 'reservations')] - private ?Tables $Table = null; + private ?Tables $tables = null; /** * @var Collection @@ -65,14 +65,14 @@ class Reservations 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; } diff --git a/src/Entity/StatutTables.php b/src/Entity/StatutTables.php index f336a5a..5b500b9 100644 --- a/src/Entity/StatutTables.php +++ b/src/Entity/StatutTables.php @@ -17,7 +17,7 @@ class StatutTables private ?string $Libellé = null; #[ORM\ManyToOne(inversedBy: 'statutTables')] - private ?Tables $Table = null; + private ?Tables $tables = null; public function getId(): ?int { @@ -36,14 +36,14 @@ class StatutTables 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; } diff --git a/src/Entity/Tables.php b/src/Entity/Tables.php index 25d3763..1d1820a 100644 --- a/src/Entity/Tables.php +++ b/src/Entity/Tables.php @@ -18,25 +18,25 @@ class Tables /** * @var Collection */ - #[ORM\ManyToMany(targetEntity: Clients::class, mappedBy: 'table')] + #[ORM\ManyToMany(targetEntity: Clients::class, inversedBy: 'tables')] private Collection $Clients; /** * @var Collection */ - #[ORM\OneToMany(targetEntity: Reservations::class, mappedBy: 'Table')] + #[ORM\OneToMany(targetEntity: Reservations::class, mappedBy: 'tables')] private Collection $reservations; /** * @var Collection */ - #[ORM\OneToMany(targetEntity: StatutTables::class, mappedBy: 'Table')] + #[ORM\OneToMany(targetEntity: StatutTables::class, mappedBy: 'tables')] private Collection $statutTables; /** * @var Collection */ - #[ORM\ManyToMany(targetEntity: Utilisateurs::class, mappedBy: 'table')] + #[ORM\ManyToMany(targetEntity: Utilisateurs::class, mappedBy: 'tables')] private Collection $utilisateurs; public function __construct() @@ -55,7 +55,7 @@ class Tables /** * @return Collection */ - public function getClient(): Collection + public function getClients(): Collection { return $this->Clients; } @@ -101,7 +101,7 @@ class Tables { if ($this->reservations->removeElement($reservation)) { // set the owning side to null (unless already changed) - if ($reservation->getTable() === $this) { + if ($reservation->getTables() === $this) { $reservation->setTable(null); } } @@ -131,7 +131,7 @@ class Tables { if ($this->statutTables->removeElement($statutTable)) { // set the owning side to null (unless already changed) - if ($statutTable->getTable() === $this) { + if ($statutTable->getTables() === $this) { $statutTable->setTable(null); } } diff --git a/src/Entity/Utilisateurs.php b/src/Entity/Utilisateurs.php index c4af5ea..c9a6ead 100644 --- a/src/Entity/Utilisateurs.php +++ b/src/Entity/Utilisateurs.php @@ -42,12 +42,12 @@ class Utilisateurs implements UserInterface, PasswordAuthenticatedUserInterface * @var Collection */ #[ORM\ManyToMany(targetEntity: Tables::class, inversedBy: 'utilisateurs')] - private Collection $table; + private Collection $tables; public function __construct() { $this->Reservation = new ArrayCollection(); - $this->table = new ArrayCollection(); + $this->tables = new ArrayCollection(); } public function getId(): ?int @@ -157,23 +157,23 @@ class Utilisateurs implements UserInterface, PasswordAuthenticatedUserInterface /** * @return Collection */ - 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)) { - $this->table->add($table); + if (!$this->tables->contains($tables)) { + $this->tables->add($tables); } return $this; } - public function removeTable(Tables $table): static + public function removeTable(Tables $tables): static { - $this->table->removeElement($table); + $this->tables->removeElement($tables); return $this; } From a675b7270d1a2938fc16c8a90a6361262dfbd8d9 Mon Sep 17 00:00:00 2001 From: bayard Date: Thu, 21 Nov 2024 15:11:11 +0100 Subject: [PATCH 06/19] push de controller --- composer.lock | 360 +++++++++--------- migrations/Version20241010155711.php | 109 ++++++ public/css/list.css | 77 ++++ src/Controller/ClientsController.php | 81 ++++ src/Controller/CommandesController.php | 81 ++++ src/Controller/CuisinierController.php | 46 --- src/Controller/DetailsCommandeController.php | 81 ++++ src/Controller/PlatsController.php | 81 ++++ src/Controller/ReductionsController.php | 81 ++++ src/Entity/Clients.php | 3 +- src/Form/ClientsType.php | 41 ++ src/Form/CommandesType.php | 47 +++ src/Form/DetailsCommandeType.php | 32 ++ src/Form/PlatsType.php | 42 ++ src/Form/ReductionsType.php | 34 ++ templates/clients/_delete_form.html.twig | 4 + templates/clients/_form.html.twig | 4 + templates/clients/edit.html.twig | 13 + templates/clients/index.html.twig | 44 +++ templates/clients/new.html.twig | 11 + templates/clients/show.html.twig | 38 ++ templates/commande/index.html.twig | 23 ++ templates/commandes/_delete_form.html.twig | 4 + templates/commandes/_form.html.twig | 4 + templates/commandes/edit.html.twig | 13 + templates/commandes/index.html.twig | 42 ++ templates/commandes/new.html.twig | 11 + templates/commandes/show.html.twig | 34 ++ .../details_commande/_delete_form.html.twig | 4 + templates/details_commande/_form.html.twig | 4 + templates/details_commande/edit.html.twig | 13 + templates/details_commande/index.html.twig | 41 ++ templates/details_commande/new.html.twig | 11 + templates/details_commande/show.html.twig | 30 ++ templates/plats/_delete_form.html.twig | 4 + templates/plats/_form.html.twig | 4 + templates/plats/edit.html.twig | 13 + templates/plats/index.html.twig | 48 +++ templates/plats/new.html.twig | 11 + templates/plats/show.html.twig | 46 +++ templates/reductions/_delete_form.html.twig | 4 + templates/reductions/_form.html.twig | 4 + templates/reductions/edit.html.twig | 13 + templates/reductions/index.html.twig | 48 +++ templates/reductions/new.html.twig | 11 + templates/reductions/show.html.twig | 46 +++ 46 files changed, 1570 insertions(+), 226 deletions(-) create mode 100644 migrations/Version20241010155711.php create mode 100644 public/css/list.css create mode 100644 src/Controller/ClientsController.php create mode 100644 src/Controller/CommandesController.php delete mode 100644 src/Controller/CuisinierController.php create mode 100644 src/Controller/DetailsCommandeController.php create mode 100644 src/Controller/PlatsController.php create mode 100644 src/Controller/ReductionsController.php create mode 100644 src/Form/ClientsType.php create mode 100644 src/Form/CommandesType.php create mode 100644 src/Form/DetailsCommandeType.php create mode 100644 src/Form/PlatsType.php create mode 100644 src/Form/ReductionsType.php create mode 100644 templates/clients/_delete_form.html.twig create mode 100644 templates/clients/_form.html.twig create mode 100644 templates/clients/edit.html.twig create mode 100644 templates/clients/index.html.twig create mode 100644 templates/clients/new.html.twig create mode 100644 templates/clients/show.html.twig create mode 100644 templates/commande/index.html.twig create mode 100644 templates/commandes/_delete_form.html.twig create mode 100644 templates/commandes/_form.html.twig create mode 100644 templates/commandes/edit.html.twig create mode 100644 templates/commandes/index.html.twig create mode 100644 templates/commandes/new.html.twig create mode 100644 templates/commandes/show.html.twig create mode 100644 templates/details_commande/_delete_form.html.twig create mode 100644 templates/details_commande/_form.html.twig create mode 100644 templates/details_commande/edit.html.twig create mode 100644 templates/details_commande/index.html.twig create mode 100644 templates/details_commande/new.html.twig create mode 100644 templates/details_commande/show.html.twig create mode 100644 templates/plats/_delete_form.html.twig create mode 100644 templates/plats/_form.html.twig create mode 100644 templates/plats/edit.html.twig create mode 100644 templates/plats/index.html.twig create mode 100644 templates/plats/new.html.twig create mode 100644 templates/plats/show.html.twig create mode 100644 templates/reductions/_delete_form.html.twig create mode 100644 templates/reductions/_form.html.twig create mode 100644 templates/reductions/edit.html.twig create mode 100644 templates/reductions/index.html.twig create mode 100644 templates/reductions/new.html.twig create mode 100644 templates/reductions/show.html.twig diff --git a/composer.lock b/composer.lock index d8184ac..c0e03e7 100644 --- a/composer.lock +++ b/composer.lock @@ -2645,16 +2645,16 @@ }, { "name": "monolog/monolog", - "version": "3.7.0", + "version": "3.8.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "f4393b648b78a5408747de94fca38beb5f7e9ef8" + "reference": "32e515fdc02cdafbe4593e30a9350d486b125b67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f4393b648b78a5408747de94fca38beb5f7e9ef8", - "reference": "f4393b648b78a5408747de94fca38beb5f7e9ef8", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/32e515fdc02cdafbe4593e30a9350d486b125b67", + "reference": "32e515fdc02cdafbe4593e30a9350d486b125b67", "shasum": "" }, "require": { @@ -2674,12 +2674,14 @@ "guzzlehttp/psr7": "^2.2", "mongodb/mongodb": "^1.8", "php-amqplib/php-amqplib": "~2.4 || ^3", - "phpstan/phpstan": "^1.9", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-strict-rules": "^1.4", - "phpunit/phpunit": "^10.5.17", + "php-console/php-console": "^3.1.8", + "phpstan/phpstan": "^2", + "phpstan/phpstan-deprecation-rules": "^2", + "phpstan/phpstan-strict-rules": "^2", + "phpunit/phpunit": "^10.5.17 || ^11.0.7", "predis/predis": "^1.1 || ^2", - "ruflin/elastica": "^7", + "rollbar/rollbar": "^4.0", + "ruflin/elastica": "^7 || ^8", "symfony/mailer": "^5.4 || ^6", "symfony/mime": "^5.4 || ^6" }, @@ -2730,7 +2732,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.7.0" + "source": "https://github.com/Seldaek/monolog/tree/3.8.0" }, "funding": [ { @@ -2742,7 +2744,7 @@ "type": "tidelift" } ], - "time": "2024-06-28T09:40:51+00:00" + "time": "2024-11-12T13:57:08+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -2799,16 +2801,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.4.1", + "version": "5.6.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c" + "reference": "f3558a4c23426d12bffeaab463f8a8d8b681193c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", - "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/f3558a4c23426d12bffeaab463f8a8d8b681193c", + "reference": "f3558a4c23426d12bffeaab463f8a8d8b681193c", "shasum": "" }, "require": { @@ -2817,17 +2819,17 @@ "php": "^7.4 || ^8.0", "phpdocumentor/reflection-common": "^2.2", "phpdocumentor/type-resolver": "^1.7", - "phpstan/phpdoc-parser": "^1.7", + "phpstan/phpdoc-parser": "^1.7|^2.0", "webmozart/assert": "^1.9.1" }, "require-dev": { - "mockery/mockery": "~1.3.5", + "mockery/mockery": "~1.3.5 || ~1.6.0", "phpstan/extension-installer": "^1.1", "phpstan/phpstan": "^1.8", "phpstan/phpstan-mockery": "^1.1", "phpstan/phpstan-webmozart-assert": "^1.2", "phpunit/phpunit": "^9.5", - "vimeo/psalm": "^5.13" + "psalm/phar": "^5.26" }, "type": "library", "extra": { @@ -2857,29 +2859,29 @@ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.4.1" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.0" }, - "time": "2024-05-21T05:55:05+00:00" + "time": "2024-11-12T11:25:25+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.8.2", + "version": "1.10.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "153ae662783729388a584b4361f2545e4d841e3c" + "reference": "679e3ce485b99e84c775d28e2e96fade9a7fb50a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/153ae662783729388a584b4361f2545e4d841e3c", - "reference": "153ae662783729388a584b4361f2545e4d841e3c", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/679e3ce485b99e84c775d28e2e96fade9a7fb50a", + "reference": "679e3ce485b99e84c775d28e2e96fade9a7fb50a", "shasum": "" }, "require": { "doctrine/deprecations": "^1.0", "php": "^7.3 || ^8.0", "phpdocumentor/reflection-common": "^2.0", - "phpstan/phpdoc-parser": "^1.13" + "phpstan/phpdoc-parser": "^1.18|^2.0" }, "require-dev": { "ext-tokenizer": "*", @@ -2915,9 +2917,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.8.2" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.10.0" }, - "time": "2024-02-23T11:10:43+00:00" + "time": "2024-11-09T15:12:26+00:00" }, { "name": "phpstan/phpdoc-parser", @@ -3396,16 +3398,16 @@ }, { "name": "symfony/asset-mapper", - "version": "v7.1.6", + "version": "v7.1.8", "source": { "type": "git", "url": "https://github.com/symfony/asset-mapper.git", - "reference": "f918f7e4cb2f4c1f29cc43f986473ddb2392a445" + "reference": "bd09ac29c8553e39832f6100a8365240c1c697a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/asset-mapper/zipball/f918f7e4cb2f4c1f29cc43f986473ddb2392a445", - "reference": "f918f7e4cb2f4c1f29cc43f986473ddb2392a445", + "url": "https://api.github.com/repos/symfony/asset-mapper/zipball/bd09ac29c8553e39832f6100a8365240c1c697a6", + "reference": "bd09ac29c8553e39832f6100a8365240c1c697a6", "shasum": "" }, "require": { @@ -3455,7 +3457,7 @@ "description": "Maps directories of assets & makes them available in a public directory with versioned filenames.", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/asset-mapper/tree/v7.1.6" + "source": "https://github.com/symfony/asset-mapper/tree/v7.1.8" }, "funding": [ { @@ -3471,20 +3473,20 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-11-09T09:16:45+00:00" }, { "name": "symfony/cache", - "version": "v7.1.6", + "version": "v7.1.7", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "567ef6de47fdcba56eb6c0b344b857d1fce1cce0" + "reference": "23b61c9592ee72233c31625f0ae805dd1571e928" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/567ef6de47fdcba56eb6c0b344b857d1fce1cce0", - "reference": "567ef6de47fdcba56eb6c0b344b857d1fce1cce0", + "url": "https://api.github.com/repos/symfony/cache/zipball/23b61c9592ee72233c31625f0ae805dd1571e928", + "reference": "23b61c9592ee72233c31625f0ae805dd1571e928", "shasum": "" }, "require": { @@ -3552,7 +3554,7 @@ "psr6" ], "support": { - "source": "https://github.com/symfony/cache/tree/v7.1.6" + "source": "https://github.com/symfony/cache/tree/v7.1.7" }, "funding": [ { @@ -3568,7 +3570,7 @@ "type": "tidelift" } ], - "time": "2024-10-25T15:39:55+00:00" + "time": "2024-11-05T15:34:55+00:00" }, { "name": "symfony/cache-contracts", @@ -3722,16 +3724,16 @@ }, { "name": "symfony/config", - "version": "v7.1.6", + "version": "v7.1.7", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "5c6152766251ff45a44b76affadd5287e253fb27" + "reference": "dc373a5cbd345354696f5dfd39c5c7a8ea23f4c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/5c6152766251ff45a44b76affadd5287e253fb27", - "reference": "5c6152766251ff45a44b76affadd5287e253fb27", + "url": "https://api.github.com/repos/symfony/config/zipball/dc373a5cbd345354696f5dfd39c5c7a8ea23f4c8", + "reference": "dc373a5cbd345354696f5dfd39c5c7a8ea23f4c8", "shasum": "" }, "require": { @@ -3777,7 +3779,7 @@ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v7.1.6" + "source": "https://github.com/symfony/config/tree/v7.1.7" }, "funding": [ { @@ -3793,20 +3795,20 @@ "type": "tidelift" } ], - "time": "2024-10-25T15:11:02+00:00" + "time": "2024-11-04T11:34:07+00:00" }, { "name": "symfony/console", - "version": "v7.1.6", + "version": "v7.1.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "bb5192af6edc797cbab5c8e8ecfea2fe5f421e57" + "reference": "ff04e5b5ba043d2badfb308197b9e6b42883fcd5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/bb5192af6edc797cbab5c8e8ecfea2fe5f421e57", - "reference": "bb5192af6edc797cbab5c8e8ecfea2fe5f421e57", + "url": "https://api.github.com/repos/symfony/console/zipball/ff04e5b5ba043d2badfb308197b9e6b42883fcd5", + "reference": "ff04e5b5ba043d2badfb308197b9e6b42883fcd5", "shasum": "" }, "require": { @@ -3870,7 +3872,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.1.6" + "source": "https://github.com/symfony/console/tree/v7.1.8" }, "funding": [ { @@ -3886,20 +3888,20 @@ "type": "tidelift" } ], - "time": "2024-10-09T08:46:59+00:00" + "time": "2024-11-06T14:23:19+00:00" }, { "name": "symfony/dependency-injection", - "version": "v7.1.6", + "version": "v7.1.8", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "1f12f9d580ef8dd09e3b756aa111cc2d5f311bfd" + "reference": "e4d13f0f394f4d02a041ff76acd31c5a20a5f70b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/1f12f9d580ef8dd09e3b756aa111cc2d5f311bfd", - "reference": "1f12f9d580ef8dd09e3b756aa111cc2d5f311bfd", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/e4d13f0f394f4d02a041ff76acd31c5a20a5f70b", + "reference": "e4d13f0f394f4d02a041ff76acd31c5a20a5f70b", "shasum": "" }, "require": { @@ -3950,7 +3952,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v7.1.6" + "source": "https://github.com/symfony/dependency-injection/tree/v7.1.8" }, "funding": [ { @@ -3966,7 +3968,7 @@ "type": "tidelift" } ], - "time": "2024-10-25T15:11:02+00:00" + "time": "2024-11-09T09:16:45+00:00" }, { "name": "symfony/deprecation-contracts", @@ -4291,16 +4293,16 @@ }, { "name": "symfony/error-handler", - "version": "v7.1.6", + "version": "v7.1.7", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "d60117093c2a9fe667baa8fedf84e8a09b9c592f" + "reference": "010e44661f4c6babaf8c4862fe68c24a53903342" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/d60117093c2a9fe667baa8fedf84e8a09b9c592f", - "reference": "d60117093c2a9fe667baa8fedf84e8a09b9c592f", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/010e44661f4c6babaf8c4862fe68c24a53903342", + "reference": "010e44661f4c6babaf8c4862fe68c24a53903342", "shasum": "" }, "require": { @@ -4346,7 +4348,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v7.1.6" + "source": "https://github.com/symfony/error-handler/tree/v7.1.7" }, "funding": [ { @@ -4362,7 +4364,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-11-05T15:34:55+00:00" }, { "name": "symfony/event-dispatcher", @@ -5029,16 +5031,16 @@ }, { "name": "symfony/http-client", - "version": "v7.1.6", + "version": "v7.1.8", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "274e2f6886b43a36f8bd5dfeb67215f7ebf9e291" + "reference": "c30d91a1deac0dc3ed5e604683cf2e1dfc635b8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/274e2f6886b43a36f8bd5dfeb67215f7ebf9e291", - "reference": "274e2f6886b43a36f8bd5dfeb67215f7ebf9e291", + "url": "https://api.github.com/repos/symfony/http-client/zipball/c30d91a1deac0dc3ed5e604683cf2e1dfc635b8a", + "reference": "c30d91a1deac0dc3ed5e604683cf2e1dfc635b8a", "shasum": "" }, "require": { @@ -5103,7 +5105,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v7.1.6" + "source": "https://github.com/symfony/http-client/tree/v7.1.8" }, "funding": [ { @@ -5119,7 +5121,7 @@ "type": "tidelift" } ], - "time": "2024-10-22T09:40:50+00:00" + "time": "2024-11-13T13:40:27+00:00" }, { "name": "symfony/http-client-contracts", @@ -5201,16 +5203,16 @@ }, { "name": "symfony/http-foundation", - "version": "v7.1.6", + "version": "v7.1.8", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "3d7bbf071b25f802f7d55524d408bed414ea71e2" + "reference": "f4419ec69ccfc3f725a4de7c20e4e57626d10112" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/3d7bbf071b25f802f7d55524d408bed414ea71e2", - "reference": "3d7bbf071b25f802f7d55524d408bed414ea71e2", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/f4419ec69ccfc3f725a4de7c20e4e57626d10112", + "reference": "f4419ec69ccfc3f725a4de7c20e4e57626d10112", "shasum": "" }, "require": { @@ -5220,12 +5222,12 @@ }, "conflict": { "doctrine/dbal": "<3.6", - "symfony/cache": "<6.4" + "symfony/cache": "<6.4.12|>=7.0,<7.1.5" }, "require-dev": { "doctrine/dbal": "^3.6|^4", "predis/predis": "^1.1|^2.0", - "symfony/cache": "^6.4|^7.0", + "symfony/cache": "^6.4.12|^7.1.5", "symfony/dependency-injection": "^6.4|^7.0", "symfony/expression-language": "^6.4|^7.0", "symfony/http-kernel": "^6.4|^7.0", @@ -5258,7 +5260,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v7.1.6" + "source": "https://github.com/symfony/http-foundation/tree/v7.1.8" }, "funding": [ { @@ -5274,20 +5276,20 @@ "type": "tidelift" } ], - "time": "2024-10-11T19:23:14+00:00" + "time": "2024-11-09T09:16:45+00:00" }, { "name": "symfony/http-kernel", - "version": "v7.1.6", + "version": "v7.1.8", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "5d8315899cd76b2e7e29179bf5fea103e41bdf03" + "reference": "33fef24e3dc79d6d30bf4936531f2f4bd2ca189e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/5d8315899cd76b2e7e29179bf5fea103e41bdf03", - "reference": "5d8315899cd76b2e7e29179bf5fea103e41bdf03", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/33fef24e3dc79d6d30bf4936531f2f4bd2ca189e", + "reference": "33fef24e3dc79d6d30bf4936531f2f4bd2ca189e", "shasum": "" }, "require": { @@ -5372,7 +5374,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v7.1.6" + "source": "https://github.com/symfony/http-kernel/tree/v7.1.8" }, "funding": [ { @@ -5388,20 +5390,20 @@ "type": "tidelift" } ], - "time": "2024-10-27T13:54:21+00:00" + "time": "2024-11-13T14:25:32+00:00" }, { "name": "symfony/intl", - "version": "v7.1.6", + "version": "v7.1.8", "source": { "type": "git", "url": "https://github.com/symfony/intl.git", - "reference": "c65630cc9c22acd9b511a87a3f4734e48e500932" + "reference": "e56b243fc0afa5a12bd11dace4002ada5a7d99f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/intl/zipball/c65630cc9c22acd9b511a87a3f4734e48e500932", - "reference": "c65630cc9c22acd9b511a87a3f4734e48e500932", + "url": "https://api.github.com/repos/symfony/intl/zipball/e56b243fc0afa5a12bd11dace4002ada5a7d99f8", + "reference": "e56b243fc0afa5a12bd11dace4002ada5a7d99f8", "shasum": "" }, "require": { @@ -5458,7 +5460,7 @@ "localization" ], "support": { - "source": "https://github.com/symfony/intl/tree/v7.1.6" + "source": "https://github.com/symfony/intl/tree/v7.1.8" }, "funding": [ { @@ -5474,7 +5476,7 @@ "type": "tidelift" } ], - "time": "2024-10-09T08:46:59+00:00" + "time": "2024-11-08T15:46:42+00:00" }, { "name": "symfony/mailer", @@ -5558,16 +5560,16 @@ }, { "name": "symfony/messenger", - "version": "v7.1.6", + "version": "v7.1.8", "source": { "type": "git", "url": "https://github.com/symfony/messenger.git", - "reference": "a391d2cb2b15436c0e3fbdf983440e762a30f88b" + "reference": "86d9aead6c40a56a528f2fb881a8be253efbbd1f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/messenger/zipball/a391d2cb2b15436c0e3fbdf983440e762a30f88b", - "reference": "a391d2cb2b15436c0e3fbdf983440e762a30f88b", + "url": "https://api.github.com/repos/symfony/messenger/zipball/86d9aead6c40a56a528f2fb881a8be253efbbd1f", + "reference": "86d9aead6c40a56a528f2fb881a8be253efbbd1f", "shasum": "" }, "require": { @@ -5624,7 +5626,7 @@ "description": "Helps applications send and receive messages to/from other applications or via message queues", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/messenger/tree/v7.1.6" + "source": "https://github.com/symfony/messenger/tree/v7.1.8" }, "funding": [ { @@ -5640,7 +5642,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-11-09T09:16:45+00:00" }, { "name": "symfony/mime", @@ -6586,16 +6588,16 @@ }, { "name": "symfony/process", - "version": "v7.1.6", + "version": "v7.1.8", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "6aaa189ddb4ff6b5de8fa3210f2fb42c87b4d12e" + "reference": "42783370fda6e538771f7c7a36e9fa2ee3a84892" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/6aaa189ddb4ff6b5de8fa3210f2fb42c87b4d12e", - "reference": "6aaa189ddb4ff6b5de8fa3210f2fb42c87b4d12e", + "url": "https://api.github.com/repos/symfony/process/zipball/42783370fda6e538771f7c7a36e9fa2ee3a84892", + "reference": "42783370fda6e538771f7c7a36e9fa2ee3a84892", "shasum": "" }, "require": { @@ -6627,7 +6629,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.1.6" + "source": "https://github.com/symfony/process/tree/v7.1.8" }, "funding": [ { @@ -6643,7 +6645,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-11-06T14:23:19+00:00" }, { "name": "symfony/property-access", @@ -6723,16 +6725,16 @@ }, { "name": "symfony/property-info", - "version": "v7.1.6", + "version": "v7.1.8", "source": { "type": "git", "url": "https://github.com/symfony/property-info.git", - "reference": "6b630ff585d9fdc72f50369885ad4364a849cf02" + "reference": "3748f85f64351d282fd028e44309856f1d79142e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-info/zipball/6b630ff585d9fdc72f50369885ad4364a849cf02", - "reference": "6b630ff585d9fdc72f50369885ad4364a849cf02", + "url": "https://api.github.com/repos/symfony/property-info/zipball/3748f85f64351d282fd028e44309856f1d79142e", + "reference": "3748f85f64351d282fd028e44309856f1d79142e", "shasum": "" }, "require": { @@ -6748,7 +6750,7 @@ }, "require-dev": { "phpdocumentor/reflection-docblock": "^5.2", - "phpstan/phpdoc-parser": "^1.0", + "phpstan/phpdoc-parser": "^1.0|^2.0", "symfony/cache": "^6.4|^7.0", "symfony/dependency-injection": "^6.4|^7.0", "symfony/serializer": "^6.4|^7.0" @@ -6787,7 +6789,7 @@ "validator" ], "support": { - "source": "https://github.com/symfony/property-info/tree/v7.1.6" + "source": "https://github.com/symfony/property-info/tree/v7.1.8" }, "funding": [ { @@ -6803,7 +6805,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-11-09T07:07:11+00:00" }, { "name": "symfony/routing", @@ -6888,16 +6890,16 @@ }, { "name": "symfony/runtime", - "version": "v7.1.6", + "version": "v7.1.7", "source": { "type": "git", "url": "https://github.com/symfony/runtime.git", - "reference": "5f556dcd917234d11d56763d4c81bbe8f527bcad" + "reference": "9889783c17e8a68fa5e88c8e8a1a85e802558dba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/runtime/zipball/5f556dcd917234d11d56763d4c81bbe8f527bcad", - "reference": "5f556dcd917234d11d56763d4c81bbe8f527bcad", + "url": "https://api.github.com/repos/symfony/runtime/zipball/9889783c17e8a68fa5e88c8e8a1a85e802558dba", + "reference": "9889783c17e8a68fa5e88c8e8a1a85e802558dba", "shasum": "" }, "require": { @@ -6947,7 +6949,7 @@ "runtime" ], "support": { - "source": "https://github.com/symfony/runtime/tree/v7.1.6" + "source": "https://github.com/symfony/runtime/tree/v7.1.7" }, "funding": [ { @@ -6963,7 +6965,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-11-05T16:45:54+00:00" }, { "name": "symfony/security-bundle", @@ -7227,16 +7229,16 @@ }, { "name": "symfony/security-http", - "version": "v7.1.6", + "version": "v7.1.8", "source": { "type": "git", "url": "https://github.com/symfony/security-http.git", - "reference": "a4af93423bb89f8330ce2c5d3b5af371788aedc5" + "reference": "e11ea7f98fba4921a6c847a0c6a77d1befa9698f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/security-http/zipball/a4af93423bb89f8330ce2c5d3b5af371788aedc5", - "reference": "a4af93423bb89f8330ce2c5d3b5af371788aedc5", + "url": "https://api.github.com/repos/symfony/security-http/zipball/e11ea7f98fba4921a6c847a0c6a77d1befa9698f", + "reference": "e11ea7f98fba4921a6c847a0c6a77d1befa9698f", "shasum": "" }, "require": { @@ -7295,7 +7297,7 @@ "description": "Symfony Security Component - HTTP Integration", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/security-http/tree/v7.1.6" + "source": "https://github.com/symfony/security-http/tree/v7.1.8" }, "funding": [ { @@ -7311,20 +7313,20 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-11-13T13:40:27+00:00" }, { "name": "symfony/serializer", - "version": "v7.1.6", + "version": "v7.1.8", "source": { "type": "git", "url": "https://github.com/symfony/serializer.git", - "reference": "537f125ed7ddb8fffac34a83dfd6905e044ca76f" + "reference": "6066de113408496e1e3d4bf9e21fb209d344768b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/serializer/zipball/537f125ed7ddb8fffac34a83dfd6905e044ca76f", - "reference": "537f125ed7ddb8fffac34a83dfd6905e044ca76f", + "url": "https://api.github.com/repos/symfony/serializer/zipball/6066de113408496e1e3d4bf9e21fb209d344768b", + "reference": "6066de113408496e1e3d4bf9e21fb209d344768b", "shasum": "" }, "require": { @@ -7345,7 +7347,7 @@ }, "require-dev": { "phpdocumentor/reflection-docblock": "^3.2|^4.0|^5.0", - "phpstan/phpdoc-parser": "^1.0", + "phpstan/phpdoc-parser": "^1.0|^2.0", "seld/jsonlint": "^1.10", "symfony/cache": "^6.4|^7.0", "symfony/config": "^6.4|^7.0", @@ -7394,7 +7396,7 @@ "description": "Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and JSON.", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/serializer/tree/v7.1.6" + "source": "https://github.com/symfony/serializer/tree/v7.1.8" }, "funding": [ { @@ -7410,7 +7412,7 @@ "type": "tidelift" } ], - "time": "2024-10-09T08:46:59+00:00" + "time": "2024-11-09T09:16:45+00:00" }, { "name": "symfony/service-contracts", @@ -7628,16 +7630,16 @@ }, { "name": "symfony/string", - "version": "v7.1.6", + "version": "v7.1.8", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "61b72d66bf96c360a727ae6232df5ac83c71f626" + "reference": "591ebd41565f356fcd8b090fe64dbb5878f50281" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/61b72d66bf96c360a727ae6232df5ac83c71f626", - "reference": "61b72d66bf96c360a727ae6232df5ac83c71f626", + "url": "https://api.github.com/repos/symfony/string/zipball/591ebd41565f356fcd8b090fe64dbb5878f50281", + "reference": "591ebd41565f356fcd8b090fe64dbb5878f50281", "shasum": "" }, "require": { @@ -7695,7 +7697,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.1.6" + "source": "https://github.com/symfony/string/tree/v7.1.8" }, "funding": [ { @@ -7711,7 +7713,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-11-13T13:31:21+00:00" }, { "name": "symfony/translation", @@ -7887,16 +7889,16 @@ }, { "name": "symfony/twig-bridge", - "version": "v7.1.6", + "version": "v7.1.8", "source": { "type": "git", "url": "https://github.com/symfony/twig-bridge.git", - "reference": "91c67942b0e535272e4d7a89619094a5acd8479d" + "reference": "535ab0be4fc563b2bc5fc0cc9e388626d226c63f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/91c67942b0e535272e4d7a89619094a5acd8479d", - "reference": "91c67942b0e535272e4d7a89619094a5acd8479d", + "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/535ab0be4fc563b2bc5fc0cc9e388626d226c63f", + "reference": "535ab0be4fc563b2bc5fc0cc9e388626d226c63f", "shasum": "" }, "require": { @@ -7976,7 +7978,7 @@ "description": "Provides integration for Twig with various Symfony components", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/twig-bridge/tree/v7.1.6" + "source": "https://github.com/symfony/twig-bridge/tree/v7.1.8" }, "funding": [ { @@ -7992,7 +7994,7 @@ "type": "tidelift" } ], - "time": "2024-10-25T15:11:02+00:00" + "time": "2024-11-10T02:47:09+00:00" }, { "name": "symfony/twig-bundle", @@ -8080,16 +8082,16 @@ }, { "name": "symfony/type-info", - "version": "v7.1.6", + "version": "v7.1.8", "source": { "type": "git", "url": "https://github.com/symfony/type-info.git", - "reference": "a13032128c307470955c45c99201349b15cd7f4a" + "reference": "51535dde21c7abf65c9d000a30bb15f6478195e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/type-info/zipball/a13032128c307470955c45c99201349b15cd7f4a", - "reference": "a13032128c307470955c45c99201349b15cd7f4a", + "url": "https://api.github.com/repos/symfony/type-info/zipball/51535dde21c7abf65c9d000a30bb15f6478195e6", + "reference": "51535dde21c7abf65c9d000a30bb15f6478195e6", "shasum": "" }, "require": { @@ -8102,7 +8104,7 @@ "symfony/property-info": "<6.4" }, "require-dev": { - "phpstan/phpdoc-parser": "^1.0", + "phpstan/phpdoc-parser": "^1.0|^2.0", "symfony/dependency-injection": "^6.4|^7.0", "symfony/property-info": "^6.4|^7.0" }, @@ -8142,7 +8144,7 @@ "type" ], "support": { - "source": "https://github.com/symfony/type-info/tree/v7.1.6" + "source": "https://github.com/symfony/type-info/tree/v7.1.8" }, "funding": [ { @@ -8158,7 +8160,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-11-07T15:49:33+00:00" }, { "name": "symfony/ux-icons", @@ -8349,16 +8351,16 @@ }, { "name": "symfony/validator", - "version": "v7.1.6", + "version": "v7.1.8", "source": { "type": "git", "url": "https://github.com/symfony/validator.git", - "reference": "6c9fc7b87bc7a7056c0fdbe3ff87b12690942ffb" + "reference": "85a90c0a4ab0d10c118d3cdf39115e00d9cca7d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/validator/zipball/6c9fc7b87bc7a7056c0fdbe3ff87b12690942ffb", - "reference": "6c9fc7b87bc7a7056c0fdbe3ff87b12690942ffb", + "url": "https://api.github.com/repos/symfony/validator/zipball/85a90c0a4ab0d10c118d3cdf39115e00d9cca7d0", + "reference": "85a90c0a4ab0d10c118d3cdf39115e00d9cca7d0", "shasum": "" }, "require": { @@ -8426,7 +8428,7 @@ "description": "Provides tools to validate values", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/validator/tree/v7.1.6" + "source": "https://github.com/symfony/validator/tree/v7.1.8" }, "funding": [ { @@ -8442,20 +8444,20 @@ "type": "tidelift" } ], - "time": "2024-10-25T15:11:02+00:00" + "time": "2024-11-08T15:46:42+00:00" }, { "name": "symfony/var-dumper", - "version": "v7.1.6", + "version": "v7.1.8", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "cb5bd55a6b8c2c1c7fb68b0aeae0e257948a720c" + "reference": "7bb01a47b1b00428d32b5e7b4d3b2d1aa58d3db8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/cb5bd55a6b8c2c1c7fb68b0aeae0e257948a720c", - "reference": "cb5bd55a6b8c2c1c7fb68b0aeae0e257948a720c", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/7bb01a47b1b00428d32b5e7b4d3b2d1aa58d3db8", + "reference": "7bb01a47b1b00428d32b5e7b4d3b2d1aa58d3db8", "shasum": "" }, "require": { @@ -8509,7 +8511,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v7.1.6" + "source": "https://github.com/symfony/var-dumper/tree/v7.1.8" }, "funding": [ { @@ -8525,7 +8527,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-11-08T15:46:42+00:00" }, { "name": "symfony/var-exporter", @@ -8833,16 +8835,16 @@ }, { "name": "twig/twig", - "version": "v3.14.0", + "version": "v3.14.2", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "126b2c97818dbff0cdf3fbfc881aedb3d40aae72" + "reference": "0b6f9d8370bb3b7f1ce5313ed8feb0fafd6e399a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/126b2c97818dbff0cdf3fbfc881aedb3d40aae72", - "reference": "126b2c97818dbff0cdf3fbfc881aedb3d40aae72", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/0b6f9d8370bb3b7f1ce5313ed8feb0fafd6e399a", + "reference": "0b6f9d8370bb3b7f1ce5313ed8feb0fafd6e399a", "shasum": "" }, "require": { @@ -8896,7 +8898,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.14.0" + "source": "https://github.com/twigphp/Twig/tree/v3.14.2" }, "funding": [ { @@ -8908,7 +8910,7 @@ "type": "tidelift" } ], - "time": "2024-09-09T17:55:12+00:00" + "time": "2024-11-07T12:36:22+00:00" }, { "name": "webmozart/assert", @@ -9039,16 +9041,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.12.0", + "version": "1.12.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", - "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845", + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845", "shasum": "" }, "require": { @@ -9087,7 +9089,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.1" }, "funding": [ { @@ -9095,7 +9097,7 @@ "type": "tidelift" } ], - "time": "2024-06-12T14:39:25+00:00" + "time": "2024-11-08T17:47:46+00:00" }, { "name": "nikic/php-parser", @@ -11108,16 +11110,16 @@ }, { "name": "symfony/web-profiler-bundle", - "version": "v7.1.6", + "version": "v7.1.7", "source": { "type": "git", "url": "https://github.com/symfony/web-profiler-bundle.git", - "reference": "49d95d20f32a4b5bb711f55a6fc73e7a8e37b32e" + "reference": "13d97a9acb23663550495fa2480e8cc95033ad61" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/web-profiler-bundle/zipball/49d95d20f32a4b5bb711f55a6fc73e7a8e37b32e", - "reference": "49d95d20f32a4b5bb711f55a6fc73e7a8e37b32e", + "url": "https://api.github.com/repos/symfony/web-profiler-bundle/zipball/13d97a9acb23663550495fa2480e8cc95033ad61", + "reference": "13d97a9acb23663550495fa2480e8cc95033ad61", "shasum": "" }, "require": { @@ -11169,7 +11171,7 @@ "dev" ], "support": { - "source": "https://github.com/symfony/web-profiler-bundle/tree/v7.1.6" + "source": "https://github.com/symfony/web-profiler-bundle/tree/v7.1.7" }, "funding": [ { @@ -11185,7 +11187,7 @@ "type": "tidelift" } ], - "time": "2024-10-01T08:54:22+00:00" + "time": "2024-11-05T07:52:02+00:00" }, { "name": "theseer/tokenizer", @@ -11240,7 +11242,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": [], "prefer-stable": true, "prefer-lowest": false, "platform": { @@ -11248,6 +11250,6 @@ "ext-ctype": "*", "ext-iconv": "*" }, - "platform-dev": {}, - "plugin-api-version": "2.6.0" + "platform-dev": [], + "plugin-api-version": "2.3.0" } diff --git a/migrations/Version20241010155711.php b/migrations/Version20241010155711.php new file mode 100644 index 0000000..cb95793 --- /dev/null +++ b/migrations/Version20241010155711.php @@ -0,0 +1,109 @@ +addSql('DROP SEQUENCE eat_id_seq CASCADE'); + $this->addSql('CREATE TABLE customer (id INT NOT NULL, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, number_phone VARCHAR(255) NOT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE TABLE customer_table (customer_id INT NOT NULL, table_id INT NOT NULL, PRIMARY KEY(customer_id, table_id))'); + $this->addSql('CREATE INDEX IDX_381CFA7D9395C3F3 ON customer_table (customer_id)'); + $this->addSql('CREATE INDEX IDX_381CFA7DECFF285C ON customer_table (table_id)'); + $this->addSql('CREATE TABLE discount (id INT NOT NULL, id_dishes_id INT DEFAULT NULL, description VARCHAR(255) NOT NULL, percentage VARCHAR(255) NOT NULL, fixed_amount DOUBLE PRECISION NOT NULL, start_date DATE NOT NULL, date_end DATE NOT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE INDEX IDX_E1E0B40E20686F5D ON discount (id_dishes_id)'); + $this->addSql('CREATE TABLE dishes (id INT NOT NULL, name VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, price DOUBLE PRECISION NOT NULL, category VARCHAR(255) NOT NULL, status VARCHAR(255) NOT NULL, number_order VARCHAR(255) NOT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE TABLE "order" (id INT NOT NULL, id_order_detail_id INT NOT NULL, id_status_order_id INT NOT NULL, date_time DOUBLE PRECISION NOT NULL, status VARCHAR(255) NOT NULL, total VARCHAR(255) NOT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE INDEX IDX_F52993988D09BBCB ON "order" (id_order_detail_id)'); + $this->addSql('CREATE INDEX IDX_F5299398F91B0968 ON "order" (id_status_order_id)'); + $this->addSql('CREATE TABLE order_user (order_id INT NOT NULL, user_id INT NOT NULL, PRIMARY KEY(order_id, user_id))'); + $this->addSql('CREATE INDEX IDX_C062EC5E8D9F6D38 ON order_user (order_id)'); + $this->addSql('CREATE INDEX IDX_C062EC5EA76ED395 ON order_user (user_id)'); + $this->addSql('CREATE TABLE order_dishes (order_id INT NOT NULL, dishes_id INT NOT NULL, PRIMARY KEY(order_id, dishes_id))'); + $this->addSql('CREATE INDEX IDX_9BC2C3888D9F6D38 ON order_dishes (order_id)'); + $this->addSql('CREATE INDEX IDX_9BC2C388A05DD37A ON order_dishes (dishes_id)'); + $this->addSql('CREATE TABLE order_detail (id INT NOT NULL, quantity DOUBLE PRECISION NOT NULL, unit_price DOUBLE PRECISION NOT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE TABLE reservation (id INT NOT NULL, date_time DOUBLE PRECISION NOT NULL, number_people INT NOT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE TABLE reservation_user (reservation_id INT NOT NULL, user_id INT NOT NULL, PRIMARY KEY(reservation_id, user_id))'); + $this->addSql('CREATE INDEX IDX_9BAA1B21B83297E7 ON reservation_user (reservation_id)'); + $this->addSql('CREATE INDEX IDX_9BAA1B21A76ED395 ON reservation_user (user_id)'); + $this->addSql('CREATE TABLE status_order (id INT NOT NULL, libelle VARCHAR(255) NOT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE TABLE status_table (id INT NOT NULL, libelle VARCHAR(255) NOT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE TABLE "table" (id INT NOT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE TABLE "user" (id INT NOT NULL, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, mail VARCHAR(255) NOT NULL, role VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE TABLE messenger_messages (id BIGSERIAL NOT NULL, body TEXT NOT NULL, headers TEXT NOT NULL, queue_name VARCHAR(190) NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, available_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, delivered_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE INDEX IDX_75EA56E0FB7336F0 ON messenger_messages (queue_name)'); + $this->addSql('CREATE INDEX IDX_75EA56E0E3BD61CE ON messenger_messages (available_at)'); + $this->addSql('CREATE INDEX IDX_75EA56E016BA31DB ON messenger_messages (delivered_at)'); + $this->addSql('COMMENT ON COLUMN messenger_messages.created_at IS \'(DC2Type:datetime_immutable)\''); + $this->addSql('COMMENT ON COLUMN messenger_messages.available_at IS \'(DC2Type:datetime_immutable)\''); + $this->addSql('COMMENT ON COLUMN messenger_messages.delivered_at IS \'(DC2Type:datetime_immutable)\''); + $this->addSql('CREATE OR REPLACE FUNCTION notify_messenger_messages() RETURNS TRIGGER AS $$ + BEGIN + PERFORM pg_notify(\'messenger_messages\', NEW.queue_name::text); + RETURN NEW; + END; + $$ LANGUAGE plpgsql;'); + $this->addSql('DROP TRIGGER IF EXISTS notify_trigger ON messenger_messages;'); + $this->addSql('CREATE TRIGGER notify_trigger AFTER INSERT OR UPDATE ON messenger_messages FOR EACH ROW EXECUTE PROCEDURE notify_messenger_messages();'); + $this->addSql('ALTER TABLE customer_table ADD CONSTRAINT FK_381CFA7D9395C3F3 FOREIGN KEY (customer_id) REFERENCES customer (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE customer_table ADD CONSTRAINT FK_381CFA7DECFF285C FOREIGN KEY (table_id) REFERENCES "table" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE discount ADD CONSTRAINT FK_E1E0B40E20686F5D FOREIGN KEY (id_dishes_id) REFERENCES dishes (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE "order" ADD CONSTRAINT FK_F52993988D09BBCB FOREIGN KEY (id_order_detail_id) REFERENCES order_detail (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE "order" ADD CONSTRAINT FK_F5299398F91B0968 FOREIGN KEY (id_status_order_id) REFERENCES status_order (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE order_user ADD CONSTRAINT FK_C062EC5E8D9F6D38 FOREIGN KEY (order_id) REFERENCES "order" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE order_user ADD CONSTRAINT FK_C062EC5EA76ED395 FOREIGN KEY (user_id) REFERENCES "user" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE order_dishes ADD CONSTRAINT FK_9BC2C3888D9F6D38 FOREIGN KEY (order_id) REFERENCES "order" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE order_dishes ADD CONSTRAINT FK_9BC2C388A05DD37A FOREIGN KEY (dishes_id) REFERENCES dishes (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE reservation_user ADD CONSTRAINT FK_9BAA1B21B83297E7 FOREIGN KEY (reservation_id) REFERENCES reservation (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE reservation_user ADD CONSTRAINT FK_9BAA1B21A76ED395 FOREIGN KEY (user_id) REFERENCES "user" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('CREATE SCHEMA public'); + $this->addSql('CREATE SEQUENCE eat_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('ALTER TABLE customer_table DROP CONSTRAINT FK_381CFA7D9395C3F3'); + $this->addSql('ALTER TABLE customer_table DROP CONSTRAINT FK_381CFA7DECFF285C'); + $this->addSql('ALTER TABLE discount DROP CONSTRAINT FK_E1E0B40E20686F5D'); + $this->addSql('ALTER TABLE "order" DROP CONSTRAINT FK_F52993988D09BBCB'); + $this->addSql('ALTER TABLE "order" DROP CONSTRAINT FK_F5299398F91B0968'); + $this->addSql('ALTER TABLE order_user DROP CONSTRAINT FK_C062EC5E8D9F6D38'); + $this->addSql('ALTER TABLE order_user DROP CONSTRAINT FK_C062EC5EA76ED395'); + $this->addSql('ALTER TABLE order_dishes DROP CONSTRAINT FK_9BC2C3888D9F6D38'); + $this->addSql('ALTER TABLE order_dishes DROP CONSTRAINT FK_9BC2C388A05DD37A'); + $this->addSql('ALTER TABLE reservation_user DROP CONSTRAINT FK_9BAA1B21B83297E7'); + $this->addSql('ALTER TABLE reservation_user DROP CONSTRAINT FK_9BAA1B21A76ED395'); + $this->addSql('DROP TABLE customer'); + $this->addSql('DROP TABLE customer_table'); + $this->addSql('DROP TABLE discount'); + $this->addSql('DROP TABLE dishes'); + $this->addSql('DROP TABLE "order"'); + $this->addSql('DROP TABLE order_user'); + $this->addSql('DROP TABLE order_dishes'); + $this->addSql('DROP TABLE order_detail'); + $this->addSql('DROP TABLE reservation'); + $this->addSql('DROP TABLE reservation_user'); + $this->addSql('DROP TABLE status_order'); + $this->addSql('DROP TABLE status_table'); + $this->addSql('DROP TABLE "table"'); + $this->addSql('DROP TABLE "user"'); + $this->addSql('DROP TABLE messenger_messages'); + } +} diff --git a/public/css/list.css b/public/css/list.css new file mode 100644 index 0000000..c1125b4 --- /dev/null +++ b/public/css/list.css @@ -0,0 +1,77 @@ +/* Global styles */ +body { + font-family: Arial, sans-serif; + margin: 20px; + background-color: #f9f9f9; + color: #333; +} + +h1 { + text-align: center; + color: #db5559; + margin-bottom: 20px; +} + +/* Table styles */ +.table { + width: 100%; + border-collapse: collapse; + margin-bottom: 20px; + background-color: #fff; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); +} + +.table th, .table td { + padding: 12px; + text-align: left; + border: 1px solid #ddd; +} + +.table th { + background-color: #db5559; + color: white; +} + +.table tr:nth-child(even) { + background-color: #f2f2f2; +} + +.table tr:hover { + background-color: #ddd; +} + +/* Action links */ +a { + text-decoration: none; + color: #db5559; + font-weight: bold; +} + +a:hover { + color: #38538e; + text-decoration: underline; +} + +/* New client button */ +a[href*="app_clients_new"] { + display: inline-block; + margin-top: 20px; + padding: 10px 20px; + background-color: #4CAF50; + color: white; + border-radius: 5px; + font-size: 16px; + text-align: center; + transition: background-color 0.3s ease; +} + +a[href*="app_clients_new"]:hover { + background-color: #388E3C; +} + +/* Empty table row message */ +.table td[colspan="6"] { + text-align: center; + font-style: italic; + color: #666; +} diff --git a/src/Controller/ClientsController.php b/src/Controller/ClientsController.php new file mode 100644 index 0000000..bf6701d --- /dev/null +++ b/src/Controller/ClientsController.php @@ -0,0 +1,81 @@ +render('clients/index.html.twig', [ + 'clients' => $clientsRepository->findAll(), + ]); + } + + #[Route('/new', name: 'app_clients_new', methods: ['GET', 'POST'])] + public function new(Request $request, EntityManagerInterface $entityManager): Response + { + $client = new Clients(); + $form = $this->createForm(ClientsType::class, $client); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->persist($client); + $entityManager->flush(); + + return $this->redirectToRoute('app_clients_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('clients/new.html.twig', [ + 'client' => $client, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_clients_show', methods: ['GET'])] + public function show(Clients $client): Response + { + return $this->render('clients/show.html.twig', [ + 'client' => $client, + ]); + } + + #[Route('/{id}/edit', name: 'app_clients_edit', methods: ['GET', 'POST'])] + public function edit(Request $request, Clients $client, EntityManagerInterface $entityManager): Response + { + $form = $this->createForm(ClientsType::class, $client); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->flush(); + + return $this->redirectToRoute('app_clients_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('clients/edit.html.twig', [ + 'client' => $client, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_clients_delete', methods: ['POST'])] + public function delete(Request $request, Clients $client, EntityManagerInterface $entityManager): Response + { + if ($this->isCsrfTokenValid('delete'.$client->getId(), $request->getPayload()->getString('_token'))) { + $entityManager->remove($client); + $entityManager->flush(); + } + + return $this->redirectToRoute('app_clients_index', [], Response::HTTP_SEE_OTHER); + } +} diff --git a/src/Controller/CommandesController.php b/src/Controller/CommandesController.php new file mode 100644 index 0000000..7d2ea04 --- /dev/null +++ b/src/Controller/CommandesController.php @@ -0,0 +1,81 @@ +render('commandes/index.html.twig', [ + 'commandes' => $commandesRepository->findAll(), + ]); + } + + #[Route('/new', name: 'app_commandes_new', methods: ['GET', 'POST'])] + public function new(Request $request, EntityManagerInterface $entityManager): Response + { + $commande = new Commandes(); + $form = $this->createForm(CommandesType::class, $commande); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->persist($commande); + $entityManager->flush(); + + return $this->redirectToRoute('app_commandes_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('commandes/new.html.twig', [ + 'commande' => $commande, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_commandes_show', methods: ['GET'])] + public function show(Commandes $commande): Response + { + return $this->render('commandes/show.html.twig', [ + 'commande' => $commande, + ]); + } + + #[Route('/{id}/edit', name: 'app_commandes_edit', methods: ['GET', 'POST'])] + public function edit(Request $request, Commandes $commande, EntityManagerInterface $entityManager): Response + { + $form = $this->createForm(CommandesType::class, $commande); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->flush(); + + return $this->redirectToRoute('app_commandes_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('commandes/edit.html.twig', [ + 'commande' => $commande, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_commandes_delete', methods: ['POST'])] + public function delete(Request $request, Commandes $commande, EntityManagerInterface $entityManager): Response + { + if ($this->isCsrfTokenValid('delete'.$commande->getId(), $request->getPayload()->getString('_token'))) { + $entityManager->remove($commande); + $entityManager->flush(); + } + + return $this->redirectToRoute('app_commandes_index', [], Response::HTTP_SEE_OTHER); + } +} diff --git a/src/Controller/CuisinierController.php b/src/Controller/CuisinierController.php deleted file mode 100644 index c2097ea..0000000 --- a/src/Controller/CuisinierController.php +++ /dev/null @@ -1,46 +0,0 @@ -createForm(CuisinierType::class, $cuisinier); - - $form->handleRequest($request); - if ($form->isSubmitted() && $form->isValid()) { - $entityManager->persist($cuisinier); - $entityManager->flush(); - - $this->addFlash('success', 'Cuisinier ajouté avec succès !'); - return $this->redirectToRoute('ajouter_cuisinier'); - } - - return $this->render('cuisinier/ajouter.html.twig', [ - 'form' => $form->createView(), - ]); - } - - #[Route('/cuisinier/supprimer/{id}', name: 'supprimer_cuisinier', methods: ['POST'])] - public function supprimer(int $id, EntityManagerInterface $entityManager): Response - { - $cuisinier = $entityManager->getRepository(Cuisinier::class)->find($id); - - if (!$cuisinier) { - throw $this->createNotFoundException('Ce cuisinier n\'existe pas'); - } - - $entityManager->remove($cuisinier); - $entityManager->flush(); - - $this->addFlash('success', 'Cuisinier supprimé avec succès !'); - return $this->redirectToRoute('ajouter_cuisinier'); - } -} \ No newline at end of file diff --git a/src/Controller/DetailsCommandeController.php b/src/Controller/DetailsCommandeController.php new file mode 100644 index 0000000..21139a1 --- /dev/null +++ b/src/Controller/DetailsCommandeController.php @@ -0,0 +1,81 @@ +render('details_commande/index.html.twig', [ + 'details_commandes' => $detailsCommandeRepository->findAll(), + ]); + } + + #[Route('/new', name: 'app_details_commande_new', methods: ['GET', 'POST'])] + public function new(Request $request, EntityManagerInterface $entityManager): Response + { + $detailsCommande = new DetailsCommande(); + $form = $this->createForm(DetailsCommandeType::class, $detailsCommande); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->persist($detailsCommande); + $entityManager->flush(); + + return $this->redirectToRoute('app_details_commande_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('details_commande/new.html.twig', [ + 'details_commande' => $detailsCommande, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_details_commande_show', methods: ['GET'])] + public function show(DetailsCommande $detailsCommande): Response + { + return $this->render('details_commande/show.html.twig', [ + 'details_commande' => $detailsCommande, + ]); + } + + #[Route('/{id}/edit', name: 'app_details_commande_edit', methods: ['GET', 'POST'])] + public function edit(Request $request, DetailsCommande $detailsCommande, EntityManagerInterface $entityManager): Response + { + $form = $this->createForm(DetailsCommandeType::class, $detailsCommande); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->flush(); + + return $this->redirectToRoute('app_details_commande_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('details_commande/edit.html.twig', [ + 'details_commande' => $detailsCommande, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_details_commande_delete', methods: ['POST'])] + public function delete(Request $request, DetailsCommande $detailsCommande, EntityManagerInterface $entityManager): Response + { + if ($this->isCsrfTokenValid('delete'.$detailsCommande->getId(), $request->getPayload()->getString('_token'))) { + $entityManager->remove($detailsCommande); + $entityManager->flush(); + } + + return $this->redirectToRoute('app_details_commande_index', [], Response::HTTP_SEE_OTHER); + } +} diff --git a/src/Controller/PlatsController.php b/src/Controller/PlatsController.php new file mode 100644 index 0000000..e9c034d --- /dev/null +++ b/src/Controller/PlatsController.php @@ -0,0 +1,81 @@ +render('plats/index.html.twig', [ + 'plats' => $platsRepository->findAll(), + ]); + } + + #[Route('/new', name: 'app_plats_new', methods: ['GET', 'POST'])] + public function new(Request $request, EntityManagerInterface $entityManager): Response + { + $plat = new Plats(); + $form = $this->createForm(PlatsType::class, $plat); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->persist($plat); + $entityManager->flush(); + + return $this->redirectToRoute('app_plats_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('plats/new.html.twig', [ + 'plat' => $plat, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_plats_show', methods: ['GET'])] + public function show(Plats $plat): Response + { + return $this->render('plats/show.html.twig', [ + 'plat' => $plat, + ]); + } + + #[Route('/{id}/edit', name: 'app_plats_edit', methods: ['GET', 'POST'])] + public function edit(Request $request, Plats $plat, EntityManagerInterface $entityManager): Response + { + $form = $this->createForm(PlatsType::class, $plat); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->flush(); + + return $this->redirectToRoute('app_plats_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('plats/edit.html.twig', [ + 'plat' => $plat, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_plats_delete', methods: ['POST'])] + public function delete(Request $request, Plats $plat, EntityManagerInterface $entityManager): Response + { + if ($this->isCsrfTokenValid('delete'.$plat->getId(), $request->getPayload()->getString('_token'))) { + $entityManager->remove($plat); + $entityManager->flush(); + } + + return $this->redirectToRoute('app_plats_index', [], Response::HTTP_SEE_OTHER); + } +} diff --git a/src/Controller/ReductionsController.php b/src/Controller/ReductionsController.php new file mode 100644 index 0000000..c26f767 --- /dev/null +++ b/src/Controller/ReductionsController.php @@ -0,0 +1,81 @@ +render('reductions/index.html.twig', [ + 'reductions' => $reductionsRepository->findAll(), + ]); + } + + #[Route('/new', name: 'app_reductions_new', methods: ['GET', 'POST'])] + public function new(Request $request, EntityManagerInterface $entityManager): Response + { + $reduction = new Reductions(); + $form = $this->createForm(ReductionsType::class, $reduction); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->persist($reduction); + $entityManager->flush(); + + return $this->redirectToRoute('app_reductions_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('reductions/new.html.twig', [ + 'reduction' => $reduction, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_reductions_show', methods: ['GET'])] + public function show(Reductions $reduction): Response + { + return $this->render('reductions/show.html.twig', [ + 'reduction' => $reduction, + ]); + } + + #[Route('/{id}/edit', name: 'app_reductions_edit', methods: ['GET', 'POST'])] + public function edit(Request $request, Reductions $reduction, EntityManagerInterface $entityManager): Response + { + $form = $this->createForm(ReductionsType::class, $reduction); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->flush(); + + return $this->redirectToRoute('app_reductions_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('reductions/edit.html.twig', [ + 'reduction' => $reduction, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_reductions_delete', methods: ['POST'])] + public function delete(Request $request, Reductions $reduction, EntityManagerInterface $entityManager): Response + { + if ($this->isCsrfTokenValid('delete'.$reduction->getId(), $request->getPayload()->getString('_token'))) { + $entityManager->remove($reduction); + $entityManager->flush(); + } + + return $this->redirectToRoute('app_reductions_index', [], Response::HTTP_SEE_OTHER); + } +} diff --git a/src/Entity/Clients.php b/src/Entity/Clients.php index 35a78f3..4cd28f9 100644 --- a/src/Entity/Clients.php +++ b/src/Entity/Clients.php @@ -2,12 +2,13 @@ namespace App\Entity; +use AllowDynamicProperties; use App\Repository\ClientsRepository; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; -#[ORM\Entity(repositoryClass: ClientsRepository::class)] +#[AllowDynamicProperties] #[ORM\Entity(repositoryClass: ClientsRepository::class)] class Clients { #[ORM\Id] diff --git a/src/Form/ClientsType.php b/src/Form/ClientsType.php new file mode 100644 index 0000000..bdcd973 --- /dev/null +++ b/src/Form/ClientsType.php @@ -0,0 +1,41 @@ +add('Prenom') + ->add('Nom') + ->add('Email') + ->add('Telephone') + ->add('table', EntityType::class, [ + 'class' => Tables::class, + 'choice_label' => 'id', + 'multiple' => true, + ]) + ->add('commandes', EntityType::class, [ + 'class' => Commandes::class, + 'choice_label' => 'id', + 'multiple' => true, + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Clients::class, + ]); + } +} diff --git a/src/Form/CommandesType.php b/src/Form/CommandesType.php new file mode 100644 index 0000000..5dcc39b --- /dev/null +++ b/src/Form/CommandesType.php @@ -0,0 +1,47 @@ +add('DateHeure', null, [ + 'widget' => 'single_text', + ]) + ->add('Statut') + ->add('Total') + ->add('Client', EntityType::class, [ + 'class' => Clients::class, + 'choice_label' => 'id', + 'multiple' => true, + ]) + ->add('plats', EntityType::class, [ + 'class' => Plats::class, + 'choice_label' => 'id', + 'multiple' => true, + ]) + ->add('StatutCommande', EntityType::class, [ + 'class' => StatutCommandes::class, + 'choice_label' => 'id', + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Commandes::class, + ]); + } +} diff --git a/src/Form/DetailsCommandeType.php b/src/Form/DetailsCommandeType.php new file mode 100644 index 0000000..3d4eba3 --- /dev/null +++ b/src/Form/DetailsCommandeType.php @@ -0,0 +1,32 @@ +add('Quantite') + ->add('PrixUnitaire') + ->add('Commande', EntityType::class, [ + 'class' => Commandes::class, + 'choice_label' => 'id', + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => DetailsCommande::class, + ]); + } +} diff --git a/src/Form/PlatsType.php b/src/Form/PlatsType.php new file mode 100644 index 0000000..5946a7d --- /dev/null +++ b/src/Form/PlatsType.php @@ -0,0 +1,42 @@ +add('Nom') + ->add('Description') + ->add('Prix') + ->add('Categorie') + ->add('Statut') + ->add('Nb_de_commande') + ->add('Commande', EntityType::class, [ + 'class' => Commandes::class, + 'choice_label' => 'id', + 'multiple' => true, + ]) + ->add('Reduction', EntityType::class, [ + 'class' => Reductions::class, + 'choice_label' => 'id', + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Plats::class, + ]); + } +} diff --git a/src/Form/ReductionsType.php b/src/Form/ReductionsType.php new file mode 100644 index 0000000..ff5957e --- /dev/null +++ b/src/Form/ReductionsType.php @@ -0,0 +1,34 @@ +add('Description') + ->add('Prix') + ->add('Pourcentage') + ->add('MontantFixe') + ->add('DateDebut', null, [ + 'widget' => 'single_text', + ]) + ->add('DateFin', null, [ + 'widget' => 'single_text', + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Reductions::class, + ]); + } +} diff --git a/templates/clients/_delete_form.html.twig b/templates/clients/_delete_form.html.twig new file mode 100644 index 0000000..f4deca2 --- /dev/null +++ b/templates/clients/_delete_form.html.twig @@ -0,0 +1,4 @@ +
+ + +
diff --git a/templates/clients/_form.html.twig b/templates/clients/_form.html.twig new file mode 100644 index 0000000..bf20b98 --- /dev/null +++ b/templates/clients/_form.html.twig @@ -0,0 +1,4 @@ +{{ form_start(form) }} + {{ form_widget(form) }} + +{{ form_end(form) }} diff --git a/templates/clients/edit.html.twig b/templates/clients/edit.html.twig new file mode 100644 index 0000000..1f671c7 --- /dev/null +++ b/templates/clients/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit Clients{% endblock %} + +{% block body %} +

Edit Clients

+ + {{ include('clients/_form.html.twig', {'button_label': 'Update'}) }} + + back to list + + {{ include('clients/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/clients/index.html.twig b/templates/clients/index.html.twig new file mode 100644 index 0000000..3c9222f --- /dev/null +++ b/templates/clients/index.html.twig @@ -0,0 +1,44 @@ +{% extends 'base.html.twig' %} + +{% block title %}Clients index{% endblock %} +{% block stylesheets %} + + +{% endblock %} +{% block body %} +

Clients index

+ + + + + + + + + + + + + + {% for client in clients %} + + + + + + + + + {% else %} + + + + {% endfor %} + +
IdPrenomNomEmailTelephoneactions
{{ client.id }}{{ client.Prenom }}{{ client.Nom }}{{ client.Email }}{{ client.Telephone }} + show + edit +
no records found
+ + Créer un nouveau client +{% endblock %} diff --git a/templates/clients/new.html.twig b/templates/clients/new.html.twig new file mode 100644 index 0000000..616aca7 --- /dev/null +++ b/templates/clients/new.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}New Clients{% endblock %} + +{% block body %} +

Create new Clients

+ + {{ include('clients/_form.html.twig') }} + + back to list +{% endblock %} diff --git a/templates/clients/show.html.twig b/templates/clients/show.html.twig new file mode 100644 index 0000000..254ae62 --- /dev/null +++ b/templates/clients/show.html.twig @@ -0,0 +1,38 @@ +{% extends 'base.html.twig' %} + +{% block title %}Clients{% endblock %} + +{% block body %} +

Clients

+ + + + + + + + + + + + + + + + + + + + + + + + +
Id{{ client.id }}
Prenom{{ client.Prenom }}
Nom{{ client.Nom }}
Email{{ client.Email }}
Telephone{{ client.Telephone }}
+ + back to list + + edit + + {{ include('clients/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/commande/index.html.twig b/templates/commande/index.html.twig new file mode 100644 index 0000000..5d09fae --- /dev/null +++ b/templates/commande/index.html.twig @@ -0,0 +1,23 @@ +{% extends 'base.html.twig' %} + +{% block title %}Hello CommandeController!{% endblock %} +{% block stylesheets %} + + +{% endblock %} +{% block body %} + + +
+

Hello {{ controller_name }}! ✅

+ + This friendly message is coming from: +
    +
  • Your controller at /home/bayardk@stsio.lan/Documents/FestinHegre/src/Controller/CommandeController.php
  • +
  • Your template at /home/bayardk@stsio.lan/Documents/FestinHegre/templates/commande/index.html.twig
  • +
+
+{% endblock %} diff --git a/templates/commandes/_delete_form.html.twig b/templates/commandes/_delete_form.html.twig new file mode 100644 index 0000000..af65114 --- /dev/null +++ b/templates/commandes/_delete_form.html.twig @@ -0,0 +1,4 @@ +
+ + +
diff --git a/templates/commandes/_form.html.twig b/templates/commandes/_form.html.twig new file mode 100644 index 0000000..bf20b98 --- /dev/null +++ b/templates/commandes/_form.html.twig @@ -0,0 +1,4 @@ +{{ form_start(form) }} + {{ form_widget(form) }} + +{{ form_end(form) }} diff --git a/templates/commandes/edit.html.twig b/templates/commandes/edit.html.twig new file mode 100644 index 0000000..ce8c20e --- /dev/null +++ b/templates/commandes/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit Commandes{% endblock %} + +{% block body %} +

Edit Commandes

+ + {{ include('commandes/_form.html.twig', {'button_label': 'Update'}) }} + + back to list + + {{ include('commandes/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/commandes/index.html.twig b/templates/commandes/index.html.twig new file mode 100644 index 0000000..63e9977 --- /dev/null +++ b/templates/commandes/index.html.twig @@ -0,0 +1,42 @@ +{% extends 'base.html.twig' %} + +{% block title %}Commandes index{% endblock %} +{% block stylesheets %} + + +{% endblock %} +{% block body %} +

Commandes index

+ + + + + + + + + + + + + {% for commande in commandes %} + + + + + + + + {% else %} + + + + {% endfor %} + +
IdDateHeureStatutTotalactions
{{ commande.id }}{{ commande.DateHeure ? commande.DateHeure|date('Y-m-d H:i:s') : '' }}{{ commande.Statut ? 'Yes' : 'No' }}{{ commande.Total }} + show + edit +
pas de commande crée
+ + Créer une nouvelle commande +{% endblock %} diff --git a/templates/commandes/new.html.twig b/templates/commandes/new.html.twig new file mode 100644 index 0000000..af63760 --- /dev/null +++ b/templates/commandes/new.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}New Commandes{% endblock %} + +{% block body %} +

Create new Commandes

+ + {{ include('commandes/_form.html.twig') }} + + back to list +{% endblock %} diff --git a/templates/commandes/show.html.twig b/templates/commandes/show.html.twig new file mode 100644 index 0000000..ce527e4 --- /dev/null +++ b/templates/commandes/show.html.twig @@ -0,0 +1,34 @@ +{% extends 'base.html.twig' %} + +{% block title %}Commandes{% endblock %} + +{% block body %} +

Commandes

+ + + + + + + + + + + + + + + + + + + + +
Id{{ commande.id }}
DateHeure{{ commande.DateHeure ? commande.DateHeure|date('Y-m-d H:i:s') : '' }}
Statut{{ commande.Statut ? 'Yes' : 'No' }}
Total{{ commande.Total }}
+ + back to list + + edit + + {{ include('commandes/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/details_commande/_delete_form.html.twig b/templates/details_commande/_delete_form.html.twig new file mode 100644 index 0000000..465f168 --- /dev/null +++ b/templates/details_commande/_delete_form.html.twig @@ -0,0 +1,4 @@ +
+ + +
diff --git a/templates/details_commande/_form.html.twig b/templates/details_commande/_form.html.twig new file mode 100644 index 0000000..bf20b98 --- /dev/null +++ b/templates/details_commande/_form.html.twig @@ -0,0 +1,4 @@ +{{ form_start(form) }} + {{ form_widget(form) }} + +{{ form_end(form) }} diff --git a/templates/details_commande/edit.html.twig b/templates/details_commande/edit.html.twig new file mode 100644 index 0000000..7e0c933 --- /dev/null +++ b/templates/details_commande/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit DetailsCommande{% endblock %} + +{% block body %} +

Edit DetailsCommande

+ + {{ include('details_commande/_form.html.twig', {'button_label': 'Update'}) }} + + back to list + + {{ include('details_commande/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/details_commande/index.html.twig b/templates/details_commande/index.html.twig new file mode 100644 index 0000000..79715cf --- /dev/null +++ b/templates/details_commande/index.html.twig @@ -0,0 +1,41 @@ +{% extends 'base.html.twig' %} + +{% block title %}DetailsCommande index{% endblock %} + +{% block stylesheets %} + +{% endblock %} + +{% block body %} +

DetailsCommande index

+ + + + + + + + + + + + {% for details_commande in details_commandes %} + + + + + + + {% else %} + + + + {% endfor %} + +
IdQuantitePrixUnitaireactions
{{ details_commande.id }}{{ details_commande.Quantite }}{{ details_commande.PrixUnitaire }} + show + edit +
pas de détails de commande disponible
+ + Créer le détails d'une commande +{% endblock %} diff --git a/templates/details_commande/new.html.twig b/templates/details_commande/new.html.twig new file mode 100644 index 0000000..c3cae39 --- /dev/null +++ b/templates/details_commande/new.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}New DetailsCommande{% endblock %} + +{% block body %} +

Create new DetailsCommande

+ + {{ include('details_commande/_form.html.twig') }} + + back to list +{% endblock %} diff --git a/templates/details_commande/show.html.twig b/templates/details_commande/show.html.twig new file mode 100644 index 0000000..88478e5 --- /dev/null +++ b/templates/details_commande/show.html.twig @@ -0,0 +1,30 @@ +{% extends 'base.html.twig' %} + +{% block title %}DetailsCommande{% endblock %} + +{% block body %} +

DetailsCommande

+ + + + + + + + + + + + + + + + +
Id{{ details_commande.id }}
Quantite{{ details_commande.Quantite }}
PrixUnitaire{{ details_commande.PrixUnitaire }}
+ + back to list + + edit + + {{ include('details_commande/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/plats/_delete_form.html.twig b/templates/plats/_delete_form.html.twig new file mode 100644 index 0000000..bc89faf --- /dev/null +++ b/templates/plats/_delete_form.html.twig @@ -0,0 +1,4 @@ +
+ + +
diff --git a/templates/plats/_form.html.twig b/templates/plats/_form.html.twig new file mode 100644 index 0000000..bf20b98 --- /dev/null +++ b/templates/plats/_form.html.twig @@ -0,0 +1,4 @@ +{{ form_start(form) }} + {{ form_widget(form) }} + +{{ form_end(form) }} diff --git a/templates/plats/edit.html.twig b/templates/plats/edit.html.twig new file mode 100644 index 0000000..14afd7b --- /dev/null +++ b/templates/plats/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit Plats{% endblock %} + +{% block body %} +

Edit Plats

+ + {{ include('plats/_form.html.twig', {'button_label': 'Update'}) }} + + back to list + + {{ include('plats/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/plats/index.html.twig b/templates/plats/index.html.twig new file mode 100644 index 0000000..a7d2eff --- /dev/null +++ b/templates/plats/index.html.twig @@ -0,0 +1,48 @@ +{% extends 'base.html.twig' %} + +{% block title %}Plats index{% endblock %} +{% block stylesheets %} + + +{% endblock %} +{% block body %} +

Plats index

+ + + + + + + + + + + + + + + + {% for plat in plats %} + + + + + + + + + + + {% else %} + + + + {% endfor %} + +
IdNomDescriptionPrixCategorieStatutNb_de_commandeactions
{{ plat.id }}{{ plat.Nom }}{{ plat.Description }}{{ plat.Prix }}{{ plat.Categorie }}{{ plat.Statut ? 'Yes' : 'No' }}{{ plat.NbDeCommande }} + show + edit +
pas de plats disponible
+ + Créer un nouveaux plat +{% endblock %} diff --git a/templates/plats/new.html.twig b/templates/plats/new.html.twig new file mode 100644 index 0000000..a59e66b --- /dev/null +++ b/templates/plats/new.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}New Plats{% endblock %} + +{% block body %} +

Create new Plats

+ + {{ include('plats/_form.html.twig') }} + + back to list +{% endblock %} diff --git a/templates/plats/show.html.twig b/templates/plats/show.html.twig new file mode 100644 index 0000000..41fa96e --- /dev/null +++ b/templates/plats/show.html.twig @@ -0,0 +1,46 @@ +{% extends 'base.html.twig' %} + +{% block title %}Plats{% endblock %} + +{% block body %} +

Plats

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Id{{ plat.id }}
Nom{{ plat.Nom }}
Description{{ plat.Description }}
Prix{{ plat.Prix }}
Categorie{{ plat.Categorie }}
Statut{{ plat.Statut ? 'Yes' : 'No' }}
Nb_de_commande{{ plat.NbDeCommande }}
+ + back to list + + edit + + {{ include('plats/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/reductions/_delete_form.html.twig b/templates/reductions/_delete_form.html.twig new file mode 100644 index 0000000..20968bd --- /dev/null +++ b/templates/reductions/_delete_form.html.twig @@ -0,0 +1,4 @@ +
+ + +
diff --git a/templates/reductions/_form.html.twig b/templates/reductions/_form.html.twig new file mode 100644 index 0000000..bf20b98 --- /dev/null +++ b/templates/reductions/_form.html.twig @@ -0,0 +1,4 @@ +{{ form_start(form) }} + {{ form_widget(form) }} + +{{ form_end(form) }} diff --git a/templates/reductions/edit.html.twig b/templates/reductions/edit.html.twig new file mode 100644 index 0000000..7e82b78 --- /dev/null +++ b/templates/reductions/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit Reductions{% endblock %} + +{% block body %} +

Edit Reductions

+ + {{ include('reductions/_form.html.twig', {'button_label': 'Update'}) }} + + back to list + + {{ include('reductions/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/reductions/index.html.twig b/templates/reductions/index.html.twig new file mode 100644 index 0000000..a9788fd --- /dev/null +++ b/templates/reductions/index.html.twig @@ -0,0 +1,48 @@ +{% extends 'base.html.twig' %} + +{% block title %}Reductions index{% endblock %} +{% block stylesheets %} + + +{% endblock %} +{% block body %} +

Reductions index

+ + + + + + + + + + + + + + + + {% for reduction in reductions %} + + + + + + + + + + + {% else %} + + + + {% endfor %} + +
IdDescriptionPrixPourcentageMontantFixeDateDebutDateFinactions
{{ reduction.id }}{{ reduction.Description }}{{ reduction.Prix }}{{ reduction.Pourcentage }}{{ reduction.MontantFixe }}{{ reduction.DateDebut ? reduction.DateDebut|date('Y-m-d H:i:s') : '' }}{{ reduction.DateFin ? reduction.DateFin|date('Y-m-d H:i:s') : '' }} + show + edit +
pas encore de réductions
+ + Créer une réduction +{% endblock %} diff --git a/templates/reductions/new.html.twig b/templates/reductions/new.html.twig new file mode 100644 index 0000000..3b23736 --- /dev/null +++ b/templates/reductions/new.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}New Reductions{% endblock %} + +{% block body %} +

Create new Reductions

+ + {{ include('reductions/_form.html.twig') }} + + back to list +{% endblock %} diff --git a/templates/reductions/show.html.twig b/templates/reductions/show.html.twig new file mode 100644 index 0000000..4841c98 --- /dev/null +++ b/templates/reductions/show.html.twig @@ -0,0 +1,46 @@ +{% extends 'base.html.twig' %} + +{% block title %}Reductions{% endblock %} + +{% block body %} +

Reductions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Id{{ reduction.id }}
Description{{ reduction.Description }}
Prix{{ reduction.Prix }}
Pourcentage{{ reduction.Pourcentage }}
MontantFixe{{ reduction.MontantFixe }}
DateDebut{{ reduction.DateDebut ? reduction.DateDebut|date('Y-m-d H:i:s') : '' }}
DateFin{{ reduction.DateFin ? reduction.DateFin|date('Y-m-d H:i:s') : '' }}
+ + back to list + + edit + + {{ include('reductions/_delete_form.html.twig') }} +{% endblock %} From cbc2d65041fed8c414893b9285b78be654cacb79 Mon Sep 17 00:00:00 2001 From: Joshua Date: Thu, 21 Nov 2024 15:45:32 +0100 Subject: [PATCH 07/19] Finition Section "Compte" --- migrations/Version20241114160014.php | 52 ++++++ migrations/Version20241114160729.php | 50 ++++++ migrations/Version20241114164216.php | 46 ++++++ public/css/modal.css | 152 ++++++++++++++++++ src/Controller/LoginController.php | 4 +- src/Controller/UserController.php | 4 +- templates/Modals/gestionCompteModal.html.twig | 58 ------- templates/index/admin.html.twig | 1 - .../gestion.html.twig} | 6 +- templates/user/update.html.twig | 105 ++++++++++++ 10 files changed, 414 insertions(+), 64 deletions(-) create mode 100644 migrations/Version20241114160014.php create mode 100644 migrations/Version20241114160729.php create mode 100644 migrations/Version20241114164216.php create mode 100644 public/css/modal.css delete mode 100644 templates/Modals/gestionCompteModal.html.twig rename templates/{gestion_user/index.html.twig => user/gestion.html.twig} (87%) create mode 100644 templates/user/update.html.twig diff --git a/migrations/Version20241114160014.php b/migrations/Version20241114160014.php new file mode 100644 index 0000000..c219157 --- /dev/null +++ b/migrations/Version20241114160014.php @@ -0,0 +1,52 @@ +addSql('ALTER TABLE reservations DROP CONSTRAINT fk_4da2394de1870d'); + $this->addSql('DROP INDEX idx_4da2394de1870d'); + $this->addSql('ALTER TABLE reservations RENAME COLUMN tabl_id TO table_id'); + $this->addSql('ALTER TABLE reservations ADD CONSTRAINT FK_4DA239ECFF285C FOREIGN KEY (table_id) REFERENCES tables (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('CREATE INDEX IDX_4DA239ECFF285C ON reservations (table_id)'); + $this->addSql('ALTER TABLE statut_tables DROP CONSTRAINT fk_33c8a3754de1870d'); + $this->addSql('DROP INDEX idx_33c8a3754de1870d'); + $this->addSql('ALTER TABLE statut_tables RENAME COLUMN tabl_id TO table_id'); + $this->addSql('ALTER TABLE statut_tables ADD CONSTRAINT FK_33C8A375ECFF285C FOREIGN KEY (table_id) REFERENCES tables (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('CREATE INDEX IDX_33C8A375ECFF285C ON statut_tables (table_id)'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_497B315E5126AC48 ON utilisateurs (mail)'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('CREATE SCHEMA public'); + $this->addSql('DROP INDEX UNIQ_497B315E5126AC48'); + $this->addSql('ALTER TABLE statut_tables DROP CONSTRAINT FK_33C8A375ECFF285C'); + $this->addSql('DROP INDEX IDX_33C8A375ECFF285C'); + $this->addSql('ALTER TABLE statut_tables RENAME COLUMN table_id TO tabl_id'); + $this->addSql('ALTER TABLE statut_tables ADD CONSTRAINT fk_33c8a3754de1870d FOREIGN KEY (tabl_id) REFERENCES tables (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('CREATE INDEX idx_33c8a3754de1870d ON statut_tables (tabl_id)'); + $this->addSql('ALTER TABLE reservations DROP CONSTRAINT FK_4DA239ECFF285C'); + $this->addSql('DROP INDEX IDX_4DA239ECFF285C'); + $this->addSql('ALTER TABLE reservations RENAME COLUMN table_id TO tabl_id'); + $this->addSql('ALTER TABLE reservations ADD CONSTRAINT fk_4da2394de1870d FOREIGN KEY (tabl_id) REFERENCES tables (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('CREATE INDEX idx_4da2394de1870d ON reservations (tabl_id)'); + } +} diff --git a/migrations/Version20241114160729.php b/migrations/Version20241114160729.php new file mode 100644 index 0000000..8011f79 --- /dev/null +++ b/migrations/Version20241114160729.php @@ -0,0 +1,50 @@ +addSql('ALTER TABLE reservations DROP CONSTRAINT fk_4da239ecff285c'); + $this->addSql('DROP INDEX idx_4da239ecff285c'); + $this->addSql('ALTER TABLE reservations RENAME COLUMN table_id TO tables_id'); + $this->addSql('ALTER TABLE reservations ADD CONSTRAINT FK_4DA23985405FD2 FOREIGN KEY (tables_id) REFERENCES tables (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('CREATE INDEX IDX_4DA23985405FD2 ON reservations (tables_id)'); + $this->addSql('ALTER TABLE statut_tables DROP CONSTRAINT fk_33c8a375ecff285c'); + $this->addSql('DROP INDEX idx_33c8a375ecff285c'); + $this->addSql('ALTER TABLE statut_tables RENAME COLUMN table_id TO tables_id'); + $this->addSql('ALTER TABLE statut_tables ADD CONSTRAINT FK_33C8A37585405FD2 FOREIGN KEY (tables_id) REFERENCES tables (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('CREATE INDEX IDX_33C8A37585405FD2 ON statut_tables (tables_id)'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('CREATE SCHEMA public'); + $this->addSql('ALTER TABLE statut_tables DROP CONSTRAINT FK_33C8A37585405FD2'); + $this->addSql('DROP INDEX IDX_33C8A37585405FD2'); + $this->addSql('ALTER TABLE statut_tables RENAME COLUMN tables_id TO table_id'); + $this->addSql('ALTER TABLE statut_tables ADD CONSTRAINT fk_33c8a375ecff285c FOREIGN KEY (table_id) REFERENCES tables (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('CREATE INDEX idx_33c8a375ecff285c ON statut_tables (table_id)'); + $this->addSql('ALTER TABLE reservations DROP CONSTRAINT FK_4DA23985405FD2'); + $this->addSql('DROP INDEX IDX_4DA23985405FD2'); + $this->addSql('ALTER TABLE reservations RENAME COLUMN tables_id TO table_id'); + $this->addSql('ALTER TABLE reservations ADD CONSTRAINT fk_4da239ecff285c FOREIGN KEY (table_id) REFERENCES tables (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('CREATE INDEX idx_4da239ecff285c ON reservations (table_id)'); + } +} diff --git a/migrations/Version20241114164216.php b/migrations/Version20241114164216.php new file mode 100644 index 0000000..65df11e --- /dev/null +++ b/migrations/Version20241114164216.php @@ -0,0 +1,46 @@ +addSql('CREATE TABLE tables_clients (tables_id INT NOT NULL, clients_id INT NOT NULL, PRIMARY KEY(tables_id, clients_id))'); + $this->addSql('CREATE INDEX IDX_80F8906E85405FD2 ON tables_clients (tables_id)'); + $this->addSql('CREATE INDEX IDX_80F8906EAB014612 ON tables_clients (clients_id)'); + $this->addSql('ALTER TABLE tables_clients ADD CONSTRAINT FK_80F8906E85405FD2 FOREIGN KEY (tables_id) REFERENCES tables (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE tables_clients ADD CONSTRAINT FK_80F8906EAB014612 FOREIGN KEY (clients_id) REFERENCES clients (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE clients_tables DROP CONSTRAINT fk_8190d6c6ab014612'); + $this->addSql('ALTER TABLE clients_tables DROP CONSTRAINT fk_8190d6c685405fd2'); + $this->addSql('DROP TABLE clients_tables'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('CREATE SCHEMA public'); + $this->addSql('CREATE TABLE clients_tables (clients_id INT NOT NULL, tables_id INT NOT NULL, PRIMARY KEY(clients_id, tables_id))'); + $this->addSql('CREATE INDEX idx_8190d6c685405fd2 ON clients_tables (tables_id)'); + $this->addSql('CREATE INDEX idx_8190d6c6ab014612 ON clients_tables (clients_id)'); + $this->addSql('ALTER TABLE clients_tables ADD CONSTRAINT fk_8190d6c6ab014612 FOREIGN KEY (clients_id) REFERENCES clients (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE clients_tables ADD CONSTRAINT fk_8190d6c685405fd2 FOREIGN KEY (tables_id) REFERENCES tables (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE tables_clients DROP CONSTRAINT FK_80F8906E85405FD2'); + $this->addSql('ALTER TABLE tables_clients DROP CONSTRAINT FK_80F8906EAB014612'); + $this->addSql('DROP TABLE tables_clients'); + } +} diff --git a/public/css/modal.css b/public/css/modal.css new file mode 100644 index 0000000..f09f4d3 --- /dev/null +++ b/public/css/modal.css @@ -0,0 +1,152 @@ +.top-bar { + background-color: #db5559; + width: calc(100% - 18%); /*Calcule la totalité de l'écran - le left-background */ + height: 60px; + position: fixed; + top: 0; + left: 18%; /*Evite le chauvechement des 2 bars */ + display: flex; + justify-content: space-between; + align-items: center; + padding: 0 20px; + color: white; + font-size: 18px; + box-sizing: border-box; /* Inclut le padding dans la largeur totale */ +} + + +.user-role { + background-color: white; + color: black; + padding: 10px 15px; + font-weight: bold; + overflow: hidden; +} + + + +.left-background { + background-color: #db5559; + width: 18%; + height: 100%; + position: fixed; + top: 0; + left: 0; + display: flex; + flex-direction: column; + justify-content: space-between; +} + + +.index-title-page { + color: #FFFFFF; + font-size: 60px; + padding-bottom: 10px; + font-family: 'Brittany Signature', sans-serif; +} + +ul { + list-style-type: none; + padding: 0; +} + +li { + padding-bottom: 30px; +} + +.btn-custom { + background-color: #FFFFFF; + color: black; + padding: 15px 40px; + font-size: 16px; + font-weight: bold; + cursor: pointer; + display: inline-block; + + border-right: 5px solid #db5559; + border-left: 5px solid #db5559; +} + + +.btn-custom:hover, .btn-info-compte:hover, .btn-info-exit:hover { + background-color: #f8b5b5; + color: #FFFFFF; +} + +.icon-medium { + width: 25px; + height: 25px; +} + +.icon-container { + display: flex; + align-items: center; + gap: 10px; +} + + +.Information-perso { + display: flex; + justify-content: space-between; + padding: 20px; + margin-top: auto; +} + +.btn-info-compte, .btn-info-exit { + background-color: #FFFFFF; + color: black; + padding: 10px 20px; + font-size: 16px; + font-weight: bold; + cursor: pointer; + border: 1px solid black; +} + +.btn-info-compte { + width: 50%; + height: 30px; +} + +.btn-info-exit { + width: 10%; + height: 30px; +} + +/* Style pour la modal (cachée par défaut) */ +.modal { + display: none; /* Masquée par défaut */ + position: fixed; + z-index: 1; /* Au-dessus du contenu normal */ + left: 18%; /* Commence juste après ton left-background */ + top: 0; + width: 82%; /* Prend le reste de la largeur après le left-background */ + height: 100%; /* Prend toute la hauteur de l'écran */ + background-color: rgba(0, 0, 0, 0.4); /* Couleur d'arrière-plan avec transparence */ + overflow: auto; /* Permet le défilement si le contenu dépasse */ +} + +/* Contenu de la modal */ +.modal-content { + background-color: white; + margin: 5% auto; /* Centrage vertical */ + padding: 20px; + border: 1px solid black; + width: 80%; /* Largeur du contenu de la modal */ + height: 80%; /* Hauteur du contenu de la modal */ + box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2); +} + +/* Bouton de fermeture */ +.close { + color: black; + float: right; + font-size: 28px; + font-weight: bold; +} + +.close:hover, +.close:focus { + color: red; + cursor: pointer; +} + diff --git a/src/Controller/LoginController.php b/src/Controller/LoginController.php index eb3d2cc..c40906c 100644 --- a/src/Controller/LoginController.php +++ b/src/Controller/LoginController.php @@ -18,7 +18,7 @@ class LoginController extends AbstractController // last username entered by the user $lastUsername = $authenticationUtils->getLastUsername(); - return $this->render('login/index.html.twig', ['last_username' => $lastUsername, 'error' => $error]); + return $this->render('login/gestion.html.twig', ['last_username' => $lastUsername, 'error' => $error]); } @@ -31,7 +31,7 @@ class LoginController extends AbstractController #[Route('/access/denied', name: 'app_access_denied')] public function denied(): Response { - return $this->render('access_denied/index.html.twig', [ + return $this->render('access_denied/gestion.html.twig', [ 'controller_name' => 'AccessDeniedController', ]); } diff --git a/src/Controller/UserController.php b/src/Controller/UserController.php index 0586fa5..c99f38c 100644 --- a/src/Controller/UserController.php +++ b/src/Controller/UserController.php @@ -69,7 +69,7 @@ class UserController extends AbstractController return $this->redirectToRoute('app_index'); } - return $this->render('gestion_user/index.html.twig', [ + return $this->render('user/update.html.twig', [ 'form' => $form, ]); } @@ -88,6 +88,6 @@ class UserController extends AbstractController #[Route('/gestion-user', name: 'gestion_user', methods: ['GET'])] public function index(): Response { - return $this->render('gestion_user/index.html.twig'); + return $this->render('user/gestion.html.twig'); } } diff --git a/templates/Modals/gestionCompteModal.html.twig b/templates/Modals/gestionCompteModal.html.twig deleted file mode 100644 index a5d43af..0000000 --- a/templates/Modals/gestionCompteModal.html.twig +++ /dev/null @@ -1,58 +0,0 @@ - - - - diff --git a/templates/index/admin.html.twig b/templates/index/admin.html.twig index c6a8bed..7554c1c 100644 --- a/templates/index/admin.html.twig +++ b/templates/index/admin.html.twig @@ -126,7 +126,6 @@ - {% include 'Modals/gestionCompteModal.html.twig' %} {% endblock %} diff --git a/templates/gestion_user/index.html.twig b/templates/user/gestion.html.twig similarity index 87% rename from templates/gestion_user/index.html.twig rename to templates/user/gestion.html.twig index f82de26..f00eef9 100644 --- a/templates/gestion_user/index.html.twig +++ b/templates/user/gestion.html.twig @@ -26,9 +26,13 @@
- +
{% endblock %} + +{% block javascripts %} + +{% endblock %} diff --git a/templates/user/update.html.twig b/templates/user/update.html.twig new file mode 100644 index 0000000..df18571 --- /dev/null +++ b/templates/user/update.html.twig @@ -0,0 +1,105 @@ +{% extends 'base.html.twig' %} + +{% block stylesheets %} + +{% endblock %} + +{% block title %}Nouvelle Utilisateur{% endblock %} + +{% block body %} +
+

Modifier Utilisateurs ! ✅

+ + {{ form_start(form) }} + {{ form_errors(form) }} + +
+ {{ form_row(form.Nom, {'attr': {'class': 'form-input'}, 'label': 'Nom'}) }} +
+
+ {{ form_row(form.Prenom, {'attr': {'class': 'form-input'}, 'label': 'Prénom'}) }} +
+
+ {{ form_row(form.UserIdentifier, {'attr': {'class': 'form-input'}, 'label': 'Email'}) }} +
+
+ {{ form_row(form.Password, {'attr': {'class': 'form-input'}, 'label': 'Password'}) }} +
+
+ {{ form_row(form.Roles, {'attr': {'class': 'form-input'}, 'label': 'Roles'}) }} +
+
+ {{ form_row(form.Modifier, {'attr': {'class': 'btn-save'}, 'label': 'Enregistrer'}) }} +
+ + {{ form_end(form) }} + +
+ Annuler +
+
+{% endblock %} From c6decd7d6ba87aeb95290a481ab21cc092cfef87 Mon Sep 17 00:00:00 2001 From: bayard Date: Thu, 21 Nov 2024 16:18:02 +0100 Subject: [PATCH 08/19] push des vues new + css sur les vues --- public/css/new.css | 125 +++++++++++++++++++++ public/css/show.css | 0 src/Entity/Clients.php | 2 +- src/Form/PlatsType.php | 3 +- templates/clients/new.html.twig | 1 + templates/commandes/new.html.twig | 4 + templates/details_commande/new.html.twig | 6 +- templates/plats/new.html.twig | 3 + templates/reductions/new.html.twig | 7 +- templates/reservations/new.html.twig | 3 + templates/statut_commandes/index.html.twig | 4 + templates/statut_commandes/new.html.twig | 3 + templates/tables/new.html.twig | 4 + 13 files changed, 160 insertions(+), 5 deletions(-) create mode 100644 public/css/new.css create mode 100644 public/css/show.css diff --git a/public/css/new.css b/public/css/new.css new file mode 100644 index 0000000..07c98d1 --- /dev/null +++ b/public/css/new.css @@ -0,0 +1,125 @@ +/* Global styles */ +body { + font-family: 'Arial', sans-serif; + background-color: #fff5f5; + color: #333; + margin: 0; + padding: 0; + display: flex; + flex-direction: column; + align-items: center; + min-height: 100vh; +} + +/* Page container */ +.page-container { + width: 100%; + max-width: 600px; + margin: 20px auto; + padding: 20px; + background-color: #fff; + border-radius: 10px; + box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); + border: 2px solid #ff4d4d; +} + +/* Title */ +.page-title { + text-align: center; + font-size: 28px; + color: #ff4d4d; + margin-bottom: 20px; + font-weight: bold; + text-transform: uppercase; + letter-spacing: 1px; +} + +/* Form styles */ +form { + display: flex; + flex-direction: column; + gap: 15px; +} + +.form-group { + display: flex; + flex-direction: column; +} + +label { + font-weight: bold; + color: #ff4d4d; + margin-bottom: 5px; +} + +input[type="text"], +input[type="email"], +input[type="number"], +textarea, +select { + padding: 10px; + border: 1px solid #ccc; + border-radius: 5px; + font-size: 14px; + color: #333; + transition: border-color 0.3s ease-in-out; +} + +input[type="text"]:focus, +input[type="email"]:focus, +input[type="number"]:focus, +textarea:focus, +select:focus { + border-color: #ff4d4d; + outline: none; +} + +/* Submit button */ +button { + background-color: #ff4d4d; + color: white; + font-weight: bold; + padding: 12px 20px; + border: none; + border-radius: 5px; + font-size: 16px; + cursor: pointer; + text-transform: uppercase; + transition: background-color 0.3s ease-in-out; +} + +button:hover { + background-color: #e60000; +} + +/* Links */ +.actions { + text-align: center; + margin-top: 15px; +} + +.actions a { + text-decoration: none; + color: #ff4d4d; + font-weight: bold; + transition: color 0.3s ease-in-out; +} + +.actions a:hover { + color: #e60000; +} + +/* Error messages */ +.error-message { + color: #d9534f; + font-size: 14px; + margin-top: 5px; + font-style: italic; +} + +/* Empty space below */ +body::after { + content: ''; + height: 20px; + display: block; +} diff --git a/public/css/show.css b/public/css/show.css new file mode 100644 index 0000000..e69de29 diff --git a/src/Entity/Clients.php b/src/Entity/Clients.php index fcc28fd..7367507 100644 --- a/src/Entity/Clients.php +++ b/src/Entity/Clients.php @@ -32,7 +32,7 @@ class Clients * @var Collection */ #[ORM\ManyToMany(targetEntity: Tables::class, mappedBy: 'Clients')] - private Collection $tables; + public Collection $tables; /** * @var Collection diff --git a/src/Form/PlatsType.php b/src/Form/PlatsType.php index 5946a7d..068fa54 100644 --- a/src/Form/PlatsType.php +++ b/src/Form/PlatsType.php @@ -25,10 +25,11 @@ class PlatsType extends AbstractType 'class' => Commandes::class, 'choice_label' => 'id', 'multiple' => true, + 'expanded' => true, ]) ->add('Reduction', EntityType::class, [ 'class' => Reductions::class, - 'choice_label' => 'id', + 'choice_label' => 'description', ]) ; } diff --git a/templates/clients/new.html.twig b/templates/clients/new.html.twig index 616aca7..598c5dd 100644 --- a/templates/clients/new.html.twig +++ b/templates/clients/new.html.twig @@ -2,6 +2,7 @@ {% block title %}New Clients{% endblock %} + {% block body %}

Create new Clients

diff --git a/templates/commandes/new.html.twig b/templates/commandes/new.html.twig index af63760..85f9551 100644 --- a/templates/commandes/new.html.twig +++ b/templates/commandes/new.html.twig @@ -1,6 +1,10 @@ {% extends 'base.html.twig' %} {% block title %}New Commandes{% endblock %} +{% block stylesheets %} + + +{% endblock %} {% block body %}

Create new Commandes

diff --git a/templates/details_commande/new.html.twig b/templates/details_commande/new.html.twig index c3cae39..ad45911 100644 --- a/templates/details_commande/new.html.twig +++ b/templates/details_commande/new.html.twig @@ -1,8 +1,12 @@ {% extends 'base.html.twig' %} {% block title %}New DetailsCommande{% endblock %} - +{% block stylesheets %} + + +{% endblock %} {% block body %} +

Create new DetailsCommande

{{ include('details_commande/_form.html.twig') }} diff --git a/templates/plats/new.html.twig b/templates/plats/new.html.twig index a59e66b..460014a 100644 --- a/templates/plats/new.html.twig +++ b/templates/plats/new.html.twig @@ -1,7 +1,10 @@ {% extends 'base.html.twig' %} {% block title %}New Plats{% endblock %} +{% block stylesheets %} + +{% endblock %} {% block body %}

Create new Plats

diff --git a/templates/reductions/new.html.twig b/templates/reductions/new.html.twig index 3b23736..fd042d1 100644 --- a/templates/reductions/new.html.twig +++ b/templates/reductions/new.html.twig @@ -1,11 +1,14 @@ {% extends 'base.html.twig' %} {% block title %}New Reductions{% endblock %} +{% block stylesheets %} + +{% endblock %} {% block body %} -

Create new Reductions

+

Créer une Reductions

{{ include('reductions/_form.html.twig') }} - back to list + revenir a la liste {% endblock %} diff --git a/templates/reservations/new.html.twig b/templates/reservations/new.html.twig index c7c1981..cd5fe18 100644 --- a/templates/reservations/new.html.twig +++ b/templates/reservations/new.html.twig @@ -1,7 +1,10 @@ {% extends 'base.html.twig' %} {% block title %}New Reservations{% endblock %} +{% block stylesheets %} + +{% endblock %} {% block body %}

Create new Reservations

diff --git a/templates/statut_commandes/index.html.twig b/templates/statut_commandes/index.html.twig index 31d2a17..e5d445e 100644 --- a/templates/statut_commandes/index.html.twig +++ b/templates/statut_commandes/index.html.twig @@ -2,6 +2,10 @@ {% block title %}StatutCommandes index{% endblock %} +{% block stylesheets %} + + +{% endblock %} {% block body %}

StatutCommandes index

diff --git a/templates/statut_commandes/new.html.twig b/templates/statut_commandes/new.html.twig index ff46e9a..11b3a2c 100644 --- a/templates/statut_commandes/new.html.twig +++ b/templates/statut_commandes/new.html.twig @@ -1,7 +1,10 @@ {% extends 'base.html.twig' %} {% block title %}New StatutCommandes{% endblock %} +{% block stylesheets %} + +{% endblock %} {% block body %}

Create new StatutCommandes

diff --git a/templates/tables/new.html.twig b/templates/tables/new.html.twig index f25965a..7978437 100644 --- a/templates/tables/new.html.twig +++ b/templates/tables/new.html.twig @@ -1,6 +1,10 @@ {% extends 'base.html.twig' %} {% block title %}New Tables{% endblock %} +{% block stylesheets %} + + +{% endblock %} {% block body %}

Create new Tables

From 106d4226e6666ae87989268bad9f5db7384eeb07 Mon Sep 17 00:00:00 2001 From: Joshua Date: Thu, 21 Nov 2024 16:21:37 +0100 Subject: [PATCH 09/19] Finition Section "Compte" --- public/css/{ => Compte}/GestionUser.css | 0 public/css/{compte => Compte}/index.css | 0 public/css/{Index.css => Index/index.css} | 0 public/css/modal.css | 152 ------------------- public/js/{test.js => Compte/CompteModal.js} | 0 src/Controller/LoginController.php | 2 +- templates/index/admin.html.twig | 7 +- templates/index/cuisinier.html.twig | 4 +- templates/index/serveur.html.twig | 4 +- templates/user/gestion.html.twig | 2 +- 10 files changed, 10 insertions(+), 161 deletions(-) rename public/css/{ => Compte}/GestionUser.css (100%) rename public/css/{compte => Compte}/index.css (100%) rename public/css/{Index.css => Index/index.css} (100%) delete mode 100644 public/css/modal.css rename public/js/{test.js => Compte/CompteModal.js} (100%) diff --git a/public/css/GestionUser.css b/public/css/Compte/GestionUser.css similarity index 100% rename from public/css/GestionUser.css rename to public/css/Compte/GestionUser.css diff --git a/public/css/compte/index.css b/public/css/Compte/index.css similarity index 100% rename from public/css/compte/index.css rename to public/css/Compte/index.css diff --git a/public/css/Index.css b/public/css/Index/index.css similarity index 100% rename from public/css/Index.css rename to public/css/Index/index.css diff --git a/public/css/modal.css b/public/css/modal.css deleted file mode 100644 index f09f4d3..0000000 --- a/public/css/modal.css +++ /dev/null @@ -1,152 +0,0 @@ -.top-bar { - background-color: #db5559; - width: calc(100% - 18%); /*Calcule la totalité de l'écran - le left-background */ - height: 60px; - position: fixed; - top: 0; - left: 18%; /*Evite le chauvechement des 2 bars */ - display: flex; - justify-content: space-between; - align-items: center; - padding: 0 20px; - color: white; - font-size: 18px; - box-sizing: border-box; /* Inclut le padding dans la largeur totale */ -} - - -.user-role { - background-color: white; - color: black; - padding: 10px 15px; - font-weight: bold; - overflow: hidden; -} - - - -.left-background { - background-color: #db5559; - width: 18%; - height: 100%; - position: fixed; - top: 0; - left: 0; - display: flex; - flex-direction: column; - justify-content: space-between; -} - - -.index-title-page { - color: #FFFFFF; - font-size: 60px; - padding-bottom: 10px; - font-family: 'Brittany Signature', sans-serif; -} - -ul { - list-style-type: none; - padding: 0; -} - -li { - padding-bottom: 30px; -} - -.btn-custom { - background-color: #FFFFFF; - color: black; - padding: 15px 40px; - font-size: 16px; - font-weight: bold; - cursor: pointer; - display: inline-block; - - border-right: 5px solid #db5559; - border-left: 5px solid #db5559; -} - - -.btn-custom:hover, .btn-info-compte:hover, .btn-info-exit:hover { - background-color: #f8b5b5; - color: #FFFFFF; -} - -.icon-medium { - width: 25px; - height: 25px; -} - -.icon-container { - display: flex; - align-items: center; - gap: 10px; -} - - -.Information-perso { - display: flex; - justify-content: space-between; - padding: 20px; - margin-top: auto; -} - -.btn-info-compte, .btn-info-exit { - background-color: #FFFFFF; - color: black; - padding: 10px 20px; - font-size: 16px; - font-weight: bold; - cursor: pointer; - border: 1px solid black; -} - -.btn-info-compte { - width: 50%; - height: 30px; -} - -.btn-info-exit { - width: 10%; - height: 30px; -} - -/* Style pour la modal (cachée par défaut) */ -.modal { - display: none; /* Masquée par défaut */ - position: fixed; - z-index: 1; /* Au-dessus du contenu normal */ - left: 18%; /* Commence juste après ton left-background */ - top: 0; - width: 82%; /* Prend le reste de la largeur après le left-background */ - height: 100%; /* Prend toute la hauteur de l'écran */ - background-color: rgba(0, 0, 0, 0.4); /* Couleur d'arrière-plan avec transparence */ - overflow: auto; /* Permet le défilement si le contenu dépasse */ -} - -/* Contenu de la modal */ -.modal-content { - background-color: white; - margin: 5% auto; /* Centrage vertical */ - padding: 20px; - border: 1px solid black; - width: 80%; /* Largeur du contenu de la modal */ - height: 80%; /* Hauteur du contenu de la modal */ - box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2); -} - -/* Bouton de fermeture */ -.close { - color: black; - float: right; - font-size: 28px; - font-weight: bold; -} - -.close:hover, -.close:focus { - color: red; - cursor: pointer; -} - diff --git a/public/js/test.js b/public/js/Compte/CompteModal.js similarity index 100% rename from public/js/test.js rename to public/js/Compte/CompteModal.js diff --git a/src/Controller/LoginController.php b/src/Controller/LoginController.php index c40906c..9b6ac82 100644 --- a/src/Controller/LoginController.php +++ b/src/Controller/LoginController.php @@ -18,7 +18,7 @@ class LoginController extends AbstractController // last username entered by the user $lastUsername = $authenticationUtils->getLastUsername(); - return $this->render('login/gestion.html.twig', ['last_username' => $lastUsername, 'error' => $error]); + return $this->render('login/index.html.twig', ['last_username' => $lastUsername, 'error' => $error]); } diff --git a/templates/index/admin.html.twig b/templates/index/admin.html.twig index 7554c1c..8318f64 100644 --- a/templates/index/admin.html.twig +++ b/templates/index/admin.html.twig @@ -10,8 +10,9 @@ {% endblock %} {% block stylesheets %} - - + + + {% endblock %} {% block body %} @@ -130,5 +131,5 @@ {% endblock %} {% block javascripts %} - + {% endblock %} \ No newline at end of file diff --git a/templates/index/cuisinier.html.twig b/templates/index/cuisinier.html.twig index 93d945c..c3d6c12 100644 --- a/templates/index/cuisinier.html.twig +++ b/templates/index/cuisinier.html.twig @@ -10,7 +10,7 @@ {% endblock %} {% block stylesheets %} - + {% endblock %} @@ -84,7 +84,7 @@ + {% endblock %} From c3ff97cd6ddc9a44620545fb0b37d03469e6448c Mon Sep 17 00:00:00 2001 From: leroyv Date: Thu, 21 Nov 2024 16:31:51 +0100 Subject: [PATCH 10/19] Fix clients --- src/Form/ClientsType.php | 4 ++-- templates/clients/new.html.twig | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Form/ClientsType.php b/src/Form/ClientsType.php index bdcd973..cd01f5a 100644 --- a/src/Form/ClientsType.php +++ b/src/Form/ClientsType.php @@ -19,12 +19,12 @@ class ClientsType extends AbstractType ->add('Nom') ->add('Email') ->add('Telephone') - ->add('table', EntityType::class, [ + ->add('Tables', EntityType::class, [ 'class' => Tables::class, 'choice_label' => 'id', 'multiple' => true, ]) - ->add('commandes', EntityType::class, [ + ->add('Commandes', EntityType::class, [ 'class' => Commandes::class, 'choice_label' => 'id', 'multiple' => true, diff --git a/templates/clients/new.html.twig b/templates/clients/new.html.twig index 598c5dd..528365d 100644 --- a/templates/clients/new.html.twig +++ b/templates/clients/new.html.twig @@ -1,8 +1,10 @@ {% extends 'base.html.twig' %} {% block title %}New Clients{% endblock %} +{% block stylesheets %} + - +{% endblock %} {% block body %}

Create new Clients

From 10fa708b46918703ba443e24a7320da473089cb7 Mon Sep 17 00:00:00 2001 From: bayard Date: Thu, 21 Nov 2024 17:03:32 +0100 Subject: [PATCH 11/19] - Show, CSS files de List,New --- public/css/{ => ControllerVues}/list.css | 0 public/css/{ => ControllerVues}/new.css | 0 public/css/show.css | 0 src/Controller/ClientsController.php | 7 ---- src/Controller/DetailsCommandeController.php | 7 ---- src/Controller/PlatsController.php | 8 +---- src/Controller/ReductionsController.php | 7 ---- src/Controller/ReservationsController.php | 7 ---- src/Controller/StatutCommandesController.php | 7 ---- src/Controller/StatutTablesController.php | 7 ---- src/Controller/TablesController.php | 8 +---- templates/clients/index.html.twig | 2 +- templates/commande/index.html.twig | 23 ------------- templates/commandes/index.html.twig | 8 +++-- templates/commandes/new.html.twig | 2 +- templates/commandes/show.html.twig | 34 -------------------- templates/details_commande/index.html.twig | 2 +- templates/details_commande/new.html.twig | 2 +- templates/details_commande/show.html.twig | 2 +- templates/plats/index.html.twig | 2 +- templates/plats/new.html.twig | 2 +- templates/reductions/index.html.twig | 2 +- templates/reductions/new.html.twig | 2 +- templates/reservations/new.html.twig | 2 +- templates/statut_commandes/index.html.twig | 2 +- templates/statut_commandes/new.html.twig | 2 +- templates/statut_commandes/show.html.twig | 3 ++ templates/statut_tables/show.html.twig | 5 ++- templates/tables/new.html.twig | 2 +- 29 files changed, 28 insertions(+), 129 deletions(-) rename public/css/{ => ControllerVues}/list.css (100%) rename public/css/{ => ControllerVues}/new.css (100%) delete mode 100644 public/css/show.css delete mode 100644 templates/commande/index.html.twig delete mode 100644 templates/commandes/show.html.twig diff --git a/public/css/list.css b/public/css/ControllerVues/list.css similarity index 100% rename from public/css/list.css rename to public/css/ControllerVues/list.css diff --git a/public/css/new.css b/public/css/ControllerVues/new.css similarity index 100% rename from public/css/new.css rename to public/css/ControllerVues/new.css diff --git a/public/css/show.css b/public/css/show.css deleted file mode 100644 index e69de29..0000000 diff --git a/src/Controller/ClientsController.php b/src/Controller/ClientsController.php index bf6701d..3869bd0 100644 --- a/src/Controller/ClientsController.php +++ b/src/Controller/ClientsController.php @@ -42,13 +42,6 @@ final class ClientsController extends AbstractController ]); } - #[Route('/{id}', name: 'app_clients_show', methods: ['GET'])] - public function show(Clients $client): Response - { - return $this->render('clients/show.html.twig', [ - 'client' => $client, - ]); - } #[Route('/{id}/edit', name: 'app_clients_edit', methods: ['GET', 'POST'])] public function edit(Request $request, Clients $client, EntityManagerInterface $entityManager): Response diff --git a/src/Controller/DetailsCommandeController.php b/src/Controller/DetailsCommandeController.php index 21139a1..f0f8beb 100644 --- a/src/Controller/DetailsCommandeController.php +++ b/src/Controller/DetailsCommandeController.php @@ -42,13 +42,6 @@ final class DetailsCommandeController extends AbstractController ]); } - #[Route('/{id}', name: 'app_details_commande_show', methods: ['GET'])] - public function show(DetailsCommande $detailsCommande): Response - { - return $this->render('details_commande/show.html.twig', [ - 'details_commande' => $detailsCommande, - ]); - } #[Route('/{id}/edit', name: 'app_details_commande_edit', methods: ['GET', 'POST'])] public function edit(Request $request, DetailsCommande $detailsCommande, EntityManagerInterface $entityManager): Response diff --git a/src/Controller/PlatsController.php b/src/Controller/PlatsController.php index e9c034d..498590a 100644 --- a/src/Controller/PlatsController.php +++ b/src/Controller/PlatsController.php @@ -42,13 +42,7 @@ final class PlatsController extends AbstractController ]); } - #[Route('/{id}', name: 'app_plats_show', methods: ['GET'])] - public function show(Plats $plat): Response - { - return $this->render('plats/show.html.twig', [ - 'plat' => $plat, - ]); - } + #[Route('/{id}/edit', name: 'app_plats_edit', methods: ['GET', 'POST'])] public function edit(Request $request, Plats $plat, EntityManagerInterface $entityManager): Response diff --git a/src/Controller/ReductionsController.php b/src/Controller/ReductionsController.php index c26f767..da7cdeb 100644 --- a/src/Controller/ReductionsController.php +++ b/src/Controller/ReductionsController.php @@ -42,13 +42,6 @@ final class ReductionsController extends AbstractController ]); } - #[Route('/{id}', name: 'app_reductions_show', methods: ['GET'])] - public function show(Reductions $reduction): Response - { - return $this->render('reductions/show.html.twig', [ - 'reduction' => $reduction, - ]); - } #[Route('/{id}/edit', name: 'app_reductions_edit', methods: ['GET', 'POST'])] public function edit(Request $request, Reductions $reduction, EntityManagerInterface $entityManager): Response diff --git a/src/Controller/ReservationsController.php b/src/Controller/ReservationsController.php index 3098b4c..b0287fd 100644 --- a/src/Controller/ReservationsController.php +++ b/src/Controller/ReservationsController.php @@ -42,13 +42,6 @@ final class ReservationsController extends AbstractController ]); } - #[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 diff --git a/src/Controller/StatutCommandesController.php b/src/Controller/StatutCommandesController.php index 347914c..53d82c4 100644 --- a/src/Controller/StatutCommandesController.php +++ b/src/Controller/StatutCommandesController.php @@ -42,13 +42,6 @@ final class StatutCommandesController extends AbstractController ]); } - #[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 diff --git a/src/Controller/StatutTablesController.php b/src/Controller/StatutTablesController.php index ab9f2a6..84e5c61 100644 --- a/src/Controller/StatutTablesController.php +++ b/src/Controller/StatutTablesController.php @@ -42,13 +42,6 @@ final class StatutTablesController extends AbstractController ]); } - #[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 diff --git a/src/Controller/TablesController.php b/src/Controller/TablesController.php index cb2e641..c1c834b 100644 --- a/src/Controller/TablesController.php +++ b/src/Controller/TablesController.php @@ -42,13 +42,7 @@ final class TablesController extends AbstractController ]); } - #[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 diff --git a/templates/clients/index.html.twig b/templates/clients/index.html.twig index 3c9222f..8296934 100644 --- a/templates/clients/index.html.twig +++ b/templates/clients/index.html.twig @@ -2,7 +2,7 @@ {% block title %}Clients index{% endblock %} {% block stylesheets %} - + {% endblock %} {% block body %} diff --git a/templates/commande/index.html.twig b/templates/commande/index.html.twig deleted file mode 100644 index 5d09fae..0000000 --- a/templates/commande/index.html.twig +++ /dev/null @@ -1,23 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block title %}Hello CommandeController!{% endblock %} -{% block stylesheets %} - - -{% endblock %} -{% block body %} - - -
-

Hello {{ controller_name }}! ✅

- - This friendly message is coming from: -
    -
  • Your controller at /home/bayardk@stsio.lan/Documents/FestinHegre/src/Controller/CommandeController.php
  • -
  • Your template at /home/bayardk@stsio.lan/Documents/FestinHegre/templates/commande/index.html.twig
  • -
-
-{% endblock %} diff --git a/templates/commandes/index.html.twig b/templates/commandes/index.html.twig index 63e9977..2d0002c 100644 --- a/templates/commandes/index.html.twig +++ b/templates/commandes/index.html.twig @@ -2,7 +2,7 @@ {% block title %}Commandes index{% endblock %} {% block stylesheets %} - + {% endblock %} {% block body %} @@ -26,7 +26,11 @@ {{ commande.Statut ? 'Yes' : 'No' }} {{ commande.Total }} - show +
+ + +
+ edit diff --git a/templates/commandes/new.html.twig b/templates/commandes/new.html.twig index 85f9551..9895178 100644 --- a/templates/commandes/new.html.twig +++ b/templates/commandes/new.html.twig @@ -2,7 +2,7 @@ {% block title %}New Commandes{% endblock %} {% block stylesheets %} - + {% endblock %} diff --git a/templates/commandes/show.html.twig b/templates/commandes/show.html.twig deleted file mode 100644 index ce527e4..0000000 --- a/templates/commandes/show.html.twig +++ /dev/null @@ -1,34 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block title %}Commandes{% endblock %} - -{% block body %} -

Commandes

- - - - - - - - - - - - - - - - - - - - -
Id{{ commande.id }}
DateHeure{{ commande.DateHeure ? commande.DateHeure|date('Y-m-d H:i:s') : '' }}
Statut{{ commande.Statut ? 'Yes' : 'No' }}
Total{{ commande.Total }}
- - back to list - - edit - - {{ include('commandes/_delete_form.html.twig') }} -{% endblock %} diff --git a/templates/details_commande/index.html.twig b/templates/details_commande/index.html.twig index 79715cf..9d02dfe 100644 --- a/templates/details_commande/index.html.twig +++ b/templates/details_commande/index.html.twig @@ -3,7 +3,7 @@ {% block title %}DetailsCommande index{% endblock %} {% block stylesheets %} - + {% endblock %} {% block body %} diff --git a/templates/details_commande/new.html.twig b/templates/details_commande/new.html.twig index ad45911..35d741f 100644 --- a/templates/details_commande/new.html.twig +++ b/templates/details_commande/new.html.twig @@ -2,7 +2,7 @@ {% block title %}New DetailsCommande{% endblock %} {% block stylesheets %} - + {% endblock %} {% block body %} diff --git a/templates/details_commande/show.html.twig b/templates/details_commande/show.html.twig index 88478e5..bf5f533 100644 --- a/templates/details_commande/show.html.twig +++ b/templates/details_commande/show.html.twig @@ -1,7 +1,7 @@ {% extends 'base.html.twig' %} {% block title %}DetailsCommande{% endblock %} - + {% block body %}

DetailsCommande

diff --git a/templates/plats/index.html.twig b/templates/plats/index.html.twig index a7d2eff..b89f590 100644 --- a/templates/plats/index.html.twig +++ b/templates/plats/index.html.twig @@ -2,7 +2,7 @@ {% block title %}Plats index{% endblock %} {% block stylesheets %} - + {% endblock %} {% block body %} diff --git a/templates/plats/new.html.twig b/templates/plats/new.html.twig index 460014a..3854dad 100644 --- a/templates/plats/new.html.twig +++ b/templates/plats/new.html.twig @@ -2,7 +2,7 @@ {% block title %}New Plats{% endblock %} {% block stylesheets %} - + {% endblock %} {% block body %} diff --git a/templates/reductions/index.html.twig b/templates/reductions/index.html.twig index a9788fd..e0bfc22 100644 --- a/templates/reductions/index.html.twig +++ b/templates/reductions/index.html.twig @@ -2,7 +2,7 @@ {% block title %}Reductions index{% endblock %} {% block stylesheets %} - + {% endblock %} {% block body %} diff --git a/templates/reductions/new.html.twig b/templates/reductions/new.html.twig index fd042d1..bbb1a60 100644 --- a/templates/reductions/new.html.twig +++ b/templates/reductions/new.html.twig @@ -2,7 +2,7 @@ {% block title %}New Reductions{% endblock %} {% block stylesheets %} - + {% endblock %} {% block body %} diff --git a/templates/reservations/new.html.twig b/templates/reservations/new.html.twig index cd5fe18..6aa5e66 100644 --- a/templates/reservations/new.html.twig +++ b/templates/reservations/new.html.twig @@ -2,7 +2,7 @@ {% block title %}New Reservations{% endblock %} {% block stylesheets %} - + {% endblock %} {% block body %} diff --git a/templates/statut_commandes/index.html.twig b/templates/statut_commandes/index.html.twig index e5d445e..9527bb5 100644 --- a/templates/statut_commandes/index.html.twig +++ b/templates/statut_commandes/index.html.twig @@ -3,7 +3,7 @@ {% block title %}StatutCommandes index{% endblock %} {% block stylesheets %} - + {% endblock %} {% block body %} diff --git a/templates/statut_commandes/new.html.twig b/templates/statut_commandes/new.html.twig index 11b3a2c..558ccc6 100644 --- a/templates/statut_commandes/new.html.twig +++ b/templates/statut_commandes/new.html.twig @@ -2,7 +2,7 @@ {% block title %}New StatutCommandes{% endblock %} {% block stylesheets %} - + {% endblock %} {% block body %} diff --git a/templates/statut_commandes/show.html.twig b/templates/statut_commandes/show.html.twig index e42d6a3..632355f 100644 --- a/templates/statut_commandes/show.html.twig +++ b/templates/statut_commandes/show.html.twig @@ -1,7 +1,10 @@ {% extends 'base.html.twig' %} {% block title %}StatutCommandes{% endblock %} +{% block stylesheets %} + +{% endblock %} {% block body %}

StatutCommandes

diff --git a/templates/statut_tables/show.html.twig b/templates/statut_tables/show.html.twig index 2b395af..2503d7b 100644 --- a/templates/statut_tables/show.html.twig +++ b/templates/statut_tables/show.html.twig @@ -1,7 +1,10 @@ {% extends 'base.html.twig' %} {% block title %}StatutTables{% endblock %} +{% block stylesheets %} + +{% endblock %} {% block body %}

StatutTables

@@ -13,7 +16,7 @@ Libellé - {{ statut_table.Libellé }} + {{ statut_table.Libelle }} diff --git a/templates/tables/new.html.twig b/templates/tables/new.html.twig index 7978437..5ea4688 100644 --- a/templates/tables/new.html.twig +++ b/templates/tables/new.html.twig @@ -2,7 +2,7 @@ {% block title %}New Tables{% endblock %} {% block stylesheets %} - + {% endblock %} From 3a423d53a8a7c128f795b5a535e537bf8a08fa00 Mon Sep 17 00:00:00 2001 From: bayard Date: Thu, 21 Nov 2024 17:04:58 +0100 Subject: [PATCH 12/19] - Show, CSS files de List,New --- templates/plat/index.html.twig | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 templates/plat/index.html.twig diff --git a/templates/plat/index.html.twig b/templates/plat/index.html.twig deleted file mode 100644 index e2d1ec7..0000000 --- a/templates/plat/index.html.twig +++ /dev/null @@ -1,20 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block title %}Hello PlatController!{% endblock %} - -{% block body %} - - -
-

Hello {{ controller_name }}! ✅

- - This friendly message is coming from: -
    -
  • Your controller at /home/leroyv@stsio.lan/SLAM/FestinHegre/src/Controller/PlatController.php
  • -
  • Your template at /home/leroyv@stsio.lan/SLAM/FestinHegre/templates/plat/index.html.twig
  • -
-
-{% endblock %} From 3f56c0245bfedefdbf71d356f40e43880bd6c20f Mon Sep 17 00:00:00 2001 From: Joshua Date: Thu, 21 Nov 2024 17:39:43 +0100 Subject: [PATCH 13/19] =?UTF-8?q?Test=20s=C3=A9ction=20"G=C3=A9rer=20Utili?= =?UTF-8?q?sateurs"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GestionUtilisateurs.css | 23 ++++++++ .../GestionUtilisateurs.js | 59 +++++++++++++++++++ templates/index/admin.html.twig | 19 ++++-- templates/user/list.html.twig | 4 +- 4 files changed, 98 insertions(+), 7 deletions(-) create mode 100644 public/css/GestionUtilisateurs/GestionUtilisateurs.css create mode 100644 public/js/GestionUtilisateurs/GestionUtilisateurs.js diff --git a/public/css/GestionUtilisateurs/GestionUtilisateurs.css b/public/css/GestionUtilisateurs/GestionUtilisateurs.css new file mode 100644 index 0000000..7dc86ff --- /dev/null +++ b/public/css/GestionUtilisateurs/GestionUtilisateurs.css @@ -0,0 +1,23 @@ +#container_gestion_utilisateurs { + 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; +} + +#container_gestion_utilisateurs1 { + 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; +} \ No newline at end of file diff --git a/public/js/GestionUtilisateurs/GestionUtilisateurs.js b/public/js/GestionUtilisateurs/GestionUtilisateurs.js new file mode 100644 index 0000000..7785a22 --- /dev/null +++ b/public/js/GestionUtilisateurs/GestionUtilisateurs.js @@ -0,0 +1,59 @@ +document.querySelector('.btn-gestion-utilisateurs').addEventListener('click', function(event) { + event.preventDefault(); + + const contentContainer = document.getElementById('container_gestion_utilisateurs'); + + // Vérifie si le contenu est déjà affiché + if (container_gestion_utilisateurs.style.display === 'block') { + // Masquer la section "Compte" si elle est déjà affichée + container_gestion_utilisateurs.style.display = 'none'; + container_gestion_utilisateurs.innerHTML = ''; // On efface le contenu pour éviter la réutilisation + } else { + // Afficher le conteneur et charger le contenu via AJAX + fetch('/user/list') + .then(response => { + if (!response.ok) { + throw new Error('Erreur de chargement de la section Compte'); + } + return response.text(); + }) + .then(html => { + // Insérer le HTML dans le conteneur et l'afficher + container_gestion_utilisateurs.innerHTML = html; + container_gestion_utilisateurs.style.display = 'block'; + }) + .catch(error => { + console.error('Erreur:', error); + }); + } +}); + +document.querySelector('.btn-gestion-utilisateurs').addEventListener('click', function(event) { + event.preventDefault(); + + const contentContainer = document.getElementById('container_gestion_utilisateurs1'); + + // Vérifie si le contenu est déjà affiché + if (container_gestion_utilisateurs1.style.display === 'block') { + // Masquer la section "Compte" si elle est déjà affichée + container_gestion_utilisateurs1.style.display = 'none'; + container_gestion_utilisateurs1.innerHTML = ''; // On efface le contenu pour éviter la réutilisation + } else { + // Afficher le conteneur et charger le contenu via AJAX + fetch('/user/add') + .then(response => { + if (!response.ok) { + throw new Error('Erreur de chargement de la section Compte'); + } + return response.text(); + }) + .then(html => { + // Insérer le HTML dans le conteneur et l'afficher + container_gestion_utilisateurs1.innerHTML = html; + container_gestion_utilisateurs1.style.display = 'block'; + }) + .catch(error => { + console.error('Erreur:', error); + }); + } +}); \ No newline at end of file diff --git a/templates/index/admin.html.twig b/templates/index/admin.html.twig index 8318f64..0a276fa 100644 --- a/templates/index/admin.html.twig +++ b/templates/index/admin.html.twig @@ -12,7 +12,7 @@ {% block stylesheets %} - + {% endblock %} {% block body %} @@ -35,10 +35,10 @@ {% endblock %} From 77a1af3912e9c3778aef9f087ab11e692dd8db50 Mon Sep 17 00:00:00 2001 From: leroyv Date: Thu, 21 Nov 2024 17:48:16 +0100 Subject: [PATCH 14/19] Add Edit.css for templates Fix Lien templates avec le nouveau dossier --- public/css/ControllerVues/edit.css | 119 +++++++++++++++++++++ templates/clients/edit.html.twig | 18 +++- templates/clients/index.html.twig | 1 - templates/clients/new.html.twig | 2 +- templates/commandes/edit.html.twig | 24 +++-- templates/details_commande/edit.html.twig | 18 +++- templates/details_commande/index.html.twig | 1 - templates/plats/edit.html.twig | 18 +++- templates/plats/index.html.twig | 1 - templates/reductions/edit.html.twig | 18 +++- templates/reductions/index.html.twig | 1 - templates/reservations/edit.html.twig | 18 +++- templates/reservations/index.html.twig | 4 +- templates/statut_commandes/edit.html.twig | 18 +++- templates/statut_commandes/index.html.twig | 1 - templates/statut_tables/edit.html.twig | 18 +++- templates/statut_tables/index.html.twig | 5 +- templates/statut_tables/new.html.twig | 3 + templates/tables/edit.html.twig | 24 +++-- templates/tables/index.html.twig | 4 +- templates/tables/new.html.twig | 19 +++- 21 files changed, 270 insertions(+), 65 deletions(-) create mode 100644 public/css/ControllerVues/edit.css diff --git a/public/css/ControllerVues/edit.css b/public/css/ControllerVues/edit.css new file mode 100644 index 0000000..e5a8e3a --- /dev/null +++ b/public/css/ControllerVues/edit.css @@ -0,0 +1,119 @@ +/* Global styles */ +body { + font-family: 'Arial', sans-serif; + background-color: #f9f9f9; + color: #333; + margin: 0; + padding: 20px; + display: flex; + justify-content: center; + align-items: center; + min-height: 100vh; +} + +/* Page container */ +.page-container { + width: 100%; + max-width: 600px; + margin: 20px auto; + padding: 20px; + background-color: #fff; + border-radius: 10px; + box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); + border: 2px solid #db5559; +} + +/* Title */ +.page-title { + text-align: center; + font-size: 28px; + color: #db5559; + margin-bottom: 20px; + font-weight: bold; + text-transform: uppercase; + letter-spacing: 1px; +} + +/* Form styles */ +form { + display: flex; + flex-direction: column; + gap: 15px; +} + +.form-group { + display: flex; + flex-direction: column; +} + +label { + font-weight: bold; + color: #db5559; + margin-bottom: 5px; +} + +input[type="text"], +input[type="email"], +input[type="number"], +textarea, +select { + padding: 10px; + border: 1px solid #ddd; + border-radius: 5px; + font-size: 14px; + color: #333; + transition: border-color 0.3s ease-in-out; +} + +input[type="text"]:focus, +input[type="email"]:focus, +input[type="number"]:focus, +textarea:focus, +select:focus { + border-color: #db5559; + outline: none; +} + +/* Submit and Delete buttons */ +button { + background-color: #db5559; + color: white; + font-weight: bold; + padding: 12px 20px; + border: none; + border-radius: 5px; + font-size: 16px; + cursor: pointer; + text-transform: uppercase; + transition: background-color 0.3s ease-in-out; +} + +button:hover { + background-color: #bf494d; +} + +.delete-button { + background-color: #d9534f; + margin-top: 10px; +} + +.delete-button:hover { + background-color: #c9302c; +} + +/* Back to list link */ +.actions { + text-align: center; + margin-top: 15px; +} + +.actions a { + text-decoration: none; + color: #db5559; + font-weight: bold; + transition: color 0.3s ease-in-out; +} + +.actions a:hover { + color: #a02326; +} diff --git a/templates/clients/edit.html.twig b/templates/clients/edit.html.twig index 1f671c7..fe70866 100644 --- a/templates/clients/edit.html.twig +++ b/templates/clients/edit.html.twig @@ -1,13 +1,21 @@ {% extends 'base.html.twig' %} -{% block title %}Edit Clients{% endblock %} +{% block title %}Edit Client{% endblock %} + +{% block stylesheets %} + +{% endblock %} {% block body %} -

Edit Clients

+
+

Edit Client

- {{ include('clients/_form.html.twig', {'button_label': 'Update'}) }} + {{ include('clients/_form.html.twig', {'button_label': 'Update'}) }} - back to list + - {{ include('clients/_delete_form.html.twig') }} + {{ include('clients/_delete_form.html.twig') }} +
{% endblock %} diff --git a/templates/clients/index.html.twig b/templates/clients/index.html.twig index 8296934..28107ae 100644 --- a/templates/clients/index.html.twig +++ b/templates/clients/index.html.twig @@ -28,7 +28,6 @@ {{ client.Email }} {{ client.Telephone }} - show edit diff --git a/templates/clients/new.html.twig b/templates/clients/new.html.twig index 528365d..ed78ad8 100644 --- a/templates/clients/new.html.twig +++ b/templates/clients/new.html.twig @@ -2,7 +2,7 @@ {% block title %}New Clients{% endblock %} {% block stylesheets %} - + {% endblock %} {% block body %} diff --git a/templates/commandes/edit.html.twig b/templates/commandes/edit.html.twig index ce8c20e..b5e7038 100644 --- a/templates/commandes/edit.html.twig +++ b/templates/commandes/edit.html.twig @@ -2,12 +2,20 @@ {% block title %}Edit Commandes{% endblock %} -{% block body %} -

Edit Commandes

- - {{ include('commandes/_form.html.twig', {'button_label': 'Update'}) }} - - back to list - - {{ include('commandes/_delete_form.html.twig') }} +{% block stylesheets %} + +{% endblock %} + +{% block body %} +
+

Edit Commandes

+ + {{ include('commandes/_form.html.twig', {'button_label': 'Update'}) }} + + + + {{ include('commandes/_delete_form.html.twig') }} +
{% endblock %} diff --git a/templates/details_commande/edit.html.twig b/templates/details_commande/edit.html.twig index 7e0c933..22f8aad 100644 --- a/templates/details_commande/edit.html.twig +++ b/templates/details_commande/edit.html.twig @@ -1,13 +1,21 @@ {% extends 'base.html.twig' %} -{% block title %}Edit DetailsCommande{% endblock %} +{% block title %}Edit Détails Commande{% endblock %} + +{% block stylesheets %} + +{% endblock %} {% block body %} -

Edit DetailsCommande

+
+

Edit Détails Commande

- {{ include('details_commande/_form.html.twig', {'button_label': 'Update'}) }} + {{ include('details_commande/_form.html.twig', {'button_label': 'Update'}) }} - back to list + - {{ include('details_commande/_delete_form.html.twig') }} + {{ include('details_commande/_delete_form.html.twig') }} +
{% endblock %} diff --git a/templates/details_commande/index.html.twig b/templates/details_commande/index.html.twig index 9d02dfe..1cc7b4b 100644 --- a/templates/details_commande/index.html.twig +++ b/templates/details_commande/index.html.twig @@ -25,7 +25,6 @@ {{ details_commande.Quantite }} {{ details_commande.PrixUnitaire }} - show edit diff --git a/templates/plats/edit.html.twig b/templates/plats/edit.html.twig index 14afd7b..0e96826 100644 --- a/templates/plats/edit.html.twig +++ b/templates/plats/edit.html.twig @@ -1,13 +1,21 @@ {% extends 'base.html.twig' %} -{% block title %}Edit Plats{% endblock %} +{% block title %}Edit Plat{% endblock %} + +{% block stylesheets %} + +{% endblock %} {% block body %} -

Edit Plats

+
+

Edit Plat

- {{ include('plats/_form.html.twig', {'button_label': 'Update'}) }} + {{ include('plats/_form.html.twig', {'button_label': 'Update'}) }} - back to list + - {{ include('plats/_delete_form.html.twig') }} + {{ include('plats/_delete_form.html.twig') }} +
{% endblock %} diff --git a/templates/plats/index.html.twig b/templates/plats/index.html.twig index b89f590..8aa1b43 100644 --- a/templates/plats/index.html.twig +++ b/templates/plats/index.html.twig @@ -32,7 +32,6 @@ {{ plat.Statut ? 'Yes' : 'No' }} {{ plat.NbDeCommande }} - show edit diff --git a/templates/reductions/edit.html.twig b/templates/reductions/edit.html.twig index 7e82b78..175b042 100644 --- a/templates/reductions/edit.html.twig +++ b/templates/reductions/edit.html.twig @@ -1,13 +1,21 @@ {% extends 'base.html.twig' %} -{% block title %}Edit Reductions{% endblock %} +{% block title %}Edit Réductions{% endblock %} + +{% block stylesheets %} + +{% endblock %} {% block body %} -

Edit Reductions

+
+

Edit Réductions

- {{ include('reductions/_form.html.twig', {'button_label': 'Update'}) }} + {{ include('reductions/_form.html.twig', {'button_label': 'Update'}) }} - back to list + - {{ include('reductions/_delete_form.html.twig') }} + {{ include('reductions/_delete_form.html.twig') }} +
{% endblock %} diff --git a/templates/reductions/index.html.twig b/templates/reductions/index.html.twig index e0bfc22..b34eb82 100644 --- a/templates/reductions/index.html.twig +++ b/templates/reductions/index.html.twig @@ -32,7 +32,6 @@ {{ reduction.DateDebut ? reduction.DateDebut|date('Y-m-d H:i:s') : '' }} {{ reduction.DateFin ? reduction.DateFin|date('Y-m-d H:i:s') : '' }} - show edit diff --git a/templates/reservations/edit.html.twig b/templates/reservations/edit.html.twig index 6d6ca47..fd347bf 100644 --- a/templates/reservations/edit.html.twig +++ b/templates/reservations/edit.html.twig @@ -1,13 +1,21 @@ {% extends 'base.html.twig' %} -{% block title %}Edit Reservations{% endblock %} +{% block title %}Edit Réservation{% endblock %} + +{% block stylesheets %} + +{% endblock %} {% block body %} -

Edit Reservations

+
+

Edit Réservation

- {{ include('reservations/_form.html.twig', {'button_label': 'Update'}) }} + {{ include('reservations/_form.html.twig', {'button_label': 'Update'}) }} - back to list + - {{ include('reservations/_delete_form.html.twig') }} + {{ include('reservations/_delete_form.html.twig') }} +
{% endblock %} diff --git a/templates/reservations/index.html.twig b/templates/reservations/index.html.twig index 573e019..c711123 100644 --- a/templates/reservations/index.html.twig +++ b/templates/reservations/index.html.twig @@ -1,7 +1,10 @@ {% extends 'base.html.twig' %} {% block title %}Reservations index{% endblock %} +{% block stylesheets %} + +{% endblock %} {% block body %}

Reservations index

@@ -21,7 +24,6 @@ {{ reservation.DateHeure ? reservation.DateHeure|date('Y-m-d H:i:s') : '' }} {{ reservation.NbDePrsn }} - show edit diff --git a/templates/statut_commandes/edit.html.twig b/templates/statut_commandes/edit.html.twig index d9c145b..ad7eea4 100644 --- a/templates/statut_commandes/edit.html.twig +++ b/templates/statut_commandes/edit.html.twig @@ -1,13 +1,21 @@ {% extends 'base.html.twig' %} -{% block title %}Edit StatutCommandes{% endblock %} +{% block title %}Edit Statut commandes{% endblock %} + +{% block stylesheets %} + +{% endblock %} {% block body %} -

Edit StatutCommandes

+
+

Edit Statut commandes

- {{ include('statut_commandes/_form.html.twig', {'button_label': 'Update'}) }} + {{ include('statut_commandes/_form.html.twig', {'button_label': 'Update'}) }} - back to list + - {{ include('statut_commandes/_delete_form.html.twig') }} + {{ include('statut_commandes/_delete_form.html.twig') }} +
{% endblock %} diff --git a/templates/statut_commandes/index.html.twig b/templates/statut_commandes/index.html.twig index 9527bb5..8097c11 100644 --- a/templates/statut_commandes/index.html.twig +++ b/templates/statut_commandes/index.html.twig @@ -23,7 +23,6 @@ {{ statut_commande.id }} {{ statut_commande.Libelle }} - show edit diff --git a/templates/statut_tables/edit.html.twig b/templates/statut_tables/edit.html.twig index b478d3a..34629bb 100644 --- a/templates/statut_tables/edit.html.twig +++ b/templates/statut_tables/edit.html.twig @@ -1,13 +1,21 @@ {% extends 'base.html.twig' %} -{% block title %}Edit StatutTables{% endblock %} +{% block title %}Edit Statut tables{% endblock %} + +{% block stylesheets %} + +{% endblock %} {% block body %} -

Edit StatutTables

+
+

Edit Statut tables

- {{ include('statut_tables/_form.html.twig', {'button_label': 'Update'}) }} + {{ include('statut_tables/_form.html.twig', {'button_label': 'Update'}) }} - back to list + - {{ include('statut_tables/_delete_form.html.twig') }} + {{ include('statut_tables/_delete_form.html.twig') }} +
{% endblock %} diff --git a/templates/statut_tables/index.html.twig b/templates/statut_tables/index.html.twig index b721a5a..75b0715 100644 --- a/templates/statut_tables/index.html.twig +++ b/templates/statut_tables/index.html.twig @@ -1,7 +1,9 @@ {% extends 'base.html.twig' %} {% block title %}StatutTables index{% endblock %} - +{% block stylesheets %} + +{% endblock %} {% block body %}

StatutTables index

@@ -19,7 +21,6 @@ {{ statut_table.id }} {{ statut_table.Libellé }} - show edit diff --git a/templates/statut_tables/new.html.twig b/templates/statut_tables/new.html.twig index c2a3a60..c96c59e 100644 --- a/templates/statut_tables/new.html.twig +++ b/templates/statut_tables/new.html.twig @@ -1,7 +1,10 @@ {% extends 'base.html.twig' %} {% block title %}New StatutTables{% endblock %} +{% block stylesheets %} + +{% endblock %} {% block body %}

Create new StatutTables

diff --git a/templates/tables/edit.html.twig b/templates/tables/edit.html.twig index a0a1a92..3951750 100644 --- a/templates/tables/edit.html.twig +++ b/templates/tables/edit.html.twig @@ -2,12 +2,20 @@ {% block title %}Edit Tables{% endblock %} -{% block body %} -

Edit Tables

- - {{ include('tables/_form.html.twig', {'button_label': 'Update'}) }} - - back to list - - {{ include('tables/_delete_form.html.twig') }} +{% block stylesheets %} + +{% endblock %} + +{% block body %} +
+

Edit Tables

+ + {{ include('tables/_form.html.twig', {'button_label': 'Update'}) }} + + + + {{ include('tables/_delete_form.html.twig') }} +
{% endblock %} diff --git a/templates/tables/index.html.twig b/templates/tables/index.html.twig index 979d669..721ab68 100644 --- a/templates/tables/index.html.twig +++ b/templates/tables/index.html.twig @@ -1,7 +1,10 @@ {% extends 'base.html.twig' %} {% block title %}Tables index{% endblock %} +{% block stylesheets %} + +{% endblock %} {% block body %}

Tables index

@@ -17,7 +20,6 @@ {{ table.id }} - show edit diff --git a/templates/tables/new.html.twig b/templates/tables/new.html.twig index 5ea4688..ee8b808 100644 --- a/templates/tables/new.html.twig +++ b/templates/tables/new.html.twig @@ -1,15 +1,26 @@ {% extends 'base.html.twig' %} -{% block title %}New Tables{% endblock %} +{% block title %}Create New Table{% endblock %} + +{% block stylesheets %} + + +{% endblock %} {% block stylesheets %} {% endblock %} {% block body %} -

Create new Tables

+
+

Create New Table

- {{ include('tables/_form.html.twig') }} +
+ {{ include('tables/_form.html.twig') }} +
- back to list + +
{% endblock %} From d86bce8a0e461708f6690f9a77c935330e88e4db Mon Sep 17 00:00:00 2001 From: bayard Date: Thu, 28 Nov 2024 14:56:56 +0100 Subject: [PATCH 15/19] push des vues new + css sur les vues --- src/Controller/ClientsController.php | 3 +- templates/clients/edit.html.twig | 1 - templates/clients/index.html.twig | 5 ++- templates/clients/show.html.twig | 38 ------------------ templates/commandes/edit.html.twig | 2 +- templates/details_commande/index.html.twig | 5 ++- templates/details_commande/show.html.twig | 30 -------------- templates/plats/index.html.twig | 5 ++- templates/plats/show.html.twig | 46 ---------------------- templates/reductions/index.html.twig | 5 ++- templates/reductions/show.html.twig | 46 ---------------------- templates/reservations/index.html.twig | 5 ++- templates/reservations/show.html.twig | 30 -------------- 13 files changed, 23 insertions(+), 198 deletions(-) delete mode 100644 templates/clients/show.html.twig delete mode 100644 templates/details_commande/show.html.twig delete mode 100644 templates/plats/show.html.twig delete mode 100644 templates/reductions/show.html.twig delete mode 100644 templates/reservations/show.html.twig diff --git a/src/Controller/ClientsController.php b/src/Controller/ClientsController.php index 3869bd0..83dea14 100644 --- a/src/Controller/ClientsController.php +++ b/src/Controller/ClientsController.php @@ -14,6 +14,7 @@ use Symfony\Component\Routing\Attribute\Route; #[Route('/clients')] final class ClientsController extends AbstractController { + #[Route(name: 'app_clients_index', methods: ['GET'])] public function index(ClientsRepository $clientsRepository): Response { @@ -62,7 +63,7 @@ final class ClientsController extends AbstractController } #[Route('/{id}', name: 'app_clients_delete', methods: ['POST'])] - public function delete(Request $request, Clients $client, EntityManagerInterface $entityManager): Response + public function delete(Request $request, Clients $client, EntityManagerInterface $entityManager, int $id, ): Response { if ($this->isCsrfTokenValid('delete'.$client->getId(), $request->getPayload()->getString('_token'))) { $entityManager->remove($client); diff --git a/templates/clients/edit.html.twig b/templates/clients/edit.html.twig index 1f671c7..9668f3b 100644 --- a/templates/clients/edit.html.twig +++ b/templates/clients/edit.html.twig @@ -9,5 +9,4 @@ back to list - {{ include('clients/_delete_form.html.twig') }} {% endblock %} diff --git a/templates/clients/index.html.twig b/templates/clients/index.html.twig index 8296934..2b41290 100644 --- a/templates/clients/index.html.twig +++ b/templates/clients/index.html.twig @@ -28,7 +28,10 @@ {{ client.Email }} {{ client.Telephone }} - show +
+ + +
edit diff --git a/templates/clients/show.html.twig b/templates/clients/show.html.twig deleted file mode 100644 index 254ae62..0000000 --- a/templates/clients/show.html.twig +++ /dev/null @@ -1,38 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block title %}Clients{% endblock %} - -{% block body %} -

Clients

- - - - - - - - - - - - - - - - - - - - - - - - -
Id{{ client.id }}
Prenom{{ client.Prenom }}
Nom{{ client.Nom }}
Email{{ client.Email }}
Telephone{{ client.Telephone }}
- - back to list - - edit - - {{ include('clients/_delete_form.html.twig') }} -{% endblock %} diff --git a/templates/commandes/edit.html.twig b/templates/commandes/edit.html.twig index ce8c20e..0ce8172 100644 --- a/templates/commandes/edit.html.twig +++ b/templates/commandes/edit.html.twig @@ -9,5 +9,5 @@ back to list - {{ include('commandes/_delete_form.html.twig') }} + {% endblock %} diff --git a/templates/details_commande/index.html.twig b/templates/details_commande/index.html.twig index 9d02dfe..11bab85 100644 --- a/templates/details_commande/index.html.twig +++ b/templates/details_commande/index.html.twig @@ -25,7 +25,10 @@ {{ details_commande.Quantite }} {{ details_commande.PrixUnitaire }} - show +
+ + +
edit diff --git a/templates/details_commande/show.html.twig b/templates/details_commande/show.html.twig deleted file mode 100644 index bf5f533..0000000 --- a/templates/details_commande/show.html.twig +++ /dev/null @@ -1,30 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block title %}DetailsCommande{% endblock %} - -{% block body %} -

DetailsCommande

- - - - - - - - - - - - - - - - -
Id{{ details_commande.id }}
Quantite{{ details_commande.Quantite }}
PrixUnitaire{{ details_commande.PrixUnitaire }}
- - back to list - - edit - - {{ include('details_commande/_delete_form.html.twig') }} -{% endblock %} diff --git a/templates/plats/index.html.twig b/templates/plats/index.html.twig index b89f590..266e151 100644 --- a/templates/plats/index.html.twig +++ b/templates/plats/index.html.twig @@ -32,7 +32,10 @@ {{ plat.Statut ? 'Yes' : 'No' }} {{ plat.NbDeCommande }} - show +
+ + +
edit diff --git a/templates/plats/show.html.twig b/templates/plats/show.html.twig deleted file mode 100644 index 41fa96e..0000000 --- a/templates/plats/show.html.twig +++ /dev/null @@ -1,46 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block title %}Plats{% endblock %} - -{% block body %} -

Plats

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Id{{ plat.id }}
Nom{{ plat.Nom }}
Description{{ plat.Description }}
Prix{{ plat.Prix }}
Categorie{{ plat.Categorie }}
Statut{{ plat.Statut ? 'Yes' : 'No' }}
Nb_de_commande{{ plat.NbDeCommande }}
- - back to list - - edit - - {{ include('plats/_delete_form.html.twig') }} -{% endblock %} diff --git a/templates/reductions/index.html.twig b/templates/reductions/index.html.twig index e0bfc22..4055205 100644 --- a/templates/reductions/index.html.twig +++ b/templates/reductions/index.html.twig @@ -32,7 +32,10 @@ {{ reduction.DateDebut ? reduction.DateDebut|date('Y-m-d H:i:s') : '' }} {{ reduction.DateFin ? reduction.DateFin|date('Y-m-d H:i:s') : '' }} - show +
+ + +
edit diff --git a/templates/reductions/show.html.twig b/templates/reductions/show.html.twig deleted file mode 100644 index 4841c98..0000000 --- a/templates/reductions/show.html.twig +++ /dev/null @@ -1,46 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block title %}Reductions{% endblock %} - -{% block body %} -

Reductions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Id{{ reduction.id }}
Description{{ reduction.Description }}
Prix{{ reduction.Prix }}
Pourcentage{{ reduction.Pourcentage }}
MontantFixe{{ reduction.MontantFixe }}
DateDebut{{ reduction.DateDebut ? reduction.DateDebut|date('Y-m-d H:i:s') : '' }}
DateFin{{ reduction.DateFin ? reduction.DateFin|date('Y-m-d H:i:s') : '' }}
- - back to list - - edit - - {{ include('reductions/_delete_form.html.twig') }} -{% endblock %} diff --git a/templates/reservations/index.html.twig b/templates/reservations/index.html.twig index 573e019..0054791 100644 --- a/templates/reservations/index.html.twig +++ b/templates/reservations/index.html.twig @@ -21,7 +21,10 @@ {{ reservation.DateHeure ? reservation.DateHeure|date('Y-m-d H:i:s') : '' }} {{ reservation.NbDePrsn }} - show +
+ + +
edit diff --git a/templates/reservations/show.html.twig b/templates/reservations/show.html.twig deleted file mode 100644 index 1e99f32..0000000 --- a/templates/reservations/show.html.twig +++ /dev/null @@ -1,30 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block title %}Reservations{% endblock %} - -{% block body %} -

Reservations

- - - - - - - - - - - - - - - - -
Id{{ reservation.id }}
DateHeure{{ reservation.DateHeure ? reservation.DateHeure|date('Y-m-d H:i:s') : '' }}
Nb_de_prsn{{ reservation.NbDePrsn }}
- - back to list - - edit - - {{ include('reservations/_delete_form.html.twig') }} -{% endblock %} From 54a3154cf7d08455226969b9fb09fe4363d5ae19 Mon Sep 17 00:00:00 2001 From: Joshua Date: Thu, 5 Dec 2024 14:07:11 +0100 Subject: [PATCH 16/19] Mise a jour des Modals --- public/css/Compte/GestionUser.css | 3 +- public/css/Compte/index.css | 3 +- .../GestionUtilisateurs.css | 15 +--- public/js/Compte/CompteModal.js | 61 +++++++------ .../GestionUtilisateurs.js | 86 ++++++++----------- src/Form/UpdateUserType.php | 2 + templates/index/admin.html.twig | 10 +-- templates/user/add.html.twig | 4 - templates/user/gestion.html.twig | 8 +- templates/user/list.html.twig | 6 +- 10 files changed, 85 insertions(+), 113 deletions(-) diff --git a/public/css/Compte/GestionUser.css b/public/css/Compte/GestionUser.css index a2cb857..5fe2b0a 100644 --- a/public/css/Compte/GestionUser.css +++ b/public/css/Compte/GestionUser.css @@ -1,4 +1,4 @@ -#container_gestion_user { +#container_modal { background-color: white; margin-left: 20%; /* Centrage vertical */ margin-top: 5%; @@ -7,7 +7,6 @@ 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 { diff --git a/public/css/Compte/index.css b/public/css/Compte/index.css index f1b079e..37dd955 100644 --- a/public/css/Compte/index.css +++ b/public/css/Compte/index.css @@ -48,7 +48,7 @@ } } -#container_gestion_user { +#container_modal { background-color: white; margin-left: 20%; /* Centrage vertical */ margin-top: 5%; @@ -57,7 +57,6 @@ 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; } a{ diff --git a/public/css/GestionUtilisateurs/GestionUtilisateurs.css b/public/css/GestionUtilisateurs/GestionUtilisateurs.css index 7dc86ff..b5957a1 100644 --- a/public/css/GestionUtilisateurs/GestionUtilisateurs.css +++ b/public/css/GestionUtilisateurs/GestionUtilisateurs.css @@ -1,4 +1,4 @@ -#container_gestion_utilisateurs { +#container_modal { background-color: white; margin-left: 20%; /* Centrage vertical */ margin-top: 5%; @@ -7,17 +7,4 @@ 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; } - -#container_gestion_utilisateurs1 { - 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; -} \ No newline at end of file diff --git a/public/js/Compte/CompteModal.js b/public/js/Compte/CompteModal.js index 14636bd..0cf9eac 100644 --- a/public/js/Compte/CompteModal.js +++ b/public/js/Compte/CompteModal.js @@ -1,29 +1,40 @@ document.querySelector('.btn-info-compte').addEventListener('click', function(event) { event.preventDefault(); - const contentContainer = document.getElementById('container-gestion-user'); + document.getElementById('container_modal'); - // Vérifie si le contenu est déjà affiché - if (container_gestion_user.style.display === 'block') { - // Masquer la section "Compte" si elle est déjà affichée - container_gestion_user.style.display = 'none'; - container_gestion_user.innerHTML = ''; // On efface le contenu pour éviter la réutilisation - } else { - // Afficher le conteneur et charger le contenu via AJAX - fetch('/gestion-user') - .then(response => { - if (!response.ok) { - throw new Error('Erreur de chargement de la section Compte'); - } - return response.text(); - }) - .then(html => { - // Insérer le HTML dans le conteneur et l'afficher - container_gestion_user.innerHTML = html; - container_gestion_user.style.display = 'block'; - }) - .catch(error => { - console.error('Erreur:', error); - }); - } -}); \ No newline at end of file + fetch('/gestion-user') + .then(response => { + if (!response.ok) { + throw new Error('Erreur'); + } + return response.text(); + }) + .then(html => { + // Insérer le HTML dans le conteneur et l'afficher + container_modal.innerHTML = html; + container_modal.style.display = 'block'; + }) + .catch(error => { + console.error('Erreur:', error); + }); +}); + +function updateUser (event) { + document.getElementById('container_modal'); + const userIdString = event.getAttribute('data-id'); + let userId = parseInt(userIdString); + + fetch(`/user/update/${userId}`) + .then(response => { + return response.text(); + }) + .then(html => { + // Insérer le HTML dans le conteneur et l'afficher + container_modal.innerHTML = html; + container_modal.style.display = 'block'; + }) + .catch(error => { + console.error('Erreur:', error); + }); +} \ No newline at end of file diff --git a/public/js/GestionUtilisateurs/GestionUtilisateurs.js b/public/js/GestionUtilisateurs/GestionUtilisateurs.js index 7785a22..b4351bb 100644 --- a/public/js/GestionUtilisateurs/GestionUtilisateurs.js +++ b/public/js/GestionUtilisateurs/GestionUtilisateurs.js @@ -1,59 +1,41 @@ document.querySelector('.btn-gestion-utilisateurs').addEventListener('click', function(event) { event.preventDefault(); - const contentContainer = document.getElementById('container_gestion_utilisateurs'); + document.getElementById('container_modal'); - // Vérifie si le contenu est déjà affiché - if (container_gestion_utilisateurs.style.display === 'block') { - // Masquer la section "Compte" si elle est déjà affichée - container_gestion_utilisateurs.style.display = 'none'; - container_gestion_utilisateurs.innerHTML = ''; // On efface le contenu pour éviter la réutilisation - } else { - // Afficher le conteneur et charger le contenu via AJAX - fetch('/user/list') - .then(response => { - if (!response.ok) { - throw new Error('Erreur de chargement de la section Compte'); - } - return response.text(); - }) - .then(html => { - // Insérer le HTML dans le conteneur et l'afficher - container_gestion_utilisateurs.innerHTML = html; - container_gestion_utilisateurs.style.display = 'block'; - }) - .catch(error => { - console.error('Erreur:', error); - }); - } + fetch('/user/list') + .then(response => { + if (!response.ok) { + throw new Error('Erreur de chargement de la section Compte'); + } + return response.text(); + }) + .then(html => { + // Insérer le HTML dans le conteneur et l'afficher + container_modal.innerHTML = html; + container_modal.style.display = 'block'; + }) + .catch(error => { + console.error('Erreur:', error); + }); }); -document.querySelector('.btn-gestion-utilisateurs').addEventListener('click', function(event) { - event.preventDefault(); +function addUser (event) { + document.getElementById('container_modal'); - const contentContainer = document.getElementById('container_gestion_utilisateurs1'); - - // Vérifie si le contenu est déjà affiché - if (container_gestion_utilisateurs1.style.display === 'block') { - // Masquer la section "Compte" si elle est déjà affichée - container_gestion_utilisateurs1.style.display = 'none'; - container_gestion_utilisateurs1.innerHTML = ''; // On efface le contenu pour éviter la réutilisation - } else { - // Afficher le conteneur et charger le contenu via AJAX - fetch('/user/add') - .then(response => { - if (!response.ok) { - throw new Error('Erreur de chargement de la section Compte'); - } - return response.text(); - }) - .then(html => { - // Insérer le HTML dans le conteneur et l'afficher - container_gestion_utilisateurs1.innerHTML = html; - container_gestion_utilisateurs1.style.display = 'block'; - }) - .catch(error => { - console.error('Erreur:', error); - }); - } -}); \ No newline at end of file + fetch('/user/add') + .then(response => { + if (!response.ok) { + throw new Error('Erreur de chargement de la section Compte'); + } + return response.text(); + }) + .then(html => { + // Insérer le HTML dans le conteneur et l'afficher + container_modal.innerHTML = html; + container_modal.style.display = 'block'; + }) + .catch(error => { + console.error('Erreur:', error); + }); +} diff --git a/src/Form/UpdateUserType.php b/src/Form/UpdateUserType.php index 366ec33..96e2a0f 100644 --- a/src/Form/UpdateUserType.php +++ b/src/Form/UpdateUserType.php @@ -39,6 +39,8 @@ class UpdateUserType extends AbstractType 'choices' => [ 'Admin' => 'ROLE_ADMIN', 'User' => 'ROLE_USER', + 'Cuisinier' => 'ROLE_CUISINIER', + 'Serveur' => 'ROLE_SERVEUR', ], 'expanded' => true, 'multiple' => true, diff --git a/templates/index/admin.html.twig b/templates/index/admin.html.twig index 0a276fa..9c6d107 100644 --- a/templates/index/admin.html.twig +++ b/templates/index/admin.html.twig @@ -118,15 +118,7 @@ -
- -
- -
- -
- -
+
diff --git a/templates/user/add.html.twig b/templates/user/add.html.twig index b13bd8c..d349e1d 100644 --- a/templates/user/add.html.twig +++ b/templates/user/add.html.twig @@ -97,9 +97,5 @@
{{ form_end(registrationForm) }} - - {% endblock %} diff --git a/templates/user/gestion.html.twig b/templates/user/gestion.html.twig index c7b43fb..9227329 100644 --- a/templates/user/gestion.html.twig +++ b/templates/user/gestion.html.twig @@ -24,13 +24,13 @@ - -
- -
+
+ +
+ {% endblock %} {% block javascripts %} diff --git a/templates/user/list.html.twig b/templates/user/list.html.twig index 7efdb4c..0a88997 100644 --- a/templates/user/list.html.twig +++ b/templates/user/list.html.twig @@ -78,7 +78,11 @@
- Ajouter un Utilisateur +
{% endblock %} + +{% block javascripts %} + +{% endblock %} From ddff9b16772aacee6911f74d1ef6be640b705228 Mon Sep 17 00:00:00 2001 From: bayard Date: Thu, 5 Dec 2024 15:12:46 +0100 Subject: [PATCH 17/19] =?UTF-8?q?traduction=20en=20fran=C3=A7ais=20fix=20d?= =?UTF-8?q?u=20css=20Manque=20boutton=20supprimer=20affichage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- migrations/Version20241010155711.php | 109 -------------- migrations/Version20241020235112.php | 140 ------------------ migrations/Version20241024193330.php | 34 ----- public/css/ControllerVues/new.css | 1 + src/Controller/ClientsController.php | 1 - src/Controller/CommandesController.php | 11 +- src/Entity/StatutTables.php | 10 +- src/Form/StatutTablesType.php | 3 +- templates/clients/_delete_form.html.twig | 4 +- templates/clients/_form.html.twig | 2 +- templates/clients/edit.html.twig | 2 +- templates/clients/index.html.twig | 6 +- templates/clients/new.html.twig | 6 +- templates/commandes/_delete_form.html.twig | 4 +- templates/commandes/_form.html.twig | 2 +- templates/commandes/edit.html.twig | 2 +- templates/commandes/index.html.twig | 6 +- templates/commandes/new.html.twig | 6 +- .../details_commande/_delete_form.html.twig | 4 +- templates/details_commande/_form.html.twig | 2 +- templates/details_commande/edit.html.twig | 8 +- templates/details_commande/index.html.twig | 10 +- templates/details_commande/new.html.twig | 6 +- templates/plats/_delete_form.html.twig | 4 +- templates/plats/_form.html.twig | 2 +- templates/plats/edit.html.twig | 8 +- templates/plats/index.html.twig | 10 +- templates/plats/new.html.twig | 4 +- templates/reductions/_delete_form.html.twig | 4 +- templates/reductions/_form.html.twig | 2 +- templates/reductions/edit.html.twig | 8 +- templates/reductions/index.html.twig | 8 +- templates/reductions/new.html.twig | 6 +- templates/reservations/_delete_form.html.twig | 4 +- templates/reservations/_form.html.twig | 2 +- templates/reservations/edit.html.twig | 8 +- templates/reservations/index.html.twig | 13 +- templates/reservations/new.html.twig | 4 +- .../statut_commandes/_delete_form.html.twig | 4 +- templates/statut_commandes/_form.html.twig | 2 +- templates/statut_commandes/edit.html.twig | 6 +- templates/statut_commandes/index.html.twig | 10 +- templates/statut_commandes/new.html.twig | 6 +- templates/statut_commandes/show.html.twig | 29 ---- .../statut_tables/_delete_form.html.twig | 4 +- templates/statut_tables/_form.html.twig | 2 +- templates/statut_tables/edit.html.twig | 26 ++-- templates/statut_tables/index.html.twig | 15 +- templates/statut_tables/new.html.twig | 11 +- templates/tables/_delete_form.html.twig | 4 +- templates/tables/_form.html.twig | 2 +- templates/tables/edit.html.twig | 6 +- templates/tables/index.html.twig | 10 +- templates/tables/new.html.twig | 8 +- templates/tables/show.html.twig | 4 +- 55 files changed, 156 insertions(+), 459 deletions(-) delete mode 100644 migrations/Version20241010155711.php delete mode 100644 migrations/Version20241020235112.php delete mode 100644 migrations/Version20241024193330.php delete mode 100644 templates/statut_commandes/show.html.twig diff --git a/migrations/Version20241010155711.php b/migrations/Version20241010155711.php deleted file mode 100644 index cb95793..0000000 --- a/migrations/Version20241010155711.php +++ /dev/null @@ -1,109 +0,0 @@ -addSql('DROP SEQUENCE eat_id_seq CASCADE'); - $this->addSql('CREATE TABLE customer (id INT NOT NULL, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, number_phone VARCHAR(255) NOT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE TABLE customer_table (customer_id INT NOT NULL, table_id INT NOT NULL, PRIMARY KEY(customer_id, table_id))'); - $this->addSql('CREATE INDEX IDX_381CFA7D9395C3F3 ON customer_table (customer_id)'); - $this->addSql('CREATE INDEX IDX_381CFA7DECFF285C ON customer_table (table_id)'); - $this->addSql('CREATE TABLE discount (id INT NOT NULL, id_dishes_id INT DEFAULT NULL, description VARCHAR(255) NOT NULL, percentage VARCHAR(255) NOT NULL, fixed_amount DOUBLE PRECISION NOT NULL, start_date DATE NOT NULL, date_end DATE NOT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE INDEX IDX_E1E0B40E20686F5D ON discount (id_dishes_id)'); - $this->addSql('CREATE TABLE dishes (id INT NOT NULL, name VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, price DOUBLE PRECISION NOT NULL, category VARCHAR(255) NOT NULL, status VARCHAR(255) NOT NULL, number_order VARCHAR(255) NOT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE TABLE "order" (id INT NOT NULL, id_order_detail_id INT NOT NULL, id_status_order_id INT NOT NULL, date_time DOUBLE PRECISION NOT NULL, status VARCHAR(255) NOT NULL, total VARCHAR(255) NOT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE INDEX IDX_F52993988D09BBCB ON "order" (id_order_detail_id)'); - $this->addSql('CREATE INDEX IDX_F5299398F91B0968 ON "order" (id_status_order_id)'); - $this->addSql('CREATE TABLE order_user (order_id INT NOT NULL, user_id INT NOT NULL, PRIMARY KEY(order_id, user_id))'); - $this->addSql('CREATE INDEX IDX_C062EC5E8D9F6D38 ON order_user (order_id)'); - $this->addSql('CREATE INDEX IDX_C062EC5EA76ED395 ON order_user (user_id)'); - $this->addSql('CREATE TABLE order_dishes (order_id INT NOT NULL, dishes_id INT NOT NULL, PRIMARY KEY(order_id, dishes_id))'); - $this->addSql('CREATE INDEX IDX_9BC2C3888D9F6D38 ON order_dishes (order_id)'); - $this->addSql('CREATE INDEX IDX_9BC2C388A05DD37A ON order_dishes (dishes_id)'); - $this->addSql('CREATE TABLE order_detail (id INT NOT NULL, quantity DOUBLE PRECISION NOT NULL, unit_price DOUBLE PRECISION NOT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE TABLE reservation (id INT NOT NULL, date_time DOUBLE PRECISION NOT NULL, number_people INT NOT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE TABLE reservation_user (reservation_id INT NOT NULL, user_id INT NOT NULL, PRIMARY KEY(reservation_id, user_id))'); - $this->addSql('CREATE INDEX IDX_9BAA1B21B83297E7 ON reservation_user (reservation_id)'); - $this->addSql('CREATE INDEX IDX_9BAA1B21A76ED395 ON reservation_user (user_id)'); - $this->addSql('CREATE TABLE status_order (id INT NOT NULL, libelle VARCHAR(255) NOT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE TABLE status_table (id INT NOT NULL, libelle VARCHAR(255) NOT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE TABLE "table" (id INT NOT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE TABLE "user" (id INT NOT NULL, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, mail VARCHAR(255) NOT NULL, role VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE TABLE messenger_messages (id BIGSERIAL NOT NULL, body TEXT NOT NULL, headers TEXT NOT NULL, queue_name VARCHAR(190) NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, available_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, delivered_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE INDEX IDX_75EA56E0FB7336F0 ON messenger_messages (queue_name)'); - $this->addSql('CREATE INDEX IDX_75EA56E0E3BD61CE ON messenger_messages (available_at)'); - $this->addSql('CREATE INDEX IDX_75EA56E016BA31DB ON messenger_messages (delivered_at)'); - $this->addSql('COMMENT ON COLUMN messenger_messages.created_at IS \'(DC2Type:datetime_immutable)\''); - $this->addSql('COMMENT ON COLUMN messenger_messages.available_at IS \'(DC2Type:datetime_immutable)\''); - $this->addSql('COMMENT ON COLUMN messenger_messages.delivered_at IS \'(DC2Type:datetime_immutable)\''); - $this->addSql('CREATE OR REPLACE FUNCTION notify_messenger_messages() RETURNS TRIGGER AS $$ - BEGIN - PERFORM pg_notify(\'messenger_messages\', NEW.queue_name::text); - RETURN NEW; - END; - $$ LANGUAGE plpgsql;'); - $this->addSql('DROP TRIGGER IF EXISTS notify_trigger ON messenger_messages;'); - $this->addSql('CREATE TRIGGER notify_trigger AFTER INSERT OR UPDATE ON messenger_messages FOR EACH ROW EXECUTE PROCEDURE notify_messenger_messages();'); - $this->addSql('ALTER TABLE customer_table ADD CONSTRAINT FK_381CFA7D9395C3F3 FOREIGN KEY (customer_id) REFERENCES customer (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE customer_table ADD CONSTRAINT FK_381CFA7DECFF285C FOREIGN KEY (table_id) REFERENCES "table" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE discount ADD CONSTRAINT FK_E1E0B40E20686F5D FOREIGN KEY (id_dishes_id) REFERENCES dishes (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE "order" ADD CONSTRAINT FK_F52993988D09BBCB FOREIGN KEY (id_order_detail_id) REFERENCES order_detail (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE "order" ADD CONSTRAINT FK_F5299398F91B0968 FOREIGN KEY (id_status_order_id) REFERENCES status_order (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE order_user ADD CONSTRAINT FK_C062EC5E8D9F6D38 FOREIGN KEY (order_id) REFERENCES "order" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE order_user ADD CONSTRAINT FK_C062EC5EA76ED395 FOREIGN KEY (user_id) REFERENCES "user" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE order_dishes ADD CONSTRAINT FK_9BC2C3888D9F6D38 FOREIGN KEY (order_id) REFERENCES "order" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE order_dishes ADD CONSTRAINT FK_9BC2C388A05DD37A FOREIGN KEY (dishes_id) REFERENCES dishes (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE reservation_user ADD CONSTRAINT FK_9BAA1B21B83297E7 FOREIGN KEY (reservation_id) REFERENCES reservation (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE reservation_user ADD CONSTRAINT FK_9BAA1B21A76ED395 FOREIGN KEY (user_id) REFERENCES "user" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('CREATE SCHEMA public'); - $this->addSql('CREATE SEQUENCE eat_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); - $this->addSql('ALTER TABLE customer_table DROP CONSTRAINT FK_381CFA7D9395C3F3'); - $this->addSql('ALTER TABLE customer_table DROP CONSTRAINT FK_381CFA7DECFF285C'); - $this->addSql('ALTER TABLE discount DROP CONSTRAINT FK_E1E0B40E20686F5D'); - $this->addSql('ALTER TABLE "order" DROP CONSTRAINT FK_F52993988D09BBCB'); - $this->addSql('ALTER TABLE "order" DROP CONSTRAINT FK_F5299398F91B0968'); - $this->addSql('ALTER TABLE order_user DROP CONSTRAINT FK_C062EC5E8D9F6D38'); - $this->addSql('ALTER TABLE order_user DROP CONSTRAINT FK_C062EC5EA76ED395'); - $this->addSql('ALTER TABLE order_dishes DROP CONSTRAINT FK_9BC2C3888D9F6D38'); - $this->addSql('ALTER TABLE order_dishes DROP CONSTRAINT FK_9BC2C388A05DD37A'); - $this->addSql('ALTER TABLE reservation_user DROP CONSTRAINT FK_9BAA1B21B83297E7'); - $this->addSql('ALTER TABLE reservation_user DROP CONSTRAINT FK_9BAA1B21A76ED395'); - $this->addSql('DROP TABLE customer'); - $this->addSql('DROP TABLE customer_table'); - $this->addSql('DROP TABLE discount'); - $this->addSql('DROP TABLE dishes'); - $this->addSql('DROP TABLE "order"'); - $this->addSql('DROP TABLE order_user'); - $this->addSql('DROP TABLE order_dishes'); - $this->addSql('DROP TABLE order_detail'); - $this->addSql('DROP TABLE reservation'); - $this->addSql('DROP TABLE reservation_user'); - $this->addSql('DROP TABLE status_order'); - $this->addSql('DROP TABLE status_table'); - $this->addSql('DROP TABLE "table"'); - $this->addSql('DROP TABLE "user"'); - $this->addSql('DROP TABLE messenger_messages'); - } -} diff --git a/migrations/Version20241020235112.php b/migrations/Version20241020235112.php deleted file mode 100644 index 341fe1f..0000000 --- a/migrations/Version20241020235112.php +++ /dev/null @@ -1,140 +0,0 @@ -addSql('CREATE SEQUENCE clients_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); - $this->addSql('CREATE SEQUENCE commandes_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); - $this->addSql('CREATE SEQUENCE details_commande_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); - $this->addSql('CREATE SEQUENCE plats_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); - $this->addSql('CREATE SEQUENCE reductions_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); - $this->addSql('CREATE SEQUENCE reservations_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); - $this->addSql('CREATE SEQUENCE statut_commandes_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); - $this->addSql('CREATE SEQUENCE statut_tables_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); - $this->addSql('CREATE SEQUENCE tables_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); - $this->addSql('CREATE SEQUENCE utilisateurs_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); - $this->addSql('CREATE TABLE clients (id INT NOT NULL, prenom VARCHAR(255) NOT NULL, nom VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, telephone VARCHAR(255) NOT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE TABLE clients_tables (clients_id INT NOT NULL, tables_id INT NOT NULL, PRIMARY KEY(clients_id, tables_id))'); - $this->addSql('CREATE INDEX IDX_8190D6C6AB014612 ON clients_tables (clients_id)'); - $this->addSql('CREATE INDEX IDX_8190D6C685405FD2 ON clients_tables (tables_id)'); - $this->addSql('CREATE TABLE commandes (id INT NOT NULL, statut_commande_id INT DEFAULT NULL, date_heure TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, statut BOOLEAN NOT NULL, total DOUBLE PRECISION NOT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE INDEX IDX_35D4282CFB435DFD ON commandes (statut_commande_id)'); - $this->addSql('CREATE TABLE commandes_clients (commandes_id INT NOT NULL, clients_id INT NOT NULL, PRIMARY KEY(commandes_id, clients_id))'); - $this->addSql('CREATE INDEX IDX_C665A6248BF5C2E6 ON commandes_clients (commandes_id)'); - $this->addSql('CREATE INDEX IDX_C665A624AB014612 ON commandes_clients (clients_id)'); - $this->addSql('CREATE TABLE details_commande (id INT NOT NULL, commande_id INT DEFAULT NULL, quantite INT NOT NULL, prix_unitaire DOUBLE PRECISION NOT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE INDEX IDX_4BCD5F682EA2E54 ON details_commande (commande_id)'); - $this->addSql('CREATE TABLE plats (id INT NOT NULL, reduction_id INT DEFAULT NULL, nom VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, prix DOUBLE PRECISION NOT NULL, categorie VARCHAR(255) NOT NULL, statut BOOLEAN NOT NULL, nb_de_commande INT NOT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE INDEX IDX_854A620AC03CB092 ON plats (reduction_id)'); - $this->addSql('CREATE TABLE plats_commandes (plats_id INT NOT NULL, commandes_id INT NOT NULL, PRIMARY KEY(plats_id, commandes_id))'); - $this->addSql('CREATE INDEX IDX_7F8CABAAAA14E1C8 ON plats_commandes (plats_id)'); - $this->addSql('CREATE INDEX IDX_7F8CABAA8BF5C2E6 ON plats_commandes (commandes_id)'); - $this->addSql('CREATE TABLE reductions (id INT NOT NULL, description VARCHAR(255) NOT NULL, prix DOUBLE PRECISION NOT NULL, pourcentage INT NOT NULL, montant_fixe VARCHAR(255) NOT NULL, date_debut TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, date_fin TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE TABLE reservations (id INT NOT NULL, tabl_id INT DEFAULT NULL, date_heure TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, nb_de_prsn INT NOT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE INDEX IDX_4DA2394DE1870D ON reservations (tabl_id)'); - $this->addSql('CREATE TABLE statut_commandes (id INT NOT NULL, libelle VARCHAR(255) NOT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE TABLE statut_tables (id INT NOT NULL, tabl_id INT DEFAULT NULL, libellé VARCHAR(255) NOT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE INDEX IDX_33C8A3754DE1870D ON statut_tables (tabl_id)'); - $this->addSql('CREATE TABLE tables (id INT NOT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE TABLE utilisateurs (id INT NOT NULL, nom VARCHAR(255) NOT NULL, prenom VARCHAR(255) NOT NULL, mail VARCHAR(255) NOT NULL, mot_de_passe VARCHAR(255) NOT NULL, role VARCHAR(255) NOT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE TABLE utilisateurs_reservations (utilisateurs_id INT NOT NULL, reservations_id INT NOT NULL, PRIMARY KEY(utilisateurs_id, reservations_id))'); - $this->addSql('CREATE INDEX IDX_995A78E71E969C5 ON utilisateurs_reservations (utilisateurs_id)'); - $this->addSql('CREATE INDEX IDX_995A78E7D9A7F869 ON utilisateurs_reservations (reservations_id)'); - $this->addSql('CREATE TABLE utilisateurs_tables (utilisateurs_id INT NOT NULL, tables_id INT NOT NULL, PRIMARY KEY(utilisateurs_id, tables_id))'); - $this->addSql('CREATE INDEX IDX_A9A665291E969C5 ON utilisateurs_tables (utilisateurs_id)'); - $this->addSql('CREATE INDEX IDX_A9A6652985405FD2 ON utilisateurs_tables (tables_id)'); - $this->addSql('CREATE TABLE messenger_messages (id BIGSERIAL NOT NULL, body TEXT NOT NULL, headers TEXT NOT NULL, queue_name VARCHAR(190) NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, available_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, delivered_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY(id))'); - $this->addSql('CREATE INDEX IDX_75EA56E0FB7336F0 ON messenger_messages (queue_name)'); - $this->addSql('CREATE INDEX IDX_75EA56E0E3BD61CE ON messenger_messages (available_at)'); - $this->addSql('CREATE INDEX IDX_75EA56E016BA31DB ON messenger_messages (delivered_at)'); - $this->addSql('COMMENT ON COLUMN messenger_messages.created_at IS \'(DC2Type:datetime_immutable)\''); - $this->addSql('COMMENT ON COLUMN messenger_messages.available_at IS \'(DC2Type:datetime_immutable)\''); - $this->addSql('COMMENT ON COLUMN messenger_messages.delivered_at IS \'(DC2Type:datetime_immutable)\''); - $this->addSql('CREATE OR REPLACE FUNCTION notify_messenger_messages() RETURNS TRIGGER AS $$ - BEGIN - PERFORM pg_notify(\'messenger_messages\', NEW.queue_name::text); - RETURN NEW; - END; - $$ LANGUAGE plpgsql;'); - $this->addSql('DROP TRIGGER IF EXISTS notify_trigger ON messenger_messages;'); - $this->addSql('CREATE TRIGGER notify_trigger AFTER INSERT OR UPDATE ON messenger_messages FOR EACH ROW EXECUTE PROCEDURE notify_messenger_messages();'); - $this->addSql('ALTER TABLE clients_tables ADD CONSTRAINT FK_8190D6C6AB014612 FOREIGN KEY (clients_id) REFERENCES clients (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE clients_tables ADD CONSTRAINT FK_8190D6C685405FD2 FOREIGN KEY (tables_id) REFERENCES tables (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE commandes ADD CONSTRAINT FK_35D4282CFB435DFD FOREIGN KEY (statut_commande_id) REFERENCES statut_commandes (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE commandes_clients ADD CONSTRAINT FK_C665A6248BF5C2E6 FOREIGN KEY (commandes_id) REFERENCES commandes (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE commandes_clients ADD CONSTRAINT FK_C665A624AB014612 FOREIGN KEY (clients_id) REFERENCES clients (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE details_commande ADD CONSTRAINT FK_4BCD5F682EA2E54 FOREIGN KEY (commande_id) REFERENCES commandes (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE plats ADD CONSTRAINT FK_854A620AC03CB092 FOREIGN KEY (reduction_id) REFERENCES reductions (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE plats_commandes ADD CONSTRAINT FK_7F8CABAAAA14E1C8 FOREIGN KEY (plats_id) REFERENCES plats (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE plats_commandes ADD CONSTRAINT FK_7F8CABAA8BF5C2E6 FOREIGN KEY (commandes_id) REFERENCES commandes (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE reservations ADD CONSTRAINT FK_4DA2394DE1870D FOREIGN KEY (tabl_id) REFERENCES tables (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE statut_tables ADD CONSTRAINT FK_33C8A3754DE1870D FOREIGN KEY (tabl_id) REFERENCES tables (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE utilisateurs_reservations ADD CONSTRAINT FK_995A78E71E969C5 FOREIGN KEY (utilisateurs_id) REFERENCES utilisateurs (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE utilisateurs_reservations ADD CONSTRAINT FK_995A78E7D9A7F869 FOREIGN KEY (reservations_id) REFERENCES reservations (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE utilisateurs_tables ADD CONSTRAINT FK_A9A665291E969C5 FOREIGN KEY (utilisateurs_id) REFERENCES utilisateurs (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); - $this->addSql('ALTER TABLE utilisateurs_tables ADD CONSTRAINT FK_A9A6652985405FD2 FOREIGN KEY (tables_id) REFERENCES tables (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('DROP SEQUENCE clients_id_seq CASCADE'); - $this->addSql('DROP SEQUENCE commandes_id_seq CASCADE'); - $this->addSql('DROP SEQUENCE details_commande_id_seq CASCADE'); - $this->addSql('DROP SEQUENCE plats_id_seq CASCADE'); - $this->addSql('DROP SEQUENCE reductions_id_seq CASCADE'); - $this->addSql('DROP SEQUENCE reservations_id_seq CASCADE'); - $this->addSql('DROP SEQUENCE statut_commandes_id_seq CASCADE'); - $this->addSql('DROP SEQUENCE statut_tables_id_seq CASCADE'); - $this->addSql('DROP SEQUENCE tables_id_seq CASCADE'); - $this->addSql('DROP SEQUENCE utilisateurs_id_seq CASCADE'); - $this->addSql('ALTER TABLE clients_tables DROP CONSTRAINT FK_8190D6C6AB014612'); - $this->addSql('ALTER TABLE clients_tables DROP CONSTRAINT FK_8190D6C685405FD2'); - $this->addSql('ALTER TABLE commandes DROP CONSTRAINT FK_35D4282CFB435DFD'); - $this->addSql('ALTER TABLE commandes_clients DROP CONSTRAINT FK_C665A6248BF5C2E6'); - $this->addSql('ALTER TABLE commandes_clients DROP CONSTRAINT FK_C665A624AB014612'); - $this->addSql('ALTER TABLE details_commande DROP CONSTRAINT FK_4BCD5F682EA2E54'); - $this->addSql('ALTER TABLE plats DROP CONSTRAINT FK_854A620AC03CB092'); - $this->addSql('ALTER TABLE plats_commandes DROP CONSTRAINT FK_7F8CABAAAA14E1C8'); - $this->addSql('ALTER TABLE plats_commandes DROP CONSTRAINT FK_7F8CABAA8BF5C2E6'); - $this->addSql('ALTER TABLE reservations DROP CONSTRAINT FK_4DA2394DE1870D'); - $this->addSql('ALTER TABLE statut_tables DROP CONSTRAINT FK_33C8A3754DE1870D'); - $this->addSql('ALTER TABLE utilisateurs_reservations DROP CONSTRAINT FK_995A78E71E969C5'); - $this->addSql('ALTER TABLE utilisateurs_reservations DROP CONSTRAINT FK_995A78E7D9A7F869'); - $this->addSql('ALTER TABLE utilisateurs_tables DROP CONSTRAINT FK_A9A665291E969C5'); - $this->addSql('ALTER TABLE utilisateurs_tables DROP CONSTRAINT FK_A9A6652985405FD2'); - $this->addSql('DROP TABLE clients'); - $this->addSql('DROP TABLE clients_tables'); - $this->addSql('DROP TABLE commandes'); - $this->addSql('DROP TABLE commandes_clients'); - $this->addSql('DROP TABLE details_commande'); - $this->addSql('DROP TABLE plats'); - $this->addSql('DROP TABLE plats_commandes'); - $this->addSql('DROP TABLE reductions'); - $this->addSql('DROP TABLE reservations'); - $this->addSql('DROP TABLE statut_commandes'); - $this->addSql('DROP TABLE statut_tables'); - $this->addSql('DROP TABLE tables'); - $this->addSql('DROP TABLE utilisateurs'); - $this->addSql('DROP TABLE utilisateurs_reservations'); - $this->addSql('DROP TABLE utilisateurs_tables'); - $this->addSql('DROP TABLE messenger_messages'); - } -} diff --git a/migrations/Version20241024193330.php b/migrations/Version20241024193330.php deleted file mode 100644 index b929218..0000000 --- a/migrations/Version20241024193330.php +++ /dev/null @@ -1,34 +0,0 @@ -addSql('ALTER TABLE utilisateurs ALTER role TYPE JSON USING role::json'); - $this->addSql('COMMENT ON COLUMN utilisateurs.role IS NULL'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('CREATE SCHEMA public'); - $this->addSql('ALTER TABLE utilisateurs ALTER role TYPE TEXT'); - $this->addSql('COMMENT ON COLUMN utilisateurs.role IS \'(DC2Type:array)\''); - } -} diff --git a/public/css/ControllerVues/new.css b/public/css/ControllerVues/new.css index 07c98d1..c442783 100644 --- a/public/css/ControllerVues/new.css +++ b/public/css/ControllerVues/new.css @@ -123,3 +123,4 @@ body::after { height: 20px; display: block; } + diff --git a/src/Controller/ClientsController.php b/src/Controller/ClientsController.php index 83dea14..2c41873 100644 --- a/src/Controller/ClientsController.php +++ b/src/Controller/ClientsController.php @@ -1,7 +1,6 @@ render('commandes/show.html.twig', [ - 'commande' => $commande, - ]); - } - #[Route('/{id}/edit', name: 'app_commandes_edit', methods: ['GET', 'POST'])] public function edit(Request $request, Commandes $commande, EntityManagerInterface $entityManager): Response { @@ -69,8 +61,9 @@ final class CommandesController extends AbstractController } #[Route('/{id}', name: 'app_commandes_delete', methods: ['POST'])] - public function delete(Request $request, Commandes $commande, EntityManagerInterface $entityManager): Response + public function delete(Request $request, Commandes $commande, EntityManagerInterface $entityManager, int $id): Response { + if ($this->isCsrfTokenValid('delete'.$commande->getId(), $request->getPayload()->getString('_token'))) { $entityManager->remove($commande); $entityManager->flush(); diff --git a/src/Entity/StatutTables.php b/src/Entity/StatutTables.php index 5b500b9..1093ed5 100644 --- a/src/Entity/StatutTables.php +++ b/src/Entity/StatutTables.php @@ -14,7 +14,7 @@ class StatutTables private ?int $id = null; #[ORM\Column(length: 255)] - private ?string $Libellé = null; + private ?string $Libelle = null; #[ORM\ManyToOne(inversedBy: 'statutTables')] private ?Tables $tables = null; @@ -24,14 +24,14 @@ class StatutTables return $this->id; } - public function getLibellé(): ?string + public function getLibelle(): ?string { - return $this->Libellé; + return $this->Libelle; } - public function setLibellé(string $Libellé): static + public function setLibelle(string $Libelle): static { - $this->Libellé = $Libellé; + $this->Libelle = $Libelle; return $this; } diff --git a/src/Form/StatutTablesType.php b/src/Form/StatutTablesType.php index ff6c013..70797d0 100644 --- a/src/Form/StatutTablesType.php +++ b/src/Form/StatutTablesType.php @@ -14,10 +14,11 @@ class StatutTablesType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options): void { $builder - ->add('Libellé') + ->add('Libelle') ->add('tables', EntityType::class, [ 'class' => Tables::class, 'choice_label' => 'id', + 'mapped' => false, ]) ; } diff --git a/templates/clients/_delete_form.html.twig b/templates/clients/_delete_form.html.twig index f4deca2..60f8140 100644 --- a/templates/clients/_delete_form.html.twig +++ b/templates/clients/_delete_form.html.twig @@ -1,4 +1,4 @@ -
+ - +
diff --git a/templates/clients/_form.html.twig b/templates/clients/_form.html.twig index bf20b98..7fe26a6 100644 --- a/templates/clients/_form.html.twig +++ b/templates/clients/_form.html.twig @@ -1,4 +1,4 @@ {{ form_start(form) }} {{ form_widget(form) }} - + {{ form_end(form) }} diff --git a/templates/clients/edit.html.twig b/templates/clients/edit.html.twig index 8047809..bea3e03 100644 --- a/templates/clients/edit.html.twig +++ b/templates/clients/edit.html.twig @@ -7,7 +7,7 @@ {{ include('clients/_form.html.twig', {'button_label': 'Mettre à jour'}) }} - retour à la liste + Retour à la liste {{ include('clients/_delete_form.html.twig') }} {% endblock %} diff --git a/templates/clients/index.html.twig b/templates/clients/index.html.twig index 2b41290..9eeb216 100644 --- a/templates/clients/index.html.twig +++ b/templates/clients/index.html.twig @@ -28,11 +28,11 @@ {{ client.Email }} {{ client.Telephone }} -
+ - + {{ include('clients/_delete_form.html.twig') }}
- edit + Modifier {% else %} diff --git a/templates/clients/new.html.twig b/templates/clients/new.html.twig index ed78ad8..16b0079 100644 --- a/templates/clients/new.html.twig +++ b/templates/clients/new.html.twig @@ -1,14 +1,14 @@ {% extends 'base.html.twig' %} -{% block title %}New Clients{% endblock %} +{% block title %}Nouveau client{% endblock %} {% block stylesheets %} {% endblock %} {% block body %} -

Create new Clients

+

Créer un client

{{ include('clients/_form.html.twig') }} - back to list + Retour à la liste {% endblock %} diff --git a/templates/commandes/_delete_form.html.twig b/templates/commandes/_delete_form.html.twig index af65114..60f1723 100644 --- a/templates/commandes/_delete_form.html.twig +++ b/templates/commandes/_delete_form.html.twig @@ -1,4 +1,4 @@ -
+ - +
diff --git a/templates/commandes/_form.html.twig b/templates/commandes/_form.html.twig index bf20b98..7fe26a6 100644 --- a/templates/commandes/_form.html.twig +++ b/templates/commandes/_form.html.twig @@ -1,4 +1,4 @@ {{ form_start(form) }} {{ form_widget(form) }} - + {{ form_end(form) }} diff --git a/templates/commandes/edit.html.twig b/templates/commandes/edit.html.twig index 87af3fd..104ce92 100644 --- a/templates/commandes/edit.html.twig +++ b/templates/commandes/edit.html.twig @@ -7,7 +7,7 @@ {{ include('commandes/_form.html.twig', {'button_label': 'Mettre à jour'}) }} - revenir à la liste + Retour à la liste {% endblock %} diff --git a/templates/commandes/index.html.twig b/templates/commandes/index.html.twig index 2d0002c..38ce9b9 100644 --- a/templates/commandes/index.html.twig +++ b/templates/commandes/index.html.twig @@ -26,12 +26,12 @@ {{ commande.Statut ? 'Yes' : 'No' }} {{ commande.Total }} -
+ - + {{ include('commandes/_delete_form.html.twig') }}
- edit + Modifier {% else %} diff --git a/templates/commandes/new.html.twig b/templates/commandes/new.html.twig index 9895178..fb9b259 100644 --- a/templates/commandes/new.html.twig +++ b/templates/commandes/new.html.twig @@ -1,15 +1,15 @@ {% extends 'base.html.twig' %} -{% block title %}New Commandes{% endblock %} +{% block title %}Nouvelle commande{% endblock %} {% block stylesheets %} {% endblock %} {% block body %} -

Create new Commandes

+

Créer une commande

{{ include('commandes/_form.html.twig') }} - back to list + Retour à la liste {% endblock %} diff --git a/templates/details_commande/_delete_form.html.twig b/templates/details_commande/_delete_form.html.twig index 465f168..1c08667 100644 --- a/templates/details_commande/_delete_form.html.twig +++ b/templates/details_commande/_delete_form.html.twig @@ -1,4 +1,4 @@ -
+ - +
diff --git a/templates/details_commande/_form.html.twig b/templates/details_commande/_form.html.twig index bf20b98..7fe26a6 100644 --- a/templates/details_commande/_form.html.twig +++ b/templates/details_commande/_form.html.twig @@ -1,4 +1,4 @@ {{ form_start(form) }} {{ form_widget(form) }} - + {{ form_end(form) }} diff --git a/templates/details_commande/edit.html.twig b/templates/details_commande/edit.html.twig index 22f8aad..0cc6cf2 100644 --- a/templates/details_commande/edit.html.twig +++ b/templates/details_commande/edit.html.twig @@ -1,6 +1,6 @@ {% extends 'base.html.twig' %} -{% block title %}Edit Détails Commande{% endblock %} +{% block title %}Modifier détail commande{% endblock %} {% block stylesheets %} @@ -8,12 +8,12 @@ {% block body %}
-

Edit Détails Commande

+

Modifier détail commande

- {{ include('details_commande/_form.html.twig', {'button_label': 'Update'}) }} + {{ include('details_commande/_form.html.twig', {'button_label': 'Mettre à jour'}) }} {{ include('details_commande/_delete_form.html.twig') }} diff --git a/templates/details_commande/index.html.twig b/templates/details_commande/index.html.twig index 11bab85..7441277 100644 --- a/templates/details_commande/index.html.twig +++ b/templates/details_commande/index.html.twig @@ -25,20 +25,20 @@ {{ details_commande.Quantite }} {{ details_commande.PrixUnitaire }} -
+ - + {{ include('details_commande/_delete_form.html.twig') }}
- edit + Modifier {% else %} - pas de détails de commande disponible + Aucun enregistrement trouvé {% endfor %} - Créer le détails d'une commande + Créer le détail d'une commande {% endblock %} diff --git a/templates/details_commande/new.html.twig b/templates/details_commande/new.html.twig index 35d741f..306fc33 100644 --- a/templates/details_commande/new.html.twig +++ b/templates/details_commande/new.html.twig @@ -1,15 +1,15 @@ {% extends 'base.html.twig' %} -{% block title %}New DetailsCommande{% endblock %} +{% block title %}Nouveau detail commande{% endblock %} {% block stylesheets %} {% endblock %} {% block body %} -

Create new DetailsCommande

+

Créer un détail commande

{{ include('details_commande/_form.html.twig') }} - back to list + Retour à la liste {% endblock %} diff --git a/templates/plats/_delete_form.html.twig b/templates/plats/_delete_form.html.twig index bc89faf..4a6fd3b 100644 --- a/templates/plats/_delete_form.html.twig +++ b/templates/plats/_delete_form.html.twig @@ -1,4 +1,4 @@ -
+ - +
diff --git a/templates/plats/_form.html.twig b/templates/plats/_form.html.twig index bf20b98..7fe26a6 100644 --- a/templates/plats/_form.html.twig +++ b/templates/plats/_form.html.twig @@ -1,4 +1,4 @@ {{ form_start(form) }} {{ form_widget(form) }} - + {{ form_end(form) }} diff --git a/templates/plats/edit.html.twig b/templates/plats/edit.html.twig index 0e96826..b763493 100644 --- a/templates/plats/edit.html.twig +++ b/templates/plats/edit.html.twig @@ -1,6 +1,6 @@ {% extends 'base.html.twig' %} -{% block title %}Edit Plat{% endblock %} +{% block title %}Modifier Plat{% endblock %} {% block stylesheets %} @@ -8,12 +8,12 @@ {% block body %}
-

Edit Plat

+

Modifier Plat

- {{ include('plats/_form.html.twig', {'button_label': 'Update'}) }} + {{ include('plats/_form.html.twig', {'button_label': 'Mettre à jour'}) }} {{ include('plats/_delete_form.html.twig') }} diff --git a/templates/plats/index.html.twig b/templates/plats/index.html.twig index 266e151..d6777bb 100644 --- a/templates/plats/index.html.twig +++ b/templates/plats/index.html.twig @@ -32,20 +32,20 @@ {{ plat.Statut ? 'Yes' : 'No' }} {{ plat.NbDeCommande }} -
+ - + {{ include('plats/_delete_form.html.twig') }}
- edit + Modifier {% else %} - pas de plats disponible + Aucun enregistrement trouvé {% endfor %} - Créer un nouveaux plat + Créer un nouveau plat {% endblock %} diff --git a/templates/plats/new.html.twig b/templates/plats/new.html.twig index 3854dad..7c091ad 100644 --- a/templates/plats/new.html.twig +++ b/templates/plats/new.html.twig @@ -6,9 +6,9 @@ {% endblock %} {% block body %} -

Create new Plats

+

Créer un nouveau plat

{{ include('plats/_form.html.twig') }} - back to list + Retour à la liste {% endblock %} diff --git a/templates/reductions/_delete_form.html.twig b/templates/reductions/_delete_form.html.twig index 20968bd..dca093b 100644 --- a/templates/reductions/_delete_form.html.twig +++ b/templates/reductions/_delete_form.html.twig @@ -1,4 +1,4 @@ -
+ - +
diff --git a/templates/reductions/_form.html.twig b/templates/reductions/_form.html.twig index bf20b98..7fe26a6 100644 --- a/templates/reductions/_form.html.twig +++ b/templates/reductions/_form.html.twig @@ -1,4 +1,4 @@ {{ form_start(form) }} {{ form_widget(form) }} - + {{ form_end(form) }} diff --git a/templates/reductions/edit.html.twig b/templates/reductions/edit.html.twig index 175b042..bab0c4d 100644 --- a/templates/reductions/edit.html.twig +++ b/templates/reductions/edit.html.twig @@ -1,6 +1,6 @@ {% extends 'base.html.twig' %} -{% block title %}Edit Réductions{% endblock %} +{% block title %}Modifier Réductions{% endblock %} {% block stylesheets %} @@ -8,12 +8,12 @@ {% block body %}
-

Edit Réductions

+

Modifier une réduction

- {{ include('reductions/_form.html.twig', {'button_label': 'Update'}) }} + {{ include('reductions/_form.html.twig', {'button_label': 'Mettre à jour'}) }} {{ include('reductions/_delete_form.html.twig') }} diff --git a/templates/reductions/index.html.twig b/templates/reductions/index.html.twig index 4055205..9eef75b 100644 --- a/templates/reductions/index.html.twig +++ b/templates/reductions/index.html.twig @@ -32,16 +32,16 @@ {{ reduction.DateDebut ? reduction.DateDebut|date('Y-m-d H:i:s') : '' }} {{ reduction.DateFin ? reduction.DateFin|date('Y-m-d H:i:s') : '' }} -
+ - + {{ include('reductions/_delete_form.html.twig') }}
- edit + Modifier {% else %} - pas encore de réductions + Aucun enregistrement trouvé {% endfor %} diff --git a/templates/reductions/new.html.twig b/templates/reductions/new.html.twig index bbb1a60..13723a3 100644 --- a/templates/reductions/new.html.twig +++ b/templates/reductions/new.html.twig @@ -1,14 +1,14 @@ {% extends 'base.html.twig' %} -{% block title %}New Reductions{% endblock %} +{% block title %}Nouvelle reduction{% endblock %} {% block stylesheets %} {% endblock %} {% block body %} -

Créer une Reductions

+

Créer une Reduction

{{ include('reductions/_form.html.twig') }} - revenir a la liste + Retour à la liste {% endblock %} diff --git a/templates/reservations/_delete_form.html.twig b/templates/reservations/_delete_form.html.twig index 47202e3..65bbb49 100644 --- a/templates/reservations/_delete_form.html.twig +++ b/templates/reservations/_delete_form.html.twig @@ -1,4 +1,4 @@ -
+ - +
diff --git a/templates/reservations/_form.html.twig b/templates/reservations/_form.html.twig index bf20b98..7fe26a6 100644 --- a/templates/reservations/_form.html.twig +++ b/templates/reservations/_form.html.twig @@ -1,4 +1,4 @@ {{ form_start(form) }} {{ form_widget(form) }} - + {{ form_end(form) }} diff --git a/templates/reservations/edit.html.twig b/templates/reservations/edit.html.twig index fd347bf..320a151 100644 --- a/templates/reservations/edit.html.twig +++ b/templates/reservations/edit.html.twig @@ -1,6 +1,6 @@ {% extends 'base.html.twig' %} -{% block title %}Edit Réservation{% endblock %} +{% block title %}Modifier Réservation{% endblock %} {% block stylesheets %} @@ -8,12 +8,12 @@ {% block body %}
-

Edit Réservation

+

Modifier Réservation

- {{ include('reservations/_form.html.twig', {'button_label': 'Update'}) }} + {{ include('reservations/_form.html.twig', {'button_label': 'Mettre à jour'}) }} {{ include('reservations/_delete_form.html.twig') }} diff --git a/templates/reservations/index.html.twig b/templates/reservations/index.html.twig index 0054791..c2be21a 100644 --- a/templates/reservations/index.html.twig +++ b/templates/reservations/index.html.twig @@ -1,7 +1,10 @@ {% extends 'base.html.twig' %} {% block title %}Reservations index{% endblock %} +{% block stylesheets %} + +{% endblock %} {% block body %}

Reservations index

@@ -21,20 +24,20 @@ {{ reservation.DateHeure ? reservation.DateHeure|date('Y-m-d H:i:s') : '' }} {{ reservation.NbDePrsn }} -
+ - + {{ include('reservations/_delete_form.html.twig') }}
- edit + Modifier {% else %} - no records found + Aucun enregistrement trouvé {% endfor %} - Create new + Créer une réservation {% endblock %} diff --git a/templates/reservations/new.html.twig b/templates/reservations/new.html.twig index 6aa5e66..f33c62a 100644 --- a/templates/reservations/new.html.twig +++ b/templates/reservations/new.html.twig @@ -6,9 +6,9 @@ {% endblock %} {% block body %} -

Create new Reservations

+

Créer une reservation

{{ include('reservations/_form.html.twig') }} - back to list + Retour à la liste {% endblock %} diff --git a/templates/statut_commandes/_delete_form.html.twig b/templates/statut_commandes/_delete_form.html.twig index 454d917..fd54597 100644 --- a/templates/statut_commandes/_delete_form.html.twig +++ b/templates/statut_commandes/_delete_form.html.twig @@ -1,4 +1,4 @@ -
+ - +
diff --git a/templates/statut_commandes/_form.html.twig b/templates/statut_commandes/_form.html.twig index bf20b98..7fe26a6 100644 --- a/templates/statut_commandes/_form.html.twig +++ b/templates/statut_commandes/_form.html.twig @@ -1,4 +1,4 @@ {{ form_start(form) }} {{ form_widget(form) }} - + {{ form_end(form) }} diff --git a/templates/statut_commandes/edit.html.twig b/templates/statut_commandes/edit.html.twig index ad7eea4..8dcccbd 100644 --- a/templates/statut_commandes/edit.html.twig +++ b/templates/statut_commandes/edit.html.twig @@ -8,12 +8,12 @@ {% block body %}
-

Edit Statut commandes

+

Modifier Statut commandes

- {{ include('statut_commandes/_form.html.twig', {'button_label': 'Update'}) }} + {{ include('statut_commandes/_form.html.twig', {'button_label': 'Mettre à jour'}) }} {{ include('statut_commandes/_delete_form.html.twig') }} diff --git a/templates/statut_commandes/index.html.twig b/templates/statut_commandes/index.html.twig index 8097c11..9d5e324 100644 --- a/templates/statut_commandes/index.html.twig +++ b/templates/statut_commandes/index.html.twig @@ -23,16 +23,20 @@ {{ statut_commande.id }} {{ statut_commande.Libelle }} - edit +
+ + {{ include('statut_commandes/_delete_form.html.twig') }} +
+ Modifier {% else %} - no records found + Aucun enregistrement trouvé {% endfor %} - Create new + Créer un nouveau statut {% endblock %} diff --git a/templates/statut_commandes/new.html.twig b/templates/statut_commandes/new.html.twig index 558ccc6..479f987 100644 --- a/templates/statut_commandes/new.html.twig +++ b/templates/statut_commandes/new.html.twig @@ -1,14 +1,14 @@ {% extends 'base.html.twig' %} -{% block title %}New StatutCommandes{% endblock %} +{% block title %}Nouveau StatutCommandes{% endblock %} {% block stylesheets %} {% endblock %} {% block body %} -

Create new StatutCommandes

+

Créer nouveau StatutCommandes

{{ include('statut_commandes/_form.html.twig') }} - back to list + Retour à la liste {% endblock %} diff --git a/templates/statut_commandes/show.html.twig b/templates/statut_commandes/show.html.twig deleted file mode 100644 index 632355f..0000000 --- a/templates/statut_commandes/show.html.twig +++ /dev/null @@ -1,29 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block title %}StatutCommandes{% endblock %} -{% block stylesheets %} - - -{% endblock %} -{% block body %} -

StatutCommandes

- - - - - - - - - - - - -
Id{{ statut_commande.id }}
Libelle{{ statut_commande.Libelle }}
- - back to list - - edit - - {{ include('statut_commandes/_delete_form.html.twig') }} -{% endblock %} diff --git a/templates/statut_tables/_delete_form.html.twig b/templates/statut_tables/_delete_form.html.twig index b87f5e4..b61d6a1 100644 --- a/templates/statut_tables/_delete_form.html.twig +++ b/templates/statut_tables/_delete_form.html.twig @@ -1,4 +1,4 @@ -
+ - +
diff --git a/templates/statut_tables/_form.html.twig b/templates/statut_tables/_form.html.twig index bf20b98..7fe26a6 100644 --- a/templates/statut_tables/_form.html.twig +++ b/templates/statut_tables/_form.html.twig @@ -1,4 +1,4 @@ {{ form_start(form) }} {{ form_widget(form) }} - + {{ form_end(form) }} diff --git a/templates/statut_tables/edit.html.twig b/templates/statut_tables/edit.html.twig index 34629bb..2a212cd 100644 --- a/templates/statut_tables/edit.html.twig +++ b/templates/statut_tables/edit.html.twig @@ -3,19 +3,21 @@ {% block title %}Edit Statut tables{% endblock %} {% block stylesheets %} - +
+

Modifier Statut tables

+ + {{ include('statut_tables/_form.html.twig', {'button_label': 'Mettre à jour'}) }} + +
+ {{ include('statut_tables/_delete_form.html.twig') }} +
+ Retour à la liste +
+ + +
{% endblock %} {% block body %} -
-

Edit Statut tables

- - {{ include('statut_tables/_form.html.twig', {'button_label': 'Update'}) }} - - - - {{ include('statut_tables/_delete_form.html.twig') }} -
+ {% endblock %} diff --git a/templates/statut_tables/index.html.twig b/templates/statut_tables/index.html.twig index 75b0715..fb1dbd7 100644 --- a/templates/statut_tables/index.html.twig +++ b/templates/statut_tables/index.html.twig @@ -3,6 +3,7 @@ {% block title %}StatutTables index{% endblock %} {% block stylesheets %} + {% endblock %} {% block body %}

StatutTables index

@@ -19,18 +20,22 @@ {% for statut_table in statut_tables %} {{ statut_table.id }} - {{ statut_table.Libellé }} + {{ statut_table.Libelle}} - edit +
+ + {{ include('statut_tables/_delete_form.html.twig') }} +
+ Modifier - {% else %} + {% else %} - no records found + Aucun enregistrement trouvé {% endfor %} - Create new + Créer un nouveau {% endblock %} diff --git a/templates/statut_tables/new.html.twig b/templates/statut_tables/new.html.twig index c96c59e..9369705 100644 --- a/templates/statut_tables/new.html.twig +++ b/templates/statut_tables/new.html.twig @@ -1,14 +1,15 @@ {% extends 'base.html.twig' %} -{% block title %}New StatutTables{% endblock %} +{% block title %}Créer un nouveau StatutTables{% endblock %} {% block stylesheets %} - + {% endblock %} {% block body %} -

Create new StatutTables

+

Créer un nouveau StatutTables

{{ include('statut_tables/_form.html.twig') }} - - back to list + {% endblock %} diff --git a/templates/tables/_delete_form.html.twig b/templates/tables/_delete_form.html.twig index dad5b99..0cc0dce 100644 --- a/templates/tables/_delete_form.html.twig +++ b/templates/tables/_delete_form.html.twig @@ -1,4 +1,4 @@ -
+ - +
diff --git a/templates/tables/_form.html.twig b/templates/tables/_form.html.twig index bf20b98..7fe26a6 100644 --- a/templates/tables/_form.html.twig +++ b/templates/tables/_form.html.twig @@ -1,4 +1,4 @@ {{ form_start(form) }} {{ form_widget(form) }} - + {{ form_end(form) }} diff --git a/templates/tables/edit.html.twig b/templates/tables/edit.html.twig index 3951750..6447b90 100644 --- a/templates/tables/edit.html.twig +++ b/templates/tables/edit.html.twig @@ -8,12 +8,12 @@ {% block body %}
-

Edit Tables

+

Modifier Tables

- {{ include('tables/_form.html.twig', {'button_label': 'Update'}) }} + {{ include('tables/_form.html.twig', {'button_label': 'Mettre à jour'}) }} {{ include('tables/_delete_form.html.twig') }} diff --git a/templates/tables/index.html.twig b/templates/tables/index.html.twig index 721ab68..48fe8b8 100644 --- a/templates/tables/index.html.twig +++ b/templates/tables/index.html.twig @@ -20,16 +20,20 @@ {{ table.id }} - edit +
+ + {{ include('tables/_delete_form.html.twig') }} +
+ Modifier {% else %} - no records found + Aucun enregistrement trouvé {% endfor %} - Create new + Créer une nouvelle table {% endblock %} diff --git a/templates/tables/new.html.twig b/templates/tables/new.html.twig index ee8b808..c3f5994 100644 --- a/templates/tables/new.html.twig +++ b/templates/tables/new.html.twig @@ -4,23 +4,19 @@ {% block stylesheets %} - -{% endblock %} -{% block stylesheets %} - {% endblock %} {% block body %}
-

Create New Table

+

Créer une nouvelle Table

{{ include('tables/_form.html.twig') }}
{% endblock %} diff --git a/templates/tables/show.html.twig b/templates/tables/show.html.twig index dfe40f5..df90712 100644 --- a/templates/tables/show.html.twig +++ b/templates/tables/show.html.twig @@ -14,9 +14,9 @@ - back to list + Retour à la liste - edit + Modifier {{ include('tables/_delete_form.html.twig') }} {% endblock %} From fb4610e7981a8b6907e4c617267cbac60a02064e Mon Sep 17 00:00:00 2001 From: tinkal Date: Thu, 5 Dec 2024 15:38:36 +0100 Subject: [PATCH 18/19] Supprimer templates/index/cuisinier.html.twig --- templates/index/cuisinier.html.twig | 128 ---------------------------- 1 file changed, 128 deletions(-) delete mode 100644 templates/index/cuisinier.html.twig diff --git a/templates/index/cuisinier.html.twig b/templates/index/cuisinier.html.twig deleted file mode 100644 index c3d6c12..0000000 --- a/templates/index/cuisinier.html.twig +++ /dev/null @@ -1,128 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block head %} - - - {% block title %}Index FestinHegre!{% endblock %} - - - -{% endblock %} - -{% block stylesheets %} - - -{% endblock %} - -{% block body %} - - - -
-
- Bonjour, {{ app.user.prenom }} -
-
- Rôle : {{ app.user.getRolesAsString() }} -
-
- - -
- - - -
-
- {{ ux_icon('ph:user-circle-fill') }} - Compte -
- -
-
- -
- -
- - - - - {% include 'Modals/gestionUtilisateurModal.html.twig' %} - {% include 'Modals/gestionTableModal.html.twig' %} - {% include 'Modals/gestionCompteModal.html.twig' %} - {% include 'Modals/gestionUtilisateurModal.html.twig' %} - -{% endblock %} - -{% block javascripts %} - -{% endblock %} From 7882fffe4e81e29b9dbc315ba7f2ded955fc8c32 Mon Sep 17 00:00:00 2001 From: tinkal Date: Thu, 5 Dec 2024 15:38:40 +0100 Subject: [PATCH 19/19] Supprimer templates/index/serveur.html.twig --- templates/index/serveur.html.twig | 144 ------------------------------ 1 file changed, 144 deletions(-) delete mode 100644 templates/index/serveur.html.twig diff --git a/templates/index/serveur.html.twig b/templates/index/serveur.html.twig deleted file mode 100644 index 853c587..0000000 --- a/templates/index/serveur.html.twig +++ /dev/null @@ -1,144 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block head %} - - - {% block title %}Cuisine{% endblock %} - - - -{% endblock %} - -{% block stylesheets %} - -{% endblock %} - -{% block body %} - - - -
-
- Bonjour, {{ app.user.prenom }} -
-
- Rôle : {{ app.user.getRolesAsString() }} -
-
- - -
- - - -
-
- {{ ux_icon('ph:user-circle-fill') }} - Compte -
- -
-
- -
- -
- - - - - {% include 'Modals/gestionCompteModal.html.twig' %} - -{% endblock %} - -{% block javascripts %} - -{% endblock %}