mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
Hide plans with 0 seats on provider subscription page (#11489)
This commit is contained in:
@@ -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;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user