mirror of
https://github.com/bitwarden/browser
synced 2026-02-12 06:23:38 +00:00
[PM-15840] When org reaches collection limit, organization upgrade page infinitely loads.
This commit is contained in:
@@ -42,6 +42,9 @@ import { SecretsManagerSubscriptionOptions } from "./sm-adjust-subscription.comp
|
||||
templateUrl: "organization-subscription-cloud.component.html",
|
||||
})
|
||||
export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy {
|
||||
public static readonly QUERY_PARAM_UPGRADE: string = "upgrade";
|
||||
public static readonly ROUTE_PARAM_ORGANIZATION_ID: string = "organizationId";
|
||||
|
||||
sub: OrganizationSubscriptionResponse;
|
||||
lineItems: BillingSubscriptionItemResponse[] = [];
|
||||
organizationId: string;
|
||||
@@ -82,7 +85,19 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
|
||||
) {}
|
||||
|
||||
async ngOnInit() {
|
||||
if (this.route.snapshot.queryParamMap.get("upgrade")) {
|
||||
this.organizationId =
|
||||
this.route.snapshot.params[
|
||||
OrganizationSubscriptionCloudComponent.ROUTE_PARAM_ORGANIZATION_ID
|
||||
];
|
||||
await this.load();
|
||||
|
||||
this.showUpdatedSubscriptionStatusSection$ = this.configService.getFeatureFlag$(
|
||||
FeatureFlag.AC1795_UpdatedSubscriptionStatusSection,
|
||||
);
|
||||
|
||||
if (
|
||||
this.route.snapshot.queryParams[OrganizationSubscriptionCloudComponent.QUERY_PARAM_UPGRADE]
|
||||
) {
|
||||
await this.changePlan();
|
||||
const productTierTypeStr = this.route.snapshot.queryParamMap.get("productTierType");
|
||||
if (productTierTypeStr != null) {
|
||||
@@ -92,20 +107,6 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.route.params
|
||||
.pipe(
|
||||
concatMap(async (params) => {
|
||||
this.organizationId = params.organizationId;
|
||||
await this.load();
|
||||
}),
|
||||
takeUntil(this.destroy$),
|
||||
)
|
||||
.subscribe();
|
||||
|
||||
this.showUpdatedSubscriptionStatusSection$ = this.configService.getFeatureFlag$(
|
||||
FeatureFlag.AC1795_UpdatedSubscriptionStatusSection,
|
||||
);
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
|
||||
Reference in New Issue
Block a user