upgrade: Show tier corresponding to session on upgrade page.

This commit is contained in:
Aman Agrawal 2023-12-01 11:47:09 +00:00 committed by Tim Abbott
parent 6b70be38b3
commit 5d49e54d33
4 changed files with 7 additions and 4 deletions

View File

@ -1508,7 +1508,7 @@ class BillingSession(ABC):
"billing_base_url": self.billing_base_url,
},
"payment_method": current_payment_method,
"plan": "Zulip Cloud Standard",
"plan": CustomerPlan.name_from_tier(tier),
"salt": salt,
"seat_count": seat_count,
"signed_seat_count": signed_seat_count,
@ -2873,6 +2873,8 @@ def get_price_per_license(
price_map: Dict[int, Dict[str, int]] = {
CustomerPlan.TIER_CLOUD_STANDARD: {"Annual": 8000, "Monthly": 800},
CustomerPlan.TIER_CLOUD_PLUS: {"Annual": 16000, "Monthly": 1600},
# Placeholder self-hosted plan for development.
CustomerPlan.TIER_SELF_HOSTED_BUSINESS: {"Annual": 8000, "Monthly": 800},
}
try:

View File

@ -293,6 +293,7 @@ class CustomerPlan(models.Model):
CustomerPlan.TIER_CLOUD_STANDARD: "Zulip Cloud Standard",
CustomerPlan.TIER_CLOUD_PLUS: "Zulip Plus",
CustomerPlan.TIER_CLOUD_ENTERPRISE: "Zulip Enterprise",
CustomerPlan.TIER_SELF_HOSTED_BUSINESS: "Zulip Self-Hosted Business",
}[tier]
@property

View File

@ -205,7 +205,7 @@ def remote_realm_upgrade_page(
) -> HttpResponse: # nocoverage
initial_upgrade_request = InitialUpgradeRequest(
manual_license_management=manual_license_management,
tier=CustomerPlan.TIER_CLOUD_STANDARD,
tier=CustomerPlan.TIER_SELF_HOSTED_BUSINESS,
)
redirect_url, context = billing_session.get_initial_upgrade_context(initial_upgrade_request)
@ -226,7 +226,7 @@ def remote_server_upgrade_page(
) -> HttpResponse: # nocoverage
initial_upgrade_request = InitialUpgradeRequest(
manual_license_management=manual_license_management,
tier=CustomerPlan.TIER_CLOUD_STANDARD,
tier=CustomerPlan.TIER_SELF_HOSTED_BUSINESS,
)
redirect_url, context = billing_session.get_initial_upgrade_context(initial_upgrade_request)

View File

@ -152,7 +152,7 @@
{% if free_trial_days %}
Start {{ free_trial_days }}-day free trial
{% else %}
Purchase Zulip Cloud Standard
Purchase {{ plan }}
{% endif %}
</span>
<object class="loader upgrade-button-loader" type="image/svg+xml" data="{{ static('images/loading/loader-white.svg') }}"></object>