get ready
This commit is contained in:
parent
ca9819a436
commit
6b0a478ca5
16 changed files with 395 additions and 124 deletions
49
templates/drink_type/bulk_edit_stock.html.twig
Normal file
49
templates/drink_type/bulk_edit_stock.html.twig
Normal 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 %}
|
|
@ -1,4 +0,0 @@
|
|||
<form method="post" action="{{ path('app_inventory_record_delete', {'id': inventory_record.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ inventory_record.id) }}">
|
||||
<button class="btn">Delete</button>
|
||||
</form>
|
|
@ -1,4 +0,0 @@
|
|||
{{ form_start(form) }}
|
||||
{{ form_widget(form) }}
|
||||
<button class="btn">{{ button_label|default('Save') }}</button>
|
||||
{{ form_end(form) }}
|
|
@ -1,7 +0,0 @@
|
|||
{{ form_start(form, {'attr': {'hx-post': form.vars.action, 'hx-target': '#htmxModalBody'}}) }}
|
||||
{{ form_widget(form) }}
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||
<button type="submit" class="btn btn-primary">{{ button_label|default('Save') }}</button>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
|
@ -1,13 +0,0 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Edit InventoryRecord{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Edit InventoryRecord</h1>
|
||||
|
||||
{{ include('inventory_record/_form.html.twig', {'button_label': 'Update'}) }}
|
||||
|
||||
<a href="{{ path('app_inventory_record_index') }}">back to list</a>
|
||||
|
||||
{{ include('inventory_record/_delete_form.html.twig') }}
|
||||
{% endblock %}
|
|
@ -1,41 +0,0 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}InventoryRecord index{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>InventoryRecord index</h1>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Quantity</th>
|
||||
<th>Timestamp</th>
|
||||
<th>CreatedAt</th>
|
||||
<th>UpdatedAt</th>
|
||||
<th>actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for inventory_record in inventory_records %}
|
||||
<tr>
|
||||
<td>{{ inventory_record.id }}</td>
|
||||
<td>{{ inventory_record.quantity }}</td>
|
||||
<td>{{ inventory_record.timestamp ? inventory_record.timestamp|date('Y-m-d H:i:s') : '' }}</td>
|
||||
<td>{{ inventory_record.createdAt ? inventory_record.createdAt|date('Y-m-d H:i:s') : '' }}</td>
|
||||
<td>{{ inventory_record.updatedAt ? inventory_record.updatedAt|date('Y-m-d H:i:s') : '' }}</td>
|
||||
<td>
|
||||
<a href="{{ path('app_inventory_record_show', {'id': inventory_record.id}) }}">show</a>
|
||||
<a href="{{ path('app_inventory_record_edit', {'id': inventory_record.id}) }}">edit</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="6">no records found</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ path('app_inventory_record_new') }}">Create new</a>
|
||||
{% endblock %}
|
|
@ -1,11 +0,0 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}New InventoryRecord{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Create new InventoryRecord</h1>
|
||||
|
||||
{{ include('inventory_record/_form.html.twig') }}
|
||||
|
||||
<a href="{{ path('app_inventory_record_index') }}">back to list</a>
|
||||
{% endblock %}
|
|
@ -1,38 +0,0 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}InventoryRecord{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>InventoryRecord</h1>
|
||||
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<td>{{ inventory_record.id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Quantity</th>
|
||||
<td>{{ inventory_record.quantity }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Timestamp</th>
|
||||
<td>{{ inventory_record.timestamp ? inventory_record.timestamp|date('Y-m-d H:i:s') : '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>CreatedAt</th>
|
||||
<td>{{ inventory_record.createdAt ? inventory_record.createdAt|date('Y-m-d H:i:s') : '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>UpdatedAt</th>
|
||||
<td>{{ inventory_record.updatedAt ? inventory_record.updatedAt|date('Y-m-d H:i:s') : '' }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ path('app_inventory_record_index') }}">back to list</a>
|
||||
|
||||
<a href="{{ path('app_inventory_record_edit', {'id': inventory_record.id}) }}">edit</a>
|
||||
|
||||
{{ include('inventory_record/_delete_form.html.twig') }}
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue