Add blocked_date table (migration 5), model, and store CRUD methods. Add management page at /blocked with add/delete functionality. Add nav link 'Terminy zablokowane' with event_busy icon. Pass blocked dates to order form as JSON data attribute. On form submit, if the order has special cakes and the date is blocked, show a confirm() dialog warning the user.
31 lines
1.1 KiB
Text
31 lines
1.1 KiB
Text
package templates
|
|
|
|
templ Nav() {
|
|
<div class="brand">
|
|
<button type="button" class="collapse-btn" onclick="toggleSidebar()" title="Zwiń / Rozwiń">
|
|
<span class="material-symbols-outlined">menu</span>
|
|
</button>
|
|
<div class="brand-text">
|
|
<h1>Cake Order</h1>
|
|
<p>Tracker</p>
|
|
</div>
|
|
</div>
|
|
<a href="/order" class="cta" hx-get="/order" hx-target="#main" hx-swap="outerHTML" hx-push-url="true">
|
|
<span class="material-symbols-outlined">add</span>
|
|
<span>Nowe zamówienie</span>
|
|
</a>
|
|
<nav>
|
|
<a href="/orders" class="link" hx-get="/orders" hx-target="#main" hx-swap="outerHTML" hx-push-url="true">
|
|
<span class="material-symbols-outlined">dashboard</span>
|
|
<span>Panel główny</span>
|
|
</a>
|
|
<a href="/cakes" class="link" hx-get="/cakes" hx-target="#main" hx-swap="outerHTML" hx-push-url="true">
|
|
<span class="material-symbols-outlined">inventory_2</span>
|
|
<span>Katalog</span>
|
|
</a>
|
|
<a href="/blocked" class="link" hx-get="/blocked" hx-target="#main" hx-swap="outerHTML" hx-push-url="true">
|
|
<span class="material-symbols-outlined">event_busy</span>
|
|
<span>Terminy zablokowane</span>
|
|
</a>
|
|
</nav>
|
|
}
|