description editor fix

This commit is contained in:
Diamantis Tziotzios 2024-04-10 10:01:27 +03:00
parent 29e0d032ca
commit 6b75bcb06c
1 changed files with 4 additions and 0 deletions

View File

@ -43,6 +43,10 @@ export class DescriptionBaseFieldsEditorComponent extends BaseComponent {
}
private loadDescriptionTemplates(): void {
const dmpDescriptionTemplates: DmpDescriptionTemplate[] = this.description.dmp.dmpDescriptionTemplates.filter(x => x.sectionId == this.description.dmpDescriptionTemplate.sectionId && x.isActive == IsActive.Active);
const currentVersionsOfDescriptionTemplates = dmpDescriptionTemplates.map(x => x.currentDescriptionTemplate);
this.availableDescriptionTemplates.push(...currentVersionsOfDescriptionTemplates);
const isPreviousVersion: boolean = this.description.descriptionTemplate.versionStatus === DescriptionTemplateVersionStatus.Previous;
if (isPreviousVersion === true) {
if (this.description.status === DescriptionStatus.Draft) {