From 20e93156bfa23e7d45bd44fe9454c44081cb88e9 Mon Sep 17 00:00:00 2001 From: Jonas Winkler Date: Fri, 30 Oct 2020 23:17:10 +0100 Subject: [PATCH] proper navigation when saving documents --- .../components/document-detail/document-detail.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src-ui/src/app/components/document-detail/document-detail.component.ts b/src-ui/src/app/components/document-detail/document-detail.component.ts index 6e0e51300..308e499a4 100644 --- a/src-ui/src/app/components/document-detail/document-detail.component.ts +++ b/src-ui/src/app/components/document-detail/document-detail.component.ts @@ -167,7 +167,11 @@ export class DocumentDetailComponent implements OnInit { close() { this.openDocumentService.closeDocument(this.document) - this.router.navigate(['documents']) + if (this.documentListViewService.viewConfig) { + this.router.navigate(['view', this.documentListViewService.viewConfig.id]) + } else { + this.router.navigate(['documents']) + } } delete() {