-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
sm-adjust-subscription.component.html
94 lines (94 loc) · 3.4 KB
/
sm-adjust-subscription.component.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<form [formGroup]="formGroup" [bitSubmit]="submit">
<bit-form-field class="tw-w-2/3">
<bit-label>{{ "subscriptionSeats" | i18n }}</bit-label>
<input bitInput id="smSeatCount" formControlName="seatCount" type="number" step="1" min="1" />
<bit-hint>
<strong>{{ "total" | i18n }}:</strong>
{{ formGroup.value.seatCount || 0 }} × {{ options.seatPrice | currency: "$" }} =
{{ seatTotalCost | currency: "$" }} / {{ options.interval | i18n }}
</bit-hint>
</bit-form-field>
<bit-form-control>
<bit-label>{{ "limitSubscription" | i18n }}</bit-label>
<input type="checkbox" bitCheckbox id="limitSmSeats" formControlName="limitSeats" />
<bit-hint>
{{ "limitSmSubscriptionDesc" | i18n }}
</bit-hint>
</bit-form-control>
<bit-form-field class="tw-w-2/3" *ngIf="formGroup.value.limitSeats">
<bit-label>{{ "maxSeatLimit" | i18n }}</bit-label>
<input
bitInput
id="smSeatLimit"
formControlName="maxAutoscaleSeats"
type="number"
step="1"
[min]="formGroup.value.seatCount"
/>
<bit-hint>
<strong>{{ "maxSeatCost" | i18n }}:</strong>
{{ formGroup.value.maxAutoscaleSeats || 0 }} × {{ options.seatPrice | currency: "$" }} =
{{ maxSeatTotalCost | currency: "$" }} /
{{ options.interval | i18n }}
</bit-hint>
</bit-form-field>
<bit-form-field class="tw-w-2/3">
<bit-label>{{ "additionalMachineAccounts" | i18n }}</bit-label>
<input
bitInput
id="additionalServiceAccountCount"
formControlName="additionalServiceAccounts"
type="number"
step="1"
min="0"
/>
<bit-hint>
<div>
{{ "includedMachineAccounts" | i18n: options.baseServiceAccountCount }}
{{ "addAdditionalMachineAccounts" | i18n: (monthlyServiceAccountPrice | currency: "$") }}
</div>
<div>
<strong>{{ "total" | i18n }}:</strong>
{{ formGroup.value.additionalServiceAccounts || 0 }} ×
{{ options.additionalServiceAccountPrice | currency: "$" }} =
{{ serviceAccountTotalCost | currency: "$" }} / {{ options.interval | i18n }}
</div>
</bit-hint>
</bit-form-field>
<bit-form-control>
<bit-label>{{ "limitMachineAccounts" | i18n }}</bit-label>
<input
type="checkbox"
bitCheckbox
id="limitServiceAccounts"
formControlName="limitServiceAccounts"
/>
<bit-hint>
{{ "limitMachineAccountsDesc" | i18n }}
</bit-hint>
</bit-form-control>
<bit-form-field class="tw-w-2/3" *ngIf="formGroup.value.limitServiceAccounts">
<bit-label>{{ "machineAccountLimit" | i18n }}</bit-label>
<input
bitInput
id="additionalServiceAccountLimit"
formControlName="maxAutoscaleServiceAccounts"
type="number"
step="1"
[min]="formGroup.value.additionalServiceAccounts"
/>
<bit-hint>
<div>
{{ "includedMachineAccounts" | i18n: options.baseServiceAccountCount }}
</div>
<strong>{{ "maxMachineAccountCost" | i18n }}:</strong>
{{ maxAdditionalServiceAccounts }} ×
{{ options.additionalServiceAccountPrice | currency: "$" }} =
{{ maxServiceAccountTotalCost | currency: "$" }} / {{ options.interval | i18n }}
</bit-hint>
</bit-form-field>
<button type="submit" bitButton buttonType="primary" bitFormButton>
{{ "save" | i18n }}
</button>
<bit-error-summary [formGroup]="formGroup" class="tw-mt-2"></bit-error-summary>
</form>