1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-22 11:45:59 +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> <bit-label>
{{ "seats" | i18n }} {{ "seats" | i18n }}
</bit-label> </bit-label>
<input type="text" bitInput formControlName="seats" /> <input type="number" bitInput formControlName="seats" min="1" />
<bit-hint <bit-hint
class="tw-text-muted tw-grid tw-grid-flow-col tw-gap-1 tw-grid-cols-1 tw-grid-rows-2" class="tw-text-muted tw-grid tw-grid-flow-col tw-gap-1 tw-grid-cols-1 tw-grid-rows-2"
*ngIf="openSeats > 0" *ngIf="openSeats > 0"

View File

@ -10,7 +10,12 @@
<bit-label> <bit-label>
{{ "assignedSeats" | i18n }} {{ "assignedSeats" | i18n }}
</bit-label> </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"> <bit-hint class="tw-text-muted" *ngIf="openSeats > 0 || isServiceUserWithPurchasedSeats">
<div <div
*ngIf="!this.isServiceUserWithPurchasedSeats" *ngIf="!this.isServiceUserWithPurchasedSeats"

View File

@ -42,7 +42,7 @@ export class ManageClientSubscriptionDialogComponent implements OnInit {
protected formGroup = new FormGroup({ protected formGroup = new FormGroup({
assignedSeats: new FormControl<number>(this.dialogParams.organization.seats, [ assignedSeats: new FormControl<number>(this.dialogParams.organization.seats, [
Validators.required, 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> <span class="tw-text-muted">{{ client.seats }}</span>
</td> </td>
<td bitCell class="tw-whitespace-nowrap"> <td bitCell class="tw-whitespace-nowrap">
<span class="tw-text-muted">{{ client.assignedSeats }}</span> <span class="tw-text-muted">{{ client.occupiedSeats }}</span>
</td> </td>
<td bitCell class="tw-whitespace-nowrap"> <td bitCell class="tw-whitespace-nowrap">
<span class="tw-text-muted">{{ client.remainingSeats }}</span> <span class="tw-text-muted">{{ client.remainingSeats }}</span>