2022-05-10 23:11:59 +02:00
|
|
|
import { Component, OnInit, ViewChild, ViewContainerRef } from "@angular/core";
|
2019-02-18 21:28:23 +01:00
|
|
|
import { ActivatedRoute } from "@angular/router";
|
|
|
|
|
2022-06-14 17:10:53 +02:00
|
|
|
import { ModalRef } from "@bitwarden/angular/components/modal/modal.ref";
|
|
|
|
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
|
|
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
|
|
|
import { I18nService } from "@bitwarden/common/abstractions/i18n.service";
|
|
|
|
import { LogService } from "@bitwarden/common/abstractions/log.service";
|
|
|
|
import { MessagingService } from "@bitwarden/common/abstractions/messaging.service";
|
|
|
|
import { OrganizationService } from "@bitwarden/common/abstractions/organization.service";
|
2022-08-24 18:33:05 +02:00
|
|
|
import { OrganizationApiServiceAbstraction } from "@bitwarden/common/abstractions/organization/organization-api.service.abstraction";
|
2022-06-14 17:10:53 +02:00
|
|
|
import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service";
|
|
|
|
import { OrganizationApiKeyType } from "@bitwarden/common/enums/organizationApiKeyType";
|
|
|
|
import { OrganizationConnectionType } from "@bitwarden/common/enums/organizationConnectionType";
|
|
|
|
import { PlanType } from "@bitwarden/common/enums/planType";
|
|
|
|
import { BillingSyncConfigApi } from "@bitwarden/common/models/api/billingSyncConfigApi";
|
|
|
|
import { Organization } from "@bitwarden/common/models/domain/organization";
|
|
|
|
import { OrganizationConnectionResponse } from "@bitwarden/common/models/response/organizationConnectionResponse";
|
|
|
|
import { OrganizationSubscriptionResponse } from "@bitwarden/common/models/response/organizationSubscriptionResponse";
|
2019-02-18 21:28:23 +01:00
|
|
|
|
2022-08-03 21:40:04 +02:00
|
|
|
import { BillingSyncKeyComponent } from "../../settings/billing-sync-key.component";
|
2022-05-10 23:11:59 +02:00
|
|
|
|
|
|
|
import { BillingSyncApiKeyComponent } from "./billing-sync-api-key.component";
|
|
|
|
|
2019-02-18 21:28:23 +01:00
|
|
|
@Component({
|
|
|
|
selector: "app-org-subscription",
|
|
|
|
templateUrl: "organization-subscription.component.html",
|
|
|
|
})
|
2022-08-26 18:09:28 +02:00
|
|
|
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
|
2019-02-18 21:28:23 +01:00
|
|
|
export class OrganizationSubscriptionComponent implements OnInit {
|
2022-05-10 23:11:59 +02:00
|
|
|
@ViewChild("setupBillingSyncTemplate", { read: ViewContainerRef, static: true })
|
|
|
|
setupBillingSyncModalRef: ViewContainerRef;
|
|
|
|
|
2019-02-18 21:28:23 +01:00
|
|
|
loading = false;
|
|
|
|
firstLoaded = false;
|
|
|
|
organizationId: string;
|
|
|
|
adjustSeatsAdd = true;
|
|
|
|
showAdjustSeats = false;
|
2021-09-27 21:23:12 +02:00
|
|
|
showAdjustSeatAutoscale = false;
|
2019-02-18 21:28:23 +01:00
|
|
|
adjustStorageAdd = true;
|
|
|
|
showAdjustStorage = false;
|
|
|
|
showUpdateLicense = false;
|
2022-05-10 23:11:59 +02:00
|
|
|
showBillingSyncKey = false;
|
2019-03-20 14:56:50 +01:00
|
|
|
showDownloadLicense = false;
|
2019-03-20 15:11:51 +01:00
|
|
|
showChangePlan = false;
|
2019-02-18 21:28:23 +01:00
|
|
|
sub: OrganizationSubscriptionResponse;
|
|
|
|
selfHosted = false;
|
2022-05-10 23:11:59 +02:00
|
|
|
hasBillingSyncToken: boolean;
|
2021-12-17 15:57:11 +01:00
|
|
|
|
2021-07-21 11:32:27 +02:00
|
|
|
userOrg: Organization;
|
2022-05-10 23:11:59 +02:00
|
|
|
existingBillingSyncConnection: OrganizationConnectionResponse<BillingSyncConfigApi>;
|
2021-12-17 15:57:11 +01:00
|
|
|
|
2022-08-24 18:33:05 +02:00
|
|
|
removeSponsorshipPromise: Promise<void>;
|
|
|
|
cancelPromise: Promise<void>;
|
|
|
|
reinstatePromise: Promise<void>;
|
2021-12-17 15:57:11 +01:00
|
|
|
|
2022-05-10 23:11:59 +02:00
|
|
|
@ViewChild("rotateBillingSyncKeyTemplate", { read: ViewContainerRef, static: true })
|
|
|
|
billingSyncKeyViewContainerRef: ViewContainerRef;
|
|
|
|
billingSyncKeyRef: [ModalRef, BillingSyncKeyComponent];
|
|
|
|
|
2020-08-12 23:16:38 +02:00
|
|
|
constructor(
|
|
|
|
private apiService: ApiService,
|
|
|
|
private platformUtilsService: PlatformUtilsService,
|
2021-12-07 20:41:45 +01:00
|
|
|
private i18nService: I18nService,
|
2021-07-21 11:32:27 +02:00
|
|
|
private messagingService: MessagingService,
|
|
|
|
private route: ActivatedRoute,
|
2021-12-14 17:10:26 +01:00
|
|
|
private organizationService: OrganizationService,
|
2022-05-10 23:11:59 +02:00
|
|
|
private logService: LogService,
|
2022-08-24 18:33:05 +02:00
|
|
|
private modalService: ModalService,
|
|
|
|
private organizationApiService: OrganizationApiServiceAbstraction
|
2021-12-14 17:10:26 +01:00
|
|
|
) {
|
2019-02-18 21:28:23 +01:00
|
|
|
this.selfHosted = platformUtilsService.isSelfHost();
|
2021-12-17 15:57:11 +01:00
|
|
|
}
|
|
|
|
|
2019-02-18 21:28:23 +01:00
|
|
|
async ngOnInit() {
|
2022-08-26 18:09:28 +02:00
|
|
|
// eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe
|
2021-02-03 18:41:33 +01:00
|
|
|
this.route.parent.parent.params.subscribe(async (params) => {
|
2019-02-18 21:28:23 +01:00
|
|
|
this.organizationId = params.organizationId;
|
|
|
|
await this.load();
|
|
|
|
this.firstLoaded = true;
|
2021-12-17 15:57:11 +01:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2019-02-18 21:28:23 +01:00
|
|
|
async load() {
|
|
|
|
if (this.loading) {
|
2021-12-17 15:57:11 +01:00
|
|
|
return;
|
2019-02-18 21:28:23 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
this.loading = true;
|
2021-12-14 17:10:26 +01:00
|
|
|
this.userOrg = await this.organizationService.get(this.organizationId);
|
2022-05-10 09:41:52 +02:00
|
|
|
if (this.userOrg.canManageBilling) {
|
2022-08-24 18:33:05 +02:00
|
|
|
this.sub = await this.organizationApiService.getSubscription(this.organizationId);
|
2022-05-10 09:41:52 +02:00
|
|
|
}
|
2022-08-24 18:33:05 +02:00
|
|
|
const apiKeyResponse = await this.organizationApiService.getApiKeyInformation(
|
2022-05-10 23:11:59 +02:00
|
|
|
this.organizationId
|
|
|
|
);
|
|
|
|
this.hasBillingSyncToken = apiKeyResponse.data.some(
|
|
|
|
(i) => i.keyType === OrganizationApiKeyType.BillingSync
|
|
|
|
);
|
|
|
|
|
|
|
|
if (this.selfHosted) {
|
|
|
|
this.showBillingSyncKey = await this.apiService.getCloudCommunicationsEnabled();
|
|
|
|
}
|
|
|
|
|
|
|
|
if (this.showBillingSyncKey) {
|
|
|
|
this.existingBillingSyncConnection = await this.apiService.getOrganizationConnection(
|
|
|
|
this.organizationId,
|
|
|
|
OrganizationConnectionType.CloudBillingSync,
|
|
|
|
BillingSyncConfigApi
|
|
|
|
);
|
|
|
|
}
|
2022-05-10 09:41:52 +02:00
|
|
|
|
2019-02-18 21:28:23 +01:00
|
|
|
this.loading = false;
|
2019-03-20 15:11:51 +01:00
|
|
|
}
|
2019-02-18 21:28:23 +01:00
|
|
|
|
|
|
|
async reinstate() {
|
|
|
|
if (this.loading) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
const confirmed = await this.platformUtilsService.showDialog(
|
|
|
|
this.i18nService.t("reinstateConfirmation"),
|
|
|
|
this.i18nService.t("reinstateSubscription"),
|
|
|
|
this.i18nService.t("yes"),
|
|
|
|
this.i18nService.t("cancel")
|
|
|
|
);
|
|
|
|
if (!confirmed) {
|
2021-12-17 15:57:11 +01:00
|
|
|
return;
|
2019-02-18 21:28:23 +01:00
|
|
|
}
|
|
|
|
|
2021-09-27 21:23:12 +02:00
|
|
|
try {
|
2022-08-24 18:33:05 +02:00
|
|
|
this.reinstatePromise = this.organizationApiService.reinstate(this.organizationId);
|
2019-02-18 21:28:23 +01:00
|
|
|
await this.reinstatePromise;
|
2021-09-27 21:23:12 +02:00
|
|
|
this.platformUtilsService.showToast("success", null, this.i18nService.t("reinstated"));
|
|
|
|
this.load();
|
2021-10-20 18:30:04 +02:00
|
|
|
} catch (e) {
|
|
|
|
this.logService.error(e);
|
2019-02-18 21:28:23 +01:00
|
|
|
}
|
2021-12-17 15:57:11 +01:00
|
|
|
}
|
2019-02-18 21:28:23 +01:00
|
|
|
|
|
|
|
async cancel() {
|
|
|
|
if (this.loading) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
const confirmed = await this.platformUtilsService.showDialog(
|
|
|
|
this.i18nService.t("cancelConfirmation"),
|
|
|
|
this.i18nService.t("cancelSubscription"),
|
|
|
|
this.i18nService.t("yes"),
|
|
|
|
this.i18nService.t("no"),
|
2021-12-17 15:57:11 +01:00
|
|
|
"warning"
|
2019-02-18 21:28:23 +01:00
|
|
|
);
|
|
|
|
if (!confirmed) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2021-11-22 14:41:40 +01:00
|
|
|
try {
|
2022-08-24 18:33:05 +02:00
|
|
|
this.cancelPromise = this.organizationApiService.cancel(this.organizationId);
|
2021-11-22 14:41:40 +01:00
|
|
|
await this.cancelPromise;
|
2021-12-07 20:41:45 +01:00
|
|
|
this.platformUtilsService.showToast(
|
|
|
|
"success",
|
|
|
|
null,
|
|
|
|
this.i18nService.t("canceledSubscription")
|
|
|
|
);
|
2021-11-22 14:41:40 +01:00
|
|
|
this.load();
|
|
|
|
} catch (e) {
|
|
|
|
this.logService.error(e);
|
|
|
|
}
|
2021-12-17 15:57:11 +01:00
|
|
|
}
|
2021-11-22 14:41:40 +01:00
|
|
|
|
2019-02-18 21:28:23 +01:00
|
|
|
async changePlan() {
|
|
|
|
this.showChangePlan = !this.showChangePlan;
|
|
|
|
}
|
|
|
|
|
|
|
|
closeChangePlan(changed: boolean) {
|
|
|
|
this.showChangePlan = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
downloadLicense() {
|
|
|
|
this.showDownloadLicense = !this.showDownloadLicense;
|
|
|
|
}
|
|
|
|
|
2022-05-10 23:11:59 +02:00
|
|
|
async manageBillingSync() {
|
|
|
|
const [ref] = await this.modalService.openViewRef(
|
|
|
|
BillingSyncApiKeyComponent,
|
|
|
|
this.setupBillingSyncModalRef,
|
|
|
|
(comp) => {
|
|
|
|
comp.organizationId = this.organizationId;
|
|
|
|
comp.hasBillingToken = this.hasBillingSyncToken;
|
|
|
|
}
|
|
|
|
);
|
2022-08-26 18:09:28 +02:00
|
|
|
// eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe
|
2022-05-10 23:11:59 +02:00
|
|
|
ref.onClosed.subscribe(async () => {
|
|
|
|
await this.load();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2019-02-18 21:28:23 +01:00
|
|
|
closeDownloadLicense() {
|
2020-08-12 23:16:38 +02:00
|
|
|
this.showDownloadLicense = false;
|
2019-02-18 21:28:23 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
updateLicense() {
|
2020-08-12 23:16:38 +02:00
|
|
|
if (this.loading) {
|
|
|
|
return;
|
2019-02-18 21:28:23 +01:00
|
|
|
}
|
|
|
|
this.showUpdateLicense = true;
|
2021-12-17 15:57:11 +01:00
|
|
|
}
|
|
|
|
|
2019-02-18 21:28:23 +01:00
|
|
|
closeUpdateLicense(updated: boolean) {
|
2020-08-12 23:16:38 +02:00
|
|
|
this.showUpdateLicense = false;
|
2019-02-18 21:28:23 +01:00
|
|
|
if (updated) {
|
|
|
|
this.load();
|
2020-08-12 23:16:38 +02:00
|
|
|
this.messagingService.send("updatedOrgLicense");
|
2019-02-18 21:28:23 +01:00
|
|
|
}
|
2021-12-17 15:57:11 +01:00
|
|
|
}
|
2019-02-18 21:28:23 +01:00
|
|
|
|
2021-09-27 21:23:12 +02:00
|
|
|
subscriptionAdjusted() {
|
|
|
|
this.load();
|
|
|
|
}
|
|
|
|
|
|
|
|
adjustStorage(add: boolean) {
|
|
|
|
this.adjustStorageAdd = add;
|
|
|
|
this.showAdjustStorage = true;
|
|
|
|
}
|
|
|
|
|
2019-02-18 21:28:23 +01:00
|
|
|
closeStorage(load: boolean) {
|
2020-08-12 23:16:38 +02:00
|
|
|
this.showAdjustStorage = false;
|
2019-02-18 21:28:23 +01:00
|
|
|
if (load) {
|
|
|
|
this.load();
|
|
|
|
}
|
2021-12-17 15:57:11 +01:00
|
|
|
}
|
|
|
|
|
2021-11-22 14:41:40 +01:00
|
|
|
async removeSponsorship() {
|
|
|
|
const isConfirmed = await this.platformUtilsService.showDialog(
|
|
|
|
this.i18nService.t("removeSponsorshipConfirmation"),
|
|
|
|
this.i18nService.t("removeSponsorship"),
|
|
|
|
this.i18nService.t("remove"),
|
|
|
|
this.i18nService.t("cancel"),
|
|
|
|
"warning"
|
|
|
|
);
|
2021-12-17 15:57:11 +01:00
|
|
|
|
2021-11-22 14:41:40 +01:00
|
|
|
if (!isConfirmed) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2019-02-18 21:28:23 +01:00
|
|
|
try {
|
|
|
|
this.removeSponsorshipPromise = this.apiService.deleteRemoveSponsorship(this.organizationId);
|
2021-11-22 14:41:40 +01:00
|
|
|
await this.removeSponsorshipPromise;
|
2019-02-18 21:28:23 +01:00
|
|
|
this.platformUtilsService.showToast(
|
|
|
|
"success",
|
|
|
|
null,
|
|
|
|
this.i18nService.t("removeSponsorshipSuccess")
|
2021-12-17 15:57:11 +01:00
|
|
|
);
|
2019-02-18 21:28:23 +01:00
|
|
|
await this.load();
|
|
|
|
} catch (e) {
|
2021-10-20 18:30:04 +02:00
|
|
|
this.logService.error(e);
|
2019-02-18 21:28:23 +01:00
|
|
|
}
|
2021-12-17 15:57:11 +01:00
|
|
|
}
|
|
|
|
|
2022-05-10 23:11:59 +02:00
|
|
|
async manageBillingSyncSelfHosted() {
|
|
|
|
this.billingSyncKeyRef = await this.modalService.openViewRef(
|
|
|
|
BillingSyncKeyComponent,
|
|
|
|
this.billingSyncKeyViewContainerRef,
|
|
|
|
(comp) => {
|
|
|
|
comp.entityId = this.organizationId;
|
|
|
|
comp.existingConnectionId = this.existingBillingSyncConnection?.id;
|
|
|
|
comp.billingSyncKey = this.existingBillingSyncConnection?.config?.billingSyncKey;
|
|
|
|
comp.setParentConnection = (
|
|
|
|
connection: OrganizationConnectionResponse<BillingSyncConfigApi>
|
|
|
|
) => {
|
|
|
|
this.existingBillingSyncConnection = connection;
|
|
|
|
this.billingSyncKeyRef[0].close();
|
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2019-02-18 21:28:23 +01:00
|
|
|
get isExpired() {
|
2021-12-17 15:57:11 +01:00
|
|
|
return (
|
2019-02-18 21:28:23 +01:00
|
|
|
this.sub != null && this.sub.expiration != null && new Date(this.sub.expiration) < new Date()
|
2021-12-17 15:57:11 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2021-09-27 21:23:12 +02:00
|
|
|
get subscriptionMarkedForCancel() {
|
2021-12-17 15:57:11 +01:00
|
|
|
return (
|
2021-09-27 21:23:12 +02:00
|
|
|
this.subscription != null && !this.subscription.cancelled && this.subscription.cancelAtEndDate
|
2021-12-17 15:57:11 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2019-02-18 21:28:23 +01:00
|
|
|
get subscription() {
|
|
|
|
return this.sub != null ? this.sub.subscription : null;
|
2021-12-17 15:57:11 +01:00
|
|
|
}
|
|
|
|
|
2019-02-18 21:28:23 +01:00
|
|
|
get nextInvoice() {
|
|
|
|
return this.sub != null ? this.sub.upcomingInvoice : null;
|
2021-12-17 15:57:11 +01:00
|
|
|
}
|
|
|
|
|
2019-02-18 21:28:23 +01:00
|
|
|
get storagePercentage() {
|
|
|
|
return this.sub != null && this.sub.maxStorageGb
|
|
|
|
? +(100 * (this.sub.storageGb / this.sub.maxStorageGb)).toFixed(2)
|
2021-12-17 15:57:11 +01:00
|
|
|
: 0;
|
|
|
|
}
|
|
|
|
|
2021-09-27 21:23:12 +02:00
|
|
|
get storageProgressWidth() {
|
2019-02-18 21:28:23 +01:00
|
|
|
return this.storagePercentage < 5 ? 5 : 0;
|
2021-12-17 15:57:11 +01:00
|
|
|
}
|
|
|
|
|
2019-02-18 21:28:23 +01:00
|
|
|
get billingInterval() {
|
2020-08-12 23:16:38 +02:00
|
|
|
const monthly = !this.sub.plan.isAnnual;
|
2019-02-18 21:28:23 +01:00
|
|
|
return monthly ? "month" : "year";
|
2021-12-17 15:57:11 +01:00
|
|
|
}
|
|
|
|
|
2019-02-18 21:28:23 +01:00
|
|
|
get storageGbPrice() {
|
2020-08-12 23:16:38 +02:00
|
|
|
return this.sub.plan.additionalStoragePricePerGb;
|
2021-12-17 15:57:11 +01:00
|
|
|
}
|
|
|
|
|
2019-02-18 21:28:23 +01:00
|
|
|
get seatPrice() {
|
2021-11-01 20:29:46 +01:00
|
|
|
return this.sub.plan.seatPrice;
|
2021-12-17 15:57:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
get seats() {
|
2021-11-01 20:29:46 +01:00
|
|
|
return this.sub.seats;
|
2021-12-17 15:57:11 +01:00
|
|
|
}
|
|
|
|
|
2021-09-27 21:23:12 +02:00
|
|
|
get maxAutoscaleSeats() {
|
|
|
|
return this.sub.maxAutoscaleSeats;
|
2021-12-17 15:57:11 +01:00
|
|
|
}
|
|
|
|
|
2019-02-18 21:28:23 +01:00
|
|
|
get canAdjustSeats() {
|
2020-08-12 23:16:38 +02:00
|
|
|
return this.sub.plan.hasAdditionalSeatsOption;
|
2021-12-17 15:57:11 +01:00
|
|
|
}
|
|
|
|
|
2021-11-01 20:29:46 +01:00
|
|
|
get isSponsoredSubscription(): boolean {
|
2019-02-18 21:28:23 +01:00
|
|
|
return this.sub.subscription?.items.some((i) => i.sponsoredSubscriptionItem);
|
2021-12-17 15:57:11 +01:00
|
|
|
}
|
|
|
|
|
2019-02-18 21:28:23 +01:00
|
|
|
get canDownloadLicense() {
|
2021-12-17 15:57:11 +01:00
|
|
|
return (
|
2021-11-01 20:29:46 +01:00
|
|
|
(this.sub.planType !== PlanType.Free && this.subscription == null) ||
|
2019-02-18 21:28:23 +01:00
|
|
|
(this.subscription != null && !this.subscription.cancelled)
|
2021-12-17 15:57:11 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2022-05-10 23:11:59 +02:00
|
|
|
get canManageBillingSync() {
|
|
|
|
return (
|
|
|
|
!this.selfHosted &&
|
|
|
|
(this.sub.planType === PlanType.EnterpriseAnnually ||
|
|
|
|
this.sub.planType === PlanType.EnterpriseMonthly ||
|
|
|
|
this.sub.planType === PlanType.EnterpriseAnnually2019 ||
|
|
|
|
this.sub.planType === PlanType.EnterpriseMonthly2019)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2019-02-18 21:28:23 +01:00
|
|
|
get subscriptionDesc() {
|
|
|
|
if (this.sub.planType === PlanType.Free) {
|
2021-11-01 20:29:46 +01:00
|
|
|
return this.i18nService.t("subscriptionFreePlan", this.sub.seats.toString());
|
|
|
|
} else if (
|
|
|
|
this.sub.planType === PlanType.FamiliesAnnually ||
|
|
|
|
this.sub.planType === PlanType.FamiliesAnnually2019
|
|
|
|
) {
|
2021-11-22 14:41:40 +01:00
|
|
|
if (this.isSponsoredSubscription) {
|
|
|
|
return this.i18nService.t("subscriptionSponsoredFamiliesPlan", this.sub.seats.toString());
|
|
|
|
} else {
|
|
|
|
return this.i18nService.t("subscriptionFamiliesPlan", this.sub.seats.toString());
|
|
|
|
}
|
2021-11-01 20:29:46 +01:00
|
|
|
} else if (this.sub.maxAutoscaleSeats === this.sub.seats && this.sub.seats != null) {
|
2021-09-27 21:23:12 +02:00
|
|
|
return this.i18nService.t("subscriptionMaxReached", this.sub.seats.toString());
|
|
|
|
} else if (this.sub.maxAutoscaleSeats == null) {
|
|
|
|
return this.i18nService.t("subscriptionUserSeatsUnlimitedAutoscale");
|
|
|
|
} else {
|
|
|
|
return this.i18nService.t(
|
|
|
|
"subscriptionUserSeatsLimitedAutoscale",
|
|
|
|
this.sub.maxAutoscaleSeats.toString()
|
|
|
|
);
|
|
|
|
}
|
2021-12-17 15:57:11 +01:00
|
|
|
}
|
2021-11-01 20:29:46 +01:00
|
|
|
|
|
|
|
get showChangePlanButton() {
|
|
|
|
return this.subscription == null && this.sub.planType === PlanType.Free && !this.showChangePlan;
|
|
|
|
}
|
2022-05-10 23:11:59 +02:00
|
|
|
|
|
|
|
get billingSyncSetUp() {
|
|
|
|
return this.existingBillingSyncConnection?.id != null;
|
|
|
|
}
|
2019-02-18 21:28:23 +01:00
|
|
|
}
|