mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-26 12:25:20 +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>
|
<bit-label>{{ "subscriptionSeats" | i18n }}</bit-label>
|
||||||
<input bitInput formControlName="newSeatCount" type="number" min="0" step="1" />
|
<input bitInput formControlName="newSeatCount" type="number" min="0" step="1" />
|
||||||
<bit-hint>
|
<bit-hint>
|
||||||
<strong>{{ "total" | i18n }}:</strong> {{ additionalSeatCount || 0 }} ×
|
<strong>{{ "total" | i18n }}:</strong>
|
||||||
{{ seatPrice | currency: "$" }} = {{ adjustedSeatTotal | currency: "$" }} /
|
{{ adjustSubscriptionForm.value.newSeatCount || 0 }} ×
|
||||||
|
{{ seatPrice | currency: "$" }} = {{ seatTotalCost | currency: "$" }} /
|
||||||
{{ interval | i18n }}</bit-hint
|
{{ interval | i18n }}</bit-hint
|
||||||
>
|
>
|
||||||
</bit-form-field>
|
</bit-form-field>
|
||||||
@ -43,7 +44,8 @@
|
|||||||
step="1"
|
step="1"
|
||||||
/>
|
/>
|
||||||
<bit-hint>
|
<bit-hint>
|
||||||
<strong>{{ "maxSeatCost" | i18n }}:</strong> {{ additionalMaxSeatCount || 0 }} ×
|
<strong>{{ "maxSeatCost" | i18n }}:</strong>
|
||||||
|
{{ adjustSubscriptionForm.value.newMaxSeats || 0 }} ×
|
||||||
{{ seatPrice | currency: "$" }} = {{ maxSeatTotal | currency: "$" }} /
|
{{ seatPrice | currency: "$" }} = {{ maxSeatTotal | currency: "$" }} /
|
||||||
{{ interval | i18n }}</bit-hint
|
{{ interval | i18n }}</bit-hint
|
||||||
>
|
>
|
||||||
|
@ -99,11 +99,12 @@ export class AdjustSubscription implements OnInit, OnDestroy {
|
|||||||
: 0;
|
: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
get adjustedSeatTotal(): number {
|
get maxSeatTotal(): number {
|
||||||
return this.additionalSeatCount * this.seatPrice;
|
return Math.abs((this.adjustSubscriptionForm.value.newMaxSeats ?? 0) * this.seatPrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
get maxSeatTotal(): number {
|
get seatTotalCost(): number {
|
||||||
return this.additionalMaxSeatCount * this.seatPrice;
|
const totalSeat = Math.abs(this.adjustSubscriptionForm.value.newSeatCount * this.seatPrice);
|
||||||
|
return totalSeat;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user