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 » Éditer directement depuis la vue « distribution »
x Ajouter un menu pour revenir à l'élément parent facilement x Ajouter un menu pour revenir à l'élément parent facilement
x Repenser l'interface pour la rendre plus simple 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) x Refaire une interface plus simple (moins de boutons partout, qu'on s'y retrouve plus)

View file

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

View file

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