Add menu item allergens, drop nav Help link, animate customizer price

- Menu items can now list allergens (shared catalog + join table),
  shown on the menu grid and item detail pages when applicable, and
  editable from the admin menu item form.
- Removed the top-nav "Help" link now that the footer links to it.
- The item customization page's price now uses the sliding
  AnimatedNumber, matching the basket line price.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-17 11:50:17 +02:00
co-authored by Claude Sonnet 5
parent 917fc275f9
commit 8481032e30
20 changed files with 1141 additions and 27 deletions
+12 -3
View File
@@ -2,10 +2,14 @@ import { createFileRoute, useNavigate } from '@tanstack/react-router'
import { MenuItemForm } from '#/components/admin/MenuItemForm.tsx'
import { withAdminGuard } from '#/lib/admin-guard.ts'
import { createMenuItem, getMachineTagOptions } from '#/server/menu-admin.ts'
import {
createMenuItem,
getAllergenOptions,
getMachineTagOptions,
} from '#/server/menu-admin.ts'
const NewMenuItemRoute = () => {
const machineTags = Route.useLoaderData()
const { machineTags, allergenOptions } = Route.useLoaderData()
const navigate = useNavigate()
return (
@@ -13,6 +17,7 @@ const NewMenuItemRoute = () => {
<h1>Add menu item</h1>
<MenuItemForm
machineTags={machineTags}
allergenOptions={allergenOptions}
submitLabel="Create item"
onSubmit={async (input) => {
await createMenuItem({ data: input })
@@ -24,6 +29,10 @@ const NewMenuItemRoute = () => {
}
export const Route = createFileRoute('/admin/menu/new')({
loader: () => withAdminGuard(() => getMachineTagOptions()),
loader: () =>
withAdminGuard(async () => ({
machineTags: await getMachineTagOptions(),
allergenOptions: await getAllergenOptions(),
})),
component: NewMenuItemRoute,
})