CivicTechFredericton / mealplanner

Primary Meal Planner repo
MIT License
9 stars 18 forks source link

[#698] - Client users auto-assigned to duplicate meal plans #701

Closed jon-dalton closed 6 months ago

jon-dalton commented 6 months ago

Describe the technical changes contained in this PR personId 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?