Skip to content

Call CustomersDot GraphQL on billing page

Diana Zubova requested to merge dz/363439-manage-buttons-on-billing-page into master

What does this MR do and why?

Call CustomersDot GraphQL API to show/hide Add seats and Renew button.

Before: no request, the visibility defined only by presence of planRenewHref and addSeatsHref

After: send a request to CustomersDot GraphQL API that returns two boolean values. If the request is unsuccessful always hide these buttons.

Related to #363439 (closed)

Screenshots or screen recordings

Before After
Screenshot_2022-10-06_at_17.17.02 Screenshot_2022-10-06_at_17.14.31

Video to check the loading state

Screen_Recording_2022-10-11_at_18.10.46

How to set up and validate locally

  1. Make sure that you are running instance as SaaS and should_check_namespace_plan? returns true
  2. Start CustomersDot locally
  3. Find a group that has a premium/ultimate subscription
  4. Navigate to that group OR project billing page (http://localhost:3000/groups/test-group/-/billings OR http://localhost:3000/groups/test-group/test-project/-/billings)
  5. Observe the request and check if the visibility of the buttons set correctly

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Diana Zubova

Merge request reports