Skip to content

MealList saveEdit drops component_name / portion_unit / custom_food_id on compound save #22

Description

@KrishP147

Found by the planner while briefing #7. In frontend/src/components/MealList.jsx saveEdit, the per-component update only writes base_* and portion_size, so a component replaced via handleReplaceFood (new name / custom_food_id) keeps its OLD name and link after Save Changes.

Fix: include component_name, portion_unit and custom_food_id in the component update payload; add a test that replaces a component then saves and asserts the update payload carries the new name. Land after #7 (same file).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions