diff --git a/public/css/Compte/GestionUser.css b/public/css/Compte/GestionUser.css index 5fe2b0a..323de72 100644 --- a/public/css/Compte/GestionUser.css +++ b/public/css/Compte/GestionUser.css @@ -1,3 +1,7 @@ +html{ + font-family: "Quicksand Light"; !important; +} + #container_modal { background-color: white; margin-left: 20%; /* Centrage vertical */ diff --git a/public/css/Compte/index.css b/public/css/Compte/index.css index 37dd955..4073693 100644 --- a/public/css/Compte/index.css +++ b/public/css/Compte/index.css @@ -1,3 +1,7 @@ + +html{ + font-family: "Quicksand Light"; !important; +} /* Style pour chaque élément d'information de l'utilisateur */ .user-info-item { display: flex; diff --git a/public/css/ControllerVues/edit.css b/public/css/ControllerVues/edit.css index 0ee0756..f83a288 100644 --- a/public/css/ControllerVues/edit.css +++ b/public/css/ControllerVues/edit.css @@ -1,4 +1,6 @@ - +html{ + font-family: "Quicksand Light"; !important; +} /* Page container */ .page-container { width: 100%; diff --git a/public/css/ControllerVues/list.css b/public/css/ControllerVues/list.css index 37866e5..3d5af65 100644 --- a/public/css/ControllerVues/list.css +++ b/public/css/ControllerVues/list.css @@ -1,36 +1,29 @@ - - -/*h1 {*/ -/* text-align: center;*/ -/* color: #db5559;*/ -/* margin-bottom: 20px;*/ -/*}*/ - /* Table styles */ -.table { +table { width: 100%; border-collapse: collapse; margin-bottom: 20px; background-color: #fff; - box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); + font-family: sans-serif; } -.table th, .table td { +table th, table td { padding: 12px; text-align: left; border: 1px solid #ddd; } -.table th { +table th { background-color: #db5559; color: white; + font-weight: bold; } -.table tr:nth-child(even) { +table tr:nth-child(even) { background-color: #f2f2f2; } -.table tr:hover { +table tr:hover { background-color: #ddd; } @@ -42,7 +35,7 @@ a { } a:hover { - color: #38538e; + color: white; text-decoration: underline; } @@ -64,8 +57,25 @@ a[href*="app_clients_new"]:hover { } /* Empty table row message */ -.table td[colspan="6"] { +table td[colspan="6"] { text-align: center; font-style: italic; color: #666; } + +/* Button styles */ +.btn-container { + display: flex; + justify-content: center; + margin-bottom: 20px; +} + +.btn { + padding: 5px 10px; + text-decoration: none; + color: white; + background-color: #db5559; + border-radius: 5px; + font-weight: bold; + margin-top: 25px; +} diff --git a/public/css/ControllerVues/new.css b/public/css/ControllerVues/new.css index 5f888aa..0ce956f 100644 --- a/public/css/ControllerVues/new.css +++ b/public/css/ControllerVues/new.css @@ -1,4 +1,6 @@ - +html{ + font-family: "Quicksand Light"; !important; +} /* Page container */ .page-container { width: 100%; diff --git a/public/css/GestionUtilisateurs/GestionUtilisateurs.css b/public/css/GestionUtilisateurs/GestionUtilisateurs.css index b5957a1..c6c6322 100644 --- a/public/css/GestionUtilisateurs/GestionUtilisateurs.css +++ b/public/css/GestionUtilisateurs/GestionUtilisateurs.css @@ -8,3 +8,6 @@ height: 100%; /* Hauteur du contenu de la modal */ box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2); } +html{ + font-family: "Quicksand Light"; !important; +} diff --git a/public/css/Index/index.css b/public/css/Index/index.css index f09f4d3..7b2c784 100644 --- a/public/css/Index/index.css +++ b/public/css/Index/index.css @@ -1,3 +1,7 @@ +html{ + font-family: "Quicksand Light"; !important; +} + .top-bar { background-color: #db5559; width: calc(100% - 18%); /*Calcule la totalité de l'écran - le left-background */ @@ -10,21 +14,10 @@ align-items: center; padding: 0 20px; color: white; - font-size: 18px; + font-size: 16px; 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 { background-color: #db5559; width: 18%; @@ -34,7 +27,6 @@ left: 0; display: flex; flex-direction: column; - justify-content: space-between; } @@ -51,18 +43,17 @@ ul { } li { - padding-bottom: 30px; + padding-bottom: 20px; } .btn-custom { background-color: #FFFFFF; color: black; - padding: 15px 40px; + padding: 15px; font-size: 16px; font-weight: bold; cursor: pointer; display: inline-block; - border-right: 5px solid #db5559; border-left: 5px solid #db5559; } @@ -88,8 +79,6 @@ li { .Information-perso { display: flex; justify-content: space-between; - padding: 20px; - margin-top: auto; } .btn-info-compte, .btn-info-exit { @@ -104,12 +93,12 @@ li { .btn-info-compte { width: 50%; - height: 30px; + height: 20px; } .btn-info-exit { width: 10%; - height: 30px; + height: 20px; } /* Style pour la modal (cachée par défaut) */ diff --git a/public/js/GestionMenu/GestionMenu.js b/public/js/GestionMenu/GestionMenu.js new file mode 100644 index 0000000..679f140 --- /dev/null +++ b/public/js/GestionMenu/GestionMenu.js @@ -0,0 +1,77 @@ +document.querySelector('.btn-gestion-menu').addEventListener('click', function(event) { + event.preventDefault(); + + document.getElementById('container_modal'); + + fetch('/plats') + .then(response => { + if (!response.ok) { + throw new Error('Erreur de chargement de la section Promotions'); + } + return response.text(); + }) + .then(html => { + // Insérer le HTML dans le conteneur et l'afficher + container_modal.innerHTML = html; + container_modal.style.display = 'block'; + }) + .catch(error => { + console.error('Erreur:', error); + }); +}); + +function addPlats (event) { + document.getElementById('container_modal'); + + fetch(`/plats/new`) + .then(response => { + return response.text(); + }) + .then(html => { + // Insérer le HTML dans le conteneur et l'afficher + container_modal.innerHTML = html; + container_modal.style.display = 'block'; + }) + .catch(error => { + console.error('Erreur:', error); + }); +} + + +function updatePromotion (event) { + document.getElementById('container_modal'); + const reductionsIdString = event.getAttribute('data-id'); + let reductionsId = parseInt(reductionsIdString); + + fetch(`/plats/${platsId}/edit`) + .then(response => { + return response.text(); + }) + .then(html => { + // Insérer le HTML dans le conteneur et l'afficher + container_modal.innerHTML = html; + container_modal.style.display = 'block'; + }) + .catch(error => { + console.error('Erreur:', error); + }); +} + +function deletePromotion (event) { + document.getElementById('container_modal'); + const reductionsIdString = event.getAttribute('data-id'); + let reductionsId = parseInt(reductionsIdString); + + fetch(`/reductions/${reductionsId}`) + .then(response => { + return response.text(); + }) + .then(html => { + // Insérer le HTML dans le conteneur et l'afficher + container_modal.innerHTML = html; + container_modal.style.display = 'block'; + }) + .catch(error => { + console.error('Erreur:', error); + }); +} \ No newline at end of file diff --git a/src/Form/ClientsType.php b/src/Form/ClientsType.php index cd01f5a..4444b85 100644 --- a/src/Form/ClientsType.php +++ b/src/Form/ClientsType.php @@ -23,12 +23,9 @@ class ClientsType extends AbstractType 'class' => Tables::class, 'choice_label' => 'id', 'multiple' => true, + 'expanded' => true, ]) - ->add('Commandes', EntityType::class, [ - 'class' => Commandes::class, - 'choice_label' => 'id', - 'multiple' => true, - ]) + ; } diff --git a/src/Form/CommandesType.php b/src/Form/CommandesType.php index 5dcc39b..d079017 100644 --- a/src/Form/CommandesType.php +++ b/src/Form/CommandesType.php @@ -25,15 +25,17 @@ class CommandesType extends AbstractType 'class' => Clients::class, 'choice_label' => 'id', 'multiple' => true, + 'expanded' => true, ]) ->add('plats', EntityType::class, [ 'class' => Plats::class, 'choice_label' => 'id', 'multiple' => true, + 'expanded' => true, ]) ->add('StatutCommande', EntityType::class, [ 'class' => StatutCommandes::class, - 'choice_label' => 'id', + 'choice_label' => 'libelle', ]) ; } diff --git a/src/Form/ReservationsType.php b/src/Form/ReservationsType.php index 8a59b2b..d6b4e99 100644 --- a/src/Form/ReservationsType.php +++ b/src/Form/ReservationsType.php @@ -27,6 +27,7 @@ class ReservationsType extends AbstractType 'class' => Utilisateurs::class, 'choice_label' => 'id', 'multiple' => true, + 'expanded' => true, ]) ; } diff --git a/src/Form/TablesType.php b/src/Form/TablesType.php index ff62602..f4a3d05 100644 --- a/src/Form/TablesType.php +++ b/src/Form/TablesType.php @@ -19,11 +19,13 @@ class TablesType extends AbstractType 'class' => Clients::class, 'choice_label' => 'id', 'multiple' => true, + 'expanded' => true, ]) ->add('utilisateurs', EntityType::class, [ 'class' => Utilisateurs::class, 'choice_label' => 'id', 'multiple' => true, + 'expanded' => true, ]) ; } diff --git a/templates/base.html.twig b/templates/base.html.twig index abbbe3c..baf9c01 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -1,26 +1,168 @@ -
- -