fix: Offene Lebensmittel nach Listen-Import wieder anzeigen
Deploy Development / deploy (push) Successful in 1m1s
Build Test / pytest-backend (push) Failing after 2s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 27s

Unmapped ohne Kreuzjoin, Listen-GET kurz, Rebuild im Hintergrund.
Tandoor-Zugang (URL/Token) in den Einstellungen mit ausliefern.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-09-13 10:36:08 +02:00
1 parent fa542e0fb9
commit d6838abda7
23 files changed
+786 -114

No files matched your search

+11 -4
View File
@@ -13,10 +13,17 @@ export default function FoodRecipeEditor({ recipes, learned, onChanged }) {
setOpen(true)
}
const startEdit = (r) => {
setEditing(r)
const startEdit = async (r) => {
setError(null)
setOpen(true)
try {
const full = (r.ingredients && r.ingredients.length) || r.ingredient_count === 0
? r
: await api.getNutritionRecipe(r.id)
setEditing(full)
setOpen(true)
} catch (e) {
setError(e.message)
}
}
const save = async (body) => {
@@ -53,7 +60,7 @@ export default function FoodRecipeEditor({ recipes, learned, onChanged }) {
<div key={r.id} style={{ borderTop: '1px solid var(--border)', padding: '8px 0', marginTop: 8 }}>
<div style={{ fontWeight: 600 }}>{r.name_raw}</div>
<div style={{ fontSize: 12, color: 'var(--text3)' }}>
{(r.ingredients || []).length} Zutaten · {r.portions || 1} Portionen
{r.ingredient_count ?? (r.ingredients || []).length} Zutaten · {r.portions || 1} Portionen
{r.source === 'manual' ? ' · selbst angelegt' : ''}
</div>
<div style={{ display: 'flex', gap: 8, marginTop: 6 }}>