Skip to content

Commit

Permalink
Systeme de commandes finalisé + système de collectio, pagination et f…
Browse files Browse the repository at this point in the history
…iltrage finalisé
  • Loading branch information
edouardproust committed Dec 27, 2021
1 parent 9961888 commit 3502510
Show file tree
Hide file tree
Showing 128 changed files with 3,889 additions and 1,167 deletions.
1 change: 1 addition & 0 deletions config/packages/twig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ twig:
default_path: '%kernel.project_dir%/templates'
form_themes: ['bootstrap_5_layout.html.twig']
globals:
appPath: "@App\\App\\Path"
cartService: "@App\\App\\Service\\CartService"

when@test:
Expand Down
109 changes: 67 additions & 42 deletions config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ services:

# App Services, Helpers & Components

App\App\Path:
arguments:
$projectDir: '%kernel.project_dir%'

App\App\Service\StripeService:
arguments:
$publicKey: "%env(STRIPE_PUBLIC_KEY)%"
Expand All @@ -39,55 +43,76 @@ services:
# Doctrine listeners

App\EventListener\Doctrine\CategoryListener:
tags: [{
name: 'doctrine.orm.entity_listener',
event: prePersist,
entity: App\Entity\Category
},{
name: 'doctrine.orm.entity_listener',
event: preUpdate,
entity: App\Entity\Category
}]
tags: [
{
name: 'doctrine.orm.entity_listener',
event: prePersist,
entity: App\Entity\Category
},{
name: 'doctrine.orm.entity_listener',
event: preUpdate,
entity: App\Entity\Category
}
]

App\EventListener\Doctrine\ProductListener:
tags: [{
name: 'doctrine.orm.entity_listener',
event: prePersist,
entity: App\Entity\Product,
}]
tags: [
{
name: 'doctrine.orm.entity_listener',
event: prePersist,
entity: App\Entity\Product,
}
]

App\EventListener\Doctrine\UserListener:
tags: [{
name: 'doctrine.orm.entity_listener',
event: prePersist,
entity: App\Entity\User
}]
tags: [
{
name: 'doctrine.orm.entity_listener',
event: prePersist,
entity: App\Entity\User
}
]

App\EventListener\Doctrine\PurchaseItemListener:
tags: [{
name: 'doctrine.orm.entity_listener',
event: prePersist,
entity: App\Entity\PurchaseItem
}]
tags: [
{
name: 'doctrine.orm.entity_listener',
event: prePersist,
entity: App\Entity\PurchaseItem
}
]

App\EventListener\Doctrine\PurchaseListener:
tags: [{
name: 'doctrine.orm.entity_listener',
event: prePersist,
entity: App\Entity\Purchase
},{
name: 'doctrine.orm.entity_listener',
event: preFlush,
entity: App\Entity\Purchase
}]
tags: [
{
name: 'doctrine.orm.entity_listener',
event: prePersist,
entity: App\Entity\Purchase
},{
name: 'doctrine.orm.entity_listener',
event: preFlush,
entity: App\Entity\Purchase
}
]

App\EventListener\Doctrine\PaymentMethodListener:
tags: [{
name: 'doctrine.orm.entity_listener',
event: prePersist,
entity: App\Entity\PaymentMethod
},{
name: 'doctrine.orm.entity_listener',
event: preUpdate,
entity: App\Entity\PaymentMethod
}]
tags: [
{
name: 'doctrine.orm.entity_listener',
event: prePersist,
entity: App\Entity\PaymentMethod
},{
name: 'doctrine.orm.entity_listener',
event: preUpdate,
entity: App\Entity\PaymentMethod
}
]

App\EventListener\Doctrine\UploadListener:
tags: [
{
name: 'doctrine.orm.entity_listener',
event: prePersist,
entity: App\Entity\Upload
}
]
31 changes: 31 additions & 0 deletions migrations/Version20211218205704.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?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 Version20211218205704 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 category ADD description LONGTEXT DEFAULT NULL');
}

public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE category DROP description');
}
}
31 changes: 31 additions & 0 deletions migrations/Version20211219014117.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?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 Version20211219014117 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 admin_setting ADD field_type VARCHAR(255) DEFAULT NULL, ADD help VARCHAR(255) DEFAULT NULL, ADD title VARCHAR(255) NOT NULL');
}

public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE admin_setting DROP field_type, DROP help, DROP title');
}
}
31 changes: 31 additions & 0 deletions migrations/Version20211219020549.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?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 Version20211219020549 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 admin_setting CHANGE title name VARCHAR(255) NOT NULL');
}

public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE admin_setting CHANGE name title VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
}
}
31 changes: 31 additions & 0 deletions migrations/Version20211219031802.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?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 Version20211219031802 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 admin_setting CHANGE name label VARCHAR(255) NOT NULL, CHANGE field_type input_type VARCHAR(255) DEFAULT NULL');
}

public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE admin_setting CHANGE input_type field_type VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE label name VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
}
}
31 changes: 31 additions & 0 deletions migrations/Version20211219091000.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?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 Version20211219091000 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 admin_setting ADD is_file TINYINT(1) DEFAULT NULL, DROP input_type, DROP help, DROP label');
}

public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE admin_setting ADD input_type VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD help VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD label VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, DROP is_file');
}
}
31 changes: 31 additions & 0 deletions migrations/Version20211221034259.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?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 Version20211221034259 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 admin_setting DROP is_file');
}

public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE admin_setting ADD is_file TINYINT(1) DEFAULT NULL');
}
}
31 changes: 31 additions & 0 deletions migrations/Version20211222171215.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?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 Version20211222171215 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 upload (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, directory VARCHAR(255) NOT NULL, created_at DATETIME NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
}

public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE upload');
}
}
31 changes: 31 additions & 0 deletions migrations/Version20211222172257.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?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 Version20211222172257 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 upload CHANGE directory url VARCHAR(255) NOT NULL');
}

public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE upload CHANGE url directory VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
}
}
Loading

0 comments on commit 3502510

Please sign in to comment.