From 0d5d4b07cceb54d875e51afe18a380e211313885 Mon Sep 17 00:00:00 2001 From: Shane Melton Date: Tue, 27 Jun 2023 16:44:32 -0700 Subject: [PATCH] [AC-1418] Cleanup SM subscription UI flags --- .../organization-subscription-cloud.component.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts b/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts index 50887cdd3ad..19649b180f6 100644 --- a/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts +++ b/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts @@ -117,11 +117,6 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy !this.subscription.cancelled && !this.subscriptionMarkedForCancel; - // Remove next line when the sm-ga-billing flag is deleted - this.showSecretsManagerSubscribe = - this.showSecretsManagerSubscribe && - (await this.configService.getFeatureFlagBool(FeatureFlag.SecretsManagerBilling)); - this.showAdjustSecretsManager = this.userOrg.canEditSubscription && this.userOrg.useSecretsManager && @@ -130,11 +125,14 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy !this.subscription.cancelled && !this.subscriptionMarkedForCancel; - this.showAdjustSecretsManager = - this.showAdjustSecretsManager && - (await this.configService.getFeatureFlagBool(FeatureFlag.SecretsManagerBilling)); - this.loading = false; + + // Remove the remaining lines when the sm-ga-billing flag is deleted + const smBillingEnabled = await this.configService.getFeatureFlagBool( + FeatureFlag.SecretsManagerBilling + ); + this.showSecretsManagerSubscribe = this.showSecretsManagerSubscribe && smBillingEnabled; + this.showAdjustSecretsManager = this.showAdjustSecretsManager && smBillingEnabled; } get subscription() {