Skip to content

Commit

Permalink
Merge pull request #2137 from ORCID/lmendoza/batch-fixes-17-jan-2024
Browse files Browse the repository at this point in the history
Lmendoza/batch fixes 17 jan 2024
  • Loading branch information
leomendoza123 authored Jan 17, 2024
2 parents 450a060 + d0886bc commit 53fdb93
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ <h3 class="orc-font-body" i18n="@@register.thisLooksLikeAPersonalEmail">
*ngIf="selectedOrganizationFromDatabase && displayOrganizationHint"
>
{{ selectedOrganizationFromDatabase.value }},
{{ selectedOrganizationFromDatabase.city }}
<ng-container *ngIf="selectedOrganizationFromDatabase.city"
{{ selectedOrganizationFromDatabase.city }}<ng-container *ngIf="selectedOrganizationFromDatabase.city"
>,</ng-container
>
{{ selectedOrganizationFromDatabase.country }}
Expand Down
2 changes: 1 addition & 1 deletion src/app/register2/components/step-c/step-c.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ReactivationLocal } from '../../../types/reactivation.local'
import { BaseStepDirective } from '../BaseStep'

@Component({
selector: 'app-step-ct',
selector: 'app-step-c',
templateUrl: './step-c.component.html',
styleUrls: [
'./step-c.component.scss',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ <h2 class="orc-font-body-small" i18n="@@register.step3.3">
id="step-c-back-button"
(click)="optionalNextStep()"
>
<a i18n="@@shared.previousStep">
<a i18n="@@shared.skipThisStepWithoutAddingAnAffiliation">
Skip this step without adding an affiliation</a
>
</button>
Expand Down
15 changes: 14 additions & 1 deletion src/app/register2/components/step-c2/step-c2.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'

import { ReactivationLocal } from '../../../types/reactivation.local'
import { BaseStepDirective } from '../BaseStep'
import { FormBuilder, FormGroup } from '@angular/forms'

@Component({
selector: 'app-step-c2',
Expand All @@ -18,11 +19,23 @@ export class StepC2Component extends BaseStepDirective {
nextButtonWasClicked: boolean
@Output() formGroupStepC2OptionalChange = new EventEmitter<boolean>()

constructor() {
constructor(private _formBuilder: FormBuilder) {
super()
}

optionalNextStep() {
this.formGroup.setValue({
affiliations: {
organization: '',
departmentName: '',
roleTitle: '',
startDateGroup: {
startDateMonth: '',
startDateYear: '',
},
},
})

this.formGroupStepC2OptionalChange.emit(true)
this.nextButtonWasClicked = true
}
Expand Down
14 changes: 11 additions & 3 deletions src/app/register2/pages/register/register2.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@
[stepControl]="FormGroupStepC2"
[optional]="formGroupStepC2Optional"
>
<ng-template matStepLabel i18n="@@register.visibilityAndTerm"
>Visibility and terms</ng-template
>
<app-step-c2
#stepComponentC2
[(formGroup)]="FormGroupStepC2"
Expand All @@ -46,6 +43,17 @@
(formGroupStepC2OptionalChange)="formGroupStepC2Next($event)"
></app-step-c2>
</mat-step>
<mat-step [stepControl]="FormGroupStepC">
<ng-template matStepLabel i18n="@@register.visibilityAndTerm"
>Visibility and terms</ng-template
>
<app-step-c
#stepComponentC2
[(formGroup)]="FormGroupStepC"
[loading]="loading"
[reactivation]="reactivation"
></app-step-c>
</mat-step>
<mat-step [stepControl]="FormGroupStepD" #lastStep>
<ng-template matStepLabel i18n="@@register.visibilityAndTerm"
>Visibility and terms</ng-template
Expand Down
1 change: 1 addition & 0 deletions src/locale/properties/register/register.en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -205,3 +205,4 @@ register.rolePlaceholder=Your role or job in the organization
register.yearPlaceholder=Year
register.monthPlaceholder=Month
register.clearOrganization=Clear organization
shared.skipThisStepWithoutAddingAnAffiliation=Skip this step without adding an affiliation

0 comments on commit 53fdb93

Please sign in to comment.