diff --git a/kaba/__init__.py b/kaba/__init__.py index 73200ca..1be51ff 100644 --- a/kaba/__init__.py +++ b/kaba/__init__.py @@ -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) diff --git a/kaba/static/icomoon.css b/kaba/static/icomoon.css index f98c3b8..068b09c 100644 --- a/kaba/static/icomoon.css +++ b/kaba/static/icomoon.css @@ -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 { diff --git a/kaba/templates/delivery.html b/kaba/templates/delivery.html index 0532a3c..504dd1e 100644 --- a/kaba/templates/delivery.html +++ b/kaba/templates/delivery.html @@ -41,10 +41,13 @@ Modifier la livraison (admin)
  • - Rapport résumé + Rapport résumé
  • - Rapport complet + Rapport complet +
  • +
  • + Liste d'émargement
  • diff --git a/kaba/templates/signing_list.html b/kaba/templates/signing_list.html new file mode 100644 index 0000000..666dcb7 --- /dev/null +++ b/kaba/templates/signing_list.html @@ -0,0 +1,21 @@ +{% if title %}{{ title }} - {% endif %}Commandes Epinamap + + + +

    {{ delivery.producer }} {{ delivery.when.date() }} - liste d'émargement

    +{% for email, order in delivery.orders.items() %} +

    {{ email }}

    + + + {% for product in delivery.products %} + {% if order.get_quantity(product) %} + + + + + {% endif %} + {% endfor %} +
    ProduitPrix unitaireQuantité
    {{ product.name }}{{ product.price }} €{{ order.get_quantity(product) }}
    +

    Total: {{ order.total(delivery.products) if order else 0 }} €

    +
    +{% endfor %}