Skip to content

Replace banned/blocked texts with badges in phone match admin page

What does this MR do and why?

  • Replaces banned/blocked texts with badges in phone match admin page

The preferred UI is badges.

This MR is similar to this one: !157220 (merged)

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

image.png

image.png

When current user is banned:

image.png

How to set up and validate locally

  1. Simulate a SaaS instance

  2. From the rails console, create phone number validation data for 3 users:

    Users::PhoneNumberValidation.create(user: User.find_by_username("reported_user_1"), validated_at: Time.now, international_dial_code: 1, country: "US", phone_number: "123456789")
    Users::PhoneNumberValidation.create(user: User.find_by_username("reported_user_2"), validated_at: Time.now, international_dial_code: 1, country: "US", phone_number: "123456789")
    Users::PhoneNumberValidation.create(user: User.find_by_username("reported_user_3"), validated_at: Time.now, international_dial_code: 1, country: "US", phone_number: "123456789")
  3. From the Admin Area, ban one of the users from the previous step, and block another one.

  4. In the Admin Area, go to the profile page of one of the users (for example: http://gdk.test:3000/admin/users/reported_user_1). Scroll down to the Phone section and click on View phone number matches.

  5. Check that, next to the username, one user has the (banned) text, another user has the (blocked) and the third user has no text. (One of the users will have the This User badge).

Related to #470474 (closed)

Edited by Pedro Lopez

Merge request reports

Loading