Compare commits

..

No commits in common. "41798397d30afe0d2d6dce4c579e78ea4cf7342a" and "2c11e8f83066815120e8e1a4386a4b451a71fb4e" have entirely different histories.

31 changed files with 261 additions and 426 deletions

View File

@ -0,0 +1,52 @@
<?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 Version20241114160014 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 reservations DROP CONSTRAINT fk_4da2394de1870d');
$this->addSql('DROP INDEX idx_4da2394de1870d');
$this->addSql('ALTER TABLE reservations RENAME COLUMN tabl_id TO table_id');
$this->addSql('ALTER TABLE reservations ADD CONSTRAINT FK_4DA239ECFF285C FOREIGN KEY (table_id) REFERENCES tables (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX IDX_4DA239ECFF285C ON reservations (table_id)');
$this->addSql('ALTER TABLE statut_tables DROP CONSTRAINT fk_33c8a3754de1870d');
$this->addSql('DROP INDEX idx_33c8a3754de1870d');
$this->addSql('ALTER TABLE statut_tables RENAME COLUMN tabl_id TO table_id');
$this->addSql('ALTER TABLE statut_tables ADD CONSTRAINT FK_33C8A375ECFF285C FOREIGN KEY (table_id) REFERENCES tables (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX IDX_33C8A375ECFF285C ON statut_tables (table_id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_497B315E5126AC48 ON utilisateurs (mail)');
}
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('DROP INDEX UNIQ_497B315E5126AC48');
$this->addSql('ALTER TABLE statut_tables DROP CONSTRAINT FK_33C8A375ECFF285C');
$this->addSql('DROP INDEX IDX_33C8A375ECFF285C');
$this->addSql('ALTER TABLE statut_tables RENAME COLUMN table_id TO tabl_id');
$this->addSql('ALTER TABLE statut_tables ADD CONSTRAINT fk_33c8a3754de1870d FOREIGN KEY (tabl_id) REFERENCES tables (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX idx_33c8a3754de1870d ON statut_tables (tabl_id)');
$this->addSql('ALTER TABLE reservations DROP CONSTRAINT FK_4DA239ECFF285C');
$this->addSql('DROP INDEX IDX_4DA239ECFF285C');
$this->addSql('ALTER TABLE reservations RENAME COLUMN table_id TO tabl_id');
$this->addSql('ALTER TABLE reservations ADD CONSTRAINT fk_4da2394de1870d FOREIGN KEY (tabl_id) REFERENCES tables (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX idx_4da2394de1870d ON reservations (tabl_id)');
}
}

View File

@ -0,0 +1,50 @@
<?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 Version20241114160729 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 reservations DROP CONSTRAINT fk_4da239ecff285c');
$this->addSql('DROP INDEX idx_4da239ecff285c');
$this->addSql('ALTER TABLE reservations RENAME COLUMN table_id TO tables_id');
$this->addSql('ALTER TABLE reservations ADD CONSTRAINT FK_4DA23985405FD2 FOREIGN KEY (tables_id) REFERENCES tables (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX IDX_4DA23985405FD2 ON reservations (tables_id)');
$this->addSql('ALTER TABLE statut_tables DROP CONSTRAINT fk_33c8a375ecff285c');
$this->addSql('DROP INDEX idx_33c8a375ecff285c');
$this->addSql('ALTER TABLE statut_tables RENAME COLUMN table_id TO tables_id');
$this->addSql('ALTER TABLE statut_tables ADD CONSTRAINT FK_33C8A37585405FD2 FOREIGN KEY (tables_id) REFERENCES tables (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX IDX_33C8A37585405FD2 ON statut_tables (tables_id)');
}
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 statut_tables DROP CONSTRAINT FK_33C8A37585405FD2');
$this->addSql('DROP INDEX IDX_33C8A37585405FD2');
$this->addSql('ALTER TABLE statut_tables RENAME COLUMN tables_id TO table_id');
$this->addSql('ALTER TABLE statut_tables ADD CONSTRAINT fk_33c8a375ecff285c FOREIGN KEY (table_id) REFERENCES tables (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX idx_33c8a375ecff285c ON statut_tables (table_id)');
$this->addSql('ALTER TABLE reservations DROP CONSTRAINT FK_4DA23985405FD2');
$this->addSql('DROP INDEX IDX_4DA23985405FD2');
$this->addSql('ALTER TABLE reservations RENAME COLUMN tables_id TO table_id');
$this->addSql('ALTER TABLE reservations ADD CONSTRAINT fk_4da239ecff285c FOREIGN KEY (table_id) REFERENCES tables (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX idx_4da239ecff285c ON reservations (table_id)');
}
}

View File

@ -0,0 +1,46 @@
<?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 Version20241114164216 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 tables_clients (tables_id INT NOT NULL, clients_id INT NOT NULL, PRIMARY KEY(tables_id, clients_id))');
$this->addSql('CREATE INDEX IDX_80F8906E85405FD2 ON tables_clients (tables_id)');
$this->addSql('CREATE INDEX IDX_80F8906EAB014612 ON tables_clients (clients_id)');
$this->addSql('ALTER TABLE tables_clients ADD CONSTRAINT FK_80F8906E85405FD2 FOREIGN KEY (tables_id) REFERENCES tables (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE tables_clients ADD CONSTRAINT FK_80F8906EAB014612 FOREIGN KEY (clients_id) REFERENCES clients (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE clients_tables DROP CONSTRAINT fk_8190d6c6ab014612');
$this->addSql('ALTER TABLE clients_tables DROP CONSTRAINT fk_8190d6c685405fd2');
$this->addSql('DROP TABLE clients_tables');
}
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 TABLE clients_tables (clients_id INT NOT NULL, tables_id INT NOT NULL, PRIMARY KEY(clients_id, tables_id))');
$this->addSql('CREATE INDEX idx_8190d6c685405fd2 ON clients_tables (tables_id)');
$this->addSql('CREATE INDEX idx_8190d6c6ab014612 ON clients_tables (clients_id)');
$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 tables_clients DROP CONSTRAINT FK_80F8906E85405FD2');
$this->addSql('ALTER TABLE tables_clients DROP CONSTRAINT FK_80F8906EAB014612');
$this->addSql('DROP TABLE tables_clients');
}
}

View File

@ -1,7 +1,3 @@
html{
font-family: "Quicksand Light"; !important;
}
#container_modal { #container_modal {
background-color: white; background-color: white;
margin-left: 20%; /* Centrage vertical */ margin-left: 20%; /* Centrage vertical */

View File

@ -1,7 +1,3 @@
html{
font-family: "Quicksand Light"; !important;
}
/* Style pour chaque élément d'information de l'utilisateur */ /* Style pour chaque élément d'information de l'utilisateur */
.user-info-item { .user-info-item {
display: flex; display: flex;

View File

@ -1,6 +1,4 @@
html{
font-family: "Quicksand Light"; !important;
}
/* Page container */ /* Page container */
.page-container { .page-container {
width: 100%; width: 100%;

View File

@ -1,6 +1,4 @@
html{
font-family: "Quicksand Light"; !important;
}
/* Page container */ /* Page container */
.page-container { .page-container {
width: 100%; width: 100%;

View File

@ -8,6 +8,3 @@
height: 100%; /* Hauteur du contenu de la modal */ height: 100%; /* Hauteur du contenu de la modal */
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2); box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
} }
html{
font-family: "Quicksand Light"; !important;
}

View File

@ -1,7 +1,3 @@
html{
font-family: "Quicksand Light"; !important;
}
.top-bar { .top-bar {
background-color: #db5559; background-color: #db5559;
width: calc(100% - 18%); /*Calcule la totalité de l'écran - le left-background */ width: calc(100% - 18%); /*Calcule la totalité de l'écran - le left-background */
@ -14,10 +10,21 @@ html{
align-items: center; align-items: center;
padding: 0 20px; padding: 0 20px;
color: white; color: white;
font-size: 16px; font-size: 18px;
box-sizing: border-box; /* Inclut le padding dans la largeur totale */ box-sizing: border-box; /* Inclut le padding dans la largeur totale */
} }
.user-role {
background-color: white;
color: black;
padding: 10px 15px;
font-weight: bold;
overflow: hidden;
}
.left-background { .left-background {
background-color: #db5559; background-color: #db5559;
width: 18%; width: 18%;
@ -27,6 +34,7 @@ html{
left: 0; left: 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between;
} }
@ -43,17 +51,18 @@ ul {
} }
li { li {
padding-bottom: 4%; padding-bottom: 30px;
} }
.btn-custom { .btn-custom {
background-color: #FFFFFF; background-color: #FFFFFF;
color: black; color: black;
padding: 15px; padding: 15px 40px;
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;
cursor: pointer; cursor: pointer;
display: inline-block; display: inline-block;
border-right: 5px solid #db5559; border-right: 5px solid #db5559;
border-left: 5px solid #db5559; border-left: 5px solid #db5559;
} }
@ -79,6 +88,8 @@ li {
.Information-perso { .Information-perso {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 20px;
margin-top: auto;
} }
.btn-info-compte, .btn-info-exit { .btn-info-compte, .btn-info-exit {
@ -93,12 +104,12 @@ li {
.btn-info-compte { .btn-info-compte {
width: 50%; width: 50%;
height: 20px; height: 30px;
} }
.btn-info-exit { .btn-info-exit {
width: 10%; width: 10%;
height: 20px; height: 30px;
} }
/* Style pour la modal (cachée par défaut) */ /* Style pour la modal (cachée par défaut) */

View File

@ -72,14 +72,4 @@ final class PlatsController extends AbstractController
return $this->redirectToRoute('app_plats_index', [], Response::HTTP_SEE_OTHER); return $this->redirectToRoute('app_plats_index', [], Response::HTTP_SEE_OTHER);
} }
#[Route('/bestplats', name: 'app_plats_best', methods: ['GET'])]
public function getBest(PlatsRepository $platsRepository): Response
{
$bestplats = $platsRepository->findBestPlats();
// dd($bestplats);
return $this->render('plats/best.html.twig', [
'plat' => $bestplats,
]);
}
} }

View File

@ -72,22 +72,4 @@ final class TablesController extends AbstractController
return $this->redirectToRoute('app_tables_index', [], Response::HTTP_SEE_OTHER); return $this->redirectToRoute('app_tables_index', [], Response::HTTP_SEE_OTHER);
} }
#[Route('/update/statut/{id}', name: 'app_tables_update_statut', methods: ['POST'])]
public function update(Request $request, EntityManagerInterface $entityManager, $id): Response
{
$table = $entityManager->getRepository(Tables::class)->find($id);
if (!$table) {
throw $this->createNotFoundException('Table not found');
}
$libre = $request->request->get('libre') === '1';
$table->setLibre($libre);
$entityManager->persist($table);
$entityManager->flush();
return $this->redirectToRoute('app_tables_index');
}
} }

View File

@ -36,12 +36,9 @@ class Tables
/** /**
* @var Collection<int, Utilisateurs> * @var Collection<int, Utilisateurs>
*/ */
#[ORM\ManyToMany(targetEntity: Utilisateurs::class, inversedBy: 'tables')] #[ORM\ManyToMany(targetEntity: Utilisateurs::class, mappedBy: 'tables')]
private Collection $utilisateurs; private Collection $utilisateurs;
#[ORM\Column(type: 'boolean', options: ['default' => true])]
private ?bool $libre = null;
public function __construct() public function __construct()
{ {
$this->Clients = new ArrayCollection(); $this->Clients = new ArrayCollection();
@ -168,16 +165,4 @@ class Tables
return $this; return $this;
} }
public function isLibre(): ?bool
{
return $this->libre;
}
public function setLibre(bool $libre): static
{
$this->libre = $libre;
return $this;
}
} }

View File

@ -41,7 +41,7 @@ class Utilisateurs implements UserInterface, PasswordAuthenticatedUserInterface
/** /**
* @var Collection<int, Tables> * @var Collection<int, Tables>
*/ */
#[ORM\ManyToMany(targetEntity: Tables::class, mappedBy: 'utilisateurs')] #[ORM\ManyToMany(targetEntity: Tables::class, inversedBy: 'utilisateurs')]
private Collection $tables; private Collection $tables;
public function __construct() public function __construct()

View File

@ -17,7 +17,6 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\CallbackTransformer; use Symfony\Component\Form\CallbackTransformer;
use Symfony\Component\Validator\Constraints\Length; use Symfony\Component\Validator\Constraints\Length;
use Symfony\Component\Validator\Constraints\NotBlank; use Symfony\Component\Validator\Constraints\NotBlank;
use function Sodium\add;
class AddUserFormType extends AbstractType class AddUserFormType extends AbstractType
{ {
@ -49,12 +48,6 @@ class AddUserFormType extends AbstractType
'expanded' => true, 'expanded' => true,
'multiple' => true, 'multiple' => true,
]) ])
->add('Tables', EntityType::class, [
'class' => Tables::class,
'choice_label' => 'id',
'multiple' => true,
'expanded' => true,
])
->add('Enregistrer', SubmitType::class); ->add('Enregistrer', SubmitType::class);
} }

View File

@ -23,9 +23,12 @@ class ClientsType extends AbstractType
'class' => Tables::class, 'class' => Tables::class,
'choice_label' => 'id', 'choice_label' => 'id',
'multiple' => true, 'multiple' => true,
'expanded' => true,
]) ])
->add('Commandes', EntityType::class, [
'class' => Commandes::class,
'choice_label' => 'id',
'multiple' => true,
])
; ;
} }

View File

@ -25,17 +25,15 @@ class CommandesType extends AbstractType
'class' => Clients::class, 'class' => Clients::class,
'choice_label' => 'id', 'choice_label' => 'id',
'multiple' => true, 'multiple' => true,
'expanded' => true,
]) ])
->add('plats', EntityType::class, [ ->add('plats', EntityType::class, [
'class' => Plats::class, 'class' => Plats::class,
'choice_label' => 'id', 'choice_label' => 'id',
'multiple' => true, 'multiple' => true,
'expanded' => true,
]) ])
->add('StatutCommande', EntityType::class, [ ->add('StatutCommande', EntityType::class, [
'class' => StatutCommandes::class, 'class' => StatutCommandes::class,
'choice_label' => 'libelle', 'choice_label' => 'id',
]) ])
; ;
} }

View File

@ -27,7 +27,6 @@ class ReservationsType extends AbstractType
'class' => Utilisateurs::class, 'class' => Utilisateurs::class,
'choice_label' => 'id', 'choice_label' => 'id',
'multiple' => true, 'multiple' => true,
'expanded' => true,
]) ])
; ;
} }

View File

@ -3,12 +3,10 @@
namespace App\Form; namespace App\Form;
use App\Entity\Clients; use App\Entity\Clients;
use App\Entity\StatutTables;
use App\Entity\Tables; use App\Entity\Tables;
use App\Entity\Utilisateurs; use App\Entity\Utilisateurs;
use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolver;
@ -21,16 +19,11 @@ class TablesType extends AbstractType
'class' => Clients::class, 'class' => Clients::class,
'choice_label' => 'id', 'choice_label' => 'id',
'multiple' => true, 'multiple' => true,
'expanded' => true,
]) ])
->add('Utilisateurs', EntityType::class, [ ->add('utilisateurs', EntityType::class, [
'class' => Utilisateurs::class, 'class' => Utilisateurs::class,
'choice_label' => 'id', 'choice_label' => 'id',
'multiple' => true, 'multiple' => true,
'expanded' => true,
])
->add('libre', HiddenType::class, [
'data' => true,
]) ])
; ;
} }

View File

@ -40,14 +40,4 @@ class PlatsRepository extends ServiceEntityRepository
// ->getOneOrNullResult() // ->getOneOrNullResult()
// ; // ;
// } // }
public function findBestPlats(): ?Plats
{
return $this->createQueryBuilder('p')
->orderBy('p.Nb_de_commande', 'DESC')
->setMaxResults(1)
->getQuery()
->getOneOrNullResult();
}
} }

View File

@ -38,17 +38,6 @@
<div> <div>
Bonjour, {{ app.user.prenom }} Bonjour, {{ app.user.prenom }}
</div> </div>
<div class="Information-perso">
<a href="{{ path('update-user', { 'id': app.user.id }) }}" class="btn-info-compte icon-container">
<i class="icon-medium"> {{ ux_icon('ph:user-circle-fill') }}</i>
<span>Compte</span>
</a>
<div class="btn-info-exit icon-container">
<a href="{{ path('app_logout') }}" class="icon-medium">
{{ ux_icon('iconamoon:exit-bold') }}
</a>
</div>
</div>
</div> </div>
<!-- Left Menu --> <!-- Left Menu -->
@ -63,12 +52,6 @@
<span>Gérer Utilisateur</span> <span>Gérer Utilisateur</span>
</a> </a>
</li> </li>
<li>
<a href="/clients" class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('icon-park-outline:people') }}</i>
<span>Gestion Client</span>
</a>
</li>
<li> <li>
<a href="/tables" class="btn-custom btn-gestion-table icon-container"> <a href="/tables" class="btn-custom btn-gestion-table icon-container">
<i class="icon-medium"> {{ ux_icon('ic:outline-table-bar') }}</i> <i class="icon-medium"> {{ ux_icon('ic:outline-table-bar') }}</i>
@ -88,22 +71,10 @@
</a> </a>
</li> </li>
<li> <li>
<a href="/plats/bestplats" class="btn-custom icon-container"> <div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('fluent-emoji-high-contrast:ten-oclock') }}</i> <i class="icon-medium"> {{ ux_icon('fluent-emoji-high-contrast:ten-oclock') }}</i>
<span>Voir tendances</span> <span>Voir tendances</span>
</a> </div>
</li>
<li>
<a href="/commandes" class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('icon-park-outline:view-list') }}</i>
<span>Commandes</span>
</a>
</li>
<li>
<a href="/reservations" class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('fluent-mdl2:reservation-orders') }}</i>
<span>Réservation</span>
</a>
</li> </li>
</ul> </ul>
</div> </div>
@ -146,11 +117,22 @@
</ul> </ul>
</div> </div>
{% endif %} {% endif %}
<div class="Information-perso">
<a href="{{ path('update-user', { 'id': app.user.id }) }}" class="btn-info-compte icon-container">
<i class="icon-medium"> {{ ux_icon('ph:user-circle-fill') }}</i>
<span>Compte</span>
</a>
<div class="btn-info-exit icon-container">
<a href="{{ path('app_logout') }}" class="icon-medium">
{{ ux_icon('iconamoon:exit-bold') }}
</a>
</div>
</div>
</div> </div>
{% block container_modal %} {% block container_modal %}
<div id="container_modal"> <div id="container_modal">
<!-- Contenu par défaut, ou vous pouvez laisser vide --> <!-- Contenu par défaut, ou vous p ouvez laisser vide -->
</div> </div>
{% endblock %} {% endblock %}

View File

@ -2,25 +2,7 @@
{% block title %}Modifier Client{% endblock %} {% block title %}Modifier Client{% endblock %}
{% block head %} {% block body %}
<head>
<meta charset="UTF-8">
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">
<link href="https://fonts.cdnfonts.com/css/brittany-signature" rel="stylesheet">
</head>
{% endblock %}
{% block stylesheets %}
<link rel="stylesheet" href="{{ asset('css/ControllerVues/list.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/ControllerVues/edit.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/Index/index.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/Compte/index.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/GestionUtilisateurs/GestionUtilisateurs.css') }}"> <!-- Ajout du fichier CSS -->
{% endblock %}
{% block container_modal %}
<div id="container_modal">
<h1>Modifier Client</h1> <h1>Modifier Client</h1>
{{ include('clients/_form.html.twig', {'button_label': 'Mettre à jour'}) }} {{ include('clients/_form.html.twig', {'button_label': 'Mettre à jour'}) }}
@ -28,5 +10,4 @@
<a href="{{ path('app_clients_index') }}">Retour à la liste</a> <a href="{{ path('app_clients_index') }}">Retour à la liste</a>
{{ include('clients/_delete_form.html.twig') }} {{ include('clients/_delete_form.html.twig') }}
</div>
{% endblock %} {% endblock %}

View File

@ -1,24 +1,11 @@
{% extends 'base.html.twig' %} {% extends 'base.html.twig' %}
{% block title %}Client index{% endblock %} {% block title %}Clients index{% endblock %}
{% block head %}
<head>
<meta charset="UTF-8">
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">
<link href="https://fonts.cdnfonts.com/css/brittany-signature" rel="stylesheet">
</head>
{% endblock %}
{% block stylesheets %} {% block stylesheets %}
<link rel="stylesheet" href="{{ asset('css/ControllerVues/list.css') }}"> <!-- Ajout du fichier CSS --> <link rel="stylesheet" href="{{ asset('css/ControllerVues/list.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/Index/index.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/Compte/index.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/GestionUtilisateurs/GestionUtilisateurs.css') }}"> <!-- Ajout du fichier CSS -->
{% endblock %}
{% block container_modal %} {% endblock %}
<div id="container_modal"> {% block body %}
<h1>Clients index</h1> <h1>Clients index</h1>
<table class="table"> <table class="table">
@ -57,5 +44,4 @@
</table> </table>
<a href="{{ path('app_clients_new') }}">Créer un nouveau client</a> <a href="{{ path('app_clients_new') }}">Créer un nouveau client</a>
</div>
{% endblock %} {% endblock %}

View File

@ -1,29 +1,14 @@
{% extends 'base.html.twig' %} {% extends 'base.html.twig' %}
{% block title %}Tables index{% endblock %} {% block title %}Nouveau client{% endblock %}
{% block head %}
<head>
<meta charset="UTF-8">
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">
<link href="https://fonts.cdnfonts.com/css/brittany-signature" rel="stylesheet">
</head>
{% endblock %}
{% block stylesheets %} {% block stylesheets %}
<link rel="stylesheet" href="{{ asset('css/ControllerVues/list.css') }}"> <!-- Ajout du fichier CSS --> <link rel="stylesheet" href="{{ asset('css/ControllerVues/new.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/Index/index.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/Compte/index.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/GestionUtilisateurs/GestionUtilisateurs.css') }}"> <!-- Ajout du fichier CSS -->
{% endblock %} {% endblock %}
{% block body %}
{% block container_modal %}
<div id="container_modal">
<h1>Créer un client</h1> <h1>Créer un client</h1>
{{ include('clients/_form.html.twig') }} {{ include('clients/_form.html.twig') }}
<a href="{{ path('app_clients_index') }}">Retour à la liste</a> <a href="{{ path('app_clients_index') }}">Retour à la liste</a>
</div>
{% endblock %} {% endblock %}

View File

@ -1,30 +1,13 @@
{% extends 'base.html.twig' %} {% extends 'base.html.twig' %}
{% block title %}Tables index{% endblock %} {% block title %}Modifier Commande{% endblock %}
{% block head %} {% block body %}
<head>
<meta charset="UTF-8">
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">
<link href="https://fonts.cdnfonts.com/css/brittany-signature" rel="stylesheet">
</head>
{% endblock %}
{% block stylesheets %}
<link rel="stylesheet" href="{{ asset('css/ControllerVues/list.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/ControllerVues/edit.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/Index/index.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/Compte/index.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/GestionUtilisateurs/GestionUtilisateurs.css') }}"> <!-- Ajout du fichier CSS -->
{% endblock %}
{% block container_modal %}
<div id="container_modal">
<h1>Modifier Commande</h1> <h1>Modifier Commande</h1>
{{ include('commandes/_form.html.twig', {'button_label': 'Mettre à jour'}) }} {{ include('commandes/_form.html.twig', {'button_label': 'Mettre à jour'}) }}
<a href="{{ path('app_commandes_index') }}">Retour à la liste</a> <a href="{{ path('app_commandes_index') }}">Retour à la liste</a>
</div>
{% endblock %} {% endblock %}

View File

@ -1,60 +1,46 @@
{% extends 'base.html.twig' %} {% extends 'base.html.twig' %}
{% block title %}Commandes index{% endblock %} {% block title %}Commandes index{% endblock %}
{% block head %}
<head>
<meta charset="UTF-8">
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">
<link href="https://fonts.cdnfonts.com/css/brittany-signature" rel="stylesheet">
</head>
{% endblock %}
{% block stylesheets %} {% block stylesheets %}
<link rel="stylesheet" href="{{ asset('css/ControllerVues/list.css') }}"> <!-- Ajout du fichier CSS --> <link rel="stylesheet" href="{{ asset('css/ControllerVues/list.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/Index/index.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/Compte/index.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/GestionUtilisateurs/GestionUtilisateurs.css') }}"> <!-- Ajout du fichier CSS -->
{% endblock %} {% endblock %}
{% block body %}
<h1>Commandes index</h1>
{% block container_modal %} <table class="table">
<div id="container_modal"> <thead>
<h1>Commandes index</h1> <tr>
<th>Id</th>
<th>DateHeure</th>
<th>Statut</th>
<th>Total</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for commande in commandes %}
<tr>
<td>{{ commande.id }}</td>
<td>{{ commande.DateHeure ? commande.DateHeure|date('Y-m-d H:i:s') : '' }}</td>
<td>{{ commande.Statut ? 'Yes' : 'No' }}</td>
<td>{{ commande.Total }}</td>
<td>
<form method="post" action="{{ path('app_commandes_delete', {'id': commande.id}) }}" onsubmit="return confirm('Es-tu sur de vouloir le supprimer ?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ commande.id) }}">
{{ include('commandes/_delete_form.html.twig') }}
</form>
<table class="table"> <a href="{{ path('app_commandes_edit', {'id': commande.id}) }}">Modifier</a>
<thead> </td>
<tr> </tr>
<th>Id</th> {% else %}
<th>DateHeure</th> <tr>
<th>Statut</th> <td colspan="5">pas de commande crée</td>
<th>Total</th> </tr>
<th>actions</th> {% endfor %}
</tr> </tbody>
</thead> </table>
<tbody>
{% for commande in commandes %}
<tr>
<td>{{ commande.id }}</td>
<td>{{ commande.DateHeure ? commande.DateHeure|date('Y-m-d H:i:s') : '' }}</td>
<td>{{ commande.Statut ? 'Yes' : 'No' }}</td>
<td>{{ commande.Total }}</td>
<td>
<form method="post" action="{{ path('app_commandes_delete', {'id': commande.id}) }}" onsubmit="return confirm('Es-tu sur de vouloir le supprimer ?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ commande.id) }}">
{{ include('commandes/_delete_form.html.twig') }}
</form>
<a href="{{ path('app_commandes_edit', {'id': commande.id}) }}">Modifier</a> <a href="{{ path('app_commandes_new') }}">Créer une nouvelle commande</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="5">pas de commande crée</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_commandes_new') }}">Créer une nouvelle commande</a>
</div>
{% endblock %} {% endblock %}

View File

@ -1,29 +1,15 @@
{% extends 'base.html.twig' %} {% extends 'base.html.twig' %}
{% block title %}Tables index{% endblock %} {% block title %}Nouvelle commande{% endblock %}
{% block head %}
<head>
<meta charset="UTF-8">
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">
<link href="https://fonts.cdnfonts.com/css/brittany-signature" rel="stylesheet">
</head>
{% endblock %}
{% block stylesheets %} {% block stylesheets %}
<link rel="stylesheet" href="{{ asset('css/ControllerVues/list.css') }}"> <!-- Ajout du fichier CSS --> <link rel="stylesheet" href="{{ asset('css/ControllerVues/new.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/Index/index.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/Compte/index.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/GestionUtilisateurs/GestionUtilisateurs.css') }}"> <!-- Ajout du fichier CSS -->
{% endblock %} {% endblock %}
{% block container_modal %} {% block body %}
<div id="container_modal">
<h1>Créer une commande</h1> <h1>Créer une commande</h1>
{{ include('commandes/_form.html.twig') }} {{ include('commandes/_form.html.twig') }}
<a href="{{ path('app_commandes_index') }}">Retour à la liste</a> <a href="{{ path('app_commandes_index') }}">Retour à la liste</a>
</div>
{% endblock %} {% endblock %}

View File

@ -1,59 +0,0 @@
{% extends 'base.html.twig' %}
{% block head %}
<head>
<meta charset="UTF-8">
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">
<link href="https://fonts.cdnfonts.com/css/brittany-signature" rel="stylesheet">
</head>
{% endblock %}
{% block stylesheets %}
<link rel="stylesheet" href="{{ asset('css/ControllerVues/list.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/ControllerVues/edit.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/Index/index.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/Compte/index.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/GestionUtilisateurs/GestionUtilisateurs.css') }}"> <!-- Ajout du fichier CSS -->
{% endblock %}
{% block container_modal %}
<div id="container_modal">
<h1>Tendance</h1>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>Nom</th>
<th>Description</th>
<th>Prix</th>
<th>Categorie</th>
<th>Statut</th>
<th>Nb_de_commande</th>
</tr>
</thead>
<tbody>
{% if plat %}
<tr>
<td>{{ plat.id }}</td>
<td>{{ plat.Nom }}</td>
<td>{{ plat.Description }}</td>
<td>{{ plat.Prix }}</td>
<td>{{ plat.Categorie }}</td>
<td>{{ plat.Statut ? 'Yes' : 'No' }}</td>
<td>{{ plat.NbDeCommande }}</td>
</tr>
{% else %}
<tr>
<td colspan="8">Aucun enregistrement trouvé</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
{% endblock %}

View File

@ -1,25 +1,12 @@
{% extends 'base.html.twig' %} {% extends 'base.html.twig' %}
{% block title %}Tables index{% endblock %} {% block title %}Modifier Réservation{% endblock %}
{% block head %}
<head>
<meta charset="UTF-8">
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">
<link href="https://fonts.cdnfonts.com/css/brittany-signature" rel="stylesheet">
</head>
{% endblock %}
{% block stylesheets %} {% block stylesheets %}
<link rel="stylesheet" href="{{ asset('css/ControllerVues/list.css') }}"> <!-- Ajout du fichier CSS --> <link rel="stylesheet" href="{{ asset('css/ControllerVues/edit.css') }}">
<link rel="stylesheet" href="{{ asset('css/ControllerVues/edit.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/Index/index.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/Compte/index.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/GestionUtilisateurs/GestionUtilisateurs.css') }}"> <!-- Ajout du fichier CSS -->
{% endblock %} {% endblock %}
{% block container_modal %} {% block body %}
<div id="container_modal">
<div class="page-container"> <div class="page-container">
<h1 class="page-title">Modifier Réservation</h1> <h1 class="page-title">Modifier Réservation</h1>
@ -31,5 +18,4 @@
{{ include('reservations/_delete_form.html.twig') }} {{ include('reservations/_delete_form.html.twig') }}
</div> </div>
</div>
{% endblock %} {% endblock %}

View File

@ -1,24 +1,11 @@
{% extends 'base.html.twig' %} {% extends 'base.html.twig' %}
{% block title %}Reservations index{% endblock %} {% block title %}Reservations index{% endblock %}
{% block head %}
<head>
<meta charset="UTF-8">
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">
<link href="https://fonts.cdnfonts.com/css/brittany-signature" rel="stylesheet">
</head>
{% endblock %}
{% block stylesheets %} {% block stylesheets %}
<link rel="stylesheet" href="{{ asset('css/ControllerVues/list.css') }}"> <!-- Ajout du fichier CSS --> <link rel="stylesheet" href="{{ asset('css/ControllerVues/list.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/Index/index.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/Compte/index.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/GestionUtilisateurs/GestionUtilisateurs.css') }}"> <!-- Ajout du fichier CSS -->
{% endblock %}
{% block container_modal %} {% endblock %}
<div id="container_modal"> {% block body %}
<h1>Reservations index</h1> <h1>Reservations index</h1>
<table class="table"> <table class="table">
@ -53,5 +40,4 @@
</table> </table>
<a href="{{ path('app_reservations_new') }}">Créer une réservation</a> <a href="{{ path('app_reservations_new') }}">Créer une réservation</a>
</div>
{% endblock %} {% endblock %}

View File

@ -1,29 +1,14 @@
{% extends 'base.html.twig' %} {% extends 'base.html.twig' %}
{% block title %}Tables index{% endblock %} {% block title %}New Reservations{% endblock %}
{% block head %}
<head>
<meta charset="UTF-8">
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">
<link href="https://fonts.cdnfonts.com/css/brittany-signature" rel="stylesheet">
</head>
{% endblock %}
{% block stylesheets %} {% block stylesheets %}
<link rel="stylesheet" href="{{ asset('css/ControllerVues/list.css') }}"> <!-- Ajout du fichier CSS --> <link rel="stylesheet" href="{{ asset('css/ControllerVues/new.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/ControllerVues/edit.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/Index/index.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/Compte/index.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/GestionUtilisateurs/GestionUtilisateurs.css') }}"> <!-- Ajout du fichier CSS -->
{% endblock %}
{% block container_modal %} {% endblock %}
<div id="container_modal"> {% block body %}
<h1>Créer une reservation</h1> <h1>Créer une reservation</h1>
{{ include('reservations/_form.html.twig') }} {{ include('reservations/_form.html.twig') }}
<a href="{{ path('app_reservations_index') }}">Retour à la liste</a> <a href="{{ path('app_reservations_index') }}">Retour à la liste</a>
</div>
{% endblock %} {% endblock %}

View File

@ -22,62 +22,33 @@
<div id="container_modal"> <div id="container_modal">
<h1>Tables index</h1> <h1>Tables index</h1>
<table> <table class="table">
<thead> <thead>
<tr> <tr>
<th>Numéro de Table</th> <th>Id</th>
<th>Client Assigné</th> <th>actions</th>
<th>Utilisateur Assigné</th>
<th>Libre ?</th>
<th>Actions</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for table in tables %} {% for table in tables %}
<tr> <tr>
<td>{{ table.id }}</td> <td>{{ table.id }}</td>
<td> <td>
{% for client in table.Clients %} <form method="post" action="{{ path('app_tables_delete', {'id': table.id}) }}" onsubmit="return confirm('Es-tu sur de vouloir le supprimer ?');">
{{ client.nom }}{% if not loop.last %}, {% endif %}
{% else %}
Aucun
{% endfor %}
</td>
<td>
{% for utilisateur in table.utilisateurs %}
{{ utilisateur.nom }}{% if not loop.last %}, {% endif %}
{% else %}
Aucun
{% endfor %}
</td>
<td>
<form method="POST" action="{{ path('app_tables_update_statut', {'id': table.id}) }}">
<input type="checkbox" name="libre" value="1" {% if table.libre %}checked{% endif %}>
<button type="submit">Mettre à jour</button>
</form>
</td>
<td>
<a href="{{ path('app_tables_edit', {'id': table.id}) }}">Modifier</a>
<form method="post" action="{{ path('app_tables_delete', {'id': table.id}) }}" onsubmit="return confirm('Es-tu sûr de vouloir le supprimer ?');" style="display:inline;">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ table.id) }}"> <input type="hidden" name="_token" value="{{ csrf_token('delete' ~ table.id) }}">
<button type="submit">Supprimer</button> {{ include('tables/_delete_form.html.twig') }}
</form> </form>
<a href="{{ path('app_tables_edit', {'id': table.id}) }}">Modifier</a>
</td> </td>
</tr> </tr>
{% else %} {% else %}
<tr> <tr>
<td colspan="5">Aucun enregistrement trouvé</td> <td colspan="2">Aucun enregistrement trouvé</td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
<a onclick="addTable(this)" href="{{ path('app_tables_new')}}">Créer une tables</a> <a onclick="addTable(this)" href="{{ path('app_tables_new')}}">Créer une tables</a>
</div> </div>