1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-21 11:35:34 +01:00

[AC-2853] [AC-2854] [AC-2861] Consolidated Billing UI Bugs (#10055)

* Fixed Used column on clients page

* Prevent MSP from scaling client below the number of its members

* Prevent MSP from selecting negative seats when creating client
This commit is contained in:
Alex Morask 2024-07-11 12:18:09 -04:00 committed by GitHub
parent ea76760782
commit 9a58b3b774
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 9 additions and 4 deletions

View File

@ -56,7 +56,7 @@
<bit-label>
{{ "seats" | i18n }}
</bit-label>
<input type="text" bitInput formControlName="seats" />
<input type="number" bitInput formControlName="seats" min="1" />
<bit-hint
class="tw-text-muted tw-grid tw-grid-flow-col tw-gap-1 tw-grid-cols-1 tw-grid-rows-2"
*ngIf="openSeats > 0"

View File

@ -10,7 +10,12 @@
<bit-label>
{{ "assignedSeats" | i18n }}
</bit-label>
<input type="number" bitInput formControlName="assignedSeats" />
<input
type="number"
bitInput
formControlName="assignedSeats"
[min]="dialogParams.organization.occupiedSeats"
/>
<bit-hint class="tw-text-muted" *ngIf="openSeats > 0 || isServiceUserWithPurchasedSeats">
<div
*ngIf="!this.isServiceUserWithPurchasedSeats"

View File

@ -42,7 +42,7 @@ export class ManageClientSubscriptionDialogComponent implements OnInit {
protected formGroup = new FormGroup({
assignedSeats: new FormControl<number>(this.dialogParams.organization.seats, [
Validators.required,
Validators.min(0),
Validators.min(this.dialogParams.organization.occupiedSeats),
]),
});

View File

@ -50,7 +50,7 @@
<span class="tw-text-muted">{{ client.seats }}</span>
</td>
<td bitCell class="tw-whitespace-nowrap">
<span class="tw-text-muted">{{ client.assignedSeats }}</span>
<span class="tw-text-muted">{{ client.occupiedSeats }}</span>
</td>
<td bitCell class="tw-whitespace-nowrap">
<span class="tw-text-muted">{{ client.remainingSeats }}</span>