mirror of
https://github.com/bitwarden/browser
synced 2025-01-24 02:04:40 +01:00
[PM-16682] Provider setup tax id is not saved (#12678)
This commit is contained in:
parent
be77489baa
commit
f28664716f
@ -23,8 +23,7 @@ import { KeyService } from "@bitwarden/key-management";
|
||||
templateUrl: "setup.component.html",
|
||||
})
|
||||
export class SetupComponent implements OnInit, OnDestroy {
|
||||
@ViewChild(ManageTaxInformationComponent)
|
||||
manageTaxInformationComponent: ManageTaxInformationComponent;
|
||||
@ViewChild(ManageTaxInformationComponent) taxInformationComponent: ManageTaxInformationComponent;
|
||||
|
||||
loading = true;
|
||||
providerId: string;
|
||||
@ -111,7 +110,7 @@ export class SetupComponent implements OnInit, OnDestroy {
|
||||
try {
|
||||
this.formGroup.markAllAsTouched();
|
||||
|
||||
if (!this.manageTaxInformationComponent.validate() || !this.formGroup.valid) {
|
||||
if (!this.taxInformationComponent.validate() || !this.formGroup.valid) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -125,7 +124,7 @@ export class SetupComponent implements OnInit, OnDestroy {
|
||||
request.key = key;
|
||||
|
||||
request.taxInfo = new ExpandedTaxInfoUpdateRequest();
|
||||
const taxInformation = this.manageTaxInformationComponent.getTaxInformation();
|
||||
const taxInformation = this.taxInformationComponent.getTaxInformation();
|
||||
|
||||
request.taxInfo.country = taxInformation.country;
|
||||
request.taxInfo.postalCode = taxInformation.postalCode;
|
||||
@ -147,6 +146,7 @@ export class SetupComponent implements OnInit, OnDestroy {
|
||||
|
||||
await this.router.navigate(["/providers", provider.id]);
|
||||
} catch (e) {
|
||||
e.message = this.i18nService.translate(e.message) || e.message;
|
||||
this.validationService.showError(e);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user