Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Be able to search a customer using the loyalty ID and add a new line on search labels.

This should follow the user permissions, where users can search in countries where they are admins.

Examples

  • Admin user ESP, only can access ESP loyalty customers

  • Admin user ESP and PT, can access ESP and PT loyalty customers

...

Figma

https://www.figma.com/design/Ti8Qr6jeSEPaencIDyYfcJ/branch/iS2eu3wihqpTUjXoJPXkbK/Burger-King?node-id=1218-356&t=EZP7GwsI6H6Bsmbn-0

Solution

Enhance the existing search bar on the home screen to accept the loyalty ID. Then create a new backend method to communicate with the loyalty API to get the customer cognito ID. With the cognito ID the Admin app can show the customer information correctly.

Zenuml sequence macro lite
uuid21edafca-167a-456d-9207-3d2ea87845e1
customContentId4766433306
updatedAt2024-06-05T18:26:03Z

Tasks breakdown

Schemas/Customer

  • Update the Query with the new method customerByLoyaltyId and update graphQl queries

    image-20240521-201830.pngImage Added

     

  • Create a new method customerByLoyaltyId inside the Query resolvers section (with the same signature and name of query above)

    • This method should get all the user permissions, and based on this, make requests for each country that this user can access. All this requests, like a promise to be made in parallel

      image-20240521-200957.pngImage Added
      • To get the User from Loyalty service, will be necessary update this method to override the header x-region

      image-20240522-191903.pngImage Added

queries/customers

Create a new query inside the customers queries

...

Create a use query for consume the customerByLoyaltyId

...

Add on the map section the new query

...

universal-search/searchInstructions

Add new descriptions to this list for loyalty id

...

The text for loyaltyId already exist in Lokalize, avoiding the necessity of create a new string text.