TICKET-007 (frontend): save-as-meal flow, collapsible meal rows, unpack, meal component editor

This commit is contained in:
Craig
2026-07-26 17:27:15 +01:00
parent a8aed9a84f
commit 7db64840f7
9 changed files with 741 additions and 33 deletions
+4 -1
View File
@@ -8,7 +8,7 @@
import { api } from './lib/api.js'
import {
currentDate, appView, goPrevDay, goNextDay, setDate,
navigateTo, addLogEntryToStore, refreshDayData
navigateTo, addLogEntryToStore, refreshDayData, mealEdit
} from './lib/stores.svelte.js'
import { formatDate, formatKcal, defaultQuantity, previewCalories } from './lib/format.js'
import Dashboard from './components/Dashboard.svelte'
@@ -337,6 +337,9 @@
{:else if appView.current === 'createFood'}
<FoodEditor />
{:else if appView.current === 'editMeal'}
<FoodEditor mealId={mealEdit.foodId} />
{:else if appView.current === 'targetForm'}
<div class="target-form-view">
<button type="button" class="back-btn" onclick={() => appView.current = 'dashboard'}> Back</button>