feat(Product.php): Ajoute ProductDoc pour gérer les documents.
 feat(Contrats.php): Gère les fichiers du contrat via VichUploader.
 feat(templates): Crée template mail signature contrat.
 feat(SignatureController): Ajoute la signature du contrat.
 feat(ContratsController): Crée contrat depuis devis et liste contrats.
 feat(Client): Crée soumission contrat Docuseal.
 feat(DevisPdfService): Corrige l'assurance RC Pro.
 feat(.env): Ajoute CONTRAT_BASEURL.
 feat(ProductDocType): Crée formulaire pour les documents produit.
 feat(contrats/list.twig): Liste et actions pour les contrats.
 feat(UtmEvent.js): Track click document produit.
 feat(ContratEvent.php): Crée event pour envoi contrat.
 feat(admin.js): Initialise la recherche dynamique des contrats.
 feat(ContratPdfService): Génère le PDF du contrat DocuSeal.
 feat(products/add.twig): Ajoute gestion des documents produits.
 feat(ContratController): Crée controlleur contrat.
 feat(ContratSubscriber.php): Envoi du contrat par email.
 feat(reservation/produit.twig): Affiche les documents produit.
 feat(ProductController.php): Refactorisation et ajout des documents.
```
This commit is contained in:
Serreau Jovann
2026-01-22 15:58:57 +01:00
parent 9eafbbe2d9
commit afa6133907
32 changed files with 2263 additions and 286 deletions

View File

@@ -0,0 +1,40 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20260122105631 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE contrat_line (id SERIAL NOT NULL, contrat_id INT DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_9C4011E81823061F ON contrat_line (contrat_id)');
$this->addSql('CREATE TABLE product_doc (id SERIAL NOT NULL, product_id INT DEFAULT NULL, name VARCHAR(255) NOT NULL, is_public BOOLEAN NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_666EA97B4584665A ON product_doc (product_id)');
$this->addSql('ALTER TABLE contrat_line ADD CONSTRAINT FK_9C4011E81823061F FOREIGN KEY (contrat_id) REFERENCES contrats (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE product_doc ADD CONSTRAINT FK_666EA97B4584665A FOREIGN KEY (product_id) REFERENCES product (id) 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('ALTER TABLE contrat_line DROP CONSTRAINT FK_9C4011E81823061F');
$this->addSql('ALTER TABLE product_doc DROP CONSTRAINT FK_666EA97B4584665A');
$this->addSql('DROP TABLE contrat_line');
$this->addSql('DROP TABLE product_doc');
}
}

View File

@@ -0,0 +1,37 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20260122105934 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE product_doc ADD doc_product_name VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE product_doc ADD doc_product_size INT DEFAULT NULL');
$this->addSql('ALTER TABLE product_doc ADD updated_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL');
$this->addSql('COMMENT ON COLUMN product_doc.updated_at IS \'(DC2Type:datetime_immutable)\'');
}
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 product_doc DROP doc_product_name');
$this->addSql('ALTER TABLE product_doc DROP doc_product_size');
$this->addSql('ALTER TABLE product_doc DROP updated_at');
}
}

View File

@@ -0,0 +1,42 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20260122113118 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('DROP SEQUENCE contrat_line_id_seq CASCADE');
$this->addSql('CREATE TABLE contrats_option (id SERIAL NOT NULL, contrat_id INT DEFAULT NULL, name VARCHAR(255) NOT NULL, price DOUBLE PRECISION NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_A4A2C35C1823061F ON contrats_option (contrat_id)');
$this->addSql('ALTER TABLE contrats_option ADD CONSTRAINT FK_A4A2C35C1823061F FOREIGN KEY (contrat_id) REFERENCES contrats (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE contrat_line DROP CONSTRAINT fk_9c4011e81823061f');
$this->addSql('DROP TABLE contrat_line');
}
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 contrat_line_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE TABLE contrat_line (id SERIAL NOT NULL, contrat_id INT DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX idx_9c4011e81823061f ON contrat_line (contrat_id)');
$this->addSql('ALTER TABLE contrat_line ADD CONSTRAINT fk_9c4011e81823061f FOREIGN KEY (contrat_id) REFERENCES contrats (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE contrats_option DROP CONSTRAINT FK_A4A2C35C1823061F');
$this->addSql('DROP TABLE contrats_option');
}
}

View File

@@ -0,0 +1,34 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20260122113452 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE contrats ALTER details DROP NOT NULL');
$this->addSql('ALTER TABLE contrats ALTER type_sol DROP NOT 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 contrats ALTER details SET NOT NULL');
$this->addSql('ALTER TABLE contrats ALTER type_sol SET NOT NULL');
}
}

View File

@@ -0,0 +1,32 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20260122113504 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE contrats ALTER access DROP NOT 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 contrats ALTER access SET NOT NULL');
}
}

View File

@@ -0,0 +1,32 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20260122113523 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE contrats ALTER distance_power DROP NOT 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 contrats ALTER distance_power SET NOT NULL');
}
}

View File

@@ -0,0 +1,32 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20260122113534 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE contrats ALTER notes DROP NOT 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 contrats ALTER notes SET NOT NULL');
}
}

View File

@@ -0,0 +1,49 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20260122120330 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE contrats ADD devis_file_name VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE contrats ADD devis_file_size INT DEFAULT NULL');
$this->addSql('ALTER TABLE contrats ADD devis_docu_seal_file_name VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE contrats ADD devis_docu_seal_file_size INT DEFAULT NULL');
$this->addSql('ALTER TABLE contrats ADD devis_signed_file_name VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE contrats ADD devis_signed_file_size INT DEFAULT NULL');
$this->addSql('ALTER TABLE contrats ADD devis_audit_file_name VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE contrats ADD devis_audit_file_size INT DEFAULT NULL');
$this->addSql('ALTER TABLE contrats ADD update_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL');
$this->addSql('COMMENT ON COLUMN contrats.update_at IS \'(DC2Type:datetime_immutable)\'');
}
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 contrats DROP devis_file_name');
$this->addSql('ALTER TABLE contrats DROP devis_file_size');
$this->addSql('ALTER TABLE contrats DROP devis_docu_seal_file_name');
$this->addSql('ALTER TABLE contrats DROP devis_docu_seal_file_size');
$this->addSql('ALTER TABLE contrats DROP devis_signed_file_name');
$this->addSql('ALTER TABLE contrats DROP devis_signed_file_size');
$this->addSql('ALTER TABLE contrats DROP devis_audit_file_name');
$this->addSql('ALTER TABLE contrats DROP devis_audit_file_size');
$this->addSql('ALTER TABLE contrats DROP update_at');
}
}