Compare commits
3 commits
f816cb5b3e
...
a8db69786a
Author | SHA1 | Date | |
---|---|---|---|
a8db69786a | |||
feeb4aca61 | |||
994d837de9 |
8 changed files with 53 additions and 11 deletions
|
@ -1,6 +1,11 @@
|
|||
// Sparkle effect on mouse move
|
||||
document.addEventListener('mousemove', function (e) {
|
||||
const emojis = ['✨', '💖', '🌟', '💅', '🦄', '🎉', '🌈'];
|
||||
let emojis = ['✨', '💖', '🌟', '💅', '🦄', '🎉', '🌈'];
|
||||
const htmlElement = document.documentElement;
|
||||
|
||||
if (htmlElement.getAttribute('data-website-mode') === 'mono') {
|
||||
emojis = ['🦇', '🦹', '🌙', '⚰️', '🕯️'];
|
||||
}
|
||||
const sparkle = document.createElement('div');
|
||||
sparkle.className = 'emoji-footprint';
|
||||
sparkle.textContent = emojis[Math.floor(Math.random() * emojis.length)];
|
||||
|
|
|
@ -307,6 +307,10 @@
|
|||
animation: discoFlash 0.3s infinite, wiggle 0.2s infinite;
|
||||
}
|
||||
|
||||
[data-website-mode="mono"] body {
|
||||
filter: grayscale(1);
|
||||
}
|
||||
|
||||
/* Enhanced mode styles (for future use) */
|
||||
[data-website-mode="enhanced"] .btn {
|
||||
background: linear-gradient(45deg, var(--bs-pink), var(--bs-purple), var(--bs-cyan), var(--bs-yellow), var(--bs-green), var(--bs-orange), var(--bs-red));
|
||||
|
|
|
@ -5,6 +5,7 @@ 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;
|
||||
|
@ -21,6 +22,8 @@ final class OrderItemFinalize extends AbstractType
|
|||
->add(child: 'extras', options: [
|
||||
'disabled' => true,
|
||||
])
|
||||
->add(child: 'menuItem', type: HiddenType::class, options: [
|
||||
])
|
||||
->add(child: 'createdBy', options: [
|
||||
'disabled' => true,
|
||||
])
|
||||
|
|
|
@ -25,7 +25,7 @@ final class FoodOrderRepository extends ServiceEntityRepository
|
|||
public function findLatestEntries(int $page = 1, int $pagesize = 10, int $days = 4): array
|
||||
{
|
||||
|
||||
$result = $this->createQueryBuilder('alias')
|
||||
$result = $this->createQueryBuilder('alias')
|
||||
->orderBy('alias.id', 'DESC')
|
||||
->setFirstResult(($page - 1) * $pagesize)
|
||||
->setMaxResults($pagesize)
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<header class="mb-4">
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
|
||||
<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">
|
||||
|
@ -26,6 +26,10 @@
|
|||
<li class="nav-item"><a class="nav-link" href="https://git.hannover.ccc.de/lubiana/futtern/issues/new" target="_blank">Create Issue</a></li>
|
||||
</ul>
|
||||
<div class="btn-group ms-auto" role="group" aria-label="Mode selection">
|
||||
<input type="radio" class="btn-check" name="mode" id="mono" autocomplete="off">
|
||||
<label class="btn btn-outline-primary" for="mono">
|
||||
Mono
|
||||
</label>
|
||||
<input type="radio" class="btn-check" name="mode" id="normal" autocomplete="off" checked>
|
||||
<label class="btn btn-outline-primary" for="normal">
|
||||
Normal
|
||||
|
@ -57,7 +61,7 @@
|
|||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
<main class="container pb-5">
|
||||
<main class="container pb-5 pt-5">
|
||||
{% block body %}{% endblock %}
|
||||
</main>
|
||||
</body>
|
||||
|
|
|
@ -15,6 +15,15 @@
|
|||
<th>Vendorphone</th>
|
||||
<td>{{ food_order.foodVendor.phone }}</td>
|
||||
</tr>
|
||||
{% if food_order.foodVendor.menuLink != '' %}
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<a href="{{ food_order.foodVendor.menuLink }}" target="_blank">
|
||||
External link to Menu
|
||||
</a>
|
||||
</th>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<th>Created By</th>
|
||||
<td>{{ food_order.createdBy }}</td>
|
||||
|
@ -56,7 +65,11 @@
|
|||
{% for itemForm in form.orderItems %}
|
||||
<tr>
|
||||
<td>{{ field_value(itemForm.createdBy) }}</td>
|
||||
<td>{{ field_value(itemForm.name) }}</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.extras) }}</td>
|
||||
<td>{{ form_widget(itemForm.priceCents) }}</td>
|
||||
<td>{{ form_widget(itemForm.isPaid) }}</td>
|
||||
|
@ -86,7 +99,9 @@
|
|||
<tr>
|
||||
<td>{{ loop.index }}</td>
|
||||
<td>{{ item.createdBy }}</td>
|
||||
<td>{{ item.name }}</td>
|
||||
<td>
|
||||
<a href="{{ path('app_menu_item_show', {'id': item.id}) }}">{{ item.name }}</a>
|
||||
</td>
|
||||
<td>{{ item.extras }}</td>
|
||||
<td>
|
||||
{% if(food_order.isClosed) %}
|
||||
|
|
|
@ -20,16 +20,27 @@
|
|||
|
||||
<section class="mb-4">
|
||||
<h2>known menuitems</h2>
|
||||
<ul class="list-group list-group-flush">
|
||||
<table class="table table-bordered w-auto">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>name</th>
|
||||
<th>price</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in food_vendor.menuItems %}
|
||||
<li class="list-group-item">
|
||||
<tr class="menu-item">
|
||||
<td>
|
||||
<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 %}
|
||||
</li>
|
||||
</td>
|
||||
<td>{{ (item.priceCents / 100)|format_currency('EUR') }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<div class="d-flex gap-2">
|
||||
|
|
|
@ -119,7 +119,7 @@ describe(FoodVendorController::class, function (): void {
|
|||
)->text();
|
||||
$this->assertSame('My Title', $nameNode);
|
||||
|
||||
$itemNodes = $crawler->filter('ul.list-group li.list-group-item');
|
||||
$itemNodes = $crawler->filter('tr.menu-item');
|
||||
|
||||
$this->assertCount(4, $itemNodes);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue