bug fixes

This commit is contained in:
amentis 2024-06-07 13:06:36 +03:00
parent f0e689df99
commit 98411e2b26
3 changed files with 3 additions and 3 deletions

View File

@ -77,7 +77,7 @@ export class DescriptionTemplatePreviewDialogComponent extends BaseComponent imp
buildForm() { buildForm() {
this.formGroup = this.editorModel.buildForm(null, true, this.visibilityRulesService); this.formGroup = this.editorModel.buildForm(null, true, this.visibilityRulesService);
this.previewPropertiesFormGroup = this.editorModel.properties.buildForm() as UntypedFormGroup; this.previewPropertiesFormGroup = this.editorModel.properties.buildForm({visibilityRulesService: this.visibilityRulesService}) as UntypedFormGroup;
this.visibilityRulesService.setContext(this.descriptionTemplate.definition, this.previewPropertiesFormGroup); this.visibilityRulesService.setContext(this.descriptionTemplate.definition, this.previewPropertiesFormGroup);
} }

View File

@ -197,7 +197,7 @@ export class DescriptionTemplateEditorCompositeFieldComponent extends BaseCompon
} }
const descriptionEditorModel = new DescriptionEditorModel().fromModel(mockDescription, mockDescription.descriptionTemplate); const descriptionEditorModel = new DescriptionEditorModel().fromModel(mockDescription, mockDescription.descriptionTemplate);
this.previewPropertiesFormGroup = descriptionEditorModel.properties.fieldSets.get(fieldSet.id).buildForm() as UntypedFormGroup; this.previewPropertiesFormGroup = descriptionEditorModel.properties.fieldSets.get(fieldSet.id).buildForm({visibilityRulesService: this.visibilityRulesService}) as UntypedFormGroup;
this.previewFieldSet = fieldSet; this.previewFieldSet = fieldSet;
this.visibilityRulesService.setContext(mockDescription.descriptionTemplate.definition, this.previewPropertiesFormGroup); this.visibilityRulesService.setContext(mockDescription.descriptionTemplate.definition, this.previewPropertiesFormGroup);

View File

@ -44,7 +44,7 @@ export class FinalPreviewComponent implements OnInit {
descriptionTemplate: this.descriptionTemplate descriptionTemplate: this.descriptionTemplate
} }
const descriptionEditorModel = new DescriptionEditorModel().fromModel(mockDescription, mockDescription.descriptionTemplate); const descriptionEditorModel = new DescriptionEditorModel().fromModel(mockDescription, mockDescription.descriptionTemplate);
this.previewPropertiesFormGroup = descriptionEditorModel.properties.buildForm() as UntypedFormGroup; this.previewPropertiesFormGroup = descriptionEditorModel.properties.buildForm({visibilityRulesService: this.visibilityRulesService}) as UntypedFormGroup;
this.visibilityRulesService.setContext(this.descriptionTemplate.definition, this.previewPropertiesFormGroup); this.visibilityRulesService.setContext(this.descriptionTemplate.definition, this.previewPropertiesFormGroup);
} }