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 %}