Fix affichage index admin
This commit is contained in:
parent
89fb69f680
commit
0dd438af9a
@ -10,7 +10,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
color: white;
|
color: white;
|
||||||
font-size: 18px;
|
font-size: 16px;
|
||||||
box-sizing: border-box; /* Inclut le padding dans la largeur totale */
|
box-sizing: border-box; /* Inclut le padding dans la largeur totale */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ li {
|
|||||||
.btn-custom {
|
.btn-custom {
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
color: black;
|
color: black;
|
||||||
padding: 15px 40px;
|
padding: 20px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@ -88,8 +88,6 @@ li {
|
|||||||
.Information-perso {
|
.Information-perso {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 20px;
|
|
||||||
margin-top: auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-info-compte, .btn-info-exit {
|
.btn-info-compte, .btn-info-exit {
|
||||||
@ -104,12 +102,12 @@ li {
|
|||||||
|
|
||||||
.btn-info-compte {
|
.btn-info-compte {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
height: 30px;
|
height: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-info-exit {
|
.btn-info-exit {
|
||||||
width: 10%;
|
width: 10%;
|
||||||
height: 30px;
|
height: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Style pour la modal (cachée par défaut) */
|
/* Style pour la modal (cachée par défaut) */
|
||||||
|
62
public/js/GestionMenu/GestionMenu.js
Normal file
62
public/js/GestionMenu/GestionMenu.js
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
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 Table');
|
||||||
|
}
|
||||||
|
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 addPlat (event) {
|
||||||
|
document.getElementById('container_modal');
|
||||||
|
|
||||||
|
fetch('/plats/new')
|
||||||
|
.then(response => {
|
||||||
|
if (!response.ok) {
|
||||||
|
throw new Error('Erreur de chargement de la section tables');
|
||||||
|
}
|
||||||
|
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 editMenu (event) {
|
||||||
|
document.getElementById('container_modal');
|
||||||
|
const IdString = event.getAttribute('data-id');
|
||||||
|
let Id = parseInt(IdString);
|
||||||
|
fetch(`/plats/${Id}/edit`)
|
||||||
|
.then(response => {
|
||||||
|
if (!response.ok) {
|
||||||
|
throw new Error('Erreur de chargement de la section tables');
|
||||||
|
}
|
||||||
|
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);
|
||||||
|
});
|
||||||
|
}
|
@ -26,6 +26,17 @@
|
|||||||
<div>
|
<div>
|
||||||
Bonjour, {{ app.user.prenom }}
|
Bonjour, {{ app.user.prenom }}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="Information-perso">
|
||||||
|
<div class="btn-info-compte icon-container">
|
||||||
|
<i class="icon-medium"> {{ ux_icon('ph:user-circle-fill') }}</i>
|
||||||
|
<span>Compte</span>
|
||||||
|
</div>
|
||||||
|
<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>
|
||||||
|
|
||||||
<!-- Left Menu -->
|
<!-- Left Menu -->
|
||||||
@ -64,8 +75,21 @@
|
|||||||
<span>Voir tendances</span>
|
<span>Voir tendances</span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<div class="btn-custom icon-container">
|
||||||
|
<i class="icon-medium"> {{ ux_icon('icon-park-outline:view-list') }}</i>
|
||||||
|
<span>Commandes</span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% elseif is_granted('ROLE_CUISINIER') %}
|
{% elseif is_granted('ROLE_CUISINIER') %}
|
||||||
<div class="nav-bar">
|
<div class="nav-bar">
|
||||||
<ul>
|
<ul>
|
||||||
@ -105,17 +129,6 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="Information-perso">
|
|
||||||
<div class="btn-info-compte icon-container">
|
|
||||||
<i class="icon-medium"> {{ ux_icon('ph:user-circle-fill') }}</i>
|
|
||||||
<span>Compte</span>
|
|
||||||
</div>
|
|
||||||
<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>
|
||||||
|
|
||||||
<div id="container_modal">
|
<div id="container_modal">
|
||||||
|
@ -84,5 +84,5 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block javascripts %}
|
{% block javascripts %}
|
||||||
<script src="{{ asset('js/GestionUtilisateurs/GestionUtilisateurs.js') }}" defer></script>
|
<script src="{{ asset('js/GestionUtilisateurs/GestionMenu.js') }}" defer></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user