This commit is contained in:
lubiana 2025-06-08 13:58:51 +02:00
parent 837cfb6d43
commit 939840a3ac
Signed by: lubiana
SSH key fingerprint: SHA256:vW1EA0fRR3Fw+dD/sM0K+x3Il2gSry6YRYHqOeQwrfk
76 changed files with 6636 additions and 83 deletions

50
templates/index.html.twig Normal file
View file

@ -0,0 +1,50 @@
{% extends 'base.html.twig' %}
{% block title %}Inventory Overview{% endblock %}
{% block body %}
<div class="container">
<h1>Drink Inventory</h1>
<div class="card">
<div class="card-header">
<h5 class="card-title">Drink Inventory Overview</h5>
</div>
<div class="card-body">
<table class="table table-striped">
<thead>
<tr>
<th>Drink Name</th>
<th>Current Stock</th>
<th>Desired Stock</th>
<th>Status</th>
<th>Description</th>
</tr>
</thead>
<tbody>
{% for drinkStock in drinkStocks %}
{% set rowClass = '' %}
{% if drinkStock.stock.value == 'critical' %}
{% set rowClass = 'table-danger' %}
{% elseif drinkStock.stock.value == 'low' %}
{% set rowClass = 'table-warning' %}
{% elseif drinkStock.stock.value == 'high' %}
{% set rowClass = 'table-success' %}
{% endif %}
<tr class="{{ rowClass }}">
<td>{{ drinkStock.record.drinkType.name }}</td>
<td>{{ drinkStock.record.quantity }}</td>
<td>{{ drinkStock.record.drinkType.desiredStock }}</td>
<td>{{ drinkStock.stock.value|capitalize }}</td>
<td>{{ drinkStock.record.drinkType.description }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="mt-3">
<a href="{{ path('app_drink_type_index') }}" class="btn btn-primary">View All Drinks</a>
</div>
</div>
</div>
</div>
{% endblock %}