mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-11 10:10:25 +01:00
Resolve the seat adjustment issue (#10265)
This commit is contained in:
parent
a559a113d3
commit
cdc82f13b0
@ -5,8 +5,9 @@
|
||||
<bit-label>{{ "subscriptionSeats" | i18n }}</bit-label>
|
||||
<input bitInput formControlName="newSeatCount" type="number" min="0" step="1" />
|
||||
<bit-hint>
|
||||
<strong>{{ "total" | i18n }}:</strong> {{ additionalSeatCount || 0 }} ×
|
||||
{{ seatPrice | currency: "$" }} = {{ adjustedSeatTotal | currency: "$" }} /
|
||||
<strong>{{ "total" | i18n }}:</strong>
|
||||
{{ adjustSubscriptionForm.value.newSeatCount || 0 }} ×
|
||||
{{ seatPrice | currency: "$" }} = {{ seatTotalCost | currency: "$" }} /
|
||||
{{ interval | i18n }}</bit-hint
|
||||
>
|
||||
</bit-form-field>
|
||||
@ -43,7 +44,8 @@
|
||||
step="1"
|
||||
/>
|
||||
<bit-hint>
|
||||
<strong>{{ "maxSeatCost" | i18n }}:</strong> {{ additionalMaxSeatCount || 0 }} ×
|
||||
<strong>{{ "maxSeatCost" | i18n }}:</strong>
|
||||
{{ adjustSubscriptionForm.value.newMaxSeats || 0 }} ×
|
||||
{{ seatPrice | currency: "$" }} = {{ maxSeatTotal | currency: "$" }} /
|
||||
{{ interval | i18n }}</bit-hint
|
||||
>
|
||||
|
@ -99,11 +99,12 @@ export class AdjustSubscription implements OnInit, OnDestroy {
|
||||
: 0;
|
||||
}
|
||||
|
||||
get adjustedSeatTotal(): number {
|
||||
return this.additionalSeatCount * this.seatPrice;
|
||||
get maxSeatTotal(): number {
|
||||
return Math.abs((this.adjustSubscriptionForm.value.newMaxSeats ?? 0) * this.seatPrice);
|
||||
}
|
||||
|
||||
get maxSeatTotal(): number {
|
||||
return this.additionalMaxSeatCount * this.seatPrice;
|
||||
get seatTotalCost(): number {
|
||||
const totalSeat = Math.abs(this.adjustSubscriptionForm.value.newSeatCount * this.seatPrice);
|
||||
return totalSeat;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user