Add stock to product.

This commit was merged in pull request #50.
This commit is contained in:
2026-01-20 10:09:07 +01:00
committed by krzysiej
parent 373fd1641b
commit 9ec3291a6a

View File

@@ -23,8 +23,8 @@
<td class="align-middle" style="width: 120px;"><img src='{{ product.image }}&width=70' class='img-thumbnail' alt='{{ product.name }}'/></td> <td class="align-middle" style="width: 120px;"><img src='{{ product.image }}&width=70' class='img-thumbnail' alt='{{ product.name }}'/></td>
<td class="align-middle"> <td class="align-middle">
<a href='{{ path('app_product', {'productId': product.id}) }}' class="text-decoration-none">{{ product.name }}</a> <a href='{{ path('app_product', {'productId': product.id}) }}' class="text-decoration-none">{{ product.name }}</a>
{% if product.currentStock.stock > 0 %} {% if product.stock > 0 %}
<span class="badge text-bg-light">stock: {{ product.currentStock.stock }}</span> <span class="badge text-bg-light">stock: {{ product.stock }}</span>
{% else %} {% else %}
<span class="badge text-bg-warning">out of stock</span> <span class="badge text-bg-warning">out of stock</span>
{% endif %} {% endif %}