saufen/templates/index.html.twig
2025-06-14 21:39:20 +02:00

60 lines
2.4 KiB
Twig

{% extends 'base.html.twig' %}
{% block title %}Inventory Overview{% endblock %}
{% block body %}
<div class="container">
<h1>Drink Inventory</h1>
{% if lowStock != [] %}
<div class="card">
<div class="card-header bg-danger">
<h5 class="card-title">LOW STOCK ALERT</h5>
</div>
<div class="card-body">
<ul>
{% for drinkType in lowStock %}
<li>{{ drinkType.name }} ({{ drinkType.currentStock }} / {{ drinkType.wantedStock }})</li>
{% endfor %}
</ul>
</div>
</div>
{% endif %}
<div class="card mt-3">
<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>Description</th>
<th>Current Stock</th>
<th>Wanted Stock</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for drinkType in drinkTypes %}
<tr>
<td>
<a href="{{ path('app_drink_type_show', {'id': drinkType.id}) }}">{{ drinkType.name }}</a>
</td>
<td>{{ drinkType.description }}</td>
<td>{{ drinkType.currentStock }}</td>
<td>{{ drinkType.wantedStock }}</td>
<td>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="mt-3">
<a href="{{ path('app_drink_type_index') }}" class="btn btn-primary">View All Drinks</a>
<a href="{{ path('app_drink_type_bulk_edit_stock') }}" class="btn btn-secondary">Mass Update Current Stock</a>
<a href="{{ path('app_drink_type_bulk_edit_wanted_stock') }}" class="btn btn-secondary">Mass Update Wanted Stock</a>
</div>
</div>
</div>
</div>
{% endblock %}