1
0
mirror of https://github.com/bitwarden/web synced 2026-02-22 12:23:25 +00:00

tax info collection zip + VAT

This commit is contained in:
Chad Scharf
2020-06-08 17:24:05 -04:00
parent 2b0c92a4ea
commit 23056bcd63
7 changed files with 674 additions and 9 deletions

View File

@@ -33,6 +33,11 @@ export class AdjustPaymentComponent {
paymentMethodType = PaymentMethodType;
formPromise: Promise<any>;
address: any = {
country: 'US',
postal_code: null,
};
constructor(private apiService: ApiService, private i18nService: I18nService,
private analytics: Angulartics2, private toasterService: ToasterService) { }
@@ -60,4 +65,16 @@ export class AdjustPaymentComponent {
cancel() {
this.onCanceled.emit();
}
changeCountry() {
if (this.address.country === 'US') {
this.paymentComponent.hideBank = !this.organizationId;
} else {
this.paymentComponent.hideBank = true;
if (this.paymentComponent.method === PaymentMethodType.BankAccount) {
this.paymentComponent.method = PaymentMethodType.Card;
this.paymentComponent.changeMethod();
}
}
}
}