Describe the technical changes contained in this PRpersonId was added to MealPlansQuery and duplciateMealPlans methods updated to include personId as an optional parameter. MealPlanCard now has a conditional to check for role and add personId parameter appropriately. No migration necessary as duplicate_meal_plan already looks for p_id.
Previous behaviour
Meal plans would have no user assigned when duplicated. Client users could not change this.
New behaviour
If current user is a client then they are auto-assigned to duplicate meal plan; otherwise behaviour is same as before.
Related issues addressed by this PR
Fixes #698
Have the following been addressed?
[ ] Have test cases been created for all of the changes?
[ ] Do all of the test cases pass?
[ ] Has the testing been done using the default docker-compose environment?
[ ] Are documentation changes required?
[ ] Does this change break or alter existing behaviour?
Describe the technical changes contained in this PR
personId
was added toMealPlansQuery
andduplciateMealPlans
methods updated to includepersonId
as an optional parameter.MealPlanCard
now has a conditional to check for role and addpersonId
parameter appropriately. No migration necessary asduplicate_meal_plan
already looks forp_id
.Previous behaviour Meal plans would have no user assigned when duplicated. Client users could not change this.
New behaviour If current user is a client then they are auto-assigned to duplicate meal plan; otherwise behaviour is same as before.
Related issues addressed by this PR Fixes #698
Have the following been addressed?