From ca4ac38fcb7af84a343db1d7c00a85e632b0f55d Mon Sep 17 00:00:00 2001 From: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com> Date: Tue, 2 Jul 2024 23:21:37 +0100 Subject: [PATCH] [AC-2830] Unable to create a free organization (#9917) * Resolve the issue free org creation * Check that the taxForm is touched --- .../accounts/trial-initiation/trial-billing-step.component.ts | 2 +- apps/web/src/app/billing/individual/premium.component.ts | 2 +- .../app/billing/organizations/organization-plans.component.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/src/app/billing/accounts/trial-initiation/trial-billing-step.component.ts b/apps/web/src/app/billing/accounts/trial-initiation/trial-billing-step.component.ts index 732f0a8e59..2aa15b371c 100644 --- a/apps/web/src/app/billing/accounts/trial-initiation/trial-billing-step.component.ts +++ b/apps/web/src/app/billing/accounts/trial-initiation/trial-billing-step.component.ts @@ -86,7 +86,7 @@ export class TrialBillingStepComponent implements OnInit { } async submit(): Promise { - if (!this.taxInfoComponent.taxFormGroup.valid) { + if (!this.taxInfoComponent.taxFormGroup.valid && this.taxInfoComponent?.taxFormGroup.touched) { this.taxInfoComponent.taxFormGroup.markAllAsTouched(); return; } diff --git a/apps/web/src/app/billing/individual/premium.component.ts b/apps/web/src/app/billing/individual/premium.component.ts index 19c1261d9e..d76d8d21e7 100644 --- a/apps/web/src/app/billing/individual/premium.component.ts +++ b/apps/web/src/app/billing/individual/premium.component.ts @@ -65,7 +65,7 @@ export class PremiumComponent implements OnInit { } } submit = async () => { - if (!this.taxInfoComponent.taxFormGroup.valid) { + if (!this.taxInfoComponent.taxFormGroup.valid && this.taxInfoComponent?.taxFormGroup.touched) { this.taxInfoComponent.taxFormGroup.markAllAsTouched(); return; } diff --git a/apps/web/src/app/billing/organizations/organization-plans.component.ts b/apps/web/src/app/billing/organizations/organization-plans.component.ts index 045e368109..661b896913 100644 --- a/apps/web/src/app/billing/organizations/organization-plans.component.ts +++ b/apps/web/src/app/billing/organizations/organization-plans.component.ts @@ -549,7 +549,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy { } submit = async () => { - if (!this.taxComponent?.taxFormGroup.valid) { + if (!this.taxComponent?.taxFormGroup.valid && this.taxComponent?.taxFormGroup.touched) { this.taxComponent?.taxFormGroup.markAllAsTouched(); return; }