Wire up API to show modal for reseller subscriptions
requested to merge 409750-reseller-show-modal-to-let-users-know-they-can-t-buy-storage-or-minutes-on-gitlab-for into master
What does this MR do and why?
Call CustomersDot GraphQL API to determine if we should show a modal when subscription is not allowed to add seats
Screenshots or screen recordings
No modal flow | Modal flow |
---|---|
Screen_Recording_2023-09-04_at_16.08.15 | Screen_Recording_2023-09-04_at_15.49.36 |
How to set up and validate locally
- Create a ramp subscription
- Create a reseller subscription
- Create a subscription without either reseller or ramp attributes
- Run
rails c
and then `Feature.enable(:limited_access_modal)
For both ramp + reseller subscriptions:
- Link it to a GL namespace either in the CDot UI (
subscriptions/SUBSCRIPTION_NAME/edit?transaction=change_gitlab_group
) or via the rails console - In GL, navigate to
/groups/GROUP_NAME/-/usage_quotas#seats-quota-tab
- Verify that
Add seats
button appears as usual - Verify that clicking the button displays the modal
- By default, it will show the modal text for a reseller subscription because we're temporarily stubbing the
limitedAccessReason
- To see the ramp subscription text, you can modify this line to return
RAMP_SUBSCRIPTION
- By default, it will show the modal text for a reseller subscription because we're temporarily stubbing the
- Verify that closing out of the modal functions properly
For the regular subscription:
- Link it to a GL namespace either in the CDot UI (
subscriptions/SUBSCRIPTION_NAME/edit?transaction=change_gitlab_group
) or via the rails console - In GL, navigate to
/groups/GROUP_NAME/-/usage_quotas#seats-quota-tab
- Verify that
Add seats
button appears as usual - Verify that clicking the button takes you to CDot to add seats
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #409750 (closed)
Edited by Diana Zubova