Skip to content
Snippets Groups Projects
Commit 8f23d652 authored by Milo Hivert's avatar Milo Hivert
Browse files

clear bdd+ajout messages

parent 741d0a63
No related branches found
No related tags found
No related merge requests found
......@@ -54,7 +54,7 @@ function f (){
if (somme > 5 && messageof_trop){
var paraph = document.createElement("p");
var texte = document.createTextNode("Vous ne pouvez pas commander plus de 40 crêpes d'un coup.");
var texte = document.createTextNode("Vous ne pouvez pas commander plus de 5 crêpes d'un coup.");
paraph.appendChild(texte);
bloc.appendChild(paraph);
messageof_trop=false;
......
......@@ -37,7 +37,7 @@
{% endif %}
<br>
<div class="block_bouton">
<a class="bouton_gerer_commande" href="{% url 'prendre_en_charge' pkrequete=commande.pk %}"> Prendre en charge</a>
<a class="bouton_gerer_commande" href="{% url 'prendre_en_charge' pkrequete=commande.pk %}"> Prendre en charge"</a>
</div>
<br>
</div>
......
......@@ -62,7 +62,7 @@
</div>
<br>
<div class="text_box">
<p>Adresse de livraison</p>
<p>Adresse de livraison + jusqu'à quand vous êtes là</p>
<input id="adresse" type="text" style="margin-top:1%"/>
</div>
......
......@@ -9,6 +9,7 @@
<div class="wrapper">
<div class="block_commande">
<p class="titre_page">Voici tes commandes</p>
<p class="text-box" style="color:red">Pensez bien à annuler votre commande quand vous ne pouvez plus la récuperer à l'endroit indiqué !</p>
<div class="commandes">
{% for commande in commandes %}
{% if commande.statut != "close" and commande.commanditaire.email == email %}
......
......@@ -7,6 +7,6 @@
{% block content %}
<div class="block_commande">
<p>La hotline ouvre à 10h, lendemain de soirée difficile .</p>
<p>La hotline ouvre à 9h .</p>
</div>
{% endblock %}
......@@ -100,7 +100,7 @@ def commande_passee(request, requete):
patiente=temps_entre_commandes-durée_dernière_commande
return render(request,"campagne/patiente.html",{"min":patiente//60, "sec":patiente%60})
if check(request)[1]['role']=="cotisant":
if int(date_mtn.hour<10):
if int(date_mtn.hour<9):
return render(request,"campagne/pas_lheure.html")
commande=commande_crepe.objects.create(adresse_livraison=L[5], crepe_nature=L[0], crepe_nutella=L[1], crepe_sucre=L[2], crepe_confiture_fraise=L[3],crepe_confiture_abricot=L[4],commanditaire=utilisateur.objects.get(email=mail))
commande.save()
......@@ -189,6 +189,7 @@ def check(request):
if 'email' not in dico:
request.delete_cookie('token')
return [False]
mail = dico['email']
role=utilisateur.objects.get(email=mail)
return [True,{'email': mail, 'role': role.role, 'commandes': reversed(commande_crepe.objects.all())}]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment