Add stock to product. #50

Merged
krzysiej merged 1 commits from feature/add-stock-to-product into master 2026-01-20 10:09:35 +01:00

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 %}