mirror of
https://github.com/almet/copanier.git
synced 2025-04-28 19:42:37 +02:00
Add signing list page
This commit is contained in:
parent
dc520ace5e
commit
12719d003c
4 changed files with 36 additions and 3 deletions
|
@ -140,6 +140,14 @@ async def order_form(request, response, id):
|
|||
)
|
||||
|
||||
|
||||
@app.route("/livraison/{id}/émargement", methods=["GET"])
|
||||
async def signing_list(request, response, id):
|
||||
delivery = Delivery.load(id)
|
||||
response.html(
|
||||
"signing_list.html", {"delivery": delivery}
|
||||
)
|
||||
|
||||
|
||||
@app.route("/livraison/{id}/commander", methods=["POST"])
|
||||
async def place_order(request, response, id):
|
||||
delivery = Delivery.load(id)
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1;
|
||||
vertical-align: middle;
|
||||
|
||||
/* Better Font Rendering =========== */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
|
@ -179,7 +180,7 @@
|
|||
.icon-tools:before {
|
||||
content: "\e033";
|
||||
}
|
||||
.icon-tools-:before {
|
||||
.icon-tools-2:before {
|
||||
content: "\e034";
|
||||
}
|
||||
.icon-scissors:before {
|
||||
|
|
|
@ -41,10 +41,13 @@
|
|||
<a href="/livraison/{{ delivery.id }}/edit"><i class="icon-adjustments"></i> Modifier la livraison (admin)</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/livraison/{{ delivery.id }}/rapport.xlsx"><i class="icon-download"></i> Rapport résumé</a>
|
||||
<a href="/livraison/{{ delivery.id }}/rapport.xlsx"><i class="icon-magnifying-glass"></i> Rapport résumé</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/livraison/{{ delivery.id }}/rapport-complet.xlsx"><i class="icon-download"></i> Rapport complet</a>
|
||||
<a href="/livraison/{{ delivery.id }}/rapport-complet.xlsx"><i class="icon-grid"></i> Rapport complet</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/livraison/{{ delivery.id }}/émargement"><i class="icon-document"></i> Liste d'émargement</a>
|
||||
</li>
|
||||
<li>
|
||||
<label for="import-command" class="toggle-label"><i class="icon-paperclip"></i> Importer une commande</label>
|
||||
|
|
21
kaba/templates/signing_list.html
Normal file
21
kaba/templates/signing_list.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
<title>{% if title %}{{ title }} - {% endif %}Commandes Epinamap</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<h2>{{ delivery.producer }} {{ delivery.when.date() }} - liste d'émargement</h2>
|
||||
{% for email, order in delivery.orders.items() %}
|
||||
<h3>{{ email }}</h3>
|
||||
<table class="order">
|
||||
<tr><th class="product">Produit</th><th class="price">Prix unitaire</th><th class="amount">Quantité</th></tr>
|
||||
{% for product in delivery.products %}
|
||||
{% if order.get_quantity(product) %}
|
||||
<tr>
|
||||
<th class="product">{{ product.name }}</th>
|
||||
<td>{{ product.price }} €</td><td>{{ order.get_quantity(product) }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
<p>Total: {{ order.total(delivery.products) if order else 0 }} €</p>
|
||||
<hr>
|
||||
{% endfor %}
|
Loading…
Reference in a new issue