This commit is contained in:
lubiana 2025-06-08 19:25:02 +02:00
parent b052697417
commit 43ca79f650
Signed by: lubiana
SSH key fingerprint: SHA256:vW1EA0fRR3Fw+dD/sM0K+x3Il2gSry6YRYHqOeQwrfk
14 changed files with 292 additions and 57 deletions

View file

@ -0,0 +1,4 @@
<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>

View file

@ -0,0 +1,4 @@
{{ form_start(form) }}
{{ form_widget(form) }}
<button class="btn">{{ button_label|default('Save') }}</button>
{{ form_end(form) }}

View file

@ -0,0 +1,13 @@
{% 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 %}

View file

@ -0,0 +1,41 @@
{% 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 %}

View file

@ -0,0 +1,11 @@
{% 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 %}

View file

@ -0,0 +1,38 @@
{% 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 %}