diff --git a/src/app/settings/create-organization.component.ts b/src/app/settings/create-organization.component.ts index 707159c0bb..7788557699 100644 --- a/src/app/settings/create-organization.component.ts +++ b/src/app/settings/create-organization.component.ts @@ -5,6 +5,9 @@ import { } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; +import { PlanType } from 'jslib/enums/planType'; +import { ProductType } from 'jslib/enums/productType'; + import { OrganizationPlansComponent } from './organization-plans.component'; @Component({ @@ -18,8 +21,15 @@ export class CreateOrganizationComponent implements OnInit { ngOnInit() { const queryParamsSub = this.route.queryParams.subscribe(async (qParams) => { - if (qParams.plan === 'families' || qParams.plan === 'teams' || qParams.plan === 'enterprise') { - this.orgPlansComponent.plan = qParams.plan; + if (qParams.plan === 'families') { + this.orgPlansComponent.plan = PlanType.FamiliesAnnually; + this.orgPlansComponent.product = ProductType.Families; + } else if (qParams.plan === 'teams') { + this.orgPlansComponent.plan = PlanType.TeamsAnnually; + this.orgPlansComponent.product = ProductType.Teams; + } else if (qParams.plan === 'enterprise') { + this.orgPlansComponent.plan = PlanType.EnterpriseAnnually; + this.orgPlansComponent.product = ProductType.Enterprise; } if (queryParamsSub != null) { queryParamsSub.unsubscribe(); diff --git a/src/app/settings/organization-plans.component.html b/src/app/settings/organization-plans.component.html index 4419910088..4e26e35c99 100644 --- a/src/app/settings/organization-plans.component.html +++ b/src/app/settings/organization-plans.component.html @@ -54,6 +54,9 @@ • {{'onPremHostingOptional' | i18n}} • {{'includeSsoAuthentication' | i18n}} • {{'includeEnterprisePolicies' | i18n}} + • + {{'xDayFreeTrial' | i18n : selectableProduct.trialPeriodDays }} + • diff --git a/src/app/settings/organization-plans.component.ts b/src/app/settings/organization-plans.component.ts index d2ca0f4781..803f2bd994 100644 --- a/src/app/settings/organization-plans.component.ts +++ b/src/app/settings/organization-plans.component.ts @@ -74,6 +74,9 @@ export class OrganizationPlansComponent implements OnInit { if (!this.selfHosted) { const plans = await this.apiService.getPlans(); this.plans = plans.data; + if (this.product === ProductType.Enterprise || this.product === ProductType.Teams) { + this.ownedBusiness = true; + } } this.loading = false; } @@ -189,7 +192,8 @@ export class OrganizationPlansComponent implements OnInit { if (!this.ownedBusiness || this.selectedPlan.canBeUsedByBusiness) { return; } - this.plan = PlanType.TeamsMonthly; + this.product = ProductType.Teams; + this.plan = PlanType.TeamsAnnually; } changedCountry() {