This commit is contained in:
lubiana 2024-02-05 16:16:43 +01:00
commit 203233d2ed
71 changed files with 8213 additions and 0 deletions

View file

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

17
templates/base.html.twig Normal file
View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>{% block title %}Welcome!{% endblock %}</title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">
<link rel="stylesheet" href="/css/simple.min.css">
{% block stylesheets %}
{% endblock %}
{% block javascripts %}
{% endblock %}
</head>
<body>
{% block body %}{% endblock %}
</body>
</html>

View file

@ -0,0 +1,4 @@
<form method="post" action="{{ path('app_food_order_delete', {'id': food_order.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ food_order.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 FoodOrder{% endblock %}
{% block body %}
<h1>Edit FoodOrder</h1>
{{ include('food_order/_form.html.twig', {'button_label': 'Update'}) }}
<a href="{{ path('app_food_order_index') }}">back to list</a>
{{ include('food_order/_delete_form.html.twig') }}
{% endblock %}

View file

@ -0,0 +1,39 @@
{% extends 'base.html.twig' %}
{% block title %}FoodOrder index{% endblock %}
{% block body %}
<h1>FoodOrder index</h1>
<table class="table">
<thead>
<tr>
<th>StartedByName</th>
<th>Id</th>
<th>StartedAt</th>
<th>ClosedAt</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for food_order in food_orders %}
<tr>
<td>{{ food_order.startedByName }}</td>
<td>{{ food_order.id }}</td>
<td>{{ food_order.startedAt ? food_order.startedAt|date('Y-m-d H:i:s') : '' }}</td>
<td>{{ food_order.closedAt ? food_order.closedAt|date('Y-m-d H:i:s') : '' }}</td>
<td>
<a href="{{ path('app_food_order_show', {'id': food_order.id}) }}">show</a>
<a href="{{ path('app_food_order_edit', {'id': food_order.id}) }}">edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="5">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_food_order_new') }}">Create new</a>
{% endblock %}

View file

@ -0,0 +1,11 @@
{% extends 'base.html.twig' %}
{% block title %}New FoodOrder{% endblock %}
{% block body %}
<h1>Create new FoodOrder</h1>
{{ include('food_order/_form.html.twig') }}
<a href="{{ path('app_food_order_index') }}">back to list</a>
{% endblock %}

View file

@ -0,0 +1,85 @@
{% extends 'base.html.twig' %}
{% block title %}FoodOrder{% endblock %}
{% block body %}
<h1>FoodOrder</h1>
<table class="table">
<tbody>
<tr>
<th>StartedByName</th>
<td>{{ food_order.startedByName }}</td>
</tr>
<tr>
<th>Id</th>
<td>{{ food_order.id }}</td>
</tr>
<tr>
<th>StartedAt</th>
<td>{{ food_order.startedAt ? food_order.startedAt|date('Y-m-d H:i:s') : '' }}</td>
</tr>
<tr>
<th>ClosedAt</th>
<td>{{ food_order.closedAt ? food_order.closedAt|date('Y-m-d H:i:s') : '' }}</td>
</tr>
</tbody>
</table>
<table class="table">
<thead>
<tr>
<th>Name(s)</th>
<th>possible price</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for lel in food_order.groupedOrderItems %}
<tr>
<td>
{{ lel.item.menuItem.aliases|map(i => i.name)|join(' / ') }}
</td>
<td>
{{ lel.item.menuItem.price }}
</td>
<td>
{{ lel.amount }} |
<a href="{{ path('app_foodorder_add_item', {foodOrder: food_order.id, menuItem: lel.item.menuItem.id}) }}">+1</a> |
<a href="{{ path('app_foodorder_remove_item', {foodOrder: food_order.id, orderItem: lel.item.id}) }}">-1</a> |
</td>
</tr>
{% endfor %}
</tbody>
</tbody>
</table>
<table class="table">
<thead>
<tr>
<th>Name(s)</th>
<th>possible price</th>
<th>actions</th>
</tr>
</thead>
{% for item in menu_items %}
<tr>
<td>
{{ item.aliases|map(i => i.name)|join(' / ') }}
</td>
<td>
{{ item.price }}
</td>
<td>
<a href="{{ path('app_foodorder_add_item', {foodOrder: food_order.id, menuItem: item.id}) }}">join</a>
</td>
</tr>
{% endfor %}
</table>
<a href="{{ path('app_food_order_index') }}">back to list</a>
<a href="{{ path('app_food_order_edit', {'id': food_order.id}) }}">edit</a>
{{ include('food_order/_delete_form.html.twig') }}
{% endblock %}

View file

@ -0,0 +1,35 @@
{% extends 'base.html.twig' %}
{% block title %}Futtern{% endblock %}
{% block body %}
<h1>Open Orders</h1>
<table class="table">
<thead>
<tr>
<th>StartedBy</th>
<th>Vendor</th>
<th>StartedAt</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for order in orders %}
<tr>
<td>{{ order.startedByName }}</td>
<td>{{ order.vendor.name }}</td>
<td>{{ order.startedAt|date("Y-m-d H:i") }}</td>
<td><a href="{{ path('app_food_order_show', {'id': order.id}) }}">show</a></td>
</tr>
{% else %}
<tr>
<td colspan="3">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
<h2>New Order:</h2>
{{ include('_form.html.twig') }}
{% endblock %}

View file

@ -0,0 +1,4 @@
<form method="post" action="{{ path('app_vendor_delete', {'id': vendor.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ vendor.id) }}">
<button class="btn">Delete</button>
</form>

4
templates/vendor/_form.html.twig vendored Normal file
View file

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

13
templates/vendor/edit.html.twig vendored Normal file
View file

@ -0,0 +1,13 @@
{% extends 'base.html.twig' %}
{% block title %}Edit Vendor{% endblock %}
{% block body %}
<h1>Edit Vendor</h1>
{{ include('vendor/_form.html.twig', {'button_label': 'Update'}) }}
<a href="{{ path('app_vendor_index') }}">back to list</a>
{{ include('vendor/_delete_form.html.twig') }}
{% endblock %}

35
templates/vendor/index.html.twig vendored Normal file
View file

@ -0,0 +1,35 @@
{% extends 'base.html.twig' %}
{% block title %}Vendor index{% endblock %}
{% block body %}
<h1>Vendor index</h1>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>Name</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for vendor in vendors %}
<tr>
<td>{{ vendor.id }}</td>
<td>{{ vendor.name }}</td>
<td>
<a href="{{ path('app_vendor_show', {'id': vendor.id}) }}">show</a>
<a href="{{ path('app_vendor_edit', {'id': vendor.id}) }}">edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="3">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_vendor_new') }}">Create new</a>
{% endblock %}

11
templates/vendor/new.html.twig vendored Normal file
View file

@ -0,0 +1,11 @@
{% extends 'base.html.twig' %}
{% block title %}New Vendor{% endblock %}
{% block body %}
<h1>Create new Vendor</h1>
{{ include('vendor/_form.html.twig') }}
<a href="{{ path('app_vendor_index') }}">back to list</a>
{% endblock %}

26
templates/vendor/show.html.twig vendored Normal file
View file

@ -0,0 +1,26 @@
{% extends 'base.html.twig' %}
{% block title %}Vendor{% endblock %}
{% block body %}
<h1>Vendor</h1>
<table class="table">
<tbody>
<tr>
<th>Id</th>
<td>{{ vendor.id }}</td>
</tr>
<tr>
<th>Name</th>
<td>{{ vendor.name }}</td>
</tr>
</tbody>
</table>
<a href="{{ path('app_vendor_index') }}">back to list</a>
<a href="{{ path('app_vendor_edit', {'id': vendor.id}) }}">edit</a>
{{ include('vendor/_delete_form.html.twig') }}
{% endblock %}