mirror of https://github.com/bitwarden/web.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
39 lines
1.1 KiB
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(); |
|
} |
|
}
|
|
|