1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 16:53:34 +00:00

tax info collection zip + VAT

This commit is contained in:
Chad Scharf
2020-06-08 17:24:05 -04:00
parent 4309064804
commit b1c098614c
8 changed files with 675 additions and 10 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();
}
}
}
}