1
0
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:
Alex Morask 2024-10-14 08:35:25 -04:00 committed by GitHub
parent 8d507c04a0
commit e8f7cdfeed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 1 deletions

View File

@ -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()

View File

@ -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;
}
});
}
} }