diff --git a/CLAUDE.md b/CLAUDE.md
index 2820e7d..d01ce23 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -7,12 +7,13 @@
> **Plattform:** Olares One (Kubernetes), Repo und CI auf Gitea — kein Supabase,
> kein Vercel (E-0001). Eigene Gestaltung, nicht AImighty (E-0002).
> Verteilung über den Markt, Repo öffentlich (E-0005).
-> **Status:** 26.11.20 — alle neun Arbeitspakete aus `docs/PROJEKTSTART.md` sind gebaut:
+> **Status:** 26.11.21 — alle neun Arbeitspakete aus `docs/PROJEKTSTART.md` sind gebaut:
> Anmeldung (Passkeys, Kinder mit Gerät + PIN), Gerichte (Link, Kochbuchfoto, AI über den
> Olares Router), Wünschen, Plan, Einkaufsliste (Echtzeit, offline), Kochmodus mit
> Bewertung, Web-App; Einzahl bei Stück-Mengen (26.11.15), Preise und Kosten mit Ampel
> (V2a, 26.11.16), Olares Router als Standard (26.11.17), untere Leiste am iPhone (26.11.18),
-> Rolle „Jugendlich“ (26.11.19), Rezepte in einer Form (26.11.20). Offen sind V2b (Kassenbons)
+> Rolle „Jugendlich“ (26.11.19), Rezepte in einer Form (26.11.20),
+> Produkte je Gericht (26.11.21). Offen sind V2b (Kassenbons)
> und der Magic Link.
> **Letzte Aktualisierung:** 7. November 2026
@@ -336,6 +337,14 @@ Vorlagen ersetzt. `tests/seed.test.ts` prüft die Dateien. Ein Haushalt
durch `fromStyleReply`: **jede Zahl im neuen Text muss in der Quelle stehen**, sonst
gilt die Regel. Ergebnis ist ein Entwurf; ein Mensch speichert.
+## Produkte je Gericht (seit 26.11.21)
+
+- An `dish_ingredients`: `product` (Name), `product_pack` (Basiseinheit),
+ `product_cook_minutes` (Migration 0012) — je Gericht, nicht je Haushalt (Kai).
+ Die Kochzeit ersetzt den Timer eines Kochschritts, der die Zutat nennt
+ (`withProductTimers` in `lib/dishes.ts`, `timerFrom`). Einkaufsliste:
+ `productLabel` in `lib/shopping.ts`, Packung des Produkts statt der Standardgrößen.
+
## Rollen
- `admin`, `member`, `teen` (seit 26.11.19), `child`, `guest`. Wer was darf, steht nur
diff --git a/OlaresManifest.yaml b/OlaresManifest.yaml
index 11da9b8..2fc1f2f 100644
--- a/OlaresManifest.yaml
+++ b/OlaresManifest.yaml
@@ -21,7 +21,7 @@ metadata:
title: What's cooking?
description: The family decides together what's for dinner — and the shopping list writes itself. Runs entirely on your own box.
icon: https://git.aimighty.olares.de/aimighty/bilder/raw/branch/main/lunch/icon.png
- version: 26.11.20
+ version: 26.11.21
categories:
- Applications
@@ -61,7 +61,7 @@ permission:
appData: true
spec:
- versionName: '26.11.20'
+ versionName: '26.11.21'
featuredImage: https://git.aimighty.olares.de/aimighty/bilder/raw/branch/main/lunch/icon.png
promoteImage:
diff --git a/app/(app)/gerichte/[id]/bearbeiten/page.tsx b/app/(app)/gerichte/[id]/bearbeiten/page.tsx
index 9381319..9bd5abc 100644
--- a/app/(app)/gerichte/[id]/bearbeiten/page.tsx
+++ b/app/(app)/gerichte/[id]/bearbeiten/page.tsx
@@ -39,6 +39,7 @@ export default async function EditDishPage({ params }: { params: Promise<{ id: s
ingredient: { id: i.ingredientId, name: i.name, unit: i.unit },
qty: i.qtyPerPortion * PORTIONS,
note: i.note,
+ product: i.product,
})),
steps: dish.steps.map((s) => ({ text: s.text, section: s.section, timerMinutes: s.timerSeconds ? Math.round(s.timerSeconds / 60) : null })),
}}
diff --git a/components/cooking/cooking-mode.tsx b/components/cooking/cooking-mode.tsx
index 47ad84d..da68d3a 100644
--- a/components/cooking/cooking-mode.tsx
+++ b/components/cooking/cooking-mode.tsx
@@ -13,7 +13,7 @@ import { formatQuantity, type BaseUnit } from "@/lib/units";
import { cn } from "@/lib/utils";
type Ingredient = { ingredientId: string; name: string; forms: { one: string; other: string } | null; qtyPerPortion: number; unit: BaseUnit; note: string | null };
-type Step = { section: Section; text: string; timerSeconds: number | null; ingredientIds: string[] };
+type Step = { section: Section; text: string; timerSeconds: number | null; ingredientIds: string[]; timerFrom?: string };
type Running = { step: number; endsAt: number | null; left: number; done: boolean };
const mmss = (s: number) => `${Math.floor(s / 60)}:${String(Math.max(0, Math.round(s % 60))).padStart(2, "0")}`;
@@ -244,6 +244,7 @@ export function CookingMode({
onToggle={() => toggleTimer(index, step.timerSeconds!)}
/>
) : null}
+ {step.timerSeconds && step.timerFrom ?
{t("timerFromProduct", { product: step.timerFrom })}
: null}
) : null}
diff --git a/components/dishes/dish-form.tsx b/components/dishes/dish-form.tsx
index 36a6298..0b5e7af 100644
--- a/components/dishes/dish-form.tsx
+++ b/components/dishes/dish-form.tsx
@@ -1,6 +1,6 @@
"use client";
-import { ArrowDown, ArrowUp, Plus, Sparkles, X, Wand2 } from "lucide-react";
+import { ArrowDown, ArrowUp, Plus, Sparkles, X, Package, Wand2 } from "lucide-react";
import { useRouter } from "next/navigation";
import { useTranslations } from "next-intl";
import { useEffect, useId, useRef, useState } from "react";
@@ -14,7 +14,8 @@ import { cn } from "@/lib/utils";
import { SECTIONS, type Section } from "@/lib/recipe-style";
type Picked = { id: string; name: string; unit: BaseUnit };
-type Row = { key: number; ingredient: Picked | null; qty: string; unit: string; note: string };
+// Produkt (optional): Name, Packung in der Einheit der Zeile, Kochzeit laut Packung.
+type Row = { key: number; ingredient: Picked | null; qty: string; unit: string; note: string; product: string; pack: string; cook: string; open: boolean };
type StepRow = { key: number; text: string; timer: string; section: Section | "" };
export type DishFormValue = {
@@ -26,7 +27,13 @@ export type DishFormValue = {
effortMinutes: number | null;
isTrial: boolean;
// Beim Import kann die Menge fehlen (passt nicht zur Zutat) — dann trägt die Person sie ein.
- ingredients: { ingredient: Picked; qty: number | null; unit?: string | null; note: string | null }[];
+ ingredients: {
+ ingredient: Picked;
+ qty: number | null;
+ unit?: string | null;
+ note: string | null;
+ product?: { name: string; pack: number | null; cookMinutes: number | null } | null;
+ }[];
steps: { text: string; timerMinutes: number | null; section?: Section | null }[];
sourceUrl?: string | null;
imageUrl?: string | null;
@@ -69,8 +76,12 @@ export function DishForm({ initial }: { initial?: DishFormValue }) {
qty: i.qty !== null ? formatQty(i.qty) : "",
unit: i.unit && UNITS_FOR[i.ingredient.unit].includes(i.unit) ? i.unit : i.ingredient.unit,
note: i.note ?? "",
+ product: i.product?.name ?? "",
+ pack: i.product?.pack ? formatQty(i.product.pack) : "",
+ cook: i.product?.cookMinutes ? String(i.product.cookMinutes) : "",
+ open: !!i.product,
}))
- : [{ key: next(), ingredient: null, qty: "", unit: "g", note: "" }],
+ : [{ key: next(), ingredient: null, qty: "", unit: "g", note: "", product: "", pack: "", cook: "", open: false }],
);
const [steps, setSteps] = useState(
initial?.steps.length
@@ -131,7 +142,19 @@ export function DishForm({ initial }: { initial?: DishFormValue }) {
}
const ingredients = rows
.filter((r) => r.ingredient && r.qty.trim())
- .map((r) => ({ ingredientId: r.ingredient!.id, qty: parseNumber(r.qty) ?? -1, unit: r.unit, note: r.note.trim() || null }));
+ .map((r) => ({
+ ingredientId: r.ingredient!.id,
+ qty: parseNumber(r.qty) ?? -1,
+ unit: r.unit,
+ note: r.note.trim() || null,
+ product: r.product.trim()
+ ? {
+ name: r.product.trim(),
+ pack: r.pack.trim() ? (parseNumber(r.pack) ?? null) : null,
+ cookMinutes: r.cook.trim() ? Math.round(parseNumber(r.cook) ?? 0) || null : null,
+ }
+ : null,
+ }));
if (!title.trim() || !n || n < 1 || ingredients.some((i) => !(i.qty > 0))) {
setError("invalid");
return;
@@ -294,10 +317,45 @@ export function DishForm({ initial }: { initial?: DishFormValue }) {
maxLength={120}
onChange={(e) => update(row.key, { note: e.target.value })}
/>
+ {row.open ? (
+
+ ) : (
+
+ )}
))}
-