From b51a75285a4780ae003d932837d543c2741a7537 Mon Sep 17 00:00:00 2001 From: Joshua Date: Thu, 14 Nov 2024 17:48:57 +0100 Subject: [PATCH] Maj de la table : Tables Changement CSS --- public/css/GestionUser.css | 65 +++++++++++++ public/css/{modal.css => Index.css} | 0 src/Entity/Clients.php | 20 ++-- src/Entity/Reservations.php | 10 +- src/Entity/StatutTables.php | 10 +- src/Entity/Tables.php | 14 +-- src/Entity/Utilisateurs.php | 18 ++-- templates/gestion_user/index.html.twig | 125 +++++-------------------- templates/index/index.html.twig | 14 +-- 9 files changed, 126 insertions(+), 150 deletions(-) create mode 100644 public/css/GestionUser.css rename public/css/{modal.css => Index.css} (100%) diff --git a/public/css/GestionUser.css b/public/css/GestionUser.css new file mode 100644 index 0000000..a2cb857 --- /dev/null +++ b/public/css/GestionUser.css @@ -0,0 +1,65 @@ +#container_gestion_user { + background-color: white; + margin-left: 20%; /* Centrage vertical */ + margin-top: 5%; + padding: 20px; + border: 1px solid black; + width: 75%; /* Largeur du contenu de la modal */ + height: 100%; /* Hauteur du contenu de la modal */ + box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2); + display: none; +} + +body { + width: 100%; + height: 100%; +} + +/* Style pour chaque élément d'information de l'utilisateur */ +.user-info-item { + display: flex; + padding: 10px 0; + border-bottom: 1px solid #e0e0e0; +} + +/* Dernier élément sans bordure */ +.user-info-item:last-child { + border-bottom: none; +} + +/* Style pour le label de chaque information (Nom, Prénom, etc.) */ +.user-info-label { + font-weight: bold; + color: #333; + width: 7%; +} + +/* Style pour la valeur de chaque information (la donnée de l'utilisateur) */ +.user-info-value { + color: #555; + text-align: right; + width: 65%; + word-wrap: break-word; /* Gère les débordements */ +} + +.btn-update { + margin-top: 1%; +} + + +/* Ajout d'un style pour rendre responsive */ +@media (max-width: 600px) { + #InformationUser { + padding: 15px; + } + + .user-info-item { + flex-direction: column; + padding: 8px 0; + } + + .user-info-label, .user-info-value { + width: 100%; + } +} + diff --git a/public/css/modal.css b/public/css/Index.css similarity index 100% rename from public/css/modal.css rename to public/css/Index.css diff --git a/src/Entity/Clients.php b/src/Entity/Clients.php index 35a78f3..3722d87 100644 --- a/src/Entity/Clients.php +++ b/src/Entity/Clients.php @@ -30,8 +30,8 @@ class Clients /** * @var Collection */ - #[ORM\ManyToMany(targetEntity: Tables::class, inversedBy: 'Client')] - private Collection $table; + #[ORM\ManyToMany(targetEntity: Tables::class, mappedBy: 'Clients')] + private Collection $tables; /** * @var Collection @@ -41,7 +41,7 @@ class Clients public function __construct() { - $this->table = new ArrayCollection(); + $this->tables = new ArrayCollection(); $this->commandes = new ArrayCollection(); } @@ -101,23 +101,23 @@ class Clients /** * @return Collection */ - public function getTable(): Collection + public function getTables(): Collection { - return $this->table; + return $this->tables; } - public function addTable(Tables $table): static + public function addTable(Tables $tables): static { - if (!$this->table->contains($table)) { - $this->table->add($table); + if (!$this->tables->contains($tables)) { + $this->tables->add($tables); } return $this; } - public function removeTable(Tables $table): static + public function removeTable(Tables $tables): static { - $this->table->removeElement($table); + $this->tables->removeElement($tables); return $this; } diff --git a/src/Entity/Reservations.php b/src/Entity/Reservations.php index 8ad6096..757d358 100644 --- a/src/Entity/Reservations.php +++ b/src/Entity/Reservations.php @@ -23,7 +23,7 @@ class Reservations private ?int $Nb_de_prsn = null; #[ORM\ManyToOne(inversedBy: 'reservations')] - private ?Tables $Table = null; + private ?Tables $tables = null; /** * @var Collection @@ -65,14 +65,14 @@ class Reservations return $this; } - public function getTable(): ?Tables + public function getTables(): ?Tables { - return $this->Table; + return $this->tables; } - public function setTable(?Tables $Table): static + public function setTable(?Tables $tables): static { - $this->Table = $Table; + $this->tables = $tables; return $this; } diff --git a/src/Entity/StatutTables.php b/src/Entity/StatutTables.php index f336a5a..5b500b9 100644 --- a/src/Entity/StatutTables.php +++ b/src/Entity/StatutTables.php @@ -17,7 +17,7 @@ class StatutTables private ?string $Libellé = null; #[ORM\ManyToOne(inversedBy: 'statutTables')] - private ?Tables $Table = null; + private ?Tables $tables = null; public function getId(): ?int { @@ -36,14 +36,14 @@ class StatutTables return $this; } - public function getTable(): ?Tables + public function getTables(): ?Tables { - return $this->Table; + return $this->tables; } - public function setTable(?Tables $Table): static + public function setTable(?Tables $tables): static { - $this->Table = $Table; + $this->tables = $tables; return $this; } diff --git a/src/Entity/Tables.php b/src/Entity/Tables.php index 25d3763..1d1820a 100644 --- a/src/Entity/Tables.php +++ b/src/Entity/Tables.php @@ -18,25 +18,25 @@ class Tables /** * @var Collection */ - #[ORM\ManyToMany(targetEntity: Clients::class, mappedBy: 'table')] + #[ORM\ManyToMany(targetEntity: Clients::class, inversedBy: 'tables')] private Collection $Clients; /** * @var Collection */ - #[ORM\OneToMany(targetEntity: Reservations::class, mappedBy: 'Table')] + #[ORM\OneToMany(targetEntity: Reservations::class, mappedBy: 'tables')] private Collection $reservations; /** * @var Collection */ - #[ORM\OneToMany(targetEntity: StatutTables::class, mappedBy: 'Table')] + #[ORM\OneToMany(targetEntity: StatutTables::class, mappedBy: 'tables')] private Collection $statutTables; /** * @var Collection */ - #[ORM\ManyToMany(targetEntity: Utilisateurs::class, mappedBy: 'table')] + #[ORM\ManyToMany(targetEntity: Utilisateurs::class, mappedBy: 'tables')] private Collection $utilisateurs; public function __construct() @@ -55,7 +55,7 @@ class Tables /** * @return Collection */ - public function getClient(): Collection + public function getClients(): Collection { return $this->Clients; } @@ -101,7 +101,7 @@ class Tables { if ($this->reservations->removeElement($reservation)) { // set the owning side to null (unless already changed) - if ($reservation->getTable() === $this) { + if ($reservation->getTables() === $this) { $reservation->setTable(null); } } @@ -131,7 +131,7 @@ class Tables { if ($this->statutTables->removeElement($statutTable)) { // set the owning side to null (unless already changed) - if ($statutTable->getTable() === $this) { + if ($statutTable->getTables() === $this) { $statutTable->setTable(null); } } diff --git a/src/Entity/Utilisateurs.php b/src/Entity/Utilisateurs.php index c4af5ea..c9a6ead 100644 --- a/src/Entity/Utilisateurs.php +++ b/src/Entity/Utilisateurs.php @@ -42,12 +42,12 @@ class Utilisateurs implements UserInterface, PasswordAuthenticatedUserInterface * @var Collection */ #[ORM\ManyToMany(targetEntity: Tables::class, inversedBy: 'utilisateurs')] - private Collection $table; + private Collection $tables; public function __construct() { $this->Reservation = new ArrayCollection(); - $this->table = new ArrayCollection(); + $this->tables = new ArrayCollection(); } public function getId(): ?int @@ -157,23 +157,23 @@ class Utilisateurs implements UserInterface, PasswordAuthenticatedUserInterface /** * @return Collection */ - public function getTable(): Collection + public function getTables(): Collection { - return $this->table; + return $this->tables; } - public function addTable(Tables $table): static + public function addTable(Tables $tables): static { - if (!$this->table->contains($table)) { - $this->table->add($table); + if (!$this->tables->contains($tables)) { + $this->tables->add($tables); } return $this; } - public function removeTable(Tables $table): static + public function removeTable(Tables $tables): static { - $this->table->removeElement($table); + $this->tables->removeElement($tables); return $this; } diff --git a/templates/gestion_user/index.html.twig b/templates/gestion_user/index.html.twig index 21ac47f..f82de26 100644 --- a/templates/gestion_user/index.html.twig +++ b/templates/gestion_user/index.html.twig @@ -4,110 +4,31 @@ {% block body %} +
+
+ + + + -

Test

- -{# {{ form_start(form) }}#} -{#
#} -{# {{ form_row(form.UserIdentifier) }}#} -{# {{ form_row(form.Password) }}#} -{# {{ form_row(form.Nom) }}#} -{# {{ form_row(form.Prenom) }}#} -{# {{ form_row(form.Roles) }}#} -{#
#} -{# {{ form_end(form) }}#} - -{# #} -{#
#} -{# #} -{# #} -{# #} -{# #} -{# #} - -{#
#} -{# #} -{#
#} -{#
#} -{# #} +
+ +
+
+ {% endblock %} diff --git a/templates/index/index.html.twig b/templates/index/index.html.twig index f363b1d..93d945c 100644 --- a/templates/index/index.html.twig +++ b/templates/index/index.html.twig @@ -10,22 +10,12 @@ {% endblock %} {% block stylesheets %} - + + {% endblock %} {% block body %}