Compare commits
2 Commits
035c50872b
...
ad09f63b64
Author | SHA1 | Date |
---|---|---|
Sofia Papacharalampous | ad09f63b64 | |
Sofia Papacharalampous | 9c00938640 |
|
@ -110,7 +110,6 @@ export interface DescriptionTemplateBaseFieldDataPersist {
|
|||
|
||||
export interface DescriptionTemplateReferenceTypeFieldPersist extends DescriptionTemplateLabelAndMultiplicityDataPersist {
|
||||
referenceTypeId: Guid;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface DescriptionTemplateExternalDatasetDataPersist extends DescriptionTemplateLabelAndMultiplicityDataPersist {
|
||||
|
|
|
@ -238,8 +238,7 @@ export class DescriptionTemplateEditorCompositeFieldComponent extends BaseCompon
|
|||
if (editorField.data.fieldType === DescriptionTemplateFieldType.REFERENCE_TYPES) {
|
||||
convertedField.data = editorField.data;
|
||||
(convertedField.data as DescriptionTemplateReferenceTypeData).referenceType = {
|
||||
id: (editorField.data as DescriptionTemplateReferenceTypeFieldPersist).referenceTypeId,
|
||||
name: (editorField.data as DescriptionTemplateReferenceTypeFieldPersist).name,
|
||||
id: (editorField.data as DescriptionTemplateReferenceTypeFieldPersist).referenceTypeId
|
||||
};
|
||||
} else {
|
||||
convertedField.data = editorField.data;
|
||||
|
|
|
@ -1246,7 +1246,6 @@ export class DescriptionTemplateExternalDatasetDataEditorModel extends Descripti
|
|||
//
|
||||
export class DescriptionTemplateReferenceTypeDataEditorModel extends DescriptionTemplateLabelAndMultiplicityDataEditorModel implements DescriptionTemplateReferenceTypeFieldPersist {
|
||||
referenceTypeId: Guid;
|
||||
name: string;
|
||||
protected formBuilder: UntypedFormBuilder = new UntypedFormBuilder();
|
||||
|
||||
constructor(
|
||||
|
@ -1256,7 +1255,6 @@ export class DescriptionTemplateReferenceTypeDataEditorModel extends Description
|
|||
fromModel(item: DescriptionTemplateReferenceTypeData): DescriptionTemplateReferenceTypeDataEditorModel {
|
||||
if (item) {
|
||||
super.fromModel(item);
|
||||
this.name = item.referenceType?.name;
|
||||
this.referenceTypeId = item.referenceType?.id;
|
||||
}
|
||||
return this;
|
||||
|
@ -1277,7 +1275,6 @@ export class DescriptionTemplateReferenceTypeDataEditorModel extends Description
|
|||
|
||||
const formGroup = super.buildForm({ context, disabled, rootPath });
|
||||
formGroup.setControl('referenceTypeId', new FormControl({ value: this.referenceTypeId, disabled: disabled }, context.getValidation('referenceTypeId').validators));
|
||||
formGroup.setControl('name', new FormControl({ value: this.name, disabled: disabled }));
|
||||
return formGroup;
|
||||
}
|
||||
|
||||
|
|
|
@ -75,6 +75,7 @@ export class DescriptionEditorResolver extends BaseEditorResolver {
|
|||
[nameof<Description>(x => x.properties), nameof<DescriptionPropertyDefinition>(x => x.fieldSets), nameof<DescriptionPropertyDefinitionFieldSet>(x => x.items), nameof<DescriptionPropertyDefinitionFieldSetItem>(x => x.fields), nameof<DescriptionField>(x => x.references), nameof<Reference>(x => x.id)].join('.'),
|
||||
[nameof<Description>(x => x.properties), nameof<DescriptionPropertyDefinition>(x => x.fieldSets), nameof<DescriptionPropertyDefinitionFieldSet>(x => x.items), nameof<DescriptionPropertyDefinitionFieldSetItem>(x => x.fields), nameof<DescriptionField>(x => x.references), nameof<Reference>(x => x.label)].join('.'),
|
||||
[nameof<Description>(x => x.properties), nameof<DescriptionPropertyDefinition>(x => x.fieldSets), nameof<DescriptionPropertyDefinitionFieldSet>(x => x.items), nameof<DescriptionPropertyDefinitionFieldSetItem>(x => x.fields), nameof<DescriptionField>(x => x.references), nameof<Reference>(x => x.type), nameof<ReferenceType>(x => x.id)].join('.'),
|
||||
[nameof<Description>(x => x.properties), nameof<DescriptionPropertyDefinition>(x => x.fieldSets), nameof<DescriptionPropertyDefinitionFieldSet>(x => x.items), nameof<DescriptionPropertyDefinitionFieldSetItem>(x => x.fields), nameof<DescriptionField>(x => x.references), nameof<Reference>(x => x.type), nameof<ReferenceType>(x => x.name)].join('.'),
|
||||
[nameof<Description>(x => x.properties), nameof<DescriptionPropertyDefinition>(x => x.fieldSets), nameof<DescriptionPropertyDefinitionFieldSet>(x => x.items), nameof<DescriptionPropertyDefinitionFieldSetItem>(x => x.fields), nameof<DescriptionField>(x => x.references), nameof<Reference>(x => x.reference)].join('.'),
|
||||
[nameof<Description>(x => x.properties), nameof<DescriptionPropertyDefinition>(x => x.fieldSets), nameof<DescriptionPropertyDefinitionFieldSet>(x => x.items), nameof<DescriptionPropertyDefinitionFieldSetItem>(x => x.fields), nameof<DescriptionField>(x => x.references), nameof<Reference>(x => x.isActive)].join('.'),
|
||||
[nameof<Description>(x => x.properties), nameof<DescriptionPropertyDefinition>(x => x.fieldSets), nameof<DescriptionPropertyDefinitionFieldSet>(x => x.items), nameof<DescriptionPropertyDefinitionFieldSetItem>(x => x.fields), nameof<DescriptionField>(x => x.tags), nameof<Tag>(x => x.id)].join('.'),
|
||||
|
|
Loading…
Reference in New Issue