diff --git a/src/app/organizations/settings/organization-subscription.component.html b/src/app/organizations/settings/organization-subscription.component.html index 6aeaabb130..6128f74833 100644 --- a/src/app/organizations/settings/organization-subscription.component.html +++ b/src/app/organizations/settings/organization-subscription.component.html @@ -24,7 +24,7 @@
{{'billingPlan' | i18n}}
-
{{sub.plan}}
+
{{sub.plan.name}}
{{'expiration' | i18n}}
{{sub.expiration | date:'mediumDate'}} @@ -39,7 +39,7 @@
{{'billingPlan' | i18n}}
-
{{sub.plan}}
+
{{sub.plan.name}}
{{'status' | i18n}}
diff --git a/src/app/organizations/settings/organization-subscription.component.ts b/src/app/organizations/settings/organization-subscription.component.ts index 84ab997483..20cbb983e9 100644 --- a/src/app/organizations/settings/organization-subscription.component.ts +++ b/src/app/organizations/settings/organization-subscription.component.ts @@ -13,7 +13,6 @@ import { ApiService } from 'jslib/abstractions/api.service'; import { I18nService } from 'jslib/abstractions/i18n.service'; import { MessagingService } from 'jslib/abstractions/messaging.service'; import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service'; -import { TokenService } from 'jslib/abstractions/token.service'; import { PlanType } from 'jslib/enums/planType'; @@ -38,10 +37,10 @@ export class OrganizationSubscriptionComponent implements OnInit { cancelPromise: Promise; reinstatePromise: Promise; - constructor(private tokenService: TokenService, private apiService: ApiService, - private platformUtilsService: PlatformUtilsService, private i18nService: I18nService, - private analytics: Angulartics2, private toasterService: ToasterService, - private messagingService: MessagingService, private route: ActivatedRoute) { + constructor(private apiService: ApiService, private platformUtilsService: PlatformUtilsService, + private i18nService: I18nService, private analytics: Angulartics2, + private toasterService: ToasterService, private messagingService: MessagingService, + private route: ActivatedRoute) { this.selfHosted = platformUtilsService.isSelfHost(); } @@ -192,34 +191,20 @@ export class OrganizationSubscriptionComponent implements OnInit { } get billingInterval() { - const monthly = this.sub.planType === PlanType.EnterpriseMonthly || - this.sub.planType === PlanType.TeamsMonthly; + const monthly = !this.sub.plan.isAnnual; return monthly ? 'month' : 'year'; } get storageGbPrice() { - return this.billingInterval === 'month' ? 0.5 : 4; + return this.sub.plan.additionalStoragePricePerGb; } get seatPrice() { - switch (this.sub.planType) { - case PlanType.EnterpriseMonthly: - return 4; - case PlanType.EnterpriseAnnually: - return 36; - case PlanType.TeamsMonthly: - return 2.5; - case PlanType.TeamsAnnually: - return 24; - default: - return 0; - } + return this.sub.plan.seatPrice; } get canAdjustSeats() { - return this.sub.planType === PlanType.EnterpriseMonthly || - this.sub.planType === PlanType.EnterpriseAnnually || - this.sub.planType === PlanType.TeamsMonthly || this.sub.planType === PlanType.TeamsAnnually; + return this.sub.plan.hasAdditionalSeatsOption; } get canDownloadLicense() { diff --git a/src/app/settings/organization-plans.component.html b/src/app/settings/organization-plans.component.html index 92285b6e0f..fded4f7eee 100644 --- a/src/app/settings/organization-plans.component.html +++ b/src/app/settings/organization-plans.component.html @@ -1,3 +1,7 @@ + + + {{'loading' | i18n}} +

{{'uploadLicenseFileOrg' | i18n}}

@@ -13,7 +17,8 @@
-
+

{{'generalInformation' | i18n}}

@@ -38,69 +43,53 @@

{{'chooseYourPlan' | i18n}}

-
- -