diff --git a/dmp-frontend/src/app/library/export-method-dialog/export-method-dialog.component.html b/dmp-frontend/src/app/library/export-method-dialog/export-method-dialog.component.html index a307749c8..6e601516c 100644 --- a/dmp-frontend/src/app/library/export-method-dialog/export-method-dialog.component.html +++ b/dmp-frontend/src/app/library/export-method-dialog/export-method-dialog.component.html @@ -5,10 +5,14 @@
close
-
+
+
+
+
+
diff --git a/dmp-frontend/src/app/library/export-method-dialog/export-method-dialog.component.ts b/dmp-frontend/src/app/library/export-method-dialog/export-method-dialog.component.ts index 0fe216670..2658b3ba7 100644 --- a/dmp-frontend/src/app/library/export-method-dialog/export-method-dialog.component.ts +++ b/dmp-frontend/src/app/library/export-method-dialog/export-method-dialog.component.ts @@ -36,4 +36,8 @@ export class ExportMethodDialogComponent implements OnInit { downloadJson() { this.dialogRef.close("json"); } + + isFinalized() { + return this.data.isFinalized; + } } diff --git a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.html b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.html index 5102c1bac..bcc1191aa 100644 --- a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.html +++ b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.html @@ -24,6 +24,15 @@ save_alt{{ 'DMP-LISTING.ACTIONS.ADV-EXP' | translate }} + + + + diff --git a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts index c03ab2b37..ede704299 100644 --- a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts +++ b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts @@ -157,6 +157,25 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit { }); } + advancedClickedFinalized() { + const dialogRef = this.dialog.open(ExportMethodDialogComponent, { + maxWidth: '250px', + data: { + message: "Download as:", + documentButton: "Document", + pdfButton: "PDF", + isFinalized: true + } + }); + dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => { + if (result == "pdf") { + this.downloadPDF(this.dmp.id); + } else if (result == "doc") { + this.downloadDocx(this.dmp.id); + } + }); + } + onCallbackSuccess(): void { this.uiNotificationService.snackBarNotification(this.isNew ? this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-CREATION') : this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success); this.router.navigate(['/plans']);