From 75babd808e1688f9dff9fc11657549dbe30caa4b Mon Sep 17 00:00:00 2001 From: Leonardo Mendoza Fernadez Date: Wed, 25 Sep 2024 16:11:56 -0600 Subject: [PATCH] lmendoza/sep-24 --- .../components/step-b/step-b.component.ts | 12 ++++-------- .../components/step-c/step-c.component.ts | 8 ++------ .../components/step-c2/step-c2.component.ts | 19 +++++++++++++------ .../pages/register/register2.component.ts | 2 +- 4 files changed, 20 insertions(+), 21 deletions(-) diff --git a/src/app/register2/components/step-b/step-b.component.ts b/src/app/register2/components/step-b/step-b.component.ts index 368f0f410..03cc0971a 100644 --- a/src/app/register2/components/step-b/step-b.component.ts +++ b/src/app/register2/components/step-b/step-b.component.ts @@ -18,21 +18,17 @@ export class StepBComponent extends BaseStepDirective implements OnInit { @Input() personalData @Input() reactivation: ReactivationLocal - constructor( - private _registerStateService: RegisterStateService, - private _registerObservabilityService: RegisterObservabilityService - ) { + constructor(private _registerStateService: RegisterStateService) { super() } - ngOnInit(): void { - } + ngOnInit(): void {} nextButtonWasClicked = false nextButton2() { - this._registerStateService.registerStepperButtonClicked('b', 'next'); + this._registerStateService.registerStepperButtonClicked('b', 'next') } backButton() { - this._registerStateService.registerStepperButtonClicked('b', 'back'); + this._registerStateService.registerStepperButtonClicked('b', 'back') } } diff --git a/src/app/register2/components/step-c/step-c.component.ts b/src/app/register2/components/step-c/step-c.component.ts index 8a903a3d0..66abd4b3f 100644 --- a/src/app/register2/components/step-c/step-c.component.ts +++ b/src/app/register2/components/step-c/step-c.component.ts @@ -18,14 +18,10 @@ export class StepCComponent extends BaseStepDirective implements OnInit { @Input() loading @Input() reactivation: ReactivationLocal - constructor( - private _registrationStateService: RegisterStateService, - private _registerObservabilityService: RegisterObservabilityService - ) { + constructor(private _registrationStateService: RegisterStateService) { super() } - ngOnInit(): void { - } + ngOnInit(): void {} nextButton2() { this._registrationStateService.registerStepperButtonClicked('c', 'next') diff --git a/src/app/register2/components/step-c2/step-c2.component.ts b/src/app/register2/components/step-c2/step-c2.component.ts index b96662566..1e679c831 100644 --- a/src/app/register2/components/step-c2/step-c2.component.ts +++ b/src/app/register2/components/step-c2/step-c2.component.ts @@ -21,16 +21,23 @@ export class StepC2Component extends BaseStepDirective implements OnInit { nextButtonWasClicked: boolean @Output() formGroupStepC2OptionalChange = new EventEmitter() - constructor( - private _registrationStateService: RegisterStateService, - private _registerObservabilityService: RegisterObservabilityService - ) { + constructor(private _registrationStateService: RegisterStateService) { super() } - ngOnInit(): void { - } + ngOnInit(): void {} optionalNextStep() { + this.formGroup.setValue({ + affiliations: { + organization: '', + departmentName: '', + roleTitle: '', + startDateGroup: { + startDateMonth: '', + startDateYear: '', + }, + }, + }) this.formGroupStepC2OptionalChange.emit(true) this._registrationStateService.registerStepperButtonClicked('c2', 'skip') } diff --git a/src/app/register2/pages/register/register2.component.ts b/src/app/register2/pages/register/register2.component.ts index 795669cac..cb303e070 100644 --- a/src/app/register2/pages/register/register2.component.ts +++ b/src/app/register2/pages/register/register2.component.ts @@ -193,7 +193,7 @@ export class Register2Component implements OnInit, AfterViewInit { ERROR_REPORT.REGISTER ) this._registerObservabilityService.reportRegisterErrorEvent( - 'register-validate-fail', + 'register-validate', { errors: validator.errors, }