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/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/public/css/ControllerVues/list.css b/public/css/ControllerVues/list.css new file mode 100644 index 0000000..c1125b4 --- /dev/null +++ b/public/css/ControllerVues/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/public/css/ControllerVues/new.css b/public/css/ControllerVues/new.css new file mode 100644 index 0000000..c442783 --- /dev/null +++ b/public/css/ControllerVues/new.css @@ -0,0 +1,126 @@ +/* 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/src/Controller/ClientsController.php b/src/Controller/ClientsController.php new file mode 100644 index 0000000..2c41873 --- /dev/null +++ b/src/Controller/ClientsController.php @@ -0,0 +1,74 @@ +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}/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, int $id, ): 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..fff6323 --- /dev/null +++ b/src/Controller/CommandesController.php @@ -0,0 +1,74 @@ +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}/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, int $id): 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..f0f8beb --- /dev/null +++ b/src/Controller/DetailsCommandeController.php @@ -0,0 +1,74 @@ +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}/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..498590a --- /dev/null +++ b/src/Controller/PlatsController.php @@ -0,0 +1,75 @@ +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}/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..da7cdeb --- /dev/null +++ b/src/Controller/ReductionsController.php @@ -0,0 +1,74 @@ +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}/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/Controller/ReservationsController.php b/src/Controller/ReservationsController.php new file mode 100644 index 0000000..b0287fd --- /dev/null +++ b/src/Controller/ReservationsController.php @@ -0,0 +1,74 @@ +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}/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..53d82c4 --- /dev/null +++ b/src/Controller/StatutCommandesController.php @@ -0,0 +1,74 @@ +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}/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..84e5c61 --- /dev/null +++ b/src/Controller/StatutTablesController.php @@ -0,0 +1,74 @@ +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}/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..c1c834b --- /dev/null +++ b/src/Controller/TablesController.php @@ -0,0 +1,75 @@ +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}/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/Entity/Clients.php b/src/Entity/Clients.php index 3722d87..7367507 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] @@ -31,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/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/ClientsType.php b/src/Form/ClientsType.php new file mode 100644 index 0000000..cd01f5a --- /dev/null +++ b/src/Form/ClientsType.php @@ -0,0 +1,41 @@ +add('Prenom') + ->add('Nom') + ->add('Email') + ->add('Telephone') + ->add('Tables', 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..068fa54 --- /dev/null +++ b/src/Form/PlatsType.php @@ -0,0 +1,43 @@ +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, + 'expanded' => true, + ]) + ->add('Reduction', EntityType::class, [ + 'class' => Reductions::class, + 'choice_label' => 'description', + ]) + ; + } + + 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/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..70797d0 --- /dev/null +++ b/src/Form/StatutTablesType.php @@ -0,0 +1,32 @@ +add('Libelle') + ->add('tables', EntityType::class, [ + 'class' => Tables::class, + 'choice_label' => 'id', + 'mapped' => false, + ]) + ; + } + + 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/clients/_delete_form.html.twig b/templates/clients/_delete_form.html.twig new file mode 100644 index 0000000..60f8140 --- /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..7fe26a6 --- /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..bea3e03 --- /dev/null +++ b/templates/clients/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Modifier Client{% endblock %} + +{% block body %} +

Modifier Client

+ + {{ include('clients/_form.html.twig', {'button_label': 'Mettre à jour'}) }} + + Retour à la liste + + {{ 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..9eeb216 --- /dev/null +++ b/templates/clients/index.html.twig @@ -0,0 +1,47 @@ +{% 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 }} +
+ + {{ include('clients/_delete_form.html.twig') }} +
+ Modifier +
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..16b0079 --- /dev/null +++ b/templates/clients/new.html.twig @@ -0,0 +1,14 @@ +{% extends 'base.html.twig' %} + +{% block title %}Nouveau client{% endblock %} +{% block stylesheets %} + + +{% endblock %} +{% block body %} +

Créer un client

+ + {{ include('clients/_form.html.twig') }} + + Retour à la liste +{% endblock %} diff --git a/templates/commandes/_delete_form.html.twig b/templates/commandes/_delete_form.html.twig new file mode 100644 index 0000000..60f1723 --- /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..7fe26a6 --- /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..104ce92 --- /dev/null +++ b/templates/commandes/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Modifier Commande{% endblock %} + +{% block body %} +

Modifier Commande

+ + {{ include('commandes/_form.html.twig', {'button_label': 'Mettre à jour'}) }} + + Retour à la liste + + +{% endblock %} diff --git a/templates/commandes/index.html.twig b/templates/commandes/index.html.twig new file mode 100644 index 0000000..38ce9b9 --- /dev/null +++ b/templates/commandes/index.html.twig @@ -0,0 +1,46 @@ +{% 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 }} +
+ + {{ include('commandes/_delete_form.html.twig') }} +
+ + Modifier +
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..fb9b259 --- /dev/null +++ b/templates/commandes/new.html.twig @@ -0,0 +1,15 @@ +{% extends 'base.html.twig' %} + +{% block title %}Nouvelle commande{% endblock %} +{% block stylesheets %} + + +{% endblock %} + +{% block body %} +

Créer une commande

+ + {{ include('commandes/_form.html.twig') }} + + Retour à la liste +{% 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..1c08667 --- /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..7fe26a6 --- /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..0cc6cf2 --- /dev/null +++ b/templates/details_commande/edit.html.twig @@ -0,0 +1,21 @@ +{% extends 'base.html.twig' %} + +{% block title %}Modifier détail commande{% endblock %} + +{% block stylesheets %} + +{% endblock %} + +{% block body %} +
+

Modifier détail commande

+ + {{ include('details_commande/_form.html.twig', {'button_label': 'Mettre à jour'}) }} + + + + {{ 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..7441277 --- /dev/null +++ b/templates/details_commande/index.html.twig @@ -0,0 +1,44 @@ +{% 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 }} +
+ + {{ include('details_commande/_delete_form.html.twig') }} +
+ Modifier +
Aucun enregistrement trouvé
+ + 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 new file mode 100644 index 0000000..306fc33 --- /dev/null +++ b/templates/details_commande/new.html.twig @@ -0,0 +1,15 @@ +{% extends 'base.html.twig' %} + +{% block title %}Nouveau detail commande{% endblock %} +{% block stylesheets %} + + +{% endblock %} +{% block body %} + +

Créer un détail commande

+ + {{ include('details_commande/_form.html.twig') }} + + Retour à la liste +{% endblock %} diff --git a/templates/plats/_delete_form.html.twig b/templates/plats/_delete_form.html.twig new file mode 100644 index 0000000..4a6fd3b --- /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..7fe26a6 --- /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..b763493 --- /dev/null +++ b/templates/plats/edit.html.twig @@ -0,0 +1,21 @@ +{% extends 'base.html.twig' %} + +{% block title %}Modifier Plat{% endblock %} + +{% block stylesheets %} + +{% endblock %} + +{% block body %} +
+

Modifier Plat

+ + {{ include('plats/_form.html.twig', {'button_label': 'Mettre à jour'}) }} + + + + {{ 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..d6777bb --- /dev/null +++ b/templates/plats/index.html.twig @@ -0,0 +1,51 @@ +{% 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 }} +
+ + {{ include('plats/_delete_form.html.twig') }} +
+ Modifier +
Aucun enregistrement trouvé
+ + Créer un nouveau plat +{% endblock %} diff --git a/templates/plats/new.html.twig b/templates/plats/new.html.twig new file mode 100644 index 0000000..7c091ad --- /dev/null +++ b/templates/plats/new.html.twig @@ -0,0 +1,14 @@ +{% extends 'base.html.twig' %} + +{% block title %}New Plats{% endblock %} +{% block stylesheets %} + + +{% endblock %} +{% block body %} +

Créer un nouveau plat

+ + {{ include('plats/_form.html.twig') }} + + Retour à la liste +{% endblock %} diff --git a/templates/reductions/_delete_form.html.twig b/templates/reductions/_delete_form.html.twig new file mode 100644 index 0000000..dca093b --- /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..7fe26a6 --- /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..bab0c4d --- /dev/null +++ b/templates/reductions/edit.html.twig @@ -0,0 +1,21 @@ +{% extends 'base.html.twig' %} + +{% block title %}Modifier Réductions{% endblock %} + +{% block stylesheets %} + +{% endblock %} + +{% block body %} +
+

Modifier une réduction

+ + {{ include('reductions/_form.html.twig', {'button_label': 'Mettre à jour'}) }} + + + + {{ 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..9eef75b --- /dev/null +++ b/templates/reductions/index.html.twig @@ -0,0 +1,51 @@ +{% 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') : '' }} +
+ + {{ include('reductions/_delete_form.html.twig') }} +
+ Modifier +
Aucun enregistrement trouvé
+ + 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..13723a3 --- /dev/null +++ b/templates/reductions/new.html.twig @@ -0,0 +1,14 @@ +{% extends 'base.html.twig' %} + +{% block title %}Nouvelle reduction{% endblock %} +{% block stylesheets %} + + +{% endblock %} +{% block body %} +

Créer une Reduction

+ + {{ include('reductions/_form.html.twig') }} + + Retour à la liste +{% endblock %} diff --git a/templates/reservations/_delete_form.html.twig b/templates/reservations/_delete_form.html.twig new file mode 100644 index 0000000..65bbb49 --- /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..7fe26a6 --- /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..320a151 --- /dev/null +++ b/templates/reservations/edit.html.twig @@ -0,0 +1,21 @@ +{% extends 'base.html.twig' %} + +{% block title %}Modifier Réservation{% endblock %} + +{% block stylesheets %} + +{% endblock %} + +{% block body %} +
+

Modifier Réservation

+ + {{ include('reservations/_form.html.twig', {'button_label': 'Mettre à jour'}) }} + + + + {{ 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..c2be21a --- /dev/null +++ b/templates/reservations/index.html.twig @@ -0,0 +1,43 @@ +{% extends 'base.html.twig' %} + +{% block title %}Reservations index{% endblock %} +{% block stylesheets %} + + +{% 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 }} +
+ + {{ include('reservations/_delete_form.html.twig') }} +
+ Modifier +
Aucun enregistrement trouvé
+ + Créer une réservation +{% endblock %} diff --git a/templates/reservations/new.html.twig b/templates/reservations/new.html.twig new file mode 100644 index 0000000..f33c62a --- /dev/null +++ b/templates/reservations/new.html.twig @@ -0,0 +1,14 @@ +{% extends 'base.html.twig' %} + +{% block title %}New Reservations{% endblock %} +{% block stylesheets %} + + +{% endblock %} +{% block body %} +

Créer une reservation

+ + {{ include('reservations/_form.html.twig') }} + + Retour à la liste +{% 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..fd54597 --- /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..7fe26a6 --- /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..8dcccbd --- /dev/null +++ b/templates/statut_commandes/edit.html.twig @@ -0,0 +1,21 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit Statut commandes{% endblock %} + +{% block stylesheets %} + +{% endblock %} + +{% block body %} +
+

Modifier Statut commandes

+ + {{ include('statut_commandes/_form.html.twig', {'button_label': 'Mettre à jour'}) }} + + + + {{ 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..9d5e324 --- /dev/null +++ b/templates/statut_commandes/index.html.twig @@ -0,0 +1,42 @@ +{% extends 'base.html.twig' %} + +{% block title %}StatutCommandes index{% endblock %} + +{% block stylesheets %} + + +{% endblock %} +{% block body %} +

StatutCommandes index

+ + + + + + + + + + + {% for statut_commande in statut_commandes %} + + + + + + {% else %} + + + + {% endfor %} + +
IdLibelleactions
{{ statut_commande.id }}{{ statut_commande.Libelle }} +
+ + {{ include('statut_commandes/_delete_form.html.twig') }} +
+ Modifier +
Aucun enregistrement trouvé
+ + Créer un nouveau statut +{% endblock %} diff --git a/templates/statut_commandes/new.html.twig b/templates/statut_commandes/new.html.twig new file mode 100644 index 0000000..479f987 --- /dev/null +++ b/templates/statut_commandes/new.html.twig @@ -0,0 +1,14 @@ +{% extends 'base.html.twig' %} + +{% block title %}Nouveau StatutCommandes{% endblock %} +{% block stylesheets %} + + +{% endblock %} +{% block body %} +

Créer nouveau StatutCommandes

+ + {{ include('statut_commandes/_form.html.twig') }} + + Retour à la liste +{% 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..b61d6a1 --- /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..7fe26a6 --- /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..2a212cd --- /dev/null +++ b/templates/statut_tables/edit.html.twig @@ -0,0 +1,23 @@ +{% extends 'base.html.twig' %} + +{% 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 %} + +{% endblock %} diff --git a/templates/statut_tables/index.html.twig b/templates/statut_tables/index.html.twig new file mode 100644 index 0000000..fb1dbd7 --- /dev/null +++ b/templates/statut_tables/index.html.twig @@ -0,0 +1,41 @@ +{% extends 'base.html.twig' %} + +{% block title %}StatutTables index{% endblock %} +{% block stylesheets %} + + +{% endblock %} +{% block body %} +

StatutTables index

+ + + + + + + + + + + {% for statut_table in statut_tables %} + + + + + + {% else %} + + + + {% endfor %} + +
IdLibelléactions
{{ statut_table.id }}{{ statut_table.Libelle}} +
+ + {{ include('statut_tables/_delete_form.html.twig') }} +
+ Modifier +
Aucun enregistrement trouvé
+ + Créer un nouveau +{% endblock %} diff --git a/templates/statut_tables/new.html.twig b/templates/statut_tables/new.html.twig new file mode 100644 index 0000000..9369705 --- /dev/null +++ b/templates/statut_tables/new.html.twig @@ -0,0 +1,15 @@ +{% extends 'base.html.twig' %} + +{% block title %}Créer un nouveau StatutTables{% endblock %} +{% block stylesheets %} + + +{% endblock %} +{% block body %} +

Créer un nouveau StatutTables

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

StatutTables

+ + + + + + + + + + + + +
Id{{ statut_table.id }}
Libellé{{ statut_table.Libelle }}
+ + 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..0cc0dce --- /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..7fe26a6 --- /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..6447b90 --- /dev/null +++ b/templates/tables/edit.html.twig @@ -0,0 +1,21 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit Tables{% endblock %} + +{% block stylesheets %} + +{% endblock %} + +{% block body %} +
+

Modifier Tables

+ + {{ include('tables/_form.html.twig', {'button_label': 'Mettre à jour'}) }} + + + + {{ 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..48fe8b8 --- /dev/null +++ b/templates/tables/index.html.twig @@ -0,0 +1,39 @@ +{% extends 'base.html.twig' %} + +{% block title %}Tables index{% endblock %} +{% block stylesheets %} + + +{% endblock %} +{% block body %} +

Tables index

+ + + + + + + + + + {% for table in tables %} + + + + + {% else %} + + + + {% endfor %} + +
Idactions
{{ table.id }} +
+ + {{ include('tables/_delete_form.html.twig') }} +
+ Modifier +
Aucun enregistrement trouvé
+ + Créer une nouvelle table +{% endblock %} diff --git a/templates/tables/new.html.twig b/templates/tables/new.html.twig new file mode 100644 index 0000000..c3f5994 --- /dev/null +++ b/templates/tables/new.html.twig @@ -0,0 +1,22 @@ +{% extends 'base.html.twig' %} + +{% block title %}Create New Table{% endblock %} + +{% block stylesheets %} + + +{% endblock %} + +{% block body %} +
+

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 new file mode 100644 index 0000000..df90712 --- /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 }}
+ + Retour à la liste + + Modifier + + {{ include('tables/_delete_form.html.twig') }} +{% endblock %}