Skip to content

Commit

Permalink
[PM-16682] Provider setup tax id is not saved (#12678)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonashendrickx authored Jan 13, 2025
1 parent be77489 commit f286647
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand All @@ -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;
Expand All @@ -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);
}
};
Expand Down

0 comments on commit f286647

Please sign in to comment.