TICKET-008 (frontend): Foods library view — search, pagination, edit, delete, restore
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
import Dashboard from './components/Dashboard.svelte'
|
||||
import FoodSearch from './components/FoodSearch.svelte'
|
||||
import FoodEditor from './components/FoodEditor.svelte'
|
||||
import FoodLibrary from './components/FoodLibrary.svelte'
|
||||
import BarcodeScanner from './components/BarcodeScanner.svelte'
|
||||
|
||||
// Health check — every async view handles loading/error states (spec §8.2 rule 4)
|
||||
@@ -233,6 +234,9 @@
|
||||
<button type="button" class="fab scan-fab" onclick={() => { resetScanFlow(); appView.current = 'scan' }}>
|
||||
📷 Scan
|
||||
</button>
|
||||
<button type="button" class="target-btn" onclick={() => appView.current = 'foods'}>
|
||||
🍔 Foods
|
||||
</button>
|
||||
<button type="button" class="target-btn" onclick={openTargetForm}>
|
||||
🎯 Target
|
||||
</button>
|
||||
@@ -337,6 +341,9 @@
|
||||
{:else if appView.current === 'createFood'}
|
||||
<FoodEditor />
|
||||
|
||||
{:else if appView.current === 'foods'}
|
||||
<FoodLibrary />
|
||||
|
||||
{:else if appView.current === 'editMeal'}
|
||||
<FoodEditor mealId={mealEdit.foodId} />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user