This commit is contained in:
amentis 2024-07-16 15:31:32 +03:00
parent 5bd1861cc7
commit cd9a76070a
1 changed files with 1 additions and 1 deletions

View File

@ -645,7 +645,7 @@ export class DescriptionEditorComponent extends BaseEditor<DescriptionEditorMode
this.item.descriptionTemplate = descriptionTemplate;
const sectionId = this.item.planDescriptionTemplate.sectionId;
this.item.planDescriptionTemplate = this.item.plan.planDescriptionTemplates.find(x => x.sectionId == sectionId && x.descriptionTemplateGroupId == descriptionTemplate.groupId);
this.item.planDescriptionTemplate = this.item.plan.planDescriptionTemplates.find(x => x.sectionId == sectionId && x.descriptionTemplateGroupId == descriptionTemplate.groupId && x.isActive === IsActive.Active);
this.formGroup.get('planDescriptionTemplateId').setValue(this.item.planDescriptionTemplate.id);
if (descriptionTemplate.definition) this.visibilityRulesService.setContext(this.item.descriptionTemplate.definition, this.formGroup.get('properties'));