User Story:
As a user, I want to track my food intake and set a calorie goal for better control over my diet. I should be able to search for food items, add them with their respective weights, and view a summary of consumed and remaining calories. Additionally, I should be able to edit and save my calorie goal.
Acceptance Criteria
[ ] The calorie goal section should display the current calorie goal or allow me to edit it.
[ ] If I am editing the calorie goal, I should see a text field to enter the new goal and a "Save Goal" button to save the changes.If I am not editing the calorie goal, I should see the current calorie goal displayed along with an "Edit Goal" button.
[ ] When I search for a food item by entering its name in the input field, relevant food suggestions should be displayed in a dropdown list.
[ ] I should be able to select a food item from the list by clicking on it.
[ ] Once a food item is selected, I should see its name displayed as the "Selected Food".
[ ] I should be able to enter the weight of the selected food item in grams in a text field.
[ ] After entering the weight, I should be able to click the "Add Food" button to add the selected food with the specified weight.
[ ] If I haven't selected a food item or the weight is not valid (less than or equal to 0), an error message should be displayed.
[ ] After successfully adding a food item, its name and weight should appear in the "Food List" section.
[ ] If no foods have been added yet, a message should be displayed stating "No foods added yet."
[ ] The "Energy Summary" section should display the total calories consumed and the remaining calories to reach the goal.
[ ] Any errors that occur during the process, such as searching for food or adding food, should be displayed as error messages.
User Story: As a user, I want to track my food intake and set a calorie goal for better control over my diet. I should be able to search for food items, add them with their respective weights, and view a summary of consumed and remaining calories. Additionally, I should be able to edit and save my calorie goal.
Acceptance Criteria