Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add low stock danger class

Krzysztof Białogłowicze761c8f156e5
diff --git a/saleor/static/dashboard/scss/components/_data-table.scss b/saleor/static/dashboard/scss/components/_data-table.scss
index d737b29f86..f4c85f9f68 100644
--- a/saleor/static/dashboard/scss/components/_data-table.scss
+++ b/saleor/static/dashboard/scss/components/_data-table.scss
@@ -51,6 +51,10 @@
cursor: pointer;
}
+ .danger {
+ color: $error-color;
+ }
+
th, td {
height: 48px;
overflow: hidden;
diff --git a/templates/dashboard/product/product_variant/detail.html b/templates/dashboard/product/product_variant/detail.html
index 9485ce1994..31f22e2f6d 100644
--- a/templates/dashboard/product/product_variant/detail.html
+++ b/templates/dashboard/product/product_variant/detail.html
@@ -93,7 +93,7 @@
</thead>
<tbody>
{% for stock_item in stock %}
- <tr class="{% if stock_item.quantity_available == 0 %}{% endif %}" data-action-go="{% url "dashboard:variant-stock-details" product_pk=product.pk variant_pk=variant.pk stock_pk=stock_item.pk %}">
+ <tr class="{% if stock_item.quantity_available == 0 %}danger{% endif %}" data-action-go="{% url "dashboard:variant-stock-details" product_pk=product.pk variant_pk=variant.pk stock_pk=stock_item.pk %}">
<td class="wide">{{ stock_item.location }}</td>
<td>{{ stock_item.quantity }}</td>
<td>{{ stock_item.quantity_allocated }}</td>