@if (questionForm.get('question')?.touched && questionForm.get('question')?.errors) { @if (questionForm.get('question')?.hasError('required')) {
{{ 'QUESTION_IS_REQUIRED' | translate }}
} @else if (questionForm.get('question')?.hasError('maxlength')) {
{{ 'MAXIMUM_LENGTH_IS_500_CHARACTERS' | translate }}
} }
-- {{ 'NONE' | translate }} -- @for (questionType of questionTypes; track questionType) { {{ questionType.label | translate}} } @if (questionForm.get('inputType')?.touched && questionForm.get('inputType')?.hasError('required')) {
{{ 'QUESTION_INPUT_TYPE_REQUIRED' | translate }}
}
@for (section of sections; track section) { {{ section.label | translate}} } @if (questionForm.get('section')?.touched && questionForm.get('section')?.hasError('required')) {
{{ 'QUESTION_INPUT_TYPE_REQUIRED' | translate }}
}
@if (questionForm.get('maxScore')?.touched && questionForm.get('maxScore')?.errors) { @if (questionForm.get('maxScore')?.hasError('required')) {
{{ 'MAX_SCORE_OR_WEIGHTAGE_IS_REQUIRED' | translate }}
} @if (questionForm.get('maxScore')?.hasError('pattern')) {
{{ 'ONLY_WHOLE_NUMBERS_GREATER_THAN_OR_EQUAL_TO_1_ARE_ALLOWED' | translate }}
} @if (!questionForm.get('maxScore')?.hasError('pattern') && questionForm.get('maxScore')?.hasError('min')) {
{{ 'ONLY_WHOLE_NUMBERS_GREATER_THAN_OR_EQUAL_TO_1_ARE_ALLOWED' | translate }}
} @if (!questionForm.get('maxScore')?.hasError('pattern') && questionForm.get('maxScore')?.hasError('max')) {
{{ 'ONLY_WHOLE_NUMBERS_LESS_THAN_OR_EQUAL_TO_100_ARE_ALLOWED' | translate }}
} }
{{ 'REQUIRED_EVIDENCE' | translate }}
@if (needsOptions) {
@if (questionForm.get('inputType')?.value == ratingType) { {{ 'RATING_OPTIONS' | translate }} } @else { {{ 'OPTIONS' | translate }} }
@if (questionForm.get('inputType')?.value != ratingType) { }
@for (optionControl of options.controls; track optionControl; let i = $index) {
@if (questionForm.get('inputType')?.value == ratingType) { @for (ratingNum of ratingNumbers; track ratingNum) { {{ ratingNum }} } } @else { } @if (optionControl.get('optionText')?.touched) { @if (optionControl.get('optionText')?.hasError('required')) {
@if (questionForm.get('inputType')?.value == ratingType) { {{ 'RATING_MIN_VALUE_IS_REQUIRED' | translate }} } @else { {{ 'OPTION_TEXT_IS_REQUIRED' | translate }} }
} @if (optionControl.get('optionText')?.hasError('maxlength')) {
{{ 'MAXIMUM_LENGTH_IS_200_CHARACTERS' | translate }}
} @if (optionControl?.hasError('invalidratingrange')) {
{{ 'RATING_MIN_VALUE_SHOULD_BE_LESS_THAN_RATING_MAX_VALUE' | translate }}
} }
@if (questionForm.get('inputType')?.value == ratingType) { @for (ratingNum of ratingNumbers; track ratingNum) { {{ ratingNum }} } } @else { } @if (optionControl.get('optionValue')?.touched && optionControl.get('optionValue')?.hasError('required')) {
@if (questionForm.get('inputType')?.value == ratingType) { {{ 'RATING_MAX_VALUE_IS_REQUIRED' | translate }} } @else { {{ 'OPTION_VALUE_IS_REQUIRED' | translate }} }
}
@if (questionForm.get('inputType')?.value !== ratingType) { }
} @if (options.length === 0) {

{{ "NO_OPTIONS_ADDED_YET" | translate }}

}
}