Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lmendoza/batch fixes 17 jan 2024 #2137

Merged
merged 4 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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