1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 16:23:44 +00:00

[PM-16682] Provider setup tax id is not saved (#12678)

This commit is contained in:
Jonas Hendrickx
2025-01-13 19:26:50 +01:00
committed by GitHub
parent be77489baa
commit f28664716f

View File

@@ -23,8 +23,7 @@ import { KeyService } from "@bitwarden/key-management";
templateUrl: "setup.component.html", templateUrl: "setup.component.html",
}) })
export class SetupComponent implements OnInit, OnDestroy { export class SetupComponent implements OnInit, OnDestroy {
@ViewChild(ManageTaxInformationComponent) @ViewChild(ManageTaxInformationComponent) taxInformationComponent: ManageTaxInformationComponent;
manageTaxInformationComponent: ManageTaxInformationComponent;
loading = true; loading = true;
providerId: string; providerId: string;
@@ -111,7 +110,7 @@ export class SetupComponent implements OnInit, OnDestroy {
try { try {
this.formGroup.markAllAsTouched(); this.formGroup.markAllAsTouched();
if (!this.manageTaxInformationComponent.validate() || !this.formGroup.valid) { if (!this.taxInformationComponent.validate() || !this.formGroup.valid) {
return; return;
} }
@@ -125,7 +124,7 @@ export class SetupComponent implements OnInit, OnDestroy {
request.key = key; request.key = key;
request.taxInfo = new ExpandedTaxInfoUpdateRequest(); request.taxInfo = new ExpandedTaxInfoUpdateRequest();
const taxInformation = this.manageTaxInformationComponent.getTaxInformation(); const taxInformation = this.taxInformationComponent.getTaxInformation();
request.taxInfo.country = taxInformation.country; request.taxInfo.country = taxInformation.country;
request.taxInfo.postalCode = taxInformation.postalCode; request.taxInfo.postalCode = taxInformation.postalCode;
@@ -147,6 +146,7 @@ export class SetupComponent implements OnInit, OnDestroy {
await this.router.navigate(["/providers", provider.id]); await this.router.navigate(["/providers", provider.id]);
} catch (e) { } catch (e) {
e.message = this.i18nService.translate(e.message) || e.message;
this.validationService.showError(e); this.validationService.showError(e);
} }
}; };