Compare commits

..

2 commits

Author SHA1 Message Date
f816cb5b3e
add mono mode
All checks were successful
/ ls (pull_request) Successful in 1m42s
2025-07-14 19:08:17 +02:00
44c74fb393
add cart to order view
All checks were successful
/ ls (pull_request) Successful in 1m40s
2025-07-14 18:42:18 +02:00
5 changed files with 9 additions and 29 deletions

View file

@ -5,7 +5,6 @@ namespace App\Form;
use App\Entity\OrderItem;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\Extension\Core\Type\MoneyType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
@ -22,8 +21,6 @@ final class OrderItemFinalize extends AbstractType
->add(child: 'extras', options: [
'disabled' => true,
])
->add(child: 'menuItem', type: HiddenType::class, options: [
])
->add(child: 'createdBy', options: [
'disabled' => true,
])

View file

@ -12,7 +12,7 @@
</head>
<body>
<header class="mb-4">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<span class="navbar-brand">Futtern</span>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
@ -61,7 +61,7 @@
</div>
</nav>
</header>
<main class="container pb-5 pt-5">
<main class="container pb-5">
{% block body %}{% endblock %}
</main>
</body>

View file

@ -65,11 +65,7 @@
{% for itemForm in form.orderItems %}
<tr>
<td>{{ field_value(itemForm.createdBy) }}</td>
<td>
<a href="{{ path('app_menu_item_show', {'id': itemForm.menuItem.vars.value.id}) }}">
{{ field_value(itemForm.name) }}
</a>
</td>
<td>{{ field_value(itemForm.name) }}</td>
<td>{{ field_value(itemForm.extras) }}</td>
<td>{{ form_widget(itemForm.priceCents) }}</td>
<td>{{ form_widget(itemForm.isPaid) }}</td>
@ -99,9 +95,7 @@
<tr>
<td>{{ loop.index }}</td>
<td>{{ item.createdBy }}</td>
<td>
<a href="{{ path('app_menu_item_show', {'id': item.id}) }}">{{ item.name }}</a>
</td>
<td>{{ item.name }}</td>
<td>{{ item.extras }}</td>
<td>
{% if(food_order.isClosed) %}

View file

@ -20,27 +20,16 @@
<section class="mb-4">
<h2>known menuitems</h2>
<table class="table table-bordered w-auto">
<thead>
<tr>
<th>name</th>
<th>price</th>
</tr>
</thead>
<tbody>
<ul class="list-group list-group-flush">
{% for item in food_vendor.menuItems %}
<tr class="menu-item">
<td>
<li class="list-group-item">
<a href="{{ path('app_menu_item_show', {'id': item.id}) }}">{{ item.name }}</a>
{% if(item.aliasOf) %}
<span class="text-muted">(alias of: {{ item.aliasOf.name }})</span>
{% endif %}
</td>
<td>{{ (item.priceCents / 100)|format_currency('EUR') }}</td>
</tr>
</li>
{% endfor %}
</tbody>
</table>
</ul>
</section>
<div class="d-flex gap-2">

View file

@ -119,7 +119,7 @@ describe(FoodVendorController::class, function (): void {
)->text();
$this->assertSame('My Title', $nameNode);
$itemNodes = $crawler->filter('tr.menu-item');
$itemNodes = $crawler->filter('ul.list-group li.list-group-item');
$this->assertCount(4, $itemNodes);
});