Suppression Modals, rajout et essaie de base.html.twig sur tout les page
This commit is contained in:
parent
8fb4b64ab5
commit
f4f6489274
77
public/js/GestionMenu/GestionMenu.js
Normal file
77
public/js/GestionMenu/GestionMenu.js
Normal file
@ -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);
|
||||||
|
});
|
||||||
|
}
|
@ -11,14 +11,135 @@
|
|||||||
{# <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">#}
|
{# <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 %}
|
{% 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 %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block javascripts %}
|
{% 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 %}
|
{% block importmap %}{{ importmap('app') }}{% endblock %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{% block body %}{% endblock %}
|
{% 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#}
|
{# 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>#}
|
{# <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js" integrity="sha384-0pUGZvbkm6XF6gxjEnlmuGrJXVbNuzT9qBBavbLwCsOGabYfZo0T0to5eqruptLy" crossorigin="anonymous"></script> </body>#}
|
||||||
|
@ -36,9 +36,9 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<div class="btn-custom btn-gestion-utilisateurs icon-container" >
|
<div class="btn-custom btn-gestion-utilisateurs icon-container" >
|
||||||
<i class="icon-medium"> {{ ux_icon('grommet-icons:group') }}</i>
|
<i class="icon-medium"> {{ ux_icon('grommet-icons:group') }}</i>
|
||||||
<span>Gérer Utilisateur</span>
|
<span>Gérer Utilisateur</span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div class="btn-custom btn-gestion-table icon-container">
|
<div class="btn-custom btn-gestion-table icon-container">
|
||||||
@ -47,7 +47,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div class="btn-custom icon-container">
|
<div class="btn-custom btn-gestion-menu icon-container">
|
||||||
<i class="icon-medium"> {{ ux_icon('bx:food-menu') }}</i>
|
<i class="icon-medium"> {{ ux_icon('bx:food-menu') }}</i>
|
||||||
<span>Gestion Menu</span>
|
<span>Gestion Menu</span>
|
||||||
</div>
|
</div>
|
||||||
@ -106,10 +106,10 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="Information-perso">
|
<div class="Information-perso">
|
||||||
<div class="btn-info-compte icon-container">
|
<a href="user/update/{id}" class="btn-info-compte icon-container">
|
||||||
<i class="icon-medium"> {{ ux_icon('ph:user-circle-fill') }}</i>
|
<i class="icon-medium"> {{ ux_icon('ph:user-circle-fill') }}</i>
|
||||||
<span>Compte</span>
|
<span>Compte</span>
|
||||||
</div>
|
</a>
|
||||||
<div class="btn-info-exit icon-container">
|
<div class="btn-info-exit icon-container">
|
||||||
<a href="{{ path('app_logout') }}" class="icon-medium">
|
<a href="{{ path('app_logout') }}" class="icon-medium">
|
||||||
{{ ux_icon('iconamoon:exit-bold') }}
|
{{ ux_icon('iconamoon:exit-bold') }}
|
||||||
@ -135,4 +135,5 @@
|
|||||||
<script src="{{ asset('js/GestionUtilisateurs/GestionUtilisateurs.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/GestionPromotion/GestionPromotion.js') }}" defer></script>
|
||||||
<script src="{{ asset('js/GestionTables/GestionTables.js') }}" defer></script>
|
<script src="{{ asset('js/GestionTables/GestionTables.js') }}" defer></script>
|
||||||
|
<script src="{{ asset('js/GestionMenu/GestionMenu.js') }}" defer></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -1,15 +1,118 @@
|
|||||||
{% extends 'base.html.twig' %}
|
{% extends 'base.html.twig' %}
|
||||||
|
|
||||||
{% block title %}Plats index{% endblock %}
|
{% block title %}Plats index{% endblock %}
|
||||||
{% block stylesheets %}
|
|
||||||
<link rel="stylesheet" href="{{ asset('css/ControllerVues/list.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 %}
|
{% endblock %}
|
||||||
{% block body %}
|
|
||||||
<h1>Plats index</h1>
|
|
||||||
|
|
||||||
<table class="table">
|
{% block body %}
|
||||||
<thead>
|
<!-- 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">
|
||||||
|
<h1>Plats index</h1>
|
||||||
|
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Id</th>
|
<th>Id</th>
|
||||||
<th>Nom</th>
|
<th>Nom</th>
|
||||||
@ -20,32 +123,44 @@
|
|||||||
<th>Nb_de_commande</th>
|
<th>Nb_de_commande</th>
|
||||||
<th>actions</th>
|
<th>actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for plat in plats %}
|
{% for plat in plats %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ plat.id }}</td>
|
<td>{{ plat.id }}</td>
|
||||||
<td>{{ plat.Nom }}</td>
|
<td>{{ plat.Nom }}</td>
|
||||||
<td>{{ plat.Description }}</td>
|
<td>{{ plat.Description }}</td>
|
||||||
<td>{{ plat.Prix }}</td>
|
<td>{{ plat.Prix }}</td>
|
||||||
<td>{{ plat.Categorie }}</td>
|
<td>{{ plat.Categorie }}</td>
|
||||||
<td>{{ plat.Statut ? 'Yes' : 'No' }}</td>
|
<td>{{ plat.Statut ? 'Yes' : 'No' }}</td>
|
||||||
<td>{{ plat.NbDeCommande }}</td>
|
<td>{{ plat.NbDeCommande }}</td>
|
||||||
<td>
|
<td>
|
||||||
<form method="post" action="{{ path('app_plats_delete', {'id': plat.id}) }}" onsubmit="return confirm('Es-tu sur de vouloir le supprimer ?');">
|
<form method="post" action="{{ path('app_plats_delete', {'id': plat.id}) }}" onsubmit="return confirm('Es-tu sur de vouloir le supprimer ?');">
|
||||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ plat.id) }}">
|
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ plat.id) }}">
|
||||||
{{ include('plats/_delete_form.html.twig') }}
|
{{ include('plats/_delete_form.html.twig') }}
|
||||||
</form>
|
</form>
|
||||||
<a href="{{ path('app_plats_edit', {'id': plat.id}) }}">Modifier</a>
|
<a href="{{ path('app_plats_edit', {'id': plat.id}) }}">Modifier</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% else %}
|
{% else %}
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="8">Aucun enregistrement trouvé</td>
|
<td colspan="8">Aucun enregistrement trouvé</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<button onclick="addPlats(this)" href="{{ path('app_plats_new') }}">Créer un menu</button>
|
||||||
|
</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_new') }}">Créer un nouveau plat</a>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,15 +1,118 @@
|
|||||||
{% extends 'base.html.twig' %}
|
{% extends 'base.html.twig' %}
|
||||||
|
|
||||||
{% block title %}Reductions index{% endblock %}
|
{% block title %}Promotion index{% endblock %}
|
||||||
{% block stylesheets %}
|
|
||||||
<link rel="stylesheet" href="{{ asset('css/ControllerVues/list.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 %}
|
{% endblock %}
|
||||||
{% block body %}
|
|
||||||
<h1>Reductions index</h1>
|
|
||||||
|
|
||||||
<table class="table">
|
{% block body %}
|
||||||
<thead>
|
<!-- 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">
|
||||||
|
<h1>Reductions index</h1>
|
||||||
|
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Id</th>
|
<th>Id</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
@ -20,36 +123,44 @@
|
|||||||
<th>DateFin</th>
|
<th>DateFin</th>
|
||||||
<th>actions</th>
|
<th>actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for reduction in reductions %}
|
{% for reduction in reductions %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ reduction.id }}</td>
|
<td>{{ reduction.id }}</td>
|
||||||
<td>{{ reduction.Description }}</td>
|
<td>{{ reduction.Description }}</td>
|
||||||
<td>{{ reduction.Prix }}</td>
|
<td>{{ reduction.Prix }}</td>
|
||||||
<td>{{ reduction.Pourcentage }}</td>
|
<td>{{ reduction.Pourcentage }}</td>
|
||||||
<td>{{ reduction.MontantFixe }}</td>
|
<td>{{ reduction.MontantFixe }}</td>
|
||||||
<td>{{ reduction.DateDebut ? reduction.DateDebut|date('Y-m-d H:i:s') : '' }}</td>
|
<td>{{ reduction.DateDebut ? reduction.DateDebut|date('Y-m-d H:i:s') : '' }}</td>
|
||||||
<td>{{ reduction.DateFin ? reduction.DateFin|date('Y-m-d H:i:s') : '' }}</td>
|
<td>{{ reduction.DateFin ? reduction.DateFin|date('Y-m-d H:i:s') : '' }}</td>
|
||||||
<td>
|
<td>
|
||||||
<form method="post" action="{{ path('app_reductions_delete', {'id': reduction.id}) }}" onsubmit="return confirm('Es-tu sur de vouloir le supprimer ?'); ">
|
<form method="post" action="{{ path('app_reductions_delete', {'id': reduction.id}) }}" onsubmit="return confirm('Es-tu sur de vouloir le supprimer ?'); ">
|
||||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ reduction.id) }}">
|
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ reduction.id) }}">
|
||||||
{{ include('reductions/_delete_form.html.twig') }}
|
{{ include('reductions/_delete_form.html.twig') }}
|
||||||
</form>
|
</form>
|
||||||
<button onclick="updatePromotion(this)" data-id="{{ reduction.id }}" href="{{ path('app_reductions_edit', {'id': reduction.id}) }}">Modifier</button>
|
<button onclick="updatePromotion(this)" data-id="{{ reduction.id }}" href="{{ path('app_reductions_edit', {'id': reduction.id}) }}">Modifier</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% else %}
|
{% else %}
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="8">Aucun enregistrement trouvé</td>
|
<td colspan="8">Aucun enregistrement trouvé</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<button onclick="addPromotion(this)" href="{{ path('app_reductions_new') }}">Créer une réduction</button>
|
||||||
|
</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 %}
|
||||||
|
|
||||||
<button onclick="addPromotion(this)" href="{{ path('app_reductions_new') }}">Créer une réduction</button>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block javascripts %}
|
|
||||||
<script src="{{ asset('js/GestionPromotion/GestionPromotion.js') }}" defer></script>
|
|
||||||
{% endblock %}
|
|
||||||
|
@ -1,43 +1,152 @@
|
|||||||
{% extends 'base.html.twig' %}
|
{% extends 'base.html.twig' %}
|
||||||
|
|
||||||
{% block title %}Tables index{% endblock %}
|
{% block title %}Tables index{% endblock %}
|
||||||
{% block stylesheets %}
|
|
||||||
<link rel="stylesheet" href="{{ asset('css/ControllerVues/list.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 %}
|
{% endblock %}
|
||||||
{% block body %}
|
|
||||||
<h1>Tables index</h1>
|
|
||||||
|
|
||||||
<table class="table">
|
{% block body %}
|
||||||
<thead>
|
<!-- 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">
|
||||||
|
<h1>Tables index</h1>
|
||||||
|
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Id</th>
|
<th>Id</th>
|
||||||
<th>actions</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>
|
||||||
<form method="post" action="{{ path('app_tables_delete', {'id': table.id}) }}" onsubmit="return confirm('Es-tu sur de vouloir le supprimer ?');">
|
<form method="post" action="{{ path('app_tables_delete', {'id': table.id}) }}" onsubmit="return confirm('Es-tu sur de vouloir le supprimer ?');">
|
||||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ table.id) }}">
|
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ table.id) }}">
|
||||||
{{ include('tables/_delete_form.html.twig') }}
|
{{ include('tables/_delete_form.html.twig') }}
|
||||||
</form>
|
</form>
|
||||||
<a href="{{ path('app_tables_edit', {'id': table.id}) }}">Modifier</a>
|
<a href="{{ path('app_tables_edit', {'id': table.id}) }}">Modifier</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% else %}
|
{% else %}
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">Aucun enregistrement trouvé</td>
|
<td colspan="2">Aucun enregistrement trouvé</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<button onclick="addTable(this)" href="{{ path('app_reductions_new') }}">Créer une tables</button>
|
||||||
|
</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 %}
|
||||||
|
|
||||||
<button onclick="addTable(this)" href="{{ path('app_reductions_new') }}">Créer une tables</button>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block javascripts %}
|
|
||||||
<script src="{{ asset('js/GestionPromotion/GestionPromotion.js') }}" defer></script>
|
|
||||||
{% endblock %}
|
|
||||||
|
@ -1,74 +1,34 @@
|
|||||||
{% extends 'base.html.twig' %}
|
{% extends 'base.html.twig' %}
|
||||||
|
|
||||||
{% block title %}Liste Utilisateur{% endblock %}
|
{% block title %}Liste des Utilisateurs{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block page_styles %}
|
||||||
<style>
|
<link rel="stylesheet" href="{{ asset('css/GestionUtilisateurs/list.css') }}">
|
||||||
.user-table {
|
{% endblock %}
|
||||||
width: 100%;
|
|
||||||
border-collapse: collapse;
|
|
||||||
font-family: sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-table th,
|
{% block container_modal %}
|
||||||
.user-table td {
|
<h2>Liste des utilisateurs</h2>
|
||||||
border: 1px solid #ddd;
|
<table>
|
||||||
padding: 8px;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-table th {
|
|
||||||
background-color: #f2f2f2;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-table tr:nth-child(even) {
|
|
||||||
background-color: #f9f9f9;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-table tr:hover {
|
|
||||||
background-color: #f1f1f1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-container {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn {
|
|
||||||
padding: 5px 10px;
|
|
||||||
text-decoration: none;
|
|
||||||
color: white;
|
|
||||||
background-color: #007bff;
|
|
||||||
border-radius: 5px;
|
|
||||||
font-weight: bold;
|
|
||||||
margin-top: 25px;
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<div class="example-wrapper">
|
|
||||||
<h1>Liste des Utilisateurs ! ✅</h1>
|
|
||||||
|
|
||||||
<table class="user-table">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
<th>Nom</th>
|
<th>Nom</th>
|
||||||
<th>Prenom</th>
|
<th>Email</th>
|
||||||
<th>Mail</th>
|
<th>Rôle</th>
|
||||||
<th>Roles</th>
|
<th>Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for utilisateur in utilisateurs %}
|
{% for user in users %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ utilisateur.id }}</td>
|
<td>{{ user.id }}</td>
|
||||||
<td>{{ utilisateur.nom }}</td>
|
<td>{{ user.nom }}</td>
|
||||||
<td>{{ utilisateur.prenom }}</td>
|
<td>{{ user.email }}</td>
|
||||||
<td>{{ utilisateur.UserIdentifier }}</td>
|
<td>{{ user.roles|join(', ') }}</td>
|
||||||
<td>{{ utilisateur.RolesAsString }}</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>
|
</tr>
|
||||||
{% else %}
|
{% else %}
|
||||||
<tr>
|
<tr>
|
||||||
@ -77,12 +37,4 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div class="btn-container">
|
|
||||||
<button onclick="addUser(this)" id="btn-add-user" class="btn btn-add-user btn-primary">Ajouter un Utilisateur</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block javascripts %}
|
|
||||||
<script src="{{ asset('js/GestionUtilisateurs/GestionUtilisateurs.js') }}" defer></script>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,77 +1,114 @@
|
|||||||
{% extends 'base.html.twig' %}
|
{% 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: red;
|
|
||||||
border-radius: 5px;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block title %}Nouvelle Utilisateur{% endblock %}
|
{% block title %}Nouvelle Utilisateur{% 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 body %}
|
{% block body %}
|
||||||
<div class="form-container">
|
<!-- 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">
|
||||||
<h1>Modifier Utilisateurs ! ✅</h1>
|
<h1>Modifier Utilisateurs ! ✅</h1>
|
||||||
|
|
||||||
{{ form_start(form) }}
|
{{ form_start(form) }}
|
||||||
@ -102,4 +139,81 @@
|
|||||||
<a href="{{ path('app_index') }}" class="btn-list btn-primary">Annuler</a>
|
<a href="{{ path('app_index') }}" class="btn-list btn-primary">Annuler</a>
|
||||||
</div>
|
</div>
|
||||||
</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: red;
|
||||||
|
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 %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user