feat(meal-plan) add recipe from overview dialog; pencil icon to navigate to list view #13

Merged
araemer merged 4 commits from meal-plan-overview-add-dish into stage 2026-08-09 06:16:44 +00:00
Owner

Summary

  • Clicking "Rezept hinzufügen" in the overview grid now opens the add-dish dialog inline instead of switching to list view
  • A pencil icon appears in each day tile header (edit mode only) and navigates to that day in list view for full editing (note, servings, delete)
  • MealPlanPage handles the API call for overview adds and patches the days map on success so the overview updates immediately without a full page reload

Test plan

  • In overview: click "Rezept hinzufügen" — dialog opens, select a recipe, confirm — dish appears in the tile
  • In overview: click pencil icon — switches to list view and scrolls to that day
  • Read-only users see neither the add link nor the pencil icon
  • Adding a second recipe to a day that already has one works correctly

🤖 Generated with Claude Code

## Summary - Clicking "Rezept hinzufügen" in the overview grid now opens the add-dish dialog inline instead of switching to list view - A pencil icon appears in each day tile header (edit mode only) and navigates to that day in list view for full editing (note, servings, delete) - `MealPlanPage` handles the API call for overview adds and patches the `days` map on success so the overview updates immediately without a full page reload ## Test plan - [ ] In overview: click "Rezept hinzufügen" — dialog opens, select a recipe, confirm — dish appears in the tile - [ ] In overview: click pencil icon — switches to list view and scrolls to that day - [ ] Read-only users see neither the add link nor the pencil icon - [ ] Adding a second recipe to a day that already has one works correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code)
- Clicking "Rezept hinzufügen" in the overview grid now opens the add-dish
  dialog inline instead of redirecting to list view
- A pencil icon in each day tile header navigates to and scrolls to that day
  in list view for full editing (note, servings, delete)
- MealPlanPage owns the API call for overview adds and patches the days map
  on success so the overview updates without a full reload

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
onConfirm now returns Promise<void>; the popup shows "Wird hinzugefügt…" and
disables all controls while the API call is in flight. The calendar awaits the
promise before closing the dialog, so the days map is always up to date before
the user can switch to list view via the pencil icon.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Both views are always in the DOM (CSS toggle). MealPlanDayColumn's
useMealPlanDayAutoSave reads initialDay only once on mount, so updates
to the days map after an overview add were silently ignored. Keying on
the day's version forces a remount with the fresh initialDay whenever
the server state changes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
araemer merged commit d534c39899 into stage 2026-08-09 06:16:44 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
araemer/recipe-app!13
No description provided.