mirror of
https://github.com/bitwarden/browser.git
synced 2025-03-02 03:41:09 +01:00
fix seat count to include invited and accepted members (#12848)
This commit is contained in:
parent
62e879940c
commit
63a9c69f5a
@ -68,7 +68,7 @@ export interface MemberDialogParams {
|
||||
usesKeyConnector: boolean;
|
||||
isOnSecretsManagerStandalone: boolean;
|
||||
initialTab?: MemberDialogTab;
|
||||
numConfirmedMembers: number;
|
||||
numSeatsUsed: number;
|
||||
managedByOrganization?: boolean;
|
||||
}
|
||||
|
||||
@ -263,7 +263,7 @@ export class MemberDialogComponent implements OnDestroy {
|
||||
});
|
||||
|
||||
this.remainingSeats$ = this.organization$.pipe(
|
||||
map((organization) => organization.seats - this.params.numConfirmedMembers),
|
||||
map((organization) => organization.seats - this.params.numSeatsUsed),
|
||||
);
|
||||
}
|
||||
|
||||
@ -458,7 +458,7 @@ export class MemberDialogComponent implements OnDestroy {
|
||||
}
|
||||
if (
|
||||
organization.hasReseller &&
|
||||
this.params.numConfirmedMembers + emails.length > organization.seats
|
||||
this.params.numSeatsUsed + emails.length > organization.seats
|
||||
) {
|
||||
this.formGroup.controls.emails.setErrors({
|
||||
tooManyEmails: { message: this.i18nService.t("seatLimitReachedContactYourProvider") },
|
||||
|
@ -510,6 +510,11 @@ export class MembersComponent extends BaseMembersComponent<OrganizationUserView>
|
||||
return;
|
||||
}
|
||||
|
||||
const numSeatsUsed =
|
||||
this.dataSource.confirmedUserCount +
|
||||
this.dataSource.invitedUserCount +
|
||||
this.dataSource.acceptedUserCount;
|
||||
|
||||
const dialog = openUserAddEditDialog(this.dialogService, {
|
||||
data: {
|
||||
name: this.userNamePipe.transform(user),
|
||||
@ -519,7 +524,7 @@ export class MembersComponent extends BaseMembersComponent<OrganizationUserView>
|
||||
usesKeyConnector: user?.usesKeyConnector,
|
||||
isOnSecretsManagerStandalone: this.orgIsOnSecretsManagerStandalone,
|
||||
initialTab: initialTab,
|
||||
numConfirmedMembers: this.dataSource.confirmedUserCount,
|
||||
numSeatsUsed,
|
||||
managedByOrganization: user?.managedByOrganization,
|
||||
},
|
||||
});
|
||||
|
@ -103,7 +103,7 @@ export class MemberAccessReportComponent implements OnInit {
|
||||
usesKeyConnector: user?.usesKeyConnector,
|
||||
isOnSecretsManagerStandalone: this.orgIsOnSecretsManagerStandalone,
|
||||
initialTab: MemberDialogTab.Role,
|
||||
numConfirmedMembers: this.dataSource.data.length,
|
||||
numSeatsUsed: this.dataSource.data.length,
|
||||
},
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user