mirror of
https://github.com/bitwarden/browser.git
synced 2024-10-15 06:57:58 +02:00
Hide plans with 0 seats on provider subscription page (#11489)
This commit is contained in:
parent
8d507c04a0
commit
e8f7cdfeed
@ -22,7 +22,7 @@
|
|||||||
<bit-table>
|
<bit-table>
|
||||||
<ng-template body>
|
<ng-template body>
|
||||||
<ng-container *ngIf="subscription">
|
<ng-container *ngIf="subscription">
|
||||||
<tr bitRow *ngFor="let i of subscription.plans">
|
<tr bitRow *ngFor="let i of activePlans">
|
||||||
<td bitCell class="tw-pl-0 tw-py-3">
|
<td bitCell class="tw-pl-0 tw-py-3">
|
||||||
{{ getFormattedPlanName(i.planName) }} {{ "orgSeats" | i18n }} ({{
|
{{ getFormattedPlanName(i.planName) }} {{ "orgSeats" | i18n }} ({{
|
||||||
i.cadence.toLowerCase()
|
i.cadence.toLowerCase()
|
||||||
|
@ -101,4 +101,14 @@ export class ProviderSubscriptionComponent implements OnInit, OnDestroy {
|
|||||||
this.destroy$.next();
|
this.destroy$.next();
|
||||||
this.destroy$.complete();
|
this.destroy$.complete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get activePlans(): ProviderPlanResponse[] {
|
||||||
|
return this.subscription.plans.filter((plan) => {
|
||||||
|
if (plan.purchasedSeats === 0) {
|
||||||
|
return plan.seatMinimum > 0;
|
||||||
|
} else {
|
||||||
|
return plan.purchasedSeats > 0;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user