Null check provider in organization management check (#10233)
This commit is contained in:
parent
9a6b37d019
commit
768b5393e9
|
@ -1,6 +1,6 @@
|
|||
<app-header></app-header>
|
||||
|
||||
<bit-container *ngIf="!isProviderManaged">
|
||||
<bit-container *ngIf="!isManagedByConsolidatedBillingMSP">
|
||||
<ng-container *ngIf="!firstLoaded && loading">
|
||||
<i class="bwi bwi-spinner bwi-spin text-muted" title="{{ 'loading' | i18n }}"></i>
|
||||
<span class="tw-sr-only">{{ "loading" | i18n }}</span>
|
||||
|
@ -274,7 +274,7 @@
|
|||
</ng-container>
|
||||
</ng-container>
|
||||
</bit-container>
|
||||
<bit-container *ngIf="isProviderManaged">
|
||||
<bit-container *ngIf="isManagedByConsolidatedBillingMSP">
|
||||
<div
|
||||
class="tw-mx-auto tw-flex tw-flex-col tw-items-center tw-justify-center tw-pt-24 tw-text-center tw-font-bold"
|
||||
>
|
||||
|
|
|
@ -50,7 +50,7 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
|
|||
locale: string;
|
||||
showUpdatedSubscriptionStatusSection$: Observable<boolean>;
|
||||
manageBillingFromProviderPortal = ManageBilling;
|
||||
isProviderManaged = false;
|
||||
isManagedByConsolidatedBillingMSP = false;
|
||||
enableTimeThreshold: boolean;
|
||||
preSelectedProductTier: ProductTierType = ProductTierType.Free;
|
||||
|
||||
|
@ -126,10 +126,10 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
|
|||
if (this.userOrg.canViewSubscription) {
|
||||
const enableConsolidatedBilling = await firstValueFrom(this.enableConsolidatedBilling$);
|
||||
const provider = await this.providerService.get(this.userOrg.providerId);
|
||||
this.isProviderManaged =
|
||||
this.isManagedByConsolidatedBillingMSP =
|
||||
enableConsolidatedBilling &&
|
||||
this.userOrg.hasProvider &&
|
||||
provider.providerStatus == ProviderStatusType.Billable;
|
||||
provider?.providerStatus == ProviderStatusType.Billable;
|
||||
|
||||
this.sub = await this.organizationApiService.getSubscription(this.organizationId);
|
||||
this.lineItems = this.sub?.subscription?.items;
|
||||
|
|
Loading…
Reference in New Issue