mirror of
https://github.com/bitwarden/browser
synced 2026-02-11 05:53:42 +00:00
feat(billing): close premium org upgrade dialog if feature is disabled
This commit is contained in:
@@ -122,6 +122,11 @@ export class PremiumOrgUpgradeDialogComponent implements OnInit {
|
||||
) {}
|
||||
|
||||
async ngOnInit(): Promise<void> {
|
||||
if (!this.showPremiumToOrganizationUpgrade()) {
|
||||
// If the premium to organization upgrade feature is not enabled or user does not have premium personally, close the dialog
|
||||
this.close({ status: PremiumOrgUpgradeDialogStatus.Closed });
|
||||
return;
|
||||
}
|
||||
this.account.set(this.params.account);
|
||||
this.step.set(this.params.initialStep ?? PremiumOrgUpgradeDialogStep.PlanSelection);
|
||||
this.selectedPlan.set(this.params.selectedPlan ?? null);
|
||||
|
||||
Reference in New Issue
Block a user