Skip to content

DEV User profile updates side effects #396

@prooflesben

Description

@prooflesben

Overview

We currently have the ability for users to update their profile information, including their first name, last name, and email. However, this update only modifies the user object itself. There are other parts of the app that should also reflect this change, specifically any grants where the updated user is listed as the BCAN POC. To address this, we will be creating a backend endpoint that updates all relevant grants with the user's new information. The profile update and grant updates should be treated as a single atomic operation, meaning if any part of the update fails, all changes should be rolled back to keep our data consistent. Once all updates have been confirmed successful, we should refetch all grants to ensure our data stays current.

I encourage you to think about other areas of the app that could be affected by a user updating their profile information and make note of them. If you're feeling adventurous, feel free to address any other side effects you come across as well.

Tasks

  • Create a backend endpoint that updates all grants where the current user is listed as the BCAN POC with their new profile information, handled atomically alongside the profile update so that all changes succeed or fail together
  • Once all profile and grant updates have been confirmed, call fetchGrants to refresh our data

Acceptance Criteria

  • After a user's profile is updated, the app reflects those changes everywhere necessary to keep data accurate and consistent
  • After a user's profile is updated, any grants listing that user as the BCAN POC are updated via the backend route
  • If any part of the update fails, all changes are rolled back and no partial updates are persisted

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions