Maj de la table : Tables

Changement CSS
This commit is contained in:
Joshua 2024-11-14 17:48:57 +01:00
parent 78bafdeee1
commit 825cdab07b
7 changed files with 101 additions and 36 deletions

View File

@ -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%;
}
}

View File

@ -30,8 +30,8 @@ class Clients
/** /**
* @var Collection<int, Tables> * @var Collection<int, Tables>
*/ */
#[ORM\ManyToMany(targetEntity: Tables::class, inversedBy: 'Client')] #[ORM\ManyToMany(targetEntity: Tables::class, mappedBy: 'Clients')]
private Collection $table; private Collection $tables;
/** /**
* @var Collection<int, Commandes> * @var Collection<int, Commandes>
@ -41,7 +41,7 @@ class Clients
public function __construct() public function __construct()
{ {
$this->table = new ArrayCollection(); $this->tables = new ArrayCollection();
$this->commandes = new ArrayCollection(); $this->commandes = new ArrayCollection();
} }
@ -101,23 +101,23 @@ class Clients
/** /**
* @return Collection<int, Tables> * @return Collection<int, Tables>
*/ */
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)) { if (!$this->tables->contains($tables)) {
$this->table->add($table); $this->tables->add($tables);
} }
return $this; return $this;
} }
public function removeTable(Tables $table): static public function removeTable(Tables $tables): static
{ {
$this->table->removeElement($table); $this->tables->removeElement($tables);
return $this; return $this;
} }

View File

@ -23,7 +23,7 @@ class Reservations
private ?int $Nb_de_prsn = null; private ?int $Nb_de_prsn = null;
#[ORM\ManyToOne(inversedBy: 'reservations')] #[ORM\ManyToOne(inversedBy: 'reservations')]
private ?Tables $Table = null; private ?Tables $tables = null;
/** /**
* @var Collection<int, Utilisateurs> * @var Collection<int, Utilisateurs>
@ -65,14 +65,14 @@ class Reservations
return $this; 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; return $this;
} }

View File

@ -17,7 +17,7 @@ class StatutTables
private ?string $Libellé = null; private ?string $Libellé = null;
#[ORM\ManyToOne(inversedBy: 'statutTables')] #[ORM\ManyToOne(inversedBy: 'statutTables')]
private ?Tables $Table = null; private ?Tables $tables = null;
public function getId(): ?int public function getId(): ?int
{ {
@ -36,14 +36,14 @@ class StatutTables
return $this; 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; return $this;
} }

View File

@ -18,25 +18,25 @@ class Tables
/** /**
* @var Collection<int, Clients> * @var Collection<int, Clients>
*/ */
#[ORM\ManyToMany(targetEntity: Clients::class, mappedBy: 'table')] #[ORM\ManyToMany(targetEntity: Clients::class, inversedBy: 'tables')]
private Collection $Clients; private Collection $Clients;
/** /**
* @var Collection<int, Reservations> * @var Collection<int, Reservations>
*/ */
#[ORM\OneToMany(targetEntity: Reservations::class, mappedBy: 'Table')] #[ORM\OneToMany(targetEntity: Reservations::class, mappedBy: 'tables')]
private Collection $reservations; private Collection $reservations;
/** /**
* @var Collection<int, StatutTables> * @var Collection<int, StatutTables>
*/ */
#[ORM\OneToMany(targetEntity: StatutTables::class, mappedBy: 'Table')] #[ORM\OneToMany(targetEntity: StatutTables::class, mappedBy: 'tables')]
private Collection $statutTables; private Collection $statutTables;
/** /**
* @var Collection<int, Utilisateurs> * @var Collection<int, Utilisateurs>
*/ */
#[ORM\ManyToMany(targetEntity: Utilisateurs::class, mappedBy: 'table')] #[ORM\ManyToMany(targetEntity: Utilisateurs::class, mappedBy: 'tables')]
private Collection $utilisateurs; private Collection $utilisateurs;
public function __construct() public function __construct()
@ -55,7 +55,7 @@ class Tables
/** /**
* @return Collection<int, Clients> * @return Collection<int, Clients>
*/ */
public function getClient(): Collection public function getClients(): Collection
{ {
return $this->Clients; return $this->Clients;
} }
@ -101,7 +101,7 @@ class Tables
{ {
if ($this->reservations->removeElement($reservation)) { if ($this->reservations->removeElement($reservation)) {
// set the owning side to null (unless already changed) // set the owning side to null (unless already changed)
if ($reservation->getTable() === $this) { if ($reservation->getTables() === $this) {
$reservation->setTable(null); $reservation->setTable(null);
} }
} }
@ -131,7 +131,7 @@ class Tables
{ {
if ($this->statutTables->removeElement($statutTable)) { if ($this->statutTables->removeElement($statutTable)) {
// set the owning side to null (unless already changed) // set the owning side to null (unless already changed)
if ($statutTable->getTable() === $this) { if ($statutTable->getTables() === $this) {
$statutTable->setTable(null); $statutTable->setTable(null);
} }
} }

View File

@ -42,12 +42,12 @@ class Utilisateurs implements UserInterface, PasswordAuthenticatedUserInterface
* @var Collection<int, Tables> * @var Collection<int, Tables>
*/ */
#[ORM\ManyToMany(targetEntity: Tables::class, inversedBy: 'utilisateurs')] #[ORM\ManyToMany(targetEntity: Tables::class, inversedBy: 'utilisateurs')]
private Collection $table; private Collection $tables;
public function __construct() public function __construct()
{ {
$this->Reservation = new ArrayCollection(); $this->Reservation = new ArrayCollection();
$this->table = new ArrayCollection(); $this->tables = new ArrayCollection();
} }
public function getId(): ?int public function getId(): ?int
@ -157,23 +157,23 @@ class Utilisateurs implements UserInterface, PasswordAuthenticatedUserInterface
/** /**
* @return Collection<int, Tables> * @return Collection<int, Tables>
*/ */
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)) { if (!$this->tables->contains($tables)) {
$this->table->add($table); $this->tables->add($tables);
} }
return $this; return $this;
} }
public function removeTable(Tables $table): static public function removeTable(Tables $tables): static
{ {
$this->table->removeElement($table); $this->tables->removeElement($tables);
return $this; return $this;
} }