Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

feat: addressed deprecation banner for enterprise

=e2a6bd687b1e
diff --git a/frontend/src/pages/organization/BillingV2Page/billing-v2-format.ts b/frontend/src/pages/organization/BillingV2Page/billing-v2-format.ts
index 090e6f8fda..3565d16c3f 100644
--- a/frontend/src/pages/organization/BillingV2Page/billing-v2-format.ts
+++ b/frontend/src/pages/organization/BillingV2Page/billing-v2-format.ts
@@ -191,8 +191,10 @@ export const commitSavingsNudge = (
// Capitalize a plan tier ("pro" -> "Pro") for the badge beside a product's name.
// hardcoded legacy for now
-export const tierLabel = (tier: string): string =>
- (tier.charAt(0).toUpperCase() + tier.slice(1)).replace("Legacy_", "");
+export const tierLabel = (tier: string): string => {
+ const stripped = tier.replace("Legacy_", "");
+ return stripped.charAt(0).toUpperCase() + stripped.slice(1);
+};
// Cadence as an adjective ("annual"/"monthly"), empty for an unknown cadence. Distinct from
// cadenceWord, which returns the period noun ("year"/"month").
diff --git a/frontend/src/pages/organization/BillingV2Page/components/cards/ProductsCard.tsx b/frontend/src/pages/organization/BillingV2Page/components/cards/ProductsCard.tsx
index e312f81936..217c4c4777 100644
--- a/frontend/src/pages/organization/BillingV2Page/components/cards/ProductsCard.tsx
+++ b/frontend/src/pages/organization/BillingV2Page/components/cards/ProductsCard.tsx
@@ -55,7 +55,9 @@ const ActiveProductCard = ({
// available commitment. Clicking opens the set-commitment flow.
const commitNudge = readOnly ? null : commitSavingsNudge(entitlement);
// Every deprecation is presented as a retiring plan for now (see asPlanDeprecation).
- const deprecation = asPlanDeprecation(entitlement?.deprecation);
+ const deprecation = !entitlement?.planTier?.includes("enterprise")
+ ? asPlanDeprecation(entitlement?.deprecation)
+ : null;
const isProductDeprecated = deprecation?.kind === "product";
const isPlanDeprecated = deprecation?.kind === "plan";
diff --git a/frontend/src/pages/organization/BillingV2Page/components/deprecation/DeprecationBanners.tsx b/frontend/src/pages/organization/BillingV2Page/components/deprecation/DeprecationBanners.tsx
index 71df633060..5b35bd319d 100644
--- a/frontend/src/pages/organization/BillingV2Page/components/deprecation/DeprecationBanners.tsx
+++ b/frontend/src/pages/organization/BillingV2Page/components/deprecation/DeprecationBanners.tsx
@@ -12,7 +12,7 @@ import {
import { BillingV2CatalogProduct, BillingV2Overview } from "@app/hooks/api";
import { tierLabel } from "../../billing-v2-format";
-import { asPlanDeprecation, daysLeftLabel, DeprecatedEntry } from "./deprecation-data";
+import { daysLeftLabel, DeprecatedEntry, Deprecation } from "./deprecation-data";
import { DeprecationDetailBody } from "./DeprecationDetailBody";
// Attention banners above the summary, one per affected product. A retiring plan reads forward-looking
@@ -38,7 +38,7 @@ export const DeprecationBanners = ({
productId,
name: catalog.find((prod) => prod.id === productId)?.name ?? productId,
planTier: entitlement.planTier,
- deprecation: asPlanDeprecation(entitlement.deprecation)!
+ deprecation: entitlement.deprecation as Deprecation
}))
.sort((a, b) => {
const rank = (entry: DeprecatedEntry) => (entry.deprecation.kind === "product" ? 0 : 1);