From bca36da70c1b444187e82f2b0d8955e0bdec381b Mon Sep 17 00:00:00 2001 From: Alexis M Date: Tue, 24 Sep 2019 10:17:11 +0200 Subject: [PATCH] Handle ruptures --- copanier/static/app.css | 4 ++++ copanier/templates/place_order.html | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/copanier/static/app.css b/copanier/static/app.css index 2cb17de..17fc706 100644 --- a/copanier/static/app.css +++ b/copanier/static/app.css @@ -543,3 +543,7 @@ dt.mandatory:after { details summary { cursor: pointer; } + +.rupture { + background-color: #ff000083; +} \ No newline at end of file diff --git a/copanier/templates/place_order.html b/copanier/templates/place_order.html index 793560d..3fe3cb6 100644 --- a/copanier/templates/place_order.html +++ b/copanier/templates/place_order.html @@ -25,7 +25,7 @@ {% for product in delivery.get_products_by(producer) %} - {{ product }} + {{ product }} {% if product.rupture %}(RUPTURE !){% endif %} {% if product.description or product.img %} {% with unique_id=loop.index %} {% include "includes/modal_product.html" %} @@ -36,7 +36,7 @@ {% if delivery.has_packing %} {{ product.packing or "—" }}{% if delivery.status == delivery.ADJUSTMENT and delivery.product_missing(product) %} (manque {{ delivery.product_missing(product) }}){% endif %} {% endif %} - x {{ product.unit }} + x {{ product.unit }} {% if delivery.status == delivery.ADJUSTMENT or order.has_adjustments %} {% endif %}