Skip to content

User mapping - FE - reassign banners

Oiza Baiye requested to merge 455905-user-mapping-fe-reassign-banners into master

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
Screenshot_2024-07-11_at_5.49.30_PM Screenshot 2024-07-24 at 12.12.15 PM.png
Screenshot 2024-07-11 at 5.51.52 PM.png Screenshot 2024-07-17 at 5.47.14 PM.png
- Screenshot 2024-07-17 at 5.48.56 PM.png
- Screenshot 2024-07-17 at 5.44.08 PM.png

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. In rails console enable the flag

     Feature.enable(:bulk_import_user_mapping)
  2. 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

  3. Change the status cell to 1. See the state machine in app/models/import/source_user.rb for the various statuses.

  4. 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

  5. Navigate to http://127.0.0.1:3000/import/source_users/[current_user_id] (replace [current_user_id] with the id from step 3).

  6. Click the approve button

  7. To test the other flows, you will need to follow step 3 again (change status to 1)

  8. 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)

Edited by Oiza Baiye

Merge request reports