Skip to content

GFI: Group merchants by product type in Merchant Switch dropdown #3676

@gitanjli525

Description

@gitanjli525

Summary

Create grouping of merchants in merchant switch dropdown based on product type

Type

Enhancement

Context

Currently, all merchants are shown in the merchant switch dropdown as a list as it is received from backend from /list/merchant api.

Starter tasks
Understand how is the response of /list/merchant api being used currently to show merchants in the merchant dropdown. Modify the logic of setting dropdown options to enable groupings of merchants.

Expected:

Merchant dropdown currently look like:
Image

After making changes, it will look like:
Image

In place of PLATFORM MERCHANT, it will have

Implementation

You need to make changes in function generateDropdownOptionsCustomComponent in OMPSwitchHelper file

Acceptance criteria

  • Merchant list visible in grouped by product manner as shown in image above
  • If no merchant is present for a product, the heading should not be shown for that product
  • Code formatted using npx prettier --write .

Relevant Files

MerchantSwitch
OMPSwitchHelper
OMPSwitchUtils

Mentor contact

@gitanjli525

Helpful Docs

Pre-flight

  • I read the Contributing Guide and setup
  • I searched existing issues and PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good First IssueIssues which are beginner friendly and will give a starting understanding about the repohacktoberfest

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions