description templates validation small changes
This commit is contained in:
parent
5802c2149d
commit
bc9691fa5d
|
@ -166,8 +166,9 @@
|
|||
</mat-optgroup>
|
||||
|
||||
</mat-select>
|
||||
<!-- <mat-error *ngIf="this.form.get('data').get('fieldType').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error> -->
|
||||
<mat-error>{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
<mat-error *ngIf="this.form.get('data').get('fieldType').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
<mat-error *ngIf="form.get('data').get('fieldType').hasError('backendError')">{{form.get('data').get('fieldType').getError('backendError').message}}</mat-error>
|
||||
<!-- <mat-error>{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error> -->
|
||||
<!-- <mat-error *ngIf="this.form.hasError('inputTypeNotValid')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error> -->
|
||||
|
||||
</mat-form-field>
|
||||
|
|
|
@ -172,10 +172,10 @@ export class DescriptionTemplateEditorComponent extends BaseEditor<DescriptionTe
|
|||
this.formGroup = this.editorModel.buildForm(null, this.isDeleted || !this.authService.hasPermission(AppPermission.EditDescriptionTemplate));
|
||||
//this.selectedSystemFields = this.selectedSystemFieldDisabled();
|
||||
this.descriptionTemplateEditorService.setValidationErrorModel(this.editorModel.validationErrorModel);
|
||||
DescriptionTemplateEditorModel.reApplyDefinitionValidators({
|
||||
formGroup: this.formGroup,
|
||||
validationErrorModel: this.editorModel.validationErrorModel
|
||||
});
|
||||
// DescriptionTemplateEditorModel.reApplyDefinitionValidators({
|
||||
// formGroup: this.formGroup,
|
||||
// validationErrorModel: this.editorModel.validationErrorModel
|
||||
// });
|
||||
if (this.editorModel.status == DescriptionTemplateStatus.Finalized || this.isDeleted) {
|
||||
this.formGroup.disable();
|
||||
}
|
||||
|
|
|
@ -872,18 +872,21 @@ export class DescriptionTemplateFieldEditorModel implements DescriptionTemplateF
|
|||
rootPath: `${rootPath}data.`,
|
||||
validationErrorModel: validationErrorModel
|
||||
});
|
||||
break;
|
||||
case DescriptionTemplateFieldType.RADIO_BOX:
|
||||
DescriptionTemplateRadioBoxDataEditorModel.reapplyRadioBoxValidators({
|
||||
formGroup: formGroup?.get('data') as UntypedFormGroup,
|
||||
rootPath: `${rootPath}data.`,
|
||||
validationErrorModel: validationErrorModel
|
||||
});
|
||||
break;
|
||||
case DescriptionTemplateFieldType.SELECT:
|
||||
DescriptionTemplateSelectDataEditorModel.reapplySelectValidators({
|
||||
formGroup: formGroup?.get('data') as UntypedFormGroup,
|
||||
rootPath: `${rootPath}data.`,
|
||||
validationErrorModel: validationErrorModel
|
||||
});
|
||||
break;
|
||||
case DescriptionTemplateFieldType.EXTERNAL_SELECT:
|
||||
DescriptionTemplateExternalSelectDataEditorModel.reapplyValidators({
|
||||
formGroup: formGroup?.get('data') as UntypedFormGroup,
|
||||
|
@ -896,6 +899,7 @@ export class DescriptionTemplateFieldEditorModel implements DescriptionTemplateF
|
|||
rootPath: `${rootPath}data.`,
|
||||
validationErrorModel: validationErrorModel
|
||||
});
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue