Suppresion des modals

This commit is contained in:
bethoulevj 2025-03-24 17:47:25 +01:00
parent f4f6489274
commit f1312c59d6
13 changed files with 1160 additions and 347 deletions

View File

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

View File

@ -1,147 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>{% block title %}Welcome!{% endblock %}</title>
<link rel="" href="">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Qwitcher+Grypen:wght@400;700&display=swap" rel="stylesheet">
<head>
<meta charset="UTF-8">
<title>{% block title %}Welcome!{% endblock %}</title>
<link rel="" href="">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Qwitcher+Grypen:wght@400;700&display=swap" rel="stylesheet">
{# bootstrap#}
{# <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">#}
{% block stylesheets %}
{% endblock %}
{% block javascripts %}
{% block importmap %}{{ importmap('app') }}{% endblock %}
{% endblock %}
</head>
<body>
{% block body %}{% endblock %}
{# bootstrap#}
{# <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">#}
{% block stylesheets %}
<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 javascripts %}
<script src="{{ asset('js/Compte/CompteModal.js') }}" defer></script>
<script src="{{ asset('js/GestionUtilisateurs/GestionUtilisateurs.js') }}" defer></script>
<script src="{{ asset('js/GestionPromotion/GestionPromotion.js') }}" defer></script>
<script src="{{ asset('js/GestionTables/GestionTables.js') }}" defer></script>
<script src="{{ asset('js/GestionMenu/GestionMenu.js') }}" defer></script>
{% block importmap %}{{ importmap('app') }}{% endblock %}
{% endblock %}
</head>
<body>
{% block body %}
<style>
</style>
<!-- Top Bar -->
<div class="top-bar">
<div>
Bonjour, {{ app.user.prenom }}
</div>
</div>
<!-- Left Menu -->
<div class="left-background">
<img class="LogoHegre" src="{{ asset('asset/image/LogoHegre.png') }}">
{% if is_granted('ROLE_ADMIN') %}
<div class="nav-bar">
<ul>
<li>
<a href="/user/list" class="btn-custom btn-gestion-utilisateurs icon-container">
<i class="icon-medium">{{ ux_icon('grommet-icons:group') }}</i>
<span>Gérer Utilisateur</span>
</a>
</li>
<li>
<a href="/tables" class="btn-custom btn-gestion-table icon-container">
<i class="icon-medium"> {{ ux_icon('ic:outline-table-bar') }}</i>
<span>Gérer Table</span>
</a>
</li>
<li>
<a href="/plats" class="btn-custom btn-gestion-menu icon-container">
<i class="icon-medium"> {{ ux_icon('bx:food-menu') }}</i>
<span>Gestion Menu</span>
</a>
</li>
<li>
<a href="/reductions" class="btn-custom btn-gestion-promotion icon-container">
<i class="icon-medium"> {{ ux_icon('lsicon:badge-promotion-outline') }}</i>
<span>Gestion Promotion</span>
</a>
</li>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('fluent-emoji-high-contrast:ten-oclock') }}</i>
<span>Voir tendances</span>
</div>
</li>
</ul>
</div>
{% elseif is_granted('ROLE_CUISINIER') %}
<div class="nav-bar">
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('icon-park-outline:view-list') }}</i>
<span>Liste des commandes</span>
</div>
</li>
</ul>
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('grommet-icons:group') }}</i>
<span>Je sais pas encore</span>
</div>
</li>
</ul>
</div>
{% elseif is_granted('ROLE_SERVEUR') %}
<div class="nav-bar">
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('fluent-mdl2:reservation-orders') }}</i>
<span>Réservation</span>
</div>
</li>
</ul>
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('icon-park-outline:view-list') }}</i>
<span>Commande</span>
</div>
</li>
</ul>
</div>
{% 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 id="container_modal">
<!-- Contenu par défaut, ou vous p ouvez laisser vide -->
</div>
<script>
</script>
<!-- Include modals -->
{% endblock %}
{# bootstrap#}
{# <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js" integrity="sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r" crossorigin="anonymous"></script>#}
{# <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js" integrity="sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r" crossorigin="anonymous"></script>#}
{# <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js" integrity="sha384-0pUGZvbkm6XF6gxjEnlmuGrJXVbNuzT9qBBavbLwCsOGabYfZo0T0to5eqruptLy" crossorigin="anonymous"></script> </body>#}
</body>
</body>
</html>

View File

@ -2,20 +2,136 @@
{% block title %}Modifier Plat{% endblock %}
{% block stylesheets %}
<link rel="stylesheet" href="{{ asset('css/ControllerVues/edit.css') }}">
{% 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 body %}
<div class="page-container">
<h1 class="page-title">Modifier Plat</h1>
{{ include('plats/_form.html.twig', {'button_label': 'Mettre à jour'}) }}
<div class="actions">
<a href="{{ path('app_plats_index') }}">Retour à la liste</a>
<!-- Top Bar -->
<div class="top-bar">
<div>
Bonjour, {{ app.user.prenom }}
</div>
{{ include('plats/_delete_form.html.twig') }}
</div>
<!-- Left Menu -->
<div class="left-background">
<img class="LogoHegre" src="{{ asset('asset/image/LogoHegre.png') }}">
{% if is_granted('ROLE_ADMIN') %}
<div class="nav-bar">
<ul>
<li>
<a href="/user/list" class="btn-custom btn-gestion-utilisateurs icon-container">
<i class="icon-medium">{{ ux_icon('grommet-icons:group') }}</i>
<span>Gérer Utilisateur</span>
</a>
</li>
<li>
<a href="/tables" class="btn-custom btn-gestion-table icon-container">
<i class="icon-medium"> {{ ux_icon('ic:outline-table-bar') }}</i>
<span>Gérer Table</span>
</a>
</li>
<li>
<a href="/plats" class="btn-custom btn-gestion-menu icon-container">
<i class="icon-medium"> {{ ux_icon('bx:food-menu') }}</i>
<span>Gestion Menu</span>
</a>
</li>
<li>
<a href="/reductions" class="btn-custom btn-gestion-promotion icon-container">
<i class="icon-medium"> {{ ux_icon('lsicon:badge-promotion-outline') }}</i>
<span>Gestion Promotion</span>
</a>
</li>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('fluent-emoji-high-contrast:ten-oclock') }}</i>
<span>Voir tendances</span>
</div>
</li>
</ul>
</div>
{% elseif is_granted('ROLE_CUISINIER') %}
<div class="nav-bar">
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('icon-park-outline:view-list') }}</i>
<span>Liste des commandes</span>
</div>
</li>
</ul>
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('grommet-icons:group') }}</i>
<span>Je sais pas encore</span>
</div>
</li>
</ul>
</div>
{% elseif is_granted('ROLE_SERVEUR') %}
<div class="nav-bar">
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('fluent-mdl2:reservation-orders') }}</i>
<span>Réservation</span>
</div>
</li>
</ul>
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('icon-park-outline:view-list') }}</i>
<span>Commande</span>
</div>
</li>
</ul>
</div>
{% 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 id="container_modal">
<div class="page-container">
<h1 class="page-title">Modifier Plat</h1>
{{ include('plats/_form.html.twig', {'button_label': 'Mettre à jour'}) }}
<div class="actions">
<a href="{{ path('app_plats_index') }}">Retour à la liste</a>
</div>
{{ include('plats/_delete_form.html.twig') }}
</div>
</div>
{% 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 %}
{% endblock %}

View File

@ -150,7 +150,7 @@
</tbody>
</table>
<button onclick="addPlats(this)" href="{{ path('app_plats_new') }}">Créer un menu</button>
<a href="{{ path('app_plats_new') }}">Créer un menu</a>
</div>
{% block stylesheets %}

View File

@ -1,14 +1,129 @@
{% extends 'base.html.twig' %}
{% block title %}New Plats{% endblock %}
{% block stylesheets %}
<link rel="stylesheet" href="{{ asset('css/ControllerVues/new.css') }}"> <!-- Ajout du fichier CSS -->
{% 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 body %}
<h1>Créer un nouveau plat</h1>
<!-- Top Bar -->
<div class="top-bar">
<div>
Bonjour, {{ app.user.prenom }}
</div>
</div>
{{ include('plats/_form.html.twig') }}
<!-- Left Menu -->
<div class="left-background">
<img class="LogoHegre" src="{{ asset('asset/image/LogoHegre.png') }}">
{% if is_granted('ROLE_ADMIN') %}
<div class="nav-bar">
<ul>
<li>
<a href="/user/list" class="btn-custom btn-gestion-utilisateurs icon-container">
<i class="icon-medium">{{ ux_icon('grommet-icons:group') }}</i>
<span>Gérer Utilisateur</span>
</a>
</li>
<li>
<a href="/tables" class="btn-custom btn-gestion-table icon-container">
<i class="icon-medium"> {{ ux_icon('ic:outline-table-bar') }}</i>
<span>Gérer Table</span>
</a>
</li>
<li>
<a href="/plats" class="btn-custom btn-gestion-menu icon-container">
<i class="icon-medium"> {{ ux_icon('bx:food-menu') }}</i>
<span>Gestion Menu</span>
</a>
</li>
<li>
<a href="/reductions" class="btn-custom btn-gestion-promotion icon-container">
<i class="icon-medium"> {{ ux_icon('lsicon:badge-promotion-outline') }}</i>
<span>Gestion Promotion</span>
</a>
</li>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('fluent-emoji-high-contrast:ten-oclock') }}</i>
<span>Voir tendances</span>
</div>
</li>
</ul>
</div>
{% elseif is_granted('ROLE_CUISINIER') %}
<div class="nav-bar">
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('icon-park-outline:view-list') }}</i>
<span>Liste des commandes</span>
</div>
</li>
</ul>
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('grommet-icons:group') }}</i>
<span>Je sais pas encore</span>
</div>
</li>
</ul>
</div>
{% elseif is_granted('ROLE_SERVEUR') %}
<div class="nav-bar">
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('fluent-mdl2:reservation-orders') }}</i>
<span>Réservation</span>
</div>
</li>
</ul>
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('icon-park-outline:view-list') }}</i>
<span>Commande</span>
</div>
</li>
</ul>
</div>
{% 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 id="container_modal">
<h1>Créer un nouveau plat</h1>
{{ include('plats/_form.html.twig') }}
<a href="{{ path('app_plats_index') }}">Retour à la liste</a>
</div>
{% block stylesheets %}
<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 %}
<a href="{{ path('app_plats_index') }}">Retour à la liste</a>
{% endblock %}

View File

@ -2,20 +2,136 @@
{% block title %}Modifier Réductions{% endblock %}
{% block stylesheets %}
<link rel="stylesheet" href="{{ asset('css/ControllerVues/edit.css') }}">
{% 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 body %}
<div class="page-container">
<h1 class="page-title">Modifier une réduction</h1>
{{ include('reductions/_form.html.twig', {'button_label': 'Mettre à jour'}) }}
<div class="actions">
<a href="{{ path('app_reductions_index') }}">Retour à la liste</a>
<!-- Top Bar -->
<div class="top-bar">
<div>
Bonjour, {{ app.user.prenom }}
</div>
{{ include('reductions/_delete_form.html.twig') }}
</div>
<!-- Left Menu -->
<div class="left-background">
<img class="LogoHegre" src="{{ asset('asset/image/LogoHegre.png') }}">
{% if is_granted('ROLE_ADMIN') %}
<div class="nav-bar">
<ul>
<li>
<a href="/user/list" class="btn-custom btn-gestion-utilisateurs icon-container">
<i class="icon-medium">{{ ux_icon('grommet-icons:group') }}</i>
<span>Gérer Utilisateur</span>
</a>
</li>
<li>
<a href="/tables" class="btn-custom btn-gestion-table icon-container">
<i class="icon-medium"> {{ ux_icon('ic:outline-table-bar') }}</i>
<span>Gérer Table</span>
</a>
</li>
<li>
<a href="/plats" class="btn-custom btn-gestion-menu icon-container">
<i class="icon-medium"> {{ ux_icon('bx:food-menu') }}</i>
<span>Gestion Menu</span>
</a>
</li>
<li>
<a href="/reductions" class="btn-custom btn-gestion-promotion icon-container">
<i class="icon-medium"> {{ ux_icon('lsicon:badge-promotion-outline') }}</i>
<span>Gestion Promotion</span>
</a>
</li>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('fluent-emoji-high-contrast:ten-oclock') }}</i>
<span>Voir tendances</span>
</div>
</li>
</ul>
</div>
{% elseif is_granted('ROLE_CUISINIER') %}
<div class="nav-bar">
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('icon-park-outline:view-list') }}</i>
<span>Liste des commandes</span>
</div>
</li>
</ul>
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('grommet-icons:group') }}</i>
<span>Je sais pas encore</span>
</div>
</li>
</ul>
</div>
{% elseif is_granted('ROLE_SERVEUR') %}
<div class="nav-bar">
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('fluent-mdl2:reservation-orders') }}</i>
<span>Réservation</span>
</div>
</li>
</ul>
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('icon-park-outline:view-list') }}</i>
<span>Commande</span>
</div>
</li>
</ul>
</div>
{% 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 id="container_modal">
<div class="page-container">
<h1 class="page-title">Modifier une réduction</h1>
{{ include('reductions/_form.html.twig', {'button_label': 'Mettre à jour'}) }}
<div class="actions">
<a href="{{ path('app_reductions_index') }}">Retour à la liste</a>
</div>
{{ include('reductions/_delete_form.html.twig') }}
</div>
</div>
{% 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 %}
{% endblock %}

View File

@ -139,7 +139,7 @@
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ reduction.id) }}">
{{ include('reductions/_delete_form.html.twig') }}
</form>
<button onclick="updatePromotion(this)" data-id="{{ reduction.id }}" href="{{ path('app_reductions_edit', {'id': reduction.id}) }}">Modifier</button>
<a href="{{ path('app_reductions_edit', {'id': reduction.id}) }}">Modifier</a>
</td>
</tr>
{% else %}
@ -150,7 +150,7 @@
</tbody>
</table>
<button onclick="addPromotion(this)" href="{{ path('app_reductions_new') }}">Créer une réduction</button>
<a href="{{ path('app_reductions_new') }}">Créer une réduction</a>
</div>
{% block stylesheets %}

View File

@ -1,14 +1,130 @@
{% extends 'base.html.twig' %}
{% block title %}Nouvelle reduction{% endblock %}
{% block stylesheets %}
<link rel="stylesheet" href="{{ asset('css/ControllerVues/new.css') }}"> <!-- Ajout du fichier CSS -->
{% 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 body %}
<h1>Créer une Reduction</h1>
<!-- Top Bar -->
<div class="top-bar">
<div>
Bonjour, {{ app.user.prenom }}
</div>
</div>
{{ include('reductions/_form.html.twig') }}
<!-- Left Menu -->
<div class="left-background">
<img class="LogoHegre" src="{{ asset('asset/image/LogoHegre.png') }}">
{% if is_granted('ROLE_ADMIN') %}
<div class="nav-bar">
<ul>
<li>
<a href="/user/list" class="btn-custom btn-gestion-utilisateurs icon-container">
<i class="icon-medium">{{ ux_icon('grommet-icons:group') }}</i>
<span>Gérer Utilisateur</span>
</a>
</li>
<li>
<a href="/tables" class="btn-custom btn-gestion-table icon-container">
<i class="icon-medium"> {{ ux_icon('ic:outline-table-bar') }}</i>
<span>Gérer Table</span>
</a>
</li>
<li>
<a href="/plats" class="btn-custom btn-gestion-menu icon-container">
<i class="icon-medium"> {{ ux_icon('bx:food-menu') }}</i>
<span>Gestion Menu</span>
</a>
</li>
<li>
<a href="/reductions" class="btn-custom btn-gestion-promotion icon-container">
<i class="icon-medium"> {{ ux_icon('lsicon:badge-promotion-outline') }}</i>
<span>Gestion Promotion</span>
</a>
</li>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('fluent-emoji-high-contrast:ten-oclock') }}</i>
<span>Voir tendances</span>
</div>
</li>
</ul>
</div>
{% elseif is_granted('ROLE_CUISINIER') %}
<div class="nav-bar">
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('icon-park-outline:view-list') }}</i>
<span>Liste des commandes</span>
</div>
</li>
</ul>
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('grommet-icons:group') }}</i>
<span>Je sais pas encore</span>
</div>
</li>
</ul>
</div>
{% elseif is_granted('ROLE_SERVEUR') %}
<div class="nav-bar">
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('fluent-mdl2:reservation-orders') }}</i>
<span>Réservation</span>
</div>
</li>
</ul>
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('icon-park-outline:view-list') }}</i>
<span>Commande</span>
</div>
</li>
</ul>
</div>
{% 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 id="container_modal">
<h1>Créer une Reduction</h1>
{{ include('reductions/_form.html.twig') }}
<a href="{{ path('app_reductions_index') }}">Retour à la liste</a>
</div>
{% block stylesheets %}
<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 %}
<a href="{{ path('app_reductions_index') }}">Retour à la liste</a>
{% endblock %}

View File

@ -2,20 +2,134 @@
{% block title %}Edit Tables{% endblock %}
{% block stylesheets %}
<link rel="stylesheet" href="{{ asset('css/ControllerVues/edit.css') }}">
{% 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 body %}
<div class="page-container">
<h1 class="page-title">Modifier Tables</h1>
{{ include('tables/_form.html.twig', {'button_label': 'Mettre à jour'}) }}
<div class="actions">
<a href="{{ path('app_tables_index') }}">Retour à la liste</a>
<!-- Top Bar -->
<div class="top-bar">
<div>
Bonjour, {{ app.user.prenom }}
</div>
{{ include('tables/_delete_form.html.twig') }}
</div>
<!-- Left Menu -->
<div class="left-background">
<img class="LogoHegre" src="{{ asset('asset/image/LogoHegre.png') }}">
{% if is_granted('ROLE_ADMIN') %}
<div class="nav-bar">
<ul>
<li>
<a href="/user/list" class="btn-custom btn-gestion-utilisateurs icon-container">
<i class="icon-medium">{{ ux_icon('grommet-icons:group') }}</i>
<span>Gérer Utilisateur</span>
</a>
</li>
<li>
<a href="/tables" class="btn-custom btn-gestion-table icon-container">
<i class="icon-medium"> {{ ux_icon('ic:outline-table-bar') }}</i>
<span>Gérer Table</span>
</a>
</li>
<li>
<a href="/plats" class="btn-custom btn-gestion-menu icon-container">
<i class="icon-medium"> {{ ux_icon('bx:food-menu') }}</i>
<span>Gestion Menu</span>
</a>
</li>
<li>
<a href="/reductions" class="btn-custom btn-gestion-promotion icon-container">
<i class="icon-medium"> {{ ux_icon('lsicon:badge-promotion-outline') }}</i>
<span>Gestion Promotion</span>
</a>
</li>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('fluent-emoji-high-contrast:ten-oclock') }}</i>
<span>Voir tendances</span>
</div>
</li>
</ul>
</div>
{% elseif is_granted('ROLE_CUISINIER') %}
<div class="nav-bar">
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('icon-park-outline:view-list') }}</i>
<span>Liste des commandes</span>
</div>
</li>
</ul>
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('grommet-icons:group') }}</i>
<span>Je sais pas encore</span>
</div>
</li>
</ul>
</div>
{% elseif is_granted('ROLE_SERVEUR') %}
<div class="nav-bar">
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('fluent-mdl2:reservation-orders') }}</i>
<span>Réservation</span>
</div>
</li>
</ul>
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('icon-park-outline:view-list') }}</i>
<span>Commande</span>
</div>
</li>
</ul>
</div>
{% 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 id="container_modal">
<div class="page-container">
<h1 class="page-title">Modifier Tables</h1>
{{ include('tables/_form.html.twig', {'button_label': 'Mettre à jour'}) }}
<div class="actions">
<a href="{{ path('app_tables_index') }}">Retour à la liste</a>
</div>
{{ include('tables/_delete_form.html.twig') }}
</div>
</div>
{% 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 %}
{% endblock %}

View File

@ -138,7 +138,7 @@
</tbody>
</table>
<button onclick="addTable(this)" href="{{ path('app_reductions_new') }}">Créer une tables</button>
<a href="{{ path('app_tables_new') }}">Créer une tables</a>
</div>
{% block stylesheets %}

View File

@ -2,21 +2,132 @@
{% block title %}Create New Table{% endblock %}
{% block stylesheets %}
<link rel="stylesheet" href="{{ asset('css/list.css') }}"> <!-- Ajout du fichier CSS -->
<link rel="stylesheet" href="{{ asset('css/ControllerVues/new.css') }}"> <!-- Ajout du fichier CSS -->
{% 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 body %}
<div class="container">
<h1 class="page-title">Créer une nouvelle Table</h1>
<div class="form-container">
{{ include('tables/_form.html.twig') }}
</div>
<div class="navigation">
<a href="{{ path('app_tables_index') }}" class="btn btn-secondary">Retour à la liste</a>
<!-- Top Bar -->
<div class="top-bar">
<div>
Bonjour, {{ app.user.prenom }}
</div>
</div>
<!-- Left Menu -->
<div class="left-background">
<img class="LogoHegre" src="{{ asset('asset/image/LogoHegre.png') }}">
{% if is_granted('ROLE_ADMIN') %}
<div class="nav-bar">
<ul>
<li>
<a href="/user/list" class="btn-custom btn-gestion-utilisateurs icon-container">
<i class="icon-medium">{{ ux_icon('grommet-icons:group') }}</i>
<span>Gérer Utilisateur</span>
</a>
</li>
<li>
<a href="/tables" class="btn-custom btn-gestion-table icon-container">
<i class="icon-medium"> {{ ux_icon('ic:outline-table-bar') }}</i>
<span>Gérer Table</span>
</a>
</li>
<li>
<a href="/plats" class="btn-custom btn-gestion-menu icon-container">
<i class="icon-medium"> {{ ux_icon('bx:food-menu') }}</i>
<span>Gestion Menu</span>
</a>
</li>
<li>
<a href="/reductions" class="btn-custom btn-gestion-promotion icon-container">
<i class="icon-medium"> {{ ux_icon('lsicon:badge-promotion-outline') }}</i>
<span>Gestion Promotion</span>
</a>
</li>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('fluent-emoji-high-contrast:ten-oclock') }}</i>
<span>Voir tendances</span>
</div>
</li>
</ul>
</div>
{% elseif is_granted('ROLE_CUISINIER') %}
<div class="nav-bar">
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('icon-park-outline:view-list') }}</i>
<span>Liste des commandes</span>
</div>
</li>
</ul>
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('grommet-icons:group') }}</i>
<span>Je sais pas encore</span>
</div>
</li>
</ul>
</div>
{% elseif is_granted('ROLE_SERVEUR') %}
<div class="nav-bar">
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('fluent-mdl2:reservation-orders') }}</i>
<span>Réservation</span>
</div>
</li>
</ul>
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('icon-park-outline:view-list') }}</i>
<span>Commande</span>
</div>
</li>
</ul>
</div>
{% 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 id="container_modal">
<div class="container">
<h1 class="page-title">Créer une nouvelle Table</h1>
<div class="form-container">
{{ include('tables/_form.html.twig') }}
</div>
<div class="navigation">
<a href="{{ path('app_tables_index') }}" class="btn btn-secondary">Retour à la liste</a>
</div>
</div>
</div>
{% block stylesheets %}
<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 %}

View File

@ -1,101 +1,219 @@
{% extends 'base.html.twig' %}
{% block stylesheets %}
<style>
.form-container {
max-width: 500px;
margin: 0 auto;
padding: 20px;
background-color: #f8f9fa;
border: 1px solid #dee2e6;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
font-family: sans-serif;
}
.form-container h1 {
text-align: center;
margin-bottom: 20px;
font-size: 24px;
}
.form-group {
margin-bottom: 15px;
}
.form-input {
display: flex;
justify-content: center;
margin-bottom: 20px;
width: 95%;
padding: 10px;
border: 1px solid #ced4da;
border-radius: 4px;
font-size: 16px;
}
.form-input:focus {
border-color: #007bff;
box-shadow: 0 0 5px rgba(0, 123, 255, 0.25);
outline: none;
}
.btn-container {
display: flex;
justify-content: center;
margin-bottom: 20px;
}
.btn-save {
padding: 5px 10px;
text-decoration: none;
color: white;
background-color: #007bff;
border-radius: 5px;
font-weight: bold;
margin-top: 25px;
}
.btn-list {
padding: 5px 10px;
text-decoration: none;
color: white;
background-color: orange;
border-radius: 5px;
font-weight: bold;
}
</style>
{% endblock %}
{% block title %}Nouvelle Utilisateur{% endblock %}
{% block body %}
<div class="form-container">
<h1>Nouvelle Utilisateur ! ✅</h1>
{{ form_start(registrationForm) }}
{{ form_errors(registrationForm) }}
<div class="form-group">
{{ form_row(registrationForm.Nom, {'attr': {'class': 'form-input'}, 'label': 'Nom'}) }}
</div>
<div class="form-group">
{{ form_row(registrationForm.Prenom, {'attr': {'class': 'form-input'}, 'label': 'Prénom'}) }}
</div>
<div class="form-group">
{{ form_row(registrationForm.UserIdentifier, {'attr': {'class': 'form-input'}, 'label': 'Email'}) }}
</div>
<div class="form-group">
{{ form_row(registrationForm.Password, {'attr': {'class': 'form-input'}, 'label': 'Password'}) }}
</div>
<div class="form-group">
{{ form_row(registrationForm.Roles, {'attr': {'class': 'form-input'}, 'label': 'Roles'}) }}
</div>
<div class="btn-container">
{{ form_row(registrationForm.Enregistrer, {'attr': {'class': 'btn-save'}, 'label': 'Enregistrer'}) }}
</div>
{{ form_end(registrationForm) }}
</div>
{% 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 body %}
<!-- Top Bar -->
<div class="top-bar">
<div>
Bonjour, {{ app.user.prenom }}
</div>
</div>
<!-- Left Menu -->
<div class="left-background">
<img class="LogoHegre" src="{{ asset('asset/image/LogoHegre.png') }}">
{% if is_granted('ROLE_ADMIN') %}
<div class="nav-bar">
<ul>
<li>
<a href="/user/list" class="btn-custom btn-gestion-utilisateurs icon-container">
<i class="icon-medium">{{ ux_icon('grommet-icons:group') }}</i>
<span>Gérer Utilisateur</span>
</a>
</li>
<li>
<a href="/tables" class="btn-custom btn-gestion-table icon-container">
<i class="icon-medium"> {{ ux_icon('ic:outline-table-bar') }}</i>
<span>Gérer Table</span>
</a>
</li>
<li>
<a href="/plats" class="btn-custom btn-gestion-menu icon-container">
<i class="icon-medium"> {{ ux_icon('bx:food-menu') }}</i>
<span>Gestion Menu</span>
</a>
</li>
<li>
<a href="/reductions" class="btn-custom btn-gestion-promotion icon-container">
<i class="icon-medium"> {{ ux_icon('lsicon:badge-promotion-outline') }}</i>
<span>Gestion Promotion</span>
</a>
</li>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('fluent-emoji-high-contrast:ten-oclock') }}</i>
<span>Voir tendances</span>
</div>
</li>
</ul>
</div>
{% elseif is_granted('ROLE_CUISINIER') %}
<div class="nav-bar">
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('icon-park-outline:view-list') }}</i>
<span>Liste des commandes</span>
</div>
</li>
</ul>
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('grommet-icons:group') }}</i>
<span>Je sais pas encore</span>
</div>
</li>
</ul>
</div>
{% elseif is_granted('ROLE_SERVEUR') %}
<div class="nav-bar">
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('fluent-mdl2:reservation-orders') }}</i>
<span>Réservation</span>
</div>
</li>
</ul>
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('icon-park-outline:view-list') }}</i>
<span>Commande</span>
</div>
</li>
</ul>
</div>
{% 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 id="container_modal">
<div class="form-container">
<h1>Nouvelle Utilisateur ! ✅</h1>
{{ form_start(registrationForm) }}
{{ form_errors(registrationForm) }}
<div class="form-group">
{{ form_row(registrationForm.Nom, {'attr': {'class': 'form-input'}, 'label': 'Nom'}) }}
</div>
<div class="form-group">
{{ form_row(registrationForm.Prenom, {'attr': {'class': 'form-input'}, 'label': 'Prénom'}) }}
</div>
<div class="form-group">
{{ form_row(registrationForm.UserIdentifier, {'attr': {'class': 'form-input'}, 'label': 'Email'}) }}
</div>
<div class="form-group">
{{ form_row(registrationForm.Password, {'attr': {'class': 'form-input'}, 'label': 'Password'}) }}
</div>
<div class="form-group">
{{ form_row(registrationForm.Roles, {'attr': {'class': 'form-input'}, 'label': 'Roles'}) }}
</div>
<div class="btn-container">
{{ form_row(registrationForm.Enregistrer, {'attr': {'class': 'btn-save'}, 'label': 'Enregistrer'}) }}
</div>
{{ form_end(registrationForm) }}
</div>
</div>
{% block stylesheets %}
<style>
.form-container {
max-width: 500px;
margin: 0 auto;
padding: 20px;
background-color: #f8f9fa;
border: 1px solid #dee2e6;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
font-family: sans-serif;
}
.form-container h1 {
text-align: center;
margin-bottom: 20px;
font-size: 24px;
}
.form-group {
margin-bottom: 15px;
}
.form-input {
display: flex;
justify-content: center;
margin-bottom: 20px;
width: 95%;
padding: 10px;
border: 1px solid #ced4da;
border-radius: 4px;
font-size: 16px;
}
.form-input:focus {
border-color: #007bff;
box-shadow: 0 0 5px rgba(0, 123, 255, 0.25);
outline: none;
}
.btn-container {
display: flex;
justify-content: center;
margin-bottom: 20px;
}
.btn-save {
padding: 5px 10px;
text-decoration: none;
color: white;
background-color: #007bff;
border-radius: 5px;
font-weight: bold;
margin-top: 25px;
}
.btn-list {
padding: 5px 10px;
text-decoration: none;
color: white;
background-color: orange;
border-radius: 5px;
font-weight: bold;
}
</style>
<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 %}

View File

@ -1,40 +1,158 @@
{% extends 'base.html.twig' %}
{% block title %}Liste des Utilisateurs{% endblock %}
{% block title %}Liste Utilisateur{% endblock %}
{% block page_styles %}
<link rel="stylesheet" href="{{ asset('css/GestionUtilisateurs/list.css') }}">
{% 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 container_modal %}
<h2>Liste des utilisateurs</h2>
<table>
<thead>
<tr>
<th>ID</th>
<th>Nom</th>
<th>Email</th>
<th>Rôle</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for user in users %}
<tr>
<td>{{ user.id }}</td>
<td>{{ user.nom }}</td>
<td>{{ user.email }}</td>
<td>{{ user.roles|join(', ') }}</td>
<td>
<a href="{{ path('user_edit', {'id': user.id}) }}" class="btn-edit">Modifier</a>
<a href="{{ path('user_delete', {'id': user.id}) }}" class="btn-delete" onclick="return confirm('Êtes-vous sûr de vouloir supprimer cet utilisateur ?')">Supprimer</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="5">Aucun utilisateur trouvé.</td>
</tr>
{% endfor %}
</tbody>
</table>
{% block body %}
<!-- Top Bar -->
<div class="top-bar">
<div>
Bonjour, {{ app.user.prenom }}
</div>
</div>
<!-- Left Menu -->
<div class="left-background">
<img class="LogoHegre" src="{{ asset('asset/image/LogoHegre.png') }}">
{% if is_granted('ROLE_ADMIN') %}
<div class="nav-bar">
<ul>
<li>
<a href="/user/list" class="btn-custom btn-gestion-utilisateurs icon-container">
<i class="icon-medium">{{ ux_icon('grommet-icons:group') }}</i>
<span>Gérer Utilisateur</span>
</a>
</li>
<li>
<a href="/tables" class="btn-custom btn-gestion-table icon-container">
<i class="icon-medium"> {{ ux_icon('ic:outline-table-bar') }}</i>
<span>Gérer Table</span>
</a>
</li>
<li>
<a href="/plats" class="btn-custom btn-gestion-menu icon-container">
<i class="icon-medium"> {{ ux_icon('bx:food-menu') }}</i>
<span>Gestion Menu</span>
</a>
</li>
<li>
<a href="/reductions" class="btn-custom btn-gestion-promotion icon-container">
<i class="icon-medium"> {{ ux_icon('lsicon:badge-promotion-outline') }}</i>
<span>Gestion Promotion</span>
</a>
</li>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('fluent-emoji-high-contrast:ten-oclock') }}</i>
<span>Voir tendances</span>
</div>
</li>
</ul>
</div>
{% elseif is_granted('ROLE_CUISINIER') %}
<div class="nav-bar">
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('icon-park-outline:view-list') }}</i>
<span>Liste des commandes</span>
</div>
</li>
</ul>
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('grommet-icons:group') }}</i>
<span>Je sais pas encore</span>
</div>
</li>
</ul>
</div>
{% elseif is_granted('ROLE_SERVEUR') %}
<div class="nav-bar">
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('fluent-mdl2:reservation-orders') }}</i>
<span>Réservation</span>
</div>
</li>
</ul>
<ul>
<li>
<div class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('icon-park-outline:view-list') }}</i>
<span>Commande</span>
</div>
</li>
</ul>
</div>
{% 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 id="container_modal">
<div class="example-wrapper">
<h1>Liste des Utilisateurs ! ✅</h1>
<table class="user-table">
<thead>
<tr>
<th>ID</th>
<th>Nom</th>
<th>Prenom</th>
<th>Mail</th>
<th>Roles</th>
</tr>
</thead>
<tbody>
{% for utilisateur in utilisateurs %}
<tr>
<td>{{ utilisateur.id }}</td>
<td>{{ utilisateur.nom }}</td>
<td>{{ utilisateur.prenom }}</td>
<td>{{ utilisateur.UserIdentifier }}</td>
<td>{{ utilisateur.RolesAsString }}</td>
</tr>
{% else %}
<tr>
<td colspan="5">Aucun utilisateur trouvé.</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="btn-container">
<a href="/user/add" id="btn-add-user" class="btn btn-add-user btn-primary" >Ajouter un Utilisateur</a>
</div>
</div>
</div>
{% block stylesheets %}
<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 %}