User mapping - FE - reassign banners
What does this MR do and why?
Background
This MR implements the reassign-banner issue, as part of user contribution mapping.
After a user clicks on an email invitation regarding contribution reassignment, they will land on the page implemented in a merged MR for the confirmation step.
Implementation
Starting from the confirmation step (see screenshots in other MR):
- Clicking the "Approve reassignment" button will redirect the user to the /dashboard/groups page and show an alert that the assignment was approved.
- Clicking the "Reject" button will also redirect to the groups dashboard but show an alert that the assignment was rejected.
- If the invitation is cancelled (eg. it was cancelled by the group owner), the user is redirected to the groups dashboard and is shown the cancelled alert.
- If the invitation is not valid, the user is redirected to dashboard and sees an alert that the invitation is not valid.
The "Learn more" button in all three alerts opens a new tab to the migrating groups by direct transfer docs.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
- | |
- |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
In rails console enable the flag
Feature.enable(:bulk_import_user_mapping)
-
In your local db, find the user you're logged in as (eg. id number 1) in the import_source_users table and take note of that id
-
Change the status cell to 1. See the state machine in
app/models/import/source_user.rb
for the various statuses. -
You may also need to modify the columns reassign_to_user_id and reassigned_by_user_id to the id of your logged in user
-
Navigate to http://127.0.0.1:3000/import/source_users/[current_user_id] (replace [current_user_id] with the id from step 3).
-
Click the approve button
-
To test the other flows, you will need to follow step 3 again (change status to 1)
-
To test the cancel flow, you can clear the reassign_to_user_id to NULL, then navigate to the import url.
Related to #455905 (closed)