CivicTechFredericton / mealplanner

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

[#698] - Added personId to duplicateMealPlanGQL mutation and check for role on backend #706

Closed jon-dalton closed 5 months ago

jon-dalton commented 5 months ago

Describe the technical changes contained in this PR Adds the personId in the GQL mutation and added a role and id check in a migration when duplicating meal plans

Previous behaviour Before duplicate plans wouldn't add the current person to the duplicate plans if they were a client, and as a client they can't add their name themselves.

New behaviour Now persons are automatically added to the duplicate. Non-client accounts such as admin or meal designer continue to have no user assigned.

Related issues addressed by this PR Fixes [#698]

Important notes There is potentially a separate bug where personId is passed implicitly. This will have to be addressed at a later point.

Have the following been addressed?