mirror of
https://github.com/bitwarden/web
synced 2025-12-06 00:03:28 +00:00
40 lines
1.1 KiB
TypeScript
40 lines
1.1 KiB
TypeScript
import {
|
|
Component,
|
|
EventEmitter,
|
|
Input,
|
|
Output,
|
|
} from '@angular/core';
|
|
|
|
import { ApiService } from 'jslib/abstractions/api.service';
|
|
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
|
|
|
|
import { PlanType } from 'jslib/enums/planType';
|
|
import { ProductType } from 'jslib/enums/productType';
|
|
|
|
@Component({
|
|
selector: 'app-change-plan',
|
|
templateUrl: 'change-plan.component.html',
|
|
})
|
|
export class ChangePlanComponent {
|
|
@Input() organizationId: string;
|
|
@Output() onChanged = new EventEmitter();
|
|
@Output() onCanceled = new EventEmitter();
|
|
|
|
formPromise: Promise<any>;
|
|
defaultUpgradePlan: PlanType = PlanType.FamiliesAnnually;
|
|
defaultUpgradeProduct: ProductType = ProductType.Families;
|
|
|
|
constructor(private apiService: ApiService, private platformUtilsService: PlatformUtilsService) { }
|
|
|
|
async submit() {
|
|
try {
|
|
this.platformUtilsService.eventTrack('Changed Plan');
|
|
this.onChanged.emit();
|
|
} catch { }
|
|
}
|
|
|
|
cancel() {
|
|
this.onCanceled.emit();
|
|
}
|
|
}
|