This commit is contained in:
lubiana 2025-06-14 18:32:57 +02:00
parent 16533b1495
commit ab0677c463
Signed by: lubiana
SSH key fingerprint: SHA256:vW1EA0fRR3Fw+dD/sM0K+x3Il2gSry6YRYHqOeQwrfk
14 changed files with 705 additions and 38 deletions

View file

@ -1,10 +1,10 @@
{% extends 'base.html.twig' %}
{% block title %}Bulk Edit Drink Type Wanted Stock{% endblock %}
{% block title %}Bulk Edit Drink Type Current Stock{% endblock %}
{% block body %}
<div class="container mt-4">
<h1>Bulk Edit Drink Type Wanted Stock</h1>
<h1>Bulk Edit Drink Type Current Stock</h1>
{% for message in app.flashes('success') %}
<div class="alert alert-success alert-dismissible fade show" role="alert">
@ -20,7 +20,7 @@
<thead>
<tr>
<th>Drink Type</th>
<th>Wanted Stock</th>
<th>Current Stock</th>
</tr>
</thead>
<tbody>
@ -31,8 +31,8 @@
{{ form_widget(drinkTypeForm.name) }}
</td>
<td>
{{ form_widget(drinkTypeForm.wantedStock) }}
{{ form_errors(drinkTypeForm.wantedStock) }}
{{ form_widget(drinkTypeForm.currentStock) }}
{{ form_errors(drinkTypeForm.currentStock) }}
</td>
</tr>
{% endfor %}

View file

@ -0,0 +1,49 @@
{% extends 'base.html.twig' %}
{% block title %}Bulk Edit Drink Type Wanted Stock{% endblock %}
{% block body %}
<div class="container mt-4">
<h1>Bulk Edit Drink Type Wanted Stock</h1>
{% for message in app.flashes('success') %}
<div class="alert alert-success alert-dismissible fade show" role="alert">
{{ message }}
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
</div>
{% endfor %}
{{ form_start(form) }}
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>Drink Type</th>
<th>Wanted Stock</th>
</tr>
</thead>
<tbody>
{% for drinkTypeForm in form.drinkTypes %}
<tr>
<td>
{{ form_widget(drinkTypeForm.id) }}
{{ form_widget(drinkTypeForm.name) }}
</td>
<td>
{{ form_widget(drinkTypeForm.wantedStock) }}
{{ form_errors(drinkTypeForm.wantedStock) }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="mt-3">
{{ form_widget(form.save) }}
</div>
{{ form_end(form) }}
</div>
{% endblock %}

View file

@ -37,6 +37,8 @@
</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>