mirror of
https://framagit.org/la-chariotte/la-chariotte.git
synced 2025-05-02 20:01:51 +02:00
parent
ab5d510181
commit
fb3441ddf3
6 changed files with 71 additions and 7 deletions
|
@ -27,6 +27,7 @@ class GroupedOrderForm(forms.ModelForm):
|
|||
"deadline_date",
|
||||
"deadline_time",
|
||||
"delivery_date",
|
||||
"delivery_slot",
|
||||
"place",
|
||||
"description",
|
||||
]
|
||||
|
@ -38,6 +39,9 @@ class GroupedOrderForm(forms.ModelForm):
|
|||
attrs={"type": "date"},
|
||||
format=("%Y-%m-%d"),
|
||||
),
|
||||
"delivery_slot": forms.TextInput(
|
||||
attrs={"placeholder": "14h - 17h (facultatif)"}
|
||||
),
|
||||
"place": forms.TextInput(attrs={"placeholder": "(facultatif)"}),
|
||||
"description": forms.Textarea(
|
||||
attrs={
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
# Generated by Django 4.2 on 2023-09-17 12:03
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
("order", "0025_groupedorder_code"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="groupedorder",
|
||||
name="delivery_slot",
|
||||
field=models.CharField(
|
||||
blank=True,
|
||||
max_length=50,
|
||||
null=True,
|
||||
verbose_name="Créneau de distribution",
|
||||
),
|
||||
),
|
||||
]
|
|
@ -17,6 +17,9 @@ class GroupedOrder(models.Model):
|
|||
AUTH_USER_MODEL, on_delete=models.CASCADE, verbose_name="Organisateur·ice"
|
||||
)
|
||||
delivery_date = models.DateField("Date de livraison")
|
||||
delivery_slot = models.CharField(
|
||||
max_length=50, null=True, blank=True, verbose_name="Créneau de distribution"
|
||||
)
|
||||
deadline = models.DateTimeField("Date limite de commande")
|
||||
place = models.CharField(
|
||||
max_length=100, null=True, blank=True, verbose_name="Lieu de livraison"
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
Commandes avant le {{ grouped_order.deadline }}
|
||||
</p>
|
||||
<p><i class="fa fa-truck mr-3" aria-label="Date de livraison" title="Date de livraison" aria-hidden="true"></i>
|
||||
Livraison le {{ grouped_order.delivery_date }}
|
||||
Livraison le {{ grouped_order.delivery_date }}{% if grouped_order.delivery_slot %}, {{ grouped_order.delivery_slot }}{% endif %}
|
||||
</p>
|
||||
|
||||
{% if user == grouped_order.orga %}
|
||||
|
|
|
@ -24,11 +24,11 @@
|
|||
{% if grouped_order.place %}
|
||||
<p><i class="fa fa-map-pin mr-3" aria-label="Lieu" title="Lieu" aria-hidden="true"></i>{{ grouped_order.place }}</p>
|
||||
{% endif %}
|
||||
<p><i class="fa fa-clock-o mr-3" aria-label="Date limite de commande" title="Date limite de commande" aria-hidden="true"></i>
|
||||
<p><i class="fa fa-calendar-check-o mr-3" aria-label="Date limite de commande" title="Date limite de commande" aria-hidden="true"></i>
|
||||
Commandes avant le {{ grouped_order.deadline }}
|
||||
</p>
|
||||
<p><i class="fa fa-calendar-check-o mr-3" aria-label="Date de livraison" title="Date de livraison" aria-hidden="true"></i>
|
||||
Livraison le {{ grouped_order.delivery_date }}
|
||||
<p><i class="fa fa-truck mr-3" aria-label="Date de livraison" title="Date de livraison" aria-hidden="true"></i>
|
||||
Livraison le {{ grouped_order.delivery_date }}{% if grouped_order.delivery_slot %}, {{ grouped_order.delivery_slot }}{% endif %}
|
||||
</p>
|
||||
<div class="buttons">
|
||||
<a class="button is-light" href="{% url 'order:update_grouped_order' grouped_order.code %}">
|
||||
|
|
|
@ -4,11 +4,46 @@
|
|||
|
||||
{% block content %}
|
||||
<p class="desktop-hidden mobile-content-title">
|
||||
{% block content_title %}Commande confirmée !{% endblock %}
|
||||
{% block content_title %}Merci, {{ order.author.first_name }} !{% endblock %}
|
||||
</p>
|
||||
<div class="box">
|
||||
<p class="title">Merci, {{ order.author.first_name }} !</p>
|
||||
<p>Votre participation à la commande groupée «{{ order.grouped_order }}» a bien été confirmée et vous avez normalement reçu un mail de confirmation.
|
||||
<p class="title">Votre commande</p>
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<p>Votre participation à la commande groupée «{{ order.grouped_order }}» a bien été confirmée et vous avez normalement reçu un mail de confirmation.
|
||||
|
||||
<ul>
|
||||
{% for item in order.ordered_items.all %}
|
||||
<li>{{ item.nb }} × {{ item.item }} : {{ item.get_price }} €</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<p><strong>Prix total : {{ order.price }} €</strong>
|
||||
|
||||
{% if order.note %}
|
||||
<p><strong>Votre commentaire :</strong><br>
|
||||
{{ order.note }}</p>
|
||||
{% endif %}
|
||||
|
||||
<p class="has-text-dark is-italic">Le paiement n'est pas (encore) pris en charge par la Chariotte. C'est l'organisateur·ice de la commande qui doit vous indiquer les moyens de paiement.
|
||||
</div>
|
||||
<div class="column">
|
||||
<p class="subtitle">Rendez-vous pour la distribution</p>
|
||||
<p><i class="fa fa-calendar-check-o mr-3" aria-label="Date de distribution" title="Date de distribution" aria-hidden="true"></i>
|
||||
{{ order.grouped_order.delivery_date }}
|
||||
</p>
|
||||
{% if order.grouped_order.delivery_slot %}
|
||||
<p><i class="fa fa-clock-o mr-3" aria-label="Créneau de distribution" title="Créneau de distribution" aria-hidden="true"></i>
|
||||
{{ order.grouped_order.delivery_slot }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if order.grouped_order.place %}
|
||||
<p><i class="fa fa-map-pin mr-4" aria-label="Lieu de livraison" title="Lieu de livraison" aria-hidden="true"></i>{{ order.grouped_order.place }}</p>
|
||||
{% endif %}
|
||||
Une question sur cette commande groupée ?
|
||||
<div class="buttons"><a class="button is-light" href="mailto:{{ order.grouped_order.orga.username }}">Contacter l'organisateur·ice</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p><strong>Votre commande :</strong></p>
|
||||
<ul>
|
||||
|
|
Loading…
Reference in a new issue