167 lines
7.0 KiB
Twig
167 lines
7.0 KiB
Twig
{% extends 'base.html.twig' %}
|
|
|
|
{% block title %}Promotion index{% 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 %}
|
|
<!-- 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>
|
|
<th>Id</th>
|
|
<th>Description</th>
|
|
<th>Prix</th>
|
|
<th>Pourcentage</th>
|
|
<th>MontantFixe</th>
|
|
<th>DateDebut</th>
|
|
<th>DateFin</th>
|
|
<th>actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for reduction in reductions %}
|
|
<tr>
|
|
<td>{{ reduction.id }}</td>
|
|
<td>{{ reduction.Description }}</td>
|
|
<td>{{ reduction.Prix }}</td>
|
|
<td>{{ reduction.Pourcentage }}</td>
|
|
<td>{{ reduction.MontantFixe }}</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>
|
|
<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) }}">
|
|
{{ 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>
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="8">Aucun enregistrement trouvé</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</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 %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|