Fix order page

This commit is contained in:
Alexis MÃtaireau 2020-04-04 21:28:28 +02:00
parent 45c88a21bf
commit a9016e2a9f
3 changed files with 12 additions and 15 deletions

1
TODO
View file

@ -1,4 +1,5 @@
Éditer directement depuis la vue « distribution »
x Ajouter un menu pour revenir à l'élément parent facilement
x Repenser l'interface pour la rendre plus simple
x Refaire une interface plus simple (moins de boutons partout, qu'on s'y retrouve plus)

View file

@ -2,20 +2,21 @@
{% block body %}
{% set group_name = request.groups.groups.get(person.name, person).name %}
<article class="order">
<h3>
<a href="/distribution/{{ delivery.id }}">{{ delivery.name }}</a>
— Commande pour {{ group_name }}
<div class="header">
<h1>{{ delivery.name }}</h1>
<h4>Commande pour {{ group_name }}
{% if order.phone_number %}
(<a href="tel:{{ order.phone_number }}">{{ order.phone_number }}</a>)
{% endif %}</p>
</h3>
{% endif %}
</h4>
{% include "includes/delivery_head.html" %}
</div>
<form method="post">
{% for producer in delivery.producers.values() %}
<h2>{{ producer.name }}</h2>
<table class="order">
<table class="order pure-table">
<thead>
<tr>
<th class="product">Produit</th>
@ -34,9 +35,6 @@
<tr>
<th class="product {% if product.rupture %}rupture{% endif %}">{{ product }} {% if product.rupture %}(RUPTURE !){% endif %}
{% if product.description or product.img %}
{% with unique_id=loop.index %}
{% include "includes/modal_product.html" %}
{% endwith %}
{% endif %}
</th>
<td>{{ product.price | round(2) }} €</td>

View file

@ -65,9 +65,7 @@
{% if delivery.has_packing %}
<td></td>
{% endif %}
{% if edit_mode %}
<td></td>
{% endif %}
<th class="total">{{ delivery.total_for_producer(producer) }} €</th>
{% if not list_only %}
{% for email, order in delivery.orders.items() %}