From 90d6cd40e6d50c85bf78f421489dee2624b0baae Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Thu, 10 Apr 2025 03:52:32 +0000 Subject: [PATCH] Feat: budget cap config update --- src/lib/sdk/billing.ts | 1 + .../billing/budgetAlert.svelte | 10 ++++++++++ .../billing/budgetCap.svelte | 10 ++++++++++ 3 files changed, 21 insertions(+) diff --git a/src/lib/sdk/billing.ts b/src/lib/sdk/billing.ts index e18ef961a..340ed985d 100644 --- a/src/lib/sdk/billing.ts +++ b/src/lib/sdk/billing.ts @@ -340,6 +340,7 @@ export type Plan = { seats: PlanAddon; }; trialDays: number; + budgetCapEnabled: boolean; isAvailable: boolean; selfService: boolean; premiumSupport: boolean; diff --git a/src/routes/(console)/organization-[organization]/billing/budgetAlert.svelte b/src/routes/(console)/organization-[organization]/billing/budgetAlert.svelte index 07a5db67a..011e0906d 100644 --- a/src/routes/(console)/organization-[organization]/billing/budgetAlert.svelte +++ b/src/routes/(console)/organization-[organization]/billing/budgetAlert.svelte @@ -102,6 +102,16 @@ Upgrade to a Pro plan to manage when you receive billing alerts for your organization. + {:else if !$currentPlan.budgetCapEnabled} + + Billing alerts disabled + Billing alerts are disabled for your current plan. For more information + view our pricing guide. + {:else} diff --git a/src/routes/(console)/organization-[organization]/billing/budgetCap.svelte b/src/routes/(console)/organization-[organization]/billing/budgetCap.svelte index 479886016..1db4f9fd3 100644 --- a/src/routes/(console)/organization-[organization]/billing/budgetCap.svelte +++ b/src/routes/(console)/organization-[organization]/billing/budgetCap.svelte @@ -71,6 +71,16 @@ target="_blank" rel="noopener noreferrer">view our pricing guide. + {:else if !$currentPlan.budgetCapEnabled} + + Budget cap disabled + Budget caps are disabled for your current plan. For more information + view our pricing guide. + {:else}