Update Duo Pro card on Usage Quotas page for trials
What does this MR do and why?
What
Update Duo Pro card on Usage Quotas page for trials
Why
- Updates CodeSuggestionsInfoCard to support trial data
- Migrate one class to new tailwind equivalent
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
Non Trial Duo Pro | Trial Duo Pro |
---|---|
How to set up and validate locally
-
Feature.enable(:hamilton_seat_management)
in the rails console - Visit the Usage Quotas page on a group that has Duo Pro
- If a group doesn't have duo pro follow these steps:
bin/rails c
group = Group.find_by(<find your group>)
GitlabSubscriptions::AddOn.find_or_create_by(name: 'code_suggestions', description: GitlabSubscriptions::AddOn.descriptions[:code_suggestions])
GitlabSubscription.last.update(trial: true, trial_starts_on: 45.days.ago, trial_ends_on: 30.days.from_now)
GitlabSubscriptions::AddOnPurchase.create(subscription_add_on_id: GitlabSubscriptions::AddOn.find_by(name: 'code_suggestions').id, namespace: group, organization_id: 1, started_at: 60.days.ago, expires_on: Date.today, trial: true, quantity: 1, purchase_xid: '1')
Related to #454592
Edited by Jay Montal