-
-
Notifications
You must be signed in to change notification settings - Fork 679
refactor(console): update tenant subscription page #8121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(console): update tenant subscription page #8121
Conversation
COMPARE TO
|
| Name | Diff |
|---|---|
| packages/console/src/components/PlanUsage/PlanUsageCard/index.tsx | 📈 +282 Bytes |
| packages/console/src/hooks/use-console-routes/routes/tenant-settings.tsx | 📈 +402 Bytes |
| packages/console/src/pages/TenantSettings/Subscription/CurrentPlan/index.tsx | 📈 +275 Bytes |
| packages/console/src/pages/TenantSettings/Subscription/index.tsx | 📈 +554 Bytes |
| packages/console/src/pages/TenantSettings/index.tsx | 📈 +368 Bytes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the tenant-level subscription and billing history pages to support enterprise subscriptions with shared quota scope. When a tenant is associated with an enterprise subscription using a shared quota scope, certain subscription-level information (billing details, usage notifications) is now hidden as this data should only be displayed on a centralized enterprise subscription page.
Key changes:
- Hide billing history tab and route for tenants with shared enterprise subscriptions
- Hide Logto pricing table for private region tenants
- Conditionally display billing information and usage notifications based on quota scope
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/console/src/pages/TenantSettings/index.tsx | Adds conditional rendering to hide the billing history tab when quotaScope is 'shared' |
| packages/console/src/pages/TenantSettings/Subscription/index.tsx | Adds logic to detect private region tenants and hide pricing table and plan switching actions accordingly |
| packages/console/src/pages/TenantSettings/Subscription/CurrentPlan/index.tsx | Wraps billing info and usage notifications in a conditional check for 'dedicated' quota scope |
| packages/console/src/hooks/use-console-routes/routes/tenant-settings.tsx | Updates route configuration to conditionally include billing history route based on quota scope |
| packages/console/src/components/PlanUsage/PlanUsageCard/index.tsx | Hides usage tips for shared quota scope tenants in both numeric usage displays and enterprise plan quota notices |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/console/src/hooks/use-console-routes/routes/tenant-settings.tsx
Show resolved
Hide resolved
packages/console/src/pages/TenantSettings/Subscription/index.tsx
Outdated
Show resolved
Hide resolved
packages/console/src/pages/TenantSettings/Subscription/CurrentPlan/index.tsx
Show resolved
Hide resolved
update tenant subscription settings page
remove duplicate hook statement
af53245 to
fdf587b
Compare
Summary
This PR refactors the tenant-level subscription and billing history pages to support the newly introduced enterprise subscription model.
Motivation
With the introduction of enterprise subscriptions that allow multiple tenants to share a single subscription, certain subscription-level information, such as billing details and aggregated usage status, can no longer be accurately or appropriately presented at the individual tenant level. Instead, this information should be displayed on a centralized enterprise subscription page with proper subscription-level access control.
As a result, tenant-level pages must hide or adjust specific content when the tenant is associated with an enterprise subscription, particularly when the quota scope is
shared.Detailed updates
Hide the Billing history tab and its content when the current tenant is associated with an enterprise subscription using a
sharedquota scope.Hide the Logto public pricing table for tenants in private regions.
Hide the upcoming bill section and payment management actions when the current tenant is associated with an enterprise subscription using a
sharedquota scope.Hide usage-exceeded notifications when the current tenant is associated with an enterprise subscription using a
sharedquota scope.Hide all quota usage tips from the quota usage card when the current tenant is associated with an enterprise subscription using a
sharedquota scope.Testing
Test locally

Checklist
.changeset