Skip to content

Commit

Permalink
lmendoza/fixes-oct-1
Browse files Browse the repository at this point in the history
  • Loading branch information
leomendoza123 committed Oct 2, 2024
1 parent d582763 commit 942bf20
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ <h1 class="orc-font-body-large">
[activitySection]="'affiliations'"
></app-summary-panel>
</ng-container>
<ng-container *ngIf="emailDomains.length >= 1">
<ng-container *ngIf="emailDomains?.length >= 1">
<a
tabindex="0"
rel="noopener noreferrer"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ export class CustomEventService {
eventName,
elapsedTime,
}
;(this.window as any).newrelic.addPageAction(journeyType, eventAttributes)

if (typeof (this.window as any)?.addPageAction === 'function') {
;(this.window as any).newrelic.addPageAction(journeyType, eventAttributes)
}
// Send the custom event to New Relic

if (environment.debugger) {
Expand Down Expand Up @@ -94,7 +95,9 @@ export class CustomEventService {
}

// Send the final custom event to New Relic
;(this.window as any).addPageAction(journeyType, finalAttributes)
if (typeof (this.window as any)?.addPageAction === 'function') {
;(this.window as any).addPageAction(journeyType, finalAttributes)
}

// Clean up the journey data
delete this.journeys[journeyType]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { merge, Subject } from 'rxjs'
import { Register2Service } from 'src/app/core/register2/register2.service'

import { BaseForm } from '../BaseForm'
import { RegisterStateService } from '../../register-state.service'

@Component({
selector: 'app-form-anti-robots',
Expand All @@ -31,23 +32,26 @@ import { BaseForm } from '../BaseForm'
],
})
export class FormAntiRobotsComponent extends BaseForm implements OnInit {
@Input() nextButtonWasClicked
captchaFailState = false
captchaLoadedWithWidgetId: number
$widgetIdUpdated = new Subject()
errorState = false
nextButtonWasClicked = false
captcha = new UntypedFormControl(null, {
validators: [this.captchaValidator()],
})
ngOnInit(): void {
this.form = new UntypedFormGroup({
captcha: this.captcha,
})
this._registerStateService.getNextButtonClickFor('d').subscribe(() => {
this.nextButtonWasClicked = true
})
}

constructor(
private _register: Register2Service,
private _errorStateMatcher: ErrorStateMatcher
private _registerStateService: RegisterStateService
) {
super()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { Register2Service } from 'src/app/core/register2/register2.service'
import { environment } from 'src/environments/environment'

import { BaseForm } from '../BaseForm'
import { RegisterStateService } from '../../register-state.service'

@Component({
selector: 'app-form-terms',
Expand All @@ -36,11 +37,12 @@ import { BaseForm } from '../BaseForm'
})
// tslint:disable-next-line: class-name
export class FormTermsComponent extends BaseForm implements OnInit, DoCheck {
@Input() nextButtonWasClicked: boolean
nextButtonWasClicked: boolean
environment = environment
constructor(
private _register: Register2Service,
private _errorStateMatcher: ErrorStateMatcher
private _errorStateMatcher: ErrorStateMatcher,
private _registerStateService: RegisterStateService
) {
super()
}
Expand All @@ -53,6 +55,9 @@ export class FormTermsComponent extends BaseForm implements OnInit, DoCheck {
termsOfUse: this.termsOfUse,
dataProcessed: this.dataProcessed,
})
this._registerStateService.getNextButtonClickFor('d').subscribe(() => {
this.nextButtonWasClicked = true
})
}

// OVERWRITE
Expand Down
2 changes: 0 additions & 2 deletions src/app/register2/components/step-d/step-d.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,9 @@ <h2 class="orc-font-body-small" i18n="@@register.step5.3">
></app-form-notifications>
<app-form-terms
formControlName="termsOfUse"
[nextButtonWasClicked]="nextButtonWasClicked"
></app-form-terms>
<app-form-anti-robots
formControlName="captcha"
[nextButtonWasClicked]="nextButtonWasClicked"
></app-form-anti-robots>
<div class="step-actions">
<button
Expand Down
2 changes: 0 additions & 2 deletions src/app/register2/components/step-d/step-d.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ export class StepDComponent extends BaseStepDirective {
@Input() loading
@Input() reactivation: ReactivationLocal

nextButtonWasClicked = false

constructor(
private _registrationStateService: RegisterStateService,
private _registerObservabilityService: RegisterObservabilityService
Expand Down

0 comments on commit 942bf20

Please sign in to comment.