few fixes to plan changes (#624)
This commit is contained in:
parent
2135accaf4
commit
95dc3c92c5
|
@ -46,7 +46,7 @@
|
||||||
<div *ngFor="let selectableProduct of selectableProducts" class="form-check form-check-block">
|
<div *ngFor="let selectableProduct of selectableProducts" class="form-check form-check-block">
|
||||||
<input class="form-check-input" type="radio" name="product" id="product{{selectableProduct.product}}"
|
<input class="form-check-input" type="radio" name="product" id="product{{selectableProduct.product}}"
|
||||||
[value]="selectableProduct.product" [(ngModel)]="product" (change)="changedProduct()">
|
[value]="selectableProduct.product" [(ngModel)]="product" (change)="changedProduct()">
|
||||||
<label class="form-check-label" for="product">
|
<label class="form-check-label" for="product{{selectableProduct.product}}">
|
||||||
{{ selectableProduct.nameLocalizationKey | i18n}}
|
{{ selectableProduct.nameLocalizationKey | i18n}}
|
||||||
<small class="mb-1">{{ selectableProduct.descriptionLocalizationKey | i18n : '1'}}</small>
|
<small class="mb-1">{{ selectableProduct.descriptionLocalizationKey | i18n : '1'}}</small>
|
||||||
<small *ngIf="selectableProduct.product == productTypes.Free">•
|
<small *ngIf="selectableProduct.product == productTypes.Free">•
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
{{'includesXUsers' | i18n : selectableProduct.baseSeats}}
|
{{'includesXUsers' | i18n : selectableProduct.baseSeats}}
|
||||||
<ng-container *ngIf="selectableProduct.hasAdditionalSeatsOption">
|
<ng-container *ngIf="selectableProduct.hasAdditionalSeatsOption">
|
||||||
{{('additionalUsers' | i18n).toLowerCase()}}
|
{{('additionalUsers' | i18n).toLowerCase()}}
|
||||||
{{selectableProduct.seatPrice / 12| currency:'$'}} /{{'month' | i18n}}
|
{{selectableProduct.seatPrice / 12 | currency:'$'}} /{{'month' | i18n}}
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</span>
|
</span>
|
||||||
|
@ -140,7 +140,7 @@
|
||||||
<ng-container *ngIf="selectablePlan.isAnnual">
|
<ng-container *ngIf="selectablePlan.isAnnual">
|
||||||
{{'annually' | i18n}}
|
{{'annually' | i18n}}
|
||||||
<small *ngIf="selectablePlan.basePrice">
|
<small *ngIf="selectablePlan.basePrice">
|
||||||
{{'basePrice' | i18n}}: {{ selectablePlan.basePrice / 12 | currency:'$'}} ×12
|
{{'basePrice' | i18n}}: {{ selectablePlan.basePrice / 12 | currency:'$'}} × 12
|
||||||
{{'monthAbbr' | i18n}}
|
{{'monthAbbr' | i18n}}
|
||||||
=
|
=
|
||||||
{{selectablePlan.basePrice | currency:'$'}}
|
{{selectablePlan.basePrice | currency:'$'}}
|
||||||
|
@ -149,19 +149,19 @@
|
||||||
<small *ngIf="selectablePlan.hasAdditionalSeatsOption">
|
<small *ngIf="selectablePlan.hasAdditionalSeatsOption">
|
||||||
<span *ngIf="selectablePlan.baseSeats">{{'additionalUsers' | i18n}}:</span>
|
<span *ngIf="selectablePlan.baseSeats">{{'additionalUsers' | i18n}}:</span>
|
||||||
<span *ngIf="!selectablePlan.baseSeats">{{'users' | i18n}}:</span>
|
<span *ngIf="!selectablePlan.baseSeats">{{'users' | i18n}}:</span>
|
||||||
{{additionalSeats || 0}} × {{selectablePlan.seatPrice / 12 | currency:'$'}} ×12
|
{{additionalSeats || 0}} × {{selectablePlan.seatPrice / 12 | currency:'$'}} × 12
|
||||||
{{'monthAbbr' | i18n}} = {{seatTotal(selectablePlan)
|
{{'monthAbbr' | i18n}} = {{seatTotal(selectablePlan)
|
||||||
| currency:'$'}} /{{'year' | i18n}}
|
| currency:'$'}} /{{'year' | i18n}}
|
||||||
</small>
|
</small>
|
||||||
<small *ngIf="selectablePlan.hasAdditionalStorageOption">
|
<small *ngIf="selectablePlan.hasAdditionalStorageOption">
|
||||||
{{'additionalStorageGb' | i18n}}: {{additionalStorage || 0}} ×
|
{{'additionalStorageGb' | i18n}}: {{additionalStorage || 0}} ×
|
||||||
{{selectablePlan.additionalStoragePricePerGb / 12 | currency:'$'}} ×12 {{'monthAbbr'
|
{{selectablePlan.additionalStoragePricePerGb / 12 | currency:'$'}} × 12 {{'monthAbbr'
|
||||||
| i18n}} = {{additionalStorageTotal(selectablePlan) | currency:'$'}}
|
| i18n}} = {{additionalStorageTotal(selectablePlan) | currency:'$'}}
|
||||||
/{{'year' | i18n}}
|
/{{'year' | i18n}}
|
||||||
</small>
|
</small>
|
||||||
<small *ngIf="selectablePlan.hasPremiumAccessOption && premiumAccessAddon">
|
<small *ngIf="selectablePlan.hasPremiumAccessOption && premiumAccessAddon">
|
||||||
{{'premiumAccess' | i18n}}:
|
{{'premiumAccess' | i18n}}:
|
||||||
{{selectablePlan.premiumAccessOptionCost / 12 | currency:'$'}} ×12 {{'monthAbbr' | i18n}}
|
{{selectablePlan.premiumAccessOptionCost / 12 | currency:'$'}} × 12 {{'monthAbbr' | i18n}}
|
||||||
=
|
=
|
||||||
{{40 | currency:'$'}}
|
{{40 | currency:'$'}}
|
||||||
/{{'year' | i18n}}
|
/{{'year' | i18n}}
|
||||||
|
|
|
@ -54,6 +54,8 @@ export class OrganizationPlansComponent implements OnInit {
|
||||||
name: string;
|
name: string;
|
||||||
billingEmail: string;
|
billingEmail: string;
|
||||||
businessName: string;
|
businessName: string;
|
||||||
|
productTypes = ProductType;
|
||||||
|
formPromise: Promise<any>;
|
||||||
|
|
||||||
plans: PlanResponse[];
|
plans: PlanResponse[];
|
||||||
|
|
||||||
|
@ -74,10 +76,6 @@ export class OrganizationPlansComponent implements OnInit {
|
||||||
return this.organizationId == null;
|
return this.organizationId == null;
|
||||||
}
|
}
|
||||||
|
|
||||||
get productTypes() {
|
|
||||||
return ProductType;
|
|
||||||
}
|
|
||||||
|
|
||||||
get selectedPlan() {
|
get selectedPlan() {
|
||||||
return this.plans.find((plan) => plan.type === this.plan);
|
return this.plans.find((plan) => plan.type === this.plan);
|
||||||
}
|
}
|
||||||
|
@ -286,8 +284,8 @@ export class OrganizationPlansComponent implements OnInit {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const formPromise = doSubmit();
|
this.formPromise = doSubmit();
|
||||||
await formPromise;
|
await this.formPromise;
|
||||||
this.onSuccess.emit();
|
this.onSuccess.emit();
|
||||||
} catch { }
|
} catch { }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue