From 76743539daad1d03d614ea8d22a22ba472b474fb Mon Sep 17 00:00:00 2001 From: amentis Date: Wed, 24 Apr 2024 16:33:58 +0300 Subject: [PATCH] description copy fix --- .../ui/description/editor/description-editor.component.html | 2 +- .../ui/description/editor/description-editor.component.ts | 5 ++++- .../app/ui/description/editor/description-editor.resolver.ts | 5 +++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dmp-frontend/src/app/ui/description/editor/description-editor.component.html b/dmp-frontend/src/app/ui/description/editor/description-editor.component.html index 841707064..7c59fea12 100644 --- a/dmp-frontend/src/app/ui/description/editor/description-editor.component.html +++ b/dmp-frontend/src/app/ui/description/editor/description-editor.component.html @@ -112,7 +112,7 @@ chevron_right
diff --git a/dmp-frontend/src/app/ui/description/editor/description-editor.component.ts b/dmp-frontend/src/app/ui/description/editor/description-editor.component.ts index cb0ed4eaa..e19f8740e 100644 --- a/dmp-frontend/src/app/ui/description/editor/description-editor.component.ts +++ b/dmp-frontend/src/app/ui/description/editor/description-editor.component.ts @@ -61,6 +61,7 @@ export class DescriptionEditorComponent extends BaseEditor this.breadcrumbService.addIdResolvedValue(x.id?.toString(), x.label)), takeUntil(this._destroyed), concatMap(dmp => { return this.descriptionService.getSingle(Guid.parse(id), DescriptionEditorResolver.cloneLookupFields()).pipe(tap(x => this.breadcrumbService.addIdResolvedValue(x.id?.toString(), x.label)), takeUntil(this._destroyed), map(description => { + description.id = null; + description.hash = null; + description.status = DescriptionStatus.Draft; description.dmp = dmp; description.dmpDescriptionTemplate = { + id: dmp.dmpDescriptionTemplates.filter(x => x.sectionId == Guid.parse(dmpSectionId) && x.descriptionTemplateGroupId == description.descriptionTemplate.groupId)[0].id, sectionId: Guid.parse(dmpSectionId) } return description;