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'}) }}
- Back to list + Retour à la liste
{{ 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 %}