1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

[PM-13999] show estimated tax for taxable countries (#12245)

This commit is contained in:
Jonas Hendrickx
2025-01-02 20:28:04 +01:00
committed by GitHub
parent 3917263703
commit c724b0d974
34 changed files with 1203 additions and 1261 deletions

View File

@@ -29,7 +29,7 @@
</div>
</div>
<app-manage-tax-information />
<button bitButton bitFormButton buttonType="primary" type="submit">
<button class="tw-mt-8" bitButton bitFormButton buttonType="primary" type="submit">
{{ "submit" | i18n }}
</button>
</form>

View File

@@ -111,9 +111,7 @@ export class SetupComponent implements OnInit, OnDestroy {
try {
this.formGroup.markAllAsTouched();
const formIsValid = this.formGroup.valid && this.manageTaxInformationComponent.touch();
if (!formIsValid) {
if (!this.manageTaxInformationComponent.validate() || !this.formGroup.valid) {
return;
}
@@ -131,14 +129,11 @@ export class SetupComponent implements OnInit, OnDestroy {
request.taxInfo.country = taxInformation.country;
request.taxInfo.postalCode = taxInformation.postalCode;
if (taxInformation.includeTaxId) {
request.taxInfo.taxId = taxInformation.taxId;
request.taxInfo.line1 = taxInformation.line1;
request.taxInfo.line2 = taxInformation.line2;
request.taxInfo.city = taxInformation.city;
request.taxInfo.state = taxInformation.state;
}
request.taxInfo.taxId = taxInformation.taxId;
request.taxInfo.line1 = taxInformation.line1;
request.taxInfo.line2 = taxInformation.line2;
request.taxInfo.city = taxInformation.city;
request.taxInfo.state = taxInformation.state;
const provider = await this.providerApiService.postProviderSetup(this.providerId, request);