mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-14 10:26:19 +01: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>
|
||||
<ng-template body>
|
||||
<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">
|
||||
{{ getFormattedPlanName(i.planName) }} {{ "orgSeats" | i18n }} ({{
|
||||
i.cadence.toLowerCase()
|
||||
|
@ -101,4 +101,14 @@ export class ProviderSubscriptionComponent implements OnInit, OnDestroy {
|
||||
this.destroy$.next();
|
||||
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