uwblueprint / sistering

Sistering's volunteer scheduling and management web application.
https://volunteer.sistering.org
8 stars 0 forks source link

Fix update user resolver to exclude branches as it is only changed by super admin via other resolvers #665

Closed MatoPlus closed 2 years ago

MatoPlus commented 2 years ago

Ticket link

Closes #664

Implementation description

Steps to test

  1. Login to user with a branch, update profile, user branches still persist and is no longer cleared

What should reviewers focus on?

Checklist

github-actions[bot] commented 2 years ago

Visit the preview URL for this PR (updated for commit 533821a):

https://sistering-dev--pr665-rickson-edit-profile-1vpf3ga1.web.app

(expires Tue, 06 Sep 2022 15:59:19 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

twilkhoo commented 2 years ago

Tested locally with Prisma Studio, everything works great! One question not of concern though- when creating accounts (in createAccount of AccountForm.tsx), branches is still set to [] but this makes sense since users only get assigned branches by super admins AFTER their account is created right?

MatoPlus commented 2 years ago

@briantu

Getting an error when I click the "Save Changes" button in the edit account page for volunteer. @MatoPlus Can you see if this is related to your changes?

image

Whoops, forgot to mention that you have to test locally since preview always use staging backend changes.

MatoPlus commented 2 years ago

Tested locally with Prisma Studio, everything works great! One question not of concern though- when creating accounts (in createAccount of AccountForm.tsx), branches is still set to [] but this makes sense since users only get assigned branches by super admins AFTER their account is created right?

This is correct. It doesn't hurt to leave it in for a more complete "create" resolver.

twilkhoo commented 2 years ago

Tested locally with Prisma Studio, everything works great! One question not of concern though- when creating accounts (in createAccount of AccountForm.tsx), branches is still set to [] but this makes sense since users only get assigned branches by super admins AFTER their account is created right?

This is correct. It doesn't hurt to leave it in for a more complete "create" resolver.

Sounds good, LGTM!