admin page commande + reservation

fix form client
This commit is contained in:
Tinka 2025-03-31 14:09:40 +02:00
parent f23c68bcff
commit bb35ba61c6
12 changed files with 214 additions and 75 deletions

View File

@ -43,7 +43,7 @@ ul {
} }
li { li {
padding-bottom: 30px; padding-bottom: 20px;
} }
.btn-custom { .btn-custom {

View File

@ -23,12 +23,9 @@ class ClientsType extends AbstractType
'class' => Tables::class, 'class' => Tables::class,
'choice_label' => 'id', 'choice_label' => 'id',
'multiple' => true, 'multiple' => true,
'expanded' => true,
]) ])
->add('Commandes', EntityType::class, [
'class' => Commandes::class,
'choice_label' => 'id',
'multiple' => true,
])
; ;
} }

View File

@ -63,6 +63,12 @@
<span>Gérer Utilisateur</span> <span>Gérer Utilisateur</span>
</a> </a>
</li> </li>
<li>
<a href="/clients" class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('icon-park-outline:people') }}</i>
<span>Gestion Client</span>
</a>
</li>
<li> <li>
<a href="/tables" class="btn-custom btn-gestion-table icon-container"> <a href="/tables" class="btn-custom btn-gestion-table icon-container">
<i class="icon-medium"> {{ ux_icon('ic:outline-table-bar') }}</i> <i class="icon-medium"> {{ ux_icon('ic:outline-table-bar') }}</i>
@ -82,22 +88,22 @@
</a> </a>
</li> </li>
<li> <li>
<div class="btn-custom icon-container"> <a href="/" class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('fluent-emoji-high-contrast:ten-oclock') }}</i> <i class="icon-medium"> {{ ux_icon('fluent-emoji-high-contrast:ten-oclock') }}</i>
<span>Voir tendances</span> <span>Voir tendances</span>
</div> </a>
</li> </li>
<li> <li>
<div class="btn-custom icon-container"> <a href="/commandes" class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('icon-park-outline:view-list') }}</i> <i class="icon-medium"> {{ ux_icon('icon-park-outline:view-list') }}</i>
<span>Commandes</span> <span>Commandes</span>
</div> </a>
</li> </li>
<li> <li>
<div class="btn-custom icon-container"> <a href="/reservations" class="btn-custom icon-container">
<i class="icon-medium"> {{ ux_icon('fluent-mdl2:reservation-orders') }}</i> <i class="icon-medium"> {{ ux_icon('fluent-mdl2:reservation-orders') }}</i>
<span>Réservation</span> <span>Réservation</span>
</div> </a>
</li> </li>
</ul> </ul>
</div> </div>
@ -144,7 +150,7 @@
{% block container_modal %} {% block container_modal %}
<div id="container_modal"> <div id="container_modal">
<!-- Contenu par défaut, ou vous p ouvez laisser vide --> <!-- Contenu par défaut, ou vous pouvez laisser vide -->
</div> </div>
{% endblock %} {% endblock %}

View File

@ -2,7 +2,25 @@
{% block title %}Modifier Client{% endblock %} {% block title %}Modifier Client{% endblock %}
{% block body %} {% 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 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 %}
{% block container_modal %}
<div id="container_modal">
<h1>Modifier Client</h1> <h1>Modifier Client</h1>
{{ include('clients/_form.html.twig', {'button_label': 'Mettre à jour'}) }} {{ include('clients/_form.html.twig', {'button_label': 'Mettre à jour'}) }}
@ -10,4 +28,5 @@
<a href="{{ path('app_clients_index') }}">Retour à la liste</a> <a href="{{ path('app_clients_index') }}">Retour à la liste</a>
{{ include('clients/_delete_form.html.twig') }} {{ include('clients/_delete_form.html.twig') }}
</div>
{% endblock %} {% endblock %}

View File

@ -1,11 +1,24 @@
{% extends 'base.html.twig' %} {% extends 'base.html.twig' %}
{% block title %}Clients index{% endblock %} {% block title %}Client 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 stylesheets %} {% block stylesheets %}
<link rel="stylesheet" href="{{ asset('css/ControllerVues/list.css') }}"> <!-- Ajout du fichier CSS --> <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 %}
{% block body %}
{% block container_modal %}
<div id="container_modal">
<h1>Clients index</h1> <h1>Clients index</h1>
<table class="table"> <table class="table">
@ -44,4 +57,5 @@
</table> </table>
<a href="{{ path('app_clients_new') }}">Créer un nouveau client</a> <a href="{{ path('app_clients_new') }}">Créer un nouveau client</a>
</div>
{% endblock %} {% endblock %}

View File

@ -1,14 +1,29 @@
{% extends 'base.html.twig' %} {% extends 'base.html.twig' %}
{% block title %}Nouveau client{% endblock %} {% block title %}Tables index{% 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 %} {% endblock %}
{% block body %}
{% 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 %}
{% block container_modal %}
<div id="container_modal">
<h1>Créer un client</h1> <h1>Créer un client</h1>
{{ include('clients/_form.html.twig') }} {{ include('clients/_form.html.twig') }}
<a href="{{ path('app_clients_index') }}">Retour à la liste</a> <a href="{{ path('app_clients_index') }}">Retour à la liste</a>
</div>
{% endblock %} {% endblock %}

View File

@ -1,13 +1,30 @@
{% extends 'base.html.twig' %} {% extends 'base.html.twig' %}
{% block title %}Modifier Commande{% endblock %} {% block title %}Tables index{% endblock %}
{% block body %} {% 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 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 %}
{% block container_modal %}
<div id="container_modal">
<h1>Modifier Commande</h1> <h1>Modifier Commande</h1>
{{ include('commandes/_form.html.twig', {'button_label': 'Mettre à jour'}) }} {{ include('commandes/_form.html.twig', {'button_label': 'Mettre à jour'}) }}
<a href="{{ path('app_commandes_index') }}">Retour à la liste</a> <a href="{{ path('app_commandes_index') }}">Retour à la liste</a>
</div>
{% endblock %} {% endblock %}

View File

@ -1,46 +1,60 @@
{% extends 'base.html.twig' %} {% extends 'base.html.twig' %}
{% block title %}Commandes index{% endblock %} {% block title %}Commandes 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 stylesheets %} {% block stylesheets %}
<link rel="stylesheet" href="{{ asset('css/ControllerVues/list.css') }}"> <!-- Ajout du fichier CSS --> <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 %}
{% block body %}
<h1>Commandes index</h1>
<table class="table"> {% block container_modal %}
<thead> <div id="container_modal">
<tr> <h1>Commandes index</h1>
<th>Id</th>
<th>DateHeure</th>
<th>Statut</th>
<th>Total</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for commande in commandes %}
<tr>
<td>{{ commande.id }}</td>
<td>{{ commande.DateHeure ? commande.DateHeure|date('Y-m-d H:i:s') : '' }}</td>
<td>{{ commande.Statut ? 'Yes' : 'No' }}</td>
<td>{{ commande.Total }}</td>
<td>
<form method="post" action="{{ path('app_commandes_delete', {'id': commande.id}) }}" onsubmit="return confirm('Es-tu sur de vouloir le supprimer ?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ commande.id) }}">
{{ include('commandes/_delete_form.html.twig') }}
</form>
<a href="{{ path('app_commandes_edit', {'id': commande.id}) }}">Modifier</a> <table class="table">
</td> <thead>
</tr> <tr>
{% else %} <th>Id</th>
<tr> <th>DateHeure</th>
<td colspan="5">pas de commande crée</td> <th>Statut</th>
</tr> <th>Total</th>
{% endfor %} <th>actions</th>
</tbody> </tr>
</table> </thead>
<tbody>
{% for commande in commandes %}
<tr>
<td>{{ commande.id }}</td>
<td>{{ commande.DateHeure ? commande.DateHeure|date('Y-m-d H:i:s') : '' }}</td>
<td>{{ commande.Statut ? 'Yes' : 'No' }}</td>
<td>{{ commande.Total }}</td>
<td>
<form method="post" action="{{ path('app_commandes_delete', {'id': commande.id}) }}" onsubmit="return confirm('Es-tu sur de vouloir le supprimer ?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ commande.id) }}">
{{ include('commandes/_delete_form.html.twig') }}
</form>
<a href="{{ path('app_commandes_new') }}">Créer une nouvelle commande</a> <a href="{{ path('app_commandes_edit', {'id': commande.id}) }}">Modifier</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="5">pas de commande crée</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_commandes_new') }}">Créer une nouvelle commande</a>
</div>
{% endblock %} {% endblock %}

View File

@ -1,15 +1,29 @@
{% extends 'base.html.twig' %} {% extends 'base.html.twig' %}
{% block title %}Nouvelle commande{% endblock %} {% block title %}Tables index{% 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 %} {% endblock %}
{% block body %} {% 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 %}
{% block container_modal %}
<div id="container_modal">
<h1>Créer une commande</h1> <h1>Créer une commande</h1>
{{ include('commandes/_form.html.twig') }} {{ include('commandes/_form.html.twig') }}
<a href="{{ path('app_commandes_index') }}">Retour à la liste</a> <a href="{{ path('app_commandes_index') }}">Retour à la liste</a>
</div>
{% endblock %} {% endblock %}

View File

@ -1,12 +1,25 @@
{% extends 'base.html.twig' %} {% extends 'base.html.twig' %}
{% block title %}Modifier Réservation{% endblock %} {% block title %}Tables index{% endblock %}
{% block stylesheets %} {% block head %}
<link rel="stylesheet" href="{{ asset('css/ControllerVues/edit.css') }}"> <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 %} {% 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 %}
{% block container_modal %}
<div id="container_modal">
<div class="page-container"> <div class="page-container">
<h1 class="page-title">Modifier Réservation</h1> <h1 class="page-title">Modifier Réservation</h1>
@ -18,4 +31,5 @@
{{ include('reservations/_delete_form.html.twig') }} {{ include('reservations/_delete_form.html.twig') }}
</div> </div>
</div>
{% endblock %} {% endblock %}

View File

@ -1,11 +1,24 @@
{% extends 'base.html.twig' %} {% extends 'base.html.twig' %}
{% block title %}Reservations index{% endblock %} {% block title %}Reservations 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 stylesheets %} {% block stylesheets %}
<link rel="stylesheet" href="{{ asset('css/ControllerVues/list.css') }}"> <!-- Ajout du fichier CSS --> <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 %}
{% block body %}
{% block container_modal %}
<div id="container_modal">
<h1>Reservations index</h1> <h1>Reservations index</h1>
<table class="table"> <table class="table">
@ -40,4 +53,5 @@
</table> </table>
<a href="{{ path('app_reservations_new') }}">Créer une réservation</a> <a href="{{ path('app_reservations_new') }}">Créer une réservation</a>
</div>
{% endblock %} {% endblock %}

View File

@ -1,14 +1,29 @@
{% extends 'base.html.twig' %} {% extends 'base.html.twig' %}
{% block title %}New Reservations{% endblock %} {% block title %}Tables index{% 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 %} {% endblock %}
{% block body %}
{% 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 %}
{% block container_modal %}
<div id="container_modal">
<h1>Créer une reservation</h1> <h1>Créer une reservation</h1>
{{ include('reservations/_form.html.twig') }} {{ include('reservations/_form.html.twig') }}
<a href="{{ path('app_reservations_index') }}">Retour à la liste</a> <a href="{{ path('app_reservations_index') }}">Retour à la liste</a>
</div>
{% endblock %} {% endblock %}