diff --git a/dmp-frontend/src/app/ui/admin/description-template/editor/description-template-editor.model.ts b/dmp-frontend/src/app/ui/admin/description-template/editor/description-template-editor.model.ts index c6f83fb9d..9bd066fdb 100644 --- a/dmp-frontend/src/app/ui/admin/description-template/editor/description-template-editor.model.ts +++ b/dmp-frontend/src/app/ui/admin/description-template/editor/description-template-editor.model.ts @@ -340,7 +340,7 @@ export class DescriptionTemplatePageEditorModel implements DescriptionTemplatePa rootPath: string }): void { const { validationErrorModel, rootPath, formArray } = params; - + } static reapplyValidators(params: { @@ -1019,7 +1019,7 @@ export class DescriptionTemplateLabelDataEditorModel implements DescriptionTempl } export class DescriptionTemplateLabelAndMultiplicityDataEditorModel extends DescriptionTemplateLabelDataEditorModel implements DescriptionTemplateLabelAndMultiplicityDataPersist { - multipleSelect: boolean; + multipleSelect: boolean = false; protected formBuilder: UntypedFormBuilder = new UntypedFormBuilder(); constructor( @@ -1029,7 +1029,7 @@ export class DescriptionTemplateLabelAndMultiplicityDataEditorModel extends Desc fromModel(item: DescriptionTemplateLabelAndMultiplicityDataPersist): DescriptionTemplateLabelAndMultiplicityDataEditorModel { if (item) { super.fromModel(item); - this.multipleSelect = item.multipleSelect; + this.multipleSelect = item.multipleSelect ?? false; } return this; } @@ -1158,7 +1158,7 @@ export class DescriptionTemplateExternalDatasetDataEditorModel extends Descripti // // export class DescriptionTemplateExternalSelectDataEditorModel extends DescriptionTemplateLabelDataEditorModel implements DescriptionTemplateExternalSelectDataPersist { - multipleSelect: boolean; + multipleSelect: boolean = false; sources: DescriptionTemplateExternalSelectSourceEditorModel[] = []; protected formBuilder: UntypedFormBuilder = new UntypedFormBuilder(); @@ -1169,7 +1169,7 @@ export class DescriptionTemplateExternalSelectDataEditorModel extends Descriptio fromModel(item: DescriptionTemplateExternalSelectDataPersist): DescriptionTemplateExternalSelectDataEditorModel { if (item) { super.fromModel(item); - this.multipleSelect = item.multipleSelect; + this.multipleSelect = item.multipleSelect ?? false; if (item.sources) { item.sources.map(x => this.sources.push(new DescriptionTemplateExternalSelectSourceEditorModel(this.validationErrorModel).fromModel(x))); } } return this; @@ -1655,7 +1655,7 @@ export class DescriptionTemplateRadioBoxOptionEditorModel implements Description // export class DescriptionTemplateSelectDataEditorModel extends DescriptionTemplateLabelDataEditorModel implements DescriptionTemplateSelectDataPersist { options: DescriptionTemplateSelectOptionEditorModel[] = []; - multipleSelect: boolean; + multipleSelect: boolean = false; protected formBuilder: UntypedFormBuilder = new UntypedFormBuilder(); constructor( @@ -1665,7 +1665,7 @@ export class DescriptionTemplateSelectDataEditorModel extends DescriptionTemplat fromModel(item: DescriptionTemplateSelectDataPersist): DescriptionTemplateSelectDataEditorModel { if (item) { super.fromModel(item); - this.multipleSelect = item.multipleSelect; + this.multipleSelect = item.multipleSelect ?? false; if (item.options) { item.options.map(x => this.options.push(new DescriptionTemplateSelectOptionEditorModel(this.validationErrorModel).fromModel(x))); } } return this; @@ -1950,4 +1950,4 @@ export class DescriptionTemplateUploadOptionEditorModel implements DescriptionTe control?.addValidators(context.getValidation(keyField).validators); }) } -} \ No newline at end of file +} diff --git a/dmp-frontend/src/app/ui/dmp/dmp-editor-blueprint/dmp-editor.component.html b/dmp-frontend/src/app/ui/dmp/dmp-editor-blueprint/dmp-editor.component.html index 66c02efe5..c7cfb2414 100644 --- a/dmp-frontend/src/app/ui/dmp/dmp-editor-blueprint/dmp-editor.component.html +++ b/dmp-frontend/src/app/ui/dmp/dmp-editor-blueprint/dmp-editor.component.html @@ -139,7 +139,7 @@