restore more templates in dashboard
This commit is contained in:
parent
e9d896d4a7
commit
cd4b678002
35
migrations/Version20250216220539.php
Normal file
35
migrations/Version20250216220539.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?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 Version20250216220539 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 user ADD active_festival_id INT DEFAULT NULL');
|
||||||
|
$this->addSql('ALTER TABLE user ADD CONSTRAINT FK_8D93D649DE145A1C FOREIGN KEY (active_festival_id) REFERENCES festival (id)');
|
||||||
|
$this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D649DE145A1C ON user (active_festival_id)');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this down() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649DE145A1C');
|
||||||
|
$this->addSql('DROP INDEX UNIQ_8D93D649DE145A1C ON user');
|
||||||
|
$this->addSql('ALTER TABLE user DROP active_festival_id');
|
||||||
|
}
|
||||||
|
}
|
@ -111,7 +111,7 @@ final class DefaultController extends AbstractController
|
|||||||
$user = $this->getUser();
|
$user = $this->getUser();
|
||||||
// $products = $this->getUser()->getProducts();
|
// $products = $this->getUser()->getProducts();
|
||||||
return $this->json([
|
return $this->json([
|
||||||
'categories' => $user->getGroupOfProducts(),
|
'categories' => $user->getGroupOfProducts(),
|
||||||
'products' => $user->getProducts(),
|
'products' => $user->getProducts(),
|
||||||
// mock land
|
// mock land
|
||||||
'lastFestival' => ['id'=>1,
|
'lastFestival' => ['id'=>1,
|
||||||
|
@ -24,6 +24,7 @@ class GroupOfProducts
|
|||||||
/**
|
/**
|
||||||
* @var Collection<int, Product>
|
* @var Collection<int, Product>
|
||||||
*/
|
*/
|
||||||
|
// TODO apiresource return properties
|
||||||
#[ORM\ManyToMany(targetEntity: Product::class, inversedBy: 'groupOfProducts')]
|
#[ORM\ManyToMany(targetEntity: Product::class, inversedBy: 'groupOfProducts')]
|
||||||
private Collection $products;
|
private Collection $products;
|
||||||
|
|
||||||
|
@ -83,6 +83,9 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
|
|||||||
#[ORM\OneToMany(targetEntity: SerieFestival::class, mappedBy: 'user')]
|
#[ORM\OneToMany(targetEntity: SerieFestival::class, mappedBy: 'user')]
|
||||||
private Collection $seriesFestival;
|
private Collection $seriesFestival;
|
||||||
|
|
||||||
|
#[ORM\OneToOne(cascade: ['persist', 'remove'])]
|
||||||
|
private ?Festival $activeFestival = null;
|
||||||
|
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
@ -372,4 +375,16 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getActiveFestival(): ?Festival
|
||||||
|
{
|
||||||
|
return $this->activeFestival;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setActiveFestival(?Festival $activeFestival): static
|
||||||
|
{
|
||||||
|
$this->activeFestival = $activeFestival;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
<!--caisse IHM-->
|
<!--caisse IHM-->
|
||||||
<div id="load_ok">
|
<div id="load_ok">
|
||||||
<div id="listing-products" class="listing-products col-xs-12 col-md-8">
|
<div id="listing-products" class="listing-products col-xs-12 col-md-8">
|
||||||
{# {% include 'logged/angular/messages.html.twig' %}#}
|
{% include 'logged/angular/messages.html.twig' %}
|
||||||
{# {% include 'logged/angular/listing-products.html.twig' %}#}
|
{% include 'logged/angular/listing-products.html.twig' %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="sellings" class="sellings col-xs-12 col-md-4">
|
<div id="sellings" class="sellings col-xs-12 col-md-4">
|
||||||
@ -12,22 +12,22 @@
|
|||||||
<div class="list-sell" ng-class="{'bg-success text-success': sellingOk }">
|
<div class="list-sell" ng-class="{'bg-success text-success': sellingOk }">
|
||||||
|
|
||||||
<button class="button">valider</button>
|
<button class="button">valider</button>
|
||||||
{# {% include 'logged/angular/validate-button.html.twig' %}#}
|
{% include 'logged/angular/validate-button.html.twig' %}
|
||||||
{# {% if app.user.products |length %}#}
|
{% if app.user.products |length %}
|
||||||
{# {% include 'logged/angular/current.html.twig' %}#}
|
{% include 'logged/angular/current.html.twig' %}
|
||||||
{# {% endif %}#}
|
{% endif %}
|
||||||
|
|
||||||
{#{% include 'logged/angular/paused.html.twig' %}#}
|
{% include 'logged/angular/paused.html.twig' %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="other_time">
|
<div id="other_time">
|
||||||
ventes récentes
|
ventes récentes
|
||||||
{# {% include 'logged/angular/recent.html.twig' %}#}
|
{% include 'logged/angular/recent.html.twig' %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-md-4 col-md-offset-8">
|
<div class="col-xs-12 col-md-4 col-md-offset-8">
|
||||||
catégories
|
catégories
|
||||||
{# {% include 'logged/angular/categ-options.html.twig' %}#}
|
{% include 'logged/angular/categ-options.html.twig' %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user