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

VIH-11119 bugfix selecting interpreter required causes detection change error #1448

Merged
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
@@ -1,4 +1,4 @@
import { ChangeDetectorRef, Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges } from '@angular/core';
import { ChangeDetectorRef, Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
import { Subject, takeUntil } from 'rxjs';
import { AvailableLanguageResponse, InterprepretationType } from 'src/app/services/clients/api-client';
Expand All @@ -9,13 +9,13 @@ import { InterpreterSelectedDto } from './interpreter-selected.model';
selector: 'app-interpreter-form',
templateUrl: './interpreter-form.component.html'
})
export class InterpreterFormComponent implements OnInit, OnDestroy, OnChanges {
export class InterpreterFormComponent implements OnInit, OnDestroy {
forceDisplayForm: boolean;

@Input() set requireLanguageSelection(forceSelection: boolean) {
this.forceDisplayForm = forceSelection;
this.displayForm = forceSelection;
this.cdRef.detectChanges();
this.cdRef.markForCheck();
}

@Output() interpreterLanguageSelected = new EventEmitter<InterpreterSelectedDto>();
Expand All @@ -36,12 +36,6 @@ export class InterpreterFormComponent implements OnInit, OnDestroy, OnChanges {
this.createForm();
}

ngOnChanges(changes: SimpleChanges): void {
if (changes.requireLanguageSelection) {
this.forceValidation();
}
}

get availableSignLanguages(): AvailableLanguageResponse[] {
return this.availableLanguages.filter(l => l.type === InterprepretationType.Sign);
}
Expand Down
Loading