feat(planner): add remove meal with undo; fix RecipePicker badge for neutral delta
- MealActionSheet: new onremove prop + Entfernen button (guarded by #if) - +page.svelte: handleRemoveMeal submits delete form, shows undo bar; undo re-adds via addSlot form; refactored handleUndo to undoCallback pattern; desktop day-detail panel also gets Entfernen button - RecipePicker: only show green +delta badge when scoreDelta > 0; neutral (scoreDelta = 0) shows no badge instead of ⚠ Variationskonflikt - Tests: page.test.ts remove-meal describe, RecipePicker neutral badge test Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -104,7 +104,7 @@
|
||||
{meta}
|
||||
</p>
|
||||
{/if}
|
||||
{#if !suggestion.hasConflict}
|
||||
{#if (suggestion.scoreDelta ?? 0) > 0}
|
||||
<span
|
||||
data-testid="badge-{suggestion.recipe.id}"
|
||||
data-type="good"
|
||||
@@ -112,7 +112,7 @@
|
||||
>
|
||||
↑ +{(suggestion.scoreDelta ?? 0).toFixed(1)} Punkte
|
||||
</span>
|
||||
{:else}
|
||||
{:else if suggestion.hasConflict}
|
||||
<span
|
||||
data-testid="badge-{suggestion.recipe.id}"
|
||||
data-type="warning"
|
||||
|
||||
Reference in New Issue
Block a user