mirror of
https://github.com/bitwarden/browser
synced 2026-02-12 06:23:38 +00:00
Remove unreachable toast logic.
This commit is contained in:
@@ -284,16 +284,27 @@ export class MemberDialogComponent implements OnDestroy {
|
||||
orgSeatLimitReachedValidator(
|
||||
organization,
|
||||
this.params.allOrganizationUserEmails,
|
||||
this.i18nService.t("subscriptionUpgrade", organization.seats),
|
||||
this.getSeatLimitErrorMessageForPlan(organization),
|
||||
this.params.occupiedSeatCount,
|
||||
),
|
||||
];
|
||||
|
||||
const emailsControl = this.formGroup.get("emails");
|
||||
emailsControl.setValidators(emailsControlValidators);
|
||||
emailsControl.updateValueAndValidity();
|
||||
}
|
||||
}
|
||||
|
||||
private getSeatLimitErrorMessageForPlan(organization: Organization): string {
|
||||
const { seats, hasReseller } = organization;
|
||||
|
||||
if (hasReseller) {
|
||||
return this.i18nService.t("seatLimitReachedContactYourProvider", seats);
|
||||
}
|
||||
|
||||
return this.i18nService.t("subscriptionUpgrade", seats);
|
||||
}
|
||||
|
||||
private loadOrganizationUser(
|
||||
userDetails: OrganizationUserAdminView,
|
||||
groups: GroupDetailsView[],
|
||||
@@ -467,15 +478,6 @@ export class MemberDialogComponent implements OnDestroy {
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (
|
||||
organization.hasReseller &&
|
||||
this.params.numConfirmedMembers + emails.length > organization.seats
|
||||
) {
|
||||
this.formGroup.controls.emails.setErrors({
|
||||
tooManyEmails: { message: this.i18nService.t("seatLimitReachedContactYourProvider") },
|
||||
});
|
||||
return;
|
||||
}
|
||||
await this.userService.invite(emails, userView);
|
||||
}
|
||||
|
||||
|
||||
@@ -467,7 +467,7 @@ export class MembersComponent extends BaseMembersComponent<OrganizationUserView>
|
||||
if (
|
||||
!user &&
|
||||
this.organization.hasReseller &&
|
||||
this.organization.seats === this.dataSource.confirmedUserCount
|
||||
this.organization.seats === this.dataSource.occupiedSeatCount
|
||||
) {
|
||||
this.toastService.showToast({
|
||||
variant: "error",
|
||||
|
||||
@@ -8519,7 +8519,13 @@
|
||||
"message": "Contact your provider to purchase additional seats."
|
||||
},
|
||||
"seatLimitReachedContactYourProvider": {
|
||||
"message": "Seat limit has been reached. Contact your provider to purchase additional seats."
|
||||
"message": "Seat limit of $COUNT$ has been reached. Contact your provider to purchase additional seats.",
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"content": "$1",
|
||||
"example": "2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"collectionAccessRestricted": {
|
||||
"message": "Collection access is restricted"
|
||||
|
||||
Reference in New Issue
Block a user