1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-22 11:45:59 +01:00

Resolve the payment display (#11219)

This commit is contained in:
cyprain-okeke 2024-09-24 18:07:29 +01:00 committed by GitHub
parent 0089ae0886
commit e3c75b3c1b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -403,11 +403,13 @@ export class ChangePlanDialogComponent implements OnInit, OnDestroy {
}
get upgradeRequiresPaymentMethod() {
return (
this.organization?.productTierType === ProductTierType.Free &&
!this.showFree &&
!this.billing?.paymentSource
);
const isFreeTier = this.organization?.productTierType === ProductTierType.Free;
const shouldHideFree = !this.showFree;
const hasNoPaymentSource = this.deprecateStripeSourcesAPI
? !this.paymentSource
: !this.billing?.paymentSource;
return isFreeTier && shouldHideFree && hasNoPaymentSource;
}
get selectedSecretsManagerPlan() {